// 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>

#include <cuda.h>
#include <cuda_runtime.h>
#include <nvrtc.h>

#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_nvrtc_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_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_ptx_to(struct futhark_context_config *cfg,
                                        const char *path);
void futhark_context_config_load_ptx_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);
void futhark_context_free(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
                                              CUdeviceptr 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);
CUdeviceptr 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_cuda

#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>


#include <cuda.h>
#include <cuda_runtime.h>
#include <nvrtc.h>


// 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 mainziid_counter_mem_realtype_230075[1];
static int32_t mainziid_counter_mem_realtype_230123[1];
static int32_t mainzicounter_mem_realtype_230362[10240];
static int32_t mainzicounter_mem_realtype_230399[10240];
static int32_t mainzicounter_mem_realtype_230515[10240];
static int32_t mainzicounter_mem_realtype_230569[10240];
static int32_t mainzicounter_mem_realtype_230709[10240];
static int32_t mainzicounter_mem_realtype_230777[10240];
static int32_t mainzicounter_mem_realtype_230901[10240];
static int32_t mainziid_counter_mem_realtype_230913[1];
static int32_t mainzicounter_mem_realtype_230938[10240];
static int32_t mainziid_counter_mem_realtype_230950[1];
static int32_t mainzicounter_mem_realtype_230975[10240];
static int32_t mainziid_counter_mem_realtype_230987[1];
static int32_t mainzicounter_mem_realtype_231031[10240];
static int32_t mainzicounter_mem_realtype_231061[10240];
static int32_t mainzicounter_mem_realtype_231117[10240];
static int32_t mainzicounter_mem_realtype_231164[10240];
static int32_t mainzicounter_mem_realtype_231232[10240];
static int32_t mainzicounter_mem_realtype_231293[10240];
static int32_t mainzicounter_mem_realtype_231451[10240];
static int32_t mainzicounter_mem_realtype_231485[10240];
static int32_t mainzicounter_mem_realtype_231566[10240];
static int32_t mainzicounter_mem_realtype_231617[10240];
static int32_t mainzicounter_mem_realtype_231710[10240];
static int32_t mainzicounter_mem_realtype_231775[10240];
static int32_t mainziid_counter_mem_realtype_231997[1];
static int32_t mainzicounter_mem_realtype_232043[10240];
struct memblock_device {
    int *references;
    CUdeviceptr mem;
    int64_t size;
    const char *desc;
};
struct memblock {
    int *references;
    unsigned char *mem;
    int64_t size;
    const char *desc;
};
#include <cuda.h>
#include <nvrtc.h>
typedef CUdeviceptr 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 cuda.h.

#define CUDA_SUCCEED_FATAL(x) cuda_api_succeed_fatal(x, #x, __FILE__, __LINE__)
#define CUDA_SUCCEED_NONFATAL(x) cuda_api_succeed_nonfatal(x, #x, __FILE__, __LINE__)
#define NVRTC_SUCCEED_FATAL(x) nvrtc_api_succeed_fatal(x, #x, __FILE__, __LINE__)
#define NVRTC_SUCCEED_NONFATAL(x) nvrtc_api_succeed_nonfatal(x, #x, __FILE__, __LINE__)

#define SUCCEED_OR_RETURN(serror) {               \
    if (serror) {                                 \
      if (!ctx->error) {                          \
        ctx->error = serror;                      \
        return bad;                               \
      } else {                                    \
        free(serror);                             \
      }                                           \
    }                                             \
  }

#define CUDA_SUCCEED_OR_RETURN(e) SUCCEED_OR_RETURN(CUDA_SUCCEED_NONFATAL(e))

// CUDA_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;

static inline void cuda_api_succeed_fatal(CUresult res, const char *call,
    const char *file, int line) {
  if (res != CUDA_SUCCESS) {
    const char *err_str;
    cuGetErrorString(res, &err_str);
    if (err_str == NULL) { err_str = "Unknown"; }
    futhark_panic(-1, "%s:%d: CUDA call\n  %s\nfailed with error code %d (%s)\n",
        file, line, call, res, err_str);
  }
}

static char* cuda_api_succeed_nonfatal(CUresult res, const char *call,
    const char *file, int line) {
  if (res != CUDA_SUCCESS) {
    const char *err_str;
    cuGetErrorString(res, &err_str);
    if (err_str == NULL) { err_str = "Unknown"; }
    return msgprintf("%s:%d: CUDA call\n  %s\nfailed with error code %d (%s)\n",
        file, line, call, res, err_str);
  } else {
    return NULL;
  }
}

static inline void nvrtc_api_succeed_fatal(nvrtcResult res, const char *call,
                                           const char *file, int line) {
  if (res != NVRTC_SUCCESS) {
    const char *err_str = nvrtcGetErrorString(res);
    futhark_panic(-1, "%s:%d: NVRTC call\n  %s\nfailed with error code %d (%s)\n",
        file, line, call, res, err_str);
  }
}

static char* nvrtc_api_succeed_nonfatal(nvrtcResult res, const char *call,
                                        const char *file, int line) {
  if (res != NVRTC_SUCCESS) {
    const char *err_str = nvrtcGetErrorString(res);
    return msgprintf("%s:%d: NVRTC call\n  %s\nfailed with error code %d (%s)\n",
                     file, line, call, res, err_str);
  } else {
    return NULL;
  }
}

struct cuda_config {
  int debugging;
  int logging;
  const char *preferred_device;
  int preferred_device_num;

  const char *dump_program_to;
  const char *load_program_from;

  const char *dump_ptx_to;
  const char *load_ptx_from;

  size_t default_block_size;
  size_t default_grid_size;
  size_t default_tile_size;
  size_t default_reg_tile_size;
  size_t default_threshold;

  int default_block_size_changed;
  int default_grid_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 cuda_config_init(struct cuda_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->preferred_device_num = 0;
  cfg->preferred_device = "";
  cfg->dump_program_to = NULL;
  cfg->load_program_from = NULL;

  cfg->dump_ptx_to = NULL;
  cfg->load_ptx_from = NULL;

  cfg->default_block_size = 256;
  cfg->default_grid_size = 0; // Set properly later.
  cfg->default_tile_size = 32;
  cfg->default_reg_tile_size = 2;
  cfg->default_threshold = 32*1024;

  cfg->default_block_size_changed = 0;
  cfg->default_grid_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 {
  cudaEvent_t *events; // Points to two events.
  int *runs;
  int64_t *runtime;
};

struct cuda_context {
  CUdevice dev;
  CUcontext cu_ctx;
  CUmodule module;

  struct cuda_config cfg;

  struct free_list free_list;

  size_t max_block_size;
  size_t max_grid_size;
  size_t max_tile_size;
  size_t max_threshold;
  size_t max_shared_memory;
  size_t max_bespoke;

  size_t lockstep_width;

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

#define CU_DEV_ATTR(x) (CU_DEVICE_ATTRIBUTE_##x)
#define device_query(dev,attrib) _device_query(dev, CU_DEV_ATTR(attrib))
static int _device_query(CUdevice dev, CUdevice_attribute attrib) {
  int val;
  CUDA_SUCCEED_FATAL(cuDeviceGetAttribute(&val, attrib, dev));
  return val;
}

#define CU_FUN_ATTR(x) (CU_FUNC_ATTRIBUTE_##x)
#define function_query(fn,attrib) _function_query(dev, CU_FUN_ATTR(attrib))
static int _function_query(CUfunction dev, CUfunction_attribute attrib) {
  int val;
  CUDA_SUCCEED_FATAL(cuFuncGetAttribute(&val, attrib, dev));
  return val;
}

static void set_preferred_device(struct cuda_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;
}

static int cuda_device_setup(struct cuda_context *ctx) {
  char name[256];
  int count, chosen = -1, best_cc = -1;
  int cc_major_best, cc_minor_best;
  int cc_major, cc_minor;
  CUdevice dev;

  CUDA_SUCCEED_FATAL(cuDeviceGetCount(&count));
  if (count == 0) { return 1; }

  int num_device_matches = 0;

  // XXX: Current device selection policy is to choose the device with the
  // highest compute capability (if no preferred device is set).
  // This should maybe be changed, since greater compute capability is not
  // necessarily an indicator of better performance.
  for (int i = 0; i < count; i++) {
    CUDA_SUCCEED_FATAL(cuDeviceGet(&dev, i));

    cc_major = device_query(dev, COMPUTE_CAPABILITY_MAJOR);
    cc_minor = device_query(dev, COMPUTE_CAPABILITY_MINOR);

    CUDA_SUCCEED_FATAL(cuDeviceGetName(name, sizeof(name) - 1, dev));
    name[sizeof(name) - 1] = 0;

    if (ctx->cfg.debugging) {
      fprintf(stderr, "Device #%d: name=\"%s\", compute capability=%d.%d\n",
          i, name, cc_major, cc_minor);
    }

    if (device_query(dev, COMPUTE_MODE) == CU_COMPUTEMODE_PROHIBITED) {
      if (ctx->cfg.debugging) {
        fprintf(stderr, "Device #%d is compute-prohibited, ignoring\n", i);
      }
      continue;
    }

    if (best_cc == -1 || cc_major > cc_major_best ||
        (cc_major == cc_major_best && cc_minor > cc_minor_best)) {
      best_cc = i;
      cc_major_best = cc_major;
      cc_minor_best = cc_minor;
    }

    if (strstr(name, ctx->cfg.preferred_device) != NULL &&
        num_device_matches++ == ctx->cfg.preferred_device_num) {
      chosen = i;
      break;
    }
  }

  if (chosen == -1) { chosen = best_cc; }
  if (chosen == -1) { return 1; }

  if (ctx->cfg.debugging) {
    fprintf(stderr, "Using device #%d\n", chosen);
  }

  CUDA_SUCCEED_FATAL(cuDeviceGet(&ctx->dev, chosen));
  return 0;
}

static char *concat_fragments(const char *src_fragments[]) {
  size_t src_len = 0;
  const char **p;

  for (p = src_fragments; *p; p++) {
    src_len += strlen(*p);
  }

  char *src = (char*) malloc(src_len + 1);
  size_t n = 0;
  for (p = src_fragments; *p; p++) {
    strcpy(src + n, *p);
    n += strlen(*p);
  }

  return src;
}

static const char *cuda_nvrtc_get_arch(CUdevice dev) {
  struct {
    int major;
    int minor;
    const char *arch_str;
  } static const x[] = {
    { 3, 0, "compute_30" },
    { 3, 2, "compute_32" },
    { 3, 5, "compute_35" },
    { 3, 7, "compute_37" },
    { 5, 0, "compute_50" },
    { 5, 2, "compute_52" },
    { 5, 3, "compute_53" },
    { 6, 0, "compute_60" },
    { 6, 1, "compute_61" },
    { 6, 2, "compute_62" },
    { 7, 0, "compute_70" },
    { 7, 2, "compute_72" },
    { 7, 5, "compute_75" },
    { 8, 0, "compute_80" }
  };

  int major = device_query(dev, COMPUTE_CAPABILITY_MAJOR);
  int minor = device_query(dev, COMPUTE_CAPABILITY_MINOR);

  int chosen = -1;
  for (int i = 0; i < sizeof(x)/sizeof(x[0]); i++) {
    if (x[i].major < major || (x[i].major == major && x[i].minor <= minor)) {
      chosen = i;
    } else {
      break;
    }
  }

  if (chosen == -1) {
    futhark_panic(-1, "Unsupported compute capability %d.%d\n", major, minor);
  }

  if (x[chosen].major != major || x[chosen].minor != minor) {
    fprintf(stderr,
            "Warning: device compute capability is %d.%d, but newest supported by Futhark is %d.%d.\n",
            major, minor, x[chosen].major, x[chosen].minor);
  }

  return x[chosen].arch_str;
}

static char* cuda_nvrtc_build(struct cuda_context *ctx, const char *src,
                              const char *extra_opts[], char **ptx) {
  nvrtcProgram prog;
  char *problem = NULL;

  problem = NVRTC_SUCCEED_NONFATAL(nvrtcCreateProgram(&prog, src, "futhark-cuda", 0, NULL, NULL));

  if (problem) {
    return problem;
  }

  int arch_set = 0, num_extra_opts;

  // nvrtc cannot handle multiple -arch options.  Hence, if one of the
  // extra_opts is -arch, we have to be careful not to do our usual
  // automatic generation.
  for (num_extra_opts = 0; extra_opts[num_extra_opts] != NULL; num_extra_opts++) {
    if (strstr(extra_opts[num_extra_opts], "-arch")
        == extra_opts[num_extra_opts] ||
        strstr(extra_opts[num_extra_opts], "--gpu-architecture")
        == extra_opts[num_extra_opts]) {
      arch_set = 1;
    }
  }

  size_t n_opts, i = 0, i_dyn, n_opts_alloc = 20 + num_extra_opts + ctx->cfg.num_sizes;
  const char **opts = (const char**) malloc(n_opts_alloc * sizeof(const char *));
  if (!arch_set) {
    opts[i++] = "-arch";
    opts[i++] = cuda_nvrtc_get_arch(ctx->dev);
  }
  opts[i++] = "-default-device";
  if (ctx->cfg.debugging) {
    opts[i++] = "-G";
    opts[i++] = "-lineinfo";
  } else {
    opts[i++] = "--disable-warnings";
  }
  i_dyn = i;
  for (size_t j = 0; j < ctx->cfg.num_sizes; j++) {
    opts[i++] = msgprintf("-D%s=%zu", ctx->cfg.size_vars[j],
        ctx->cfg.size_values[j]);
  }
  opts[i++] = msgprintf("-DLOCKSTEP_WIDTH=%zu", ctx->lockstep_width);
  opts[i++] = msgprintf("-DMAX_THREADS_PER_BLOCK=%zu", ctx->max_block_size);

  // Time for the best lines of the code in the entire compiler.
  if (getenv("CUDA_HOME") != NULL) {
    opts[i++] = msgprintf("-I%s/include", getenv("CUDA_HOME"));
  }
  if (getenv("CUDA_ROOT") != NULL) {
    opts[i++] = msgprintf("-I%s/include", getenv("CUDA_ROOT"));
  }
  if (getenv("CUDA_PATH") != NULL) {
    opts[i++] = msgprintf("-I%s/include", getenv("CUDA_PATH"));
  }
  opts[i++] = msgprintf("-I/usr/local/cuda/include");
  opts[i++] = msgprintf("-I/usr/include");

  // It is crucial that the extra_opts are last, so that the free()
  // logic below does not cause problems.
  for (int j = 0; extra_opts[j] != NULL; j++) {
    opts[i++] = extra_opts[j];
  }

  n_opts = i;

  if (ctx->cfg.debugging) {
    fprintf(stderr, "NVRTC compile options:\n");
    for (size_t j = 0; j < n_opts; j++) {
      fprintf(stderr, "\t%s\n", opts[j]);
    }
    fprintf(stderr, "\n");
  }

  nvrtcResult res = nvrtcCompileProgram(prog, n_opts, opts);
  if (res != NVRTC_SUCCESS) {
    size_t log_size;
    if (nvrtcGetProgramLogSize(prog, &log_size) == NVRTC_SUCCESS) {
      char *log = (char*) malloc(log_size);
      if (nvrtcGetProgramLog(prog, log) == NVRTC_SUCCESS) {
        problem = msgprintf("NVRTC compilation failed.\n\n%s\n", log);
      } else {
        problem = msgprintf("Could not retrieve compilation log\n");
      }
      free(log);
    }
    return problem;
  }

  for (i = i_dyn; i < n_opts-num_extra_opts; i++) { free((char *)opts[i]); }
  free(opts);

  size_t ptx_size;
  NVRTC_SUCCEED_FATAL(nvrtcGetPTXSize(prog, &ptx_size));
  *ptx = (char*) malloc(ptx_size);
  NVRTC_SUCCEED_FATAL(nvrtcGetPTX(prog, *ptx));

  NVRTC_SUCCEED_FATAL(nvrtcDestroyProgram(&prog));

  return NULL;
}

static void cuda_size_setup(struct cuda_context *ctx)
{
  if (ctx->cfg.default_block_size > ctx->max_block_size) {
    if (ctx->cfg.default_block_size_changed) {
      fprintf(stderr,
          "Note: Device limits default block size to %zu (down from %zu).\n",
          ctx->max_block_size, ctx->cfg.default_block_size);
    }
    ctx->cfg.default_block_size = ctx->max_block_size;
  }
  if (ctx->cfg.default_grid_size > ctx->max_grid_size) {
    if (ctx->cfg.default_grid_size_changed) {
      fprintf(stderr,
          "Note: Device limits default grid size to %zu (down from %zu).\n",
          ctx->max_grid_size, ctx->cfg.default_grid_size);
    }
    ctx->cfg.default_grid_size = ctx->max_grid_size;
  }
  if (ctx->cfg.default_tile_size > ctx->max_tile_size) {
    if (ctx->cfg.default_tile_size_changed) {
      fprintf(stderr,
          "Note: Device limits default tile size to %zu (down from %zu).\n",
          ctx->max_tile_size, ctx->cfg.default_tile_size);
    }
    ctx->cfg.default_tile_size = ctx->max_tile_size;
  }

  if (!ctx->cfg.default_grid_size_changed) {
    ctx->cfg.default_grid_size =
      (device_query(ctx->dev, MULTIPROCESSOR_COUNT) *
       device_query(ctx->dev, MAX_THREADS_PER_MULTIPROCESSOR))
      / ctx->cfg.default_block_size;
  }

  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 = ctx->max_block_size;
      default_value = ctx->cfg.default_block_size;
    } else if (strstr(size_class, "num_groups") == size_class) {
      max_value = ctx->max_grid_size;
      default_value = ctx->cfg.default_grid_size;
      // 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 = ctx->max_tile_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 %zu (down from %zu)\n",
              size_name, max_value, *size_value);
      *size_value = max_value;
    }
  }
}

static char* cuda_module_setup(struct cuda_context *ctx,
                               const char *src_fragments[],
                               const char *extra_opts[]) {
  char *ptx = NULL, *src = NULL;

  if (ctx->cfg.load_program_from == NULL) {
    src = concat_fragments(src_fragments);
  } else {
    src = slurp_file(ctx->cfg.load_program_from, NULL);
  }

  if (ctx->cfg.load_ptx_from) {
    if (ctx->cfg.load_program_from != NULL) {
      fprintf(stderr,
              "WARNING: Using PTX from %s instead of C code from %s\n",
              ctx->cfg.load_ptx_from, ctx->cfg.load_program_from);
    }
    ptx = slurp_file(ctx->cfg.load_ptx_from, NULL);
  }

  if (ctx->cfg.dump_program_to != NULL) {
    dump_file(ctx->cfg.dump_program_to, src, strlen(src));
  }

  if (ptx == NULL) {
    char* problem = cuda_nvrtc_build(ctx, src, extra_opts, &ptx);
    if (problem != NULL) {
      free(src);
      return problem;
    }
  }

  if (ctx->cfg.dump_ptx_to != NULL) {
    dump_file(ctx->cfg.dump_ptx_to, ptx, strlen(ptx));
  }

  CUDA_SUCCEED_FATAL(cuModuleLoadData(&ctx->module, ptx));

  free(ptx);
  if (src != NULL) {
    free(src);
  }

  return NULL;
}

static char* cuda_setup(struct cuda_context *ctx, const char *src_fragments[], const char *extra_opts[]) {
  CUDA_SUCCEED_FATAL(cuInit(0));

  if (cuda_device_setup(ctx) != 0) {
    futhark_panic(-1, "No suitable CUDA device found.\n");
  }
  CUDA_SUCCEED_FATAL(cuCtxCreate(&ctx->cu_ctx, 0, ctx->dev));

  free_list_init(&ctx->free_list);

  ctx->max_shared_memory = device_query(ctx->dev, MAX_SHARED_MEMORY_PER_BLOCK);
  ctx->max_block_size = device_query(ctx->dev, MAX_THREADS_PER_BLOCK);
  ctx->max_grid_size = device_query(ctx->dev, MAX_GRID_DIM_X);
  ctx->max_tile_size = sqrt(ctx->max_block_size);
  ctx->max_threshold = 0;
  ctx->max_bespoke = 0;
  ctx->lockstep_width = device_query(ctx->dev, WARP_SIZE);

  cuda_size_setup(ctx);
  return cuda_module_setup(ctx, src_fragments, extra_opts);
}

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

    float ms;
    if ((err = cudaEventElapsedTime(&ms, record.events[0], record.events[1])) != cudaSuccess) {
      return err;
    }

    // CUDA provides milisecond resolution, but we want microseconds.
    *record.runs += 1;
    *record.runtime += ms*1000;

    if ((err = cudaEventDestroy(record.events[0])) != cudaSuccess) {
      return err;
    }
    if ((err = cudaEventDestroy(record.events[1])) != cudaSuccess) {
      return err;
    }

    free(record.events);
  }

  ctx->profiling_records_used = 0;

  return cudaSuccess;
}

// Returns pointer to two events.
static cudaEvent_t* cuda_get_events(struct cuda_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));
    }
    cudaEvent_t *events = calloc(2, sizeof(cudaEvent_t));
    cudaEventCreate(&events[0]);
    cudaEventCreate(&events[1]);
    ctx->profiling_records[ctx->profiling_records_used].events = events;
    ctx->profiling_records[ctx->profiling_records_used].runs = runs;
    ctx->profiling_records[ctx->profiling_records_used].runtime = runtime;
    ctx->profiling_records_used++;
    return events;
}

static CUresult cuda_free_all(struct cuda_context *ctx);

static void cuda_cleanup(struct cuda_context *ctx) {
  CUDA_SUCCEED_FATAL(cuda_free_all(ctx));
  (void)cuda_tally_profiling_records(ctx);
  free(ctx->profiling_records);
  CUDA_SUCCEED_FATAL(cuModuleUnload(ctx->module));
  CUDA_SUCCEED_FATAL(cuCtxDestroy(ctx->cu_ctx));
}

static CUresult cuda_alloc(struct cuda_context *ctx, size_t min_size,
                           const char *tag, CUdeviceptr *mem_out) {
  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) {
    if (size >= min_size) {
      return CUDA_SUCCESS;
    } else {
      CUresult res = cuMemFree(*mem_out);
      if (res != CUDA_SUCCESS) {
        return res;
      }
    }
  }

  CUresult res = cuMemAlloc(mem_out, min_size);
  while (res == CUDA_ERROR_OUT_OF_MEMORY) {
    CUdeviceptr mem;
    if (free_list_first(&ctx->free_list, &mem) == 0) {
      res = cuMemFree(mem);
      if (res != CUDA_SUCCESS) {
        return res;
      }
    } else {
      break;
    }
    res = cuMemAlloc(mem_out, min_size);
  }

  return res;
}

static CUresult cuda_free(struct cuda_context *ctx, CUdeviceptr mem,
                          const char *tag) {
  size_t size;
  CUdeviceptr 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) {
    CUresult res = cuMemFree(existing_mem);
    if (res != CUDA_SUCCESS) {
      return res;
    }
  }

  CUresult res = cuMemGetAddressRange(NULL, &size, mem);
  if (res == CUDA_SUCCESS) {
    free_list_insert(&ctx->free_list, size, mem, tag);
  }

  return res;
}

static CUresult cuda_free_all(struct cuda_context *ctx) {
  CUdeviceptr mem;
  free_list_pack(&ctx->free_list);
  while (free_list_first(&ctx->free_list, &mem) == 0) {
    CUresult res = cuMemFree(mem);
    if (res != CUDA_SUCCESS) {
      return res;
    }
  }

  return CUDA_SUCCESS;
}

// End of cuda.h.

const char *cuda_program[] =
           {"\n#define FUTHARK_CUDA\n#define FUTHARK_F64_ENABLED\n\ntypedef char int8_t;\ntypedef short int16_t;\ntypedef int int32_t;\ntypedef long long int64_t;\ntypedef unsigned char uint8_t;\ntypedef unsigned short uint16_t;\ntypedef unsigned int uint32_t;\ntypedef unsigned long long uint64_t;\ntypedef uint8_t uchar;\ntypedef uint16_t ushort;\ntypedef uint32_t uint;\ntypedef uint64_t ulong;\n#define __kernel extern \"C\" __global__ __launch_bounds__(MAX_THREADS_PER_BLOCK)\n#define __global\n#define __local\n#define __private\n#define __constant\n#define __write_only\n#define __read_only\n\nstatic inline int get_group_id_fn(int block_dim0, int block_dim1, int block_dim2, int d) {\n  switch (d) {\n    case 0: d = block_dim0; break;\n    case 1: d = block_dim1; break;\n    case 2: d = block_dim2; break;\n  }\n  switch (d) {\n    case 0: return blockIdx.x;\n    case 1: return blockIdx.y;\n    case 2: return blockIdx.z;\n    default: return 0;\n  }\n}\n#define get_group_id(d) get_group_id_fn(block_dim0, block_dim1, block_dim2, d)\n\nstatic inline int get_num_groups_fn(int block_dim0, int block_dim1, int block_dim2, int d) {\n  switch (d) {\n    case 0: d = block_dim0; break;\n    case 1: d = block_dim1; break;\n    case 2: d = block_dim2; break;\n  }\n  switch(d) {\n    case 0: return gridDim.x;\n    case 1: return gridDim.y;\n    case 2: return gridDim.z;\n    default: return 0;\n  }\n}\n#define get_num_groups(d) get_num_groups_fn(block_dim0, block_dim1, block_dim2, d)\n\nstatic inline int get_local_id(int d) {\n  switch (d) {\n    case 0: return threadIdx.x;\n    case 1: return threadIdx.y;\n    case 2: return threadIdx.z;\n    default: return 0;\n  }\n}\n\nstatic inline int get_local_size(int d) {\n  switch (d) {\n    case 0: return blockDim.x;\n    case 1: return blockDim.y;\n    case 2: return blockDim.z;\n    default: return 0;\n  }\n}\n\nstatic inline int get_global_id_fn(int block_dim0, int block_dim1, int block_dim2, int d) {\n  return get_group_id(d) * get_local_size(d) + get_local_id(d);\n}\n#define get_global_id(d) get_global_id_fn(block_dim0,",
            " block_dim1, block_dim2, d)\n\nstatic inline int get_global_size(int block_dim0, int block_dim1, int block_dim2, int d) {\n  return get_num_groups(d) * get_local_size(d);\n}\n\n#define CLK_LOCAL_MEM_FENCE 1\n#define CLK_GLOBAL_MEM_FENCE 2\nstatic inline void barrier(int x) {\n  __syncthreads();\n}\nstatic inline void mem_fence_local() {\n  __threadfence_block();\n}\nstatic inline void mem_fence_global() {\n  __threadfence();\n}\n\n#define NAN (0.0/0.0)\n#define INFINITY (1.0/0.0)\nextern volatile __shared__ unsigned char shared_mem[];\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 Software.\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, 0x00",
            "00, 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, 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  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, 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  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, 24, 24, 24, 24, 24, 24, 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, 0x36AA0000, 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, 0x3712000",
            "0, 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, 0x377A0000, 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, 0x379B800",
            "0, 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, 0x37CF8000,\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, 0x37EE000",
            "0, 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, 0x38110000, 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, 0x38204",
            "000, 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, 0x383A4000, 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, 0x38498",
            "000, 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, 0x38638000, 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, 0x3872C",
            "000, 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, 0x38066000, 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  0x380",
            "E0000, 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, 0x381B0000, 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, 0x382",
            "2A000, 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, 0x382FA000, 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, 0x383",
            "74000, 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, 0x38444000, 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, 0x384",
            "BE000,\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, 0x3858E000, 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, 0x3",
            "8608000, 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, 0x386D8000, 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, 0x3",
            "8752000, 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, 0x06000000, 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 functions\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\nstati",
            "c 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 inli",
            "ne 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(uint64_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  uint32_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\nsta",
            "tic 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(int",
            "8_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, uint32_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 fu",
            "trts_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 // Not 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  retur",
            "n 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__\nstatic 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 __OP",
            "ENCL_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, b",
            "ut 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 float 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 double 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 dou",
            "ble 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(doub",
            "le 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-precision 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 t",
            "hat 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 fptosi_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 fpow",
            "16(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_acosh16(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(f1",
            "6 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  return 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\nstat",
            "ic 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#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_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  return 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 atomi",
            "c_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 atomi",
            "c_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  return 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\nin",
            "line 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 int64_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_225897(int32_t num_elems_225894,\n                                                       float val_225895,\n                                                   ",
            "    __global\n                                                       unsigned char *mem_225893)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    int32_t replicate_gtid_225897;\n    int32_t replicate_ltid_225898;\n    int32_t replicate_gid_225899;\n    \n    replicate_gtid_225897 = get_global_id(0);\n    replicate_ltid_225898 = get_local_id(0);\n    replicate_gid_225899 = get_group_id(0);\n    \n    int64_t slice_225903 = num_elems_225894;\n    int64_t rep_i_225902 = sext_i32_i64(replicate_gtid_225897);\n    int64_t remnant_225904 = sext_i32_i64(replicate_gtid_225897) - rep_i_225902;\n    \n    if (slt64(replicate_gtid_225897, num_elems_225894)) {\n        ((__global float *) mem_225893)[rep_i_225902] = val_225895;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void builtinzhreplicate_i64zireplicate_225438(int32_t num_elems_225435,\n                                                       int64_t val_225436,\n                                                       __global\n                                                       unsigned char *mem_225434)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    int32_t replicate_gtid_225438;\n    int32_t replicate_ltid_225439;\n    int32_t replicate_gid_225440;\n    \n    replicate_gtid_225438 = get_global_id(0);\n    replicate_ltid_225439 = get_local_id(0);\n    replicate_gid_225440 = get_group_id(0);\n    \n    int64_t slice_225444 = num_elems_225435;\n    int64_t rep_i_225443 = sext_i32_i64(replicate_gtid_225438);\n    int64_t remnant_225445 = sext_i32_i64(replicate_gtid_225438) - rep_i_225443;\n    \n    if (slt64(replicate_gtid_225438, num_elems_225435)) {\n        ((__global int64_t *) mem_225434)[rep_i_225443] = val_225436;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void builtinzhreplicate_i8zireplicate_225333(int32_t num_elems_225330,\n                                                      int8_t val_225331,\n                                                    ",
            "  __global\n                                                      unsigned char *mem_225329)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    int32_t replicate_gtid_225333;\n    int32_t replicate_ltid_225334;\n    int32_t replicate_gid_225335;\n    \n    replicate_gtid_225333 = get_global_id(0);\n    replicate_ltid_225334 = get_local_id(0);\n    replicate_gid_225335 = get_group_id(0);\n    \n    int64_t slice_225339 = num_elems_225330;\n    int64_t rep_i_225338 = sext_i32_i64(replicate_gtid_225333);\n    int64_t remnant_225340 = sext_i32_i64(replicate_gtid_225333) - rep_i_225338;\n    \n    if (slt64(replicate_gtid_225333, num_elems_225330)) {\n        ((__global int8_t *) mem_225329)[rep_i_225338] = val_225331;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void gpu_map_transpose_f32(const int block_dim0, const int block_dim1,\n                                    const int block_dim2,\n                                    uint block_9_backing_offset_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    volatile unsigned char *block_9_backing_0 =\n                           &shared_mem[block_9_backing_offset_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(const int block_dim0, const\n                                               int block_dim1, const\n                                               int block_dim2,\n                                               uint block_9_backing_offset_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    volatile unsigned char *block_9_backing_0 =\n                           &shared_mem[block_9_backing_offset_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_loca",
            "l_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(const int block_dim0, const\n                                              int block_dim1, const\n                                              int block_dim2,\n                                              uint block_9_backing_offset_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    volatile unsigned char *block_9_backing_0 =\n                           &shared_mem[block_9_backing_offset_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_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 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(uint block_9_backing_offset_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    volatile unsigned char *block_9_backing_0 =\n                           &shared_mem[block_9_backing_offset_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_3",
            "7, 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(const int block_dim0, const int block_dim1,\n                                    const int block_dim2,\n                                    uint block_9_backing_offset_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    volatile unsigned char *block_9_backing_0 =\n                           &shared_mem[block_9_backing_offset_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_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(const int block_dim0, const\n                                               int block_dim1, const\n                                               int block_dim2,\n                                               uint block_9_backing_offset_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    volatile unsigned char *block_9_backing_0 =\n                           &shared_mem[block_9_backing_offset_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    in",
            "t32_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(const int block_dim0, const\n                                              int block_dim1, const\n                                              int block_dim2,\n                                              uint block_9_backing_offset_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    volatile unsigned char *block_9_backing_0 =\n                           &shared_mem[block_9_backing_offset_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(uint block_9_backing_offset_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    volatile unsigned char *block_9_backing_0 =\n                           &shared_mem[block_9_backing_offset_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    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_225456(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_225456;\n    int32_t copy_ltid_225457;\n    int32_t copy_gid_225458;\n    \n    copy_gtid_225456 = get_global_id(0);\n    copy_ltid_225457 = get_local_id(0);\n    copy_gid_225458 = get_group_id(0);\n    \n    int64_t slice_225462 = m_196691;\n    int64_t copy_i_225461 = sext_i32_i64(copy_gtid_225456);\n    int64_t remnant_225463 = sext_i32_i64(copy_gtid_225456) - copy_i_225461;\n    \n    if (s",
            "lt64(sext_i32_i64(copy_gtid_225456), m_196691)) {\n        int64_t tmp_225464;\n        \n        tmp_225464 = ((__global int64_t *) mem_222246)[i_196779 +\n                                                       copy_i_225461 *\n                                                       n_196692];\n        ((__global int64_t *) mem_222254)[copy_i_225461] = tmp_225464;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void mainzicopy_225657(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_225657;\n    int32_t copy_ltid_225658;\n    int32_t copy_gid_225659;\n    \n    copy_gtid_225657 = get_global_id(0);\n    copy_ltid_225658 = get_local_id(0);\n    copy_gid_225659 = get_group_id(0);\n    \n    int64_t slice_225664 = n_p_196694;\n    int64_t slice_225665 = m_196691 * slice_225664;\n    int64_t copy_i_225662 = squot64(sext_i32_i64(copy_gtid_225657),\n                                    slice_225664);\n    int64_t remnant_225666 = sext_i32_i64(copy_gtid_225657) - copy_i_225662 *\n            slice_225664;\n    int64_t copy_i_225663 = remnant_225666;\n    int64_t remnant_225667 = remnant_225666 - copy_i_225663;\n    \n    if (slt64(sext_i32_i64(copy_gtid_225657), m_196691 * n_p_196694)) {\n        int64_t tmp_225668;\n        \n        tmp_225668 = ((__global int64_t *) mem_222307)[i_196831 +\n                                                       (copy_i_225662 *\n                                                        (defunc_0_f_res_196740 *\n                                                         n_p_196694) +\n                                                        copy_i_225663 *\n                                                        defunc_0_f_res_196740)];\n        ((__global int64_t *)",
            " mem_222317)[copy_i_225662 * n_p_196694 +\n                                          copy_i_225663] = tmp_225668;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void mainzicopy_227694(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_227694;\n    int32_t copy_ltid_227695;\n    int32_t copy_gid_227696;\n    \n    copy_gtid_227694 = get_global_id(0);\n    copy_ltid_227695 = get_local_id(0);\n    copy_gid_227696 = get_group_id(0);\n    \n    int64_t slice_227701 = n_196692;\n    int64_t slice_227702 = m_196691 * slice_227701;\n    int64_t copy_i_227699 = squot64(sext_i32_i64(copy_gtid_227694),\n                                    slice_227701);\n    int64_t remnant_227703 = sext_i32_i64(copy_gtid_227694) - copy_i_227699 *\n            slice_227701;\n    int64_t copy_i_227700 = remnant_227703;\n    int64_t remnant_227704 = remnant_227703 - copy_i_227700;\n    \n    if (slt64(sext_i32_i64(copy_gtid_227694), m_196691 * n_196692)) {\n        float tmp_227705;\n        \n        tmp_227705 = ((__global\n                       float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                  (copy_i_227699 *\n                                                   ctx_param_ext_222546 +\n                                                   copy_i_227700 *\n                                                   ctx_param_ext_222548)];\n        ((__global float *) mem_223621)[copy_i_227700 * m_196691 +\n                                        copy_i_227699] = tmp_227705;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void mainzicopy_227893(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_227893;\n    int32_t copy_ltid_227894;\n    int32_t copy_gid_227895;\n    \n    copy_gtid_227893 = get_global_id(0);\n    copy_ltid_227894 = get_local_id(0);\n    copy_gid_227895 = get_group_id(0);\n    \n    int64_t slice_227900 = n_196692;\n    int64_t slice_227901 = m_196691 * slice_227900;\n    int64_t copy_i_227898 = squot64(sext_i32_i64(copy_gtid_227893),\n                                    slice_227900);\n    int64_t remnant_227902 = sext_i32_i64(copy_gtid_227893) - copy_i_227898 *\n            slice_227900;\n    int64_t copy_i_227899 = remnant_227902;\n    int64_t remnant_227903 = remnant_227902 - copy_i_227899;\n    \n    if (slt64(sext_i32_i64(copy_gtid_227893), m_196691 * n_196692)) {\n        float tmp_227904;\n        \n        tmp_227904 = ((__global\n                       float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                  (copy_i_227898 *\n                                                   ctx_param_ext_222546 +\n                                                   copy_i_227899 *\n                                                   ctx_param_ext_222548)];\n        ((__global float *) mem_223679)[copy_i_227899 * m_196691 +\n                                        copy_i_227898] = tmp_227904;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void mainzicopy_228143(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_228143;\n    int32_t copy_ltid_228144;\n    int32_t copy_gid_228145;\n    \n    copy_gtid_228143 = get_global_id(0);\n    copy_ltid_228144 = get_local_id(0);\n    copy_gid_228145 = get_group_id(0);\n    \n    int64_t slice_228150 = n_196692;\n    int64_t slice_228151 = m_196691 * slice_228150;\n    int64_t copy_i_228148 = squot64(sext_i32_i64(copy_gtid_228143),\n                                    slice_228150);\n    int64_t remnant_228152 = sext_i32_i64(copy_gtid_228143) - copy_i_228148 *\n            slice_228150;\n    int64_t copy_i_228149 = remnant_228152;\n    int64_t remnant_228153 = remnant_228152 - copy_i_228149;\n    \n    if (slt64(sext_i32_i64(copy_gtid_228143), m_196691 * n_196692)) {\n        float tmp_228154;\n        \n        tmp_228154 = ((__global\n                       float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                  (copy_i_228148 *\n                                                   ctx_param_ext_222546 +\n                                                   copy_i_228149 *\n                                                   ctx_param_ext_222548)];\n        ((__global float *) mem_223786)[copy_i_228149 * m_196691 +\n                                        copy_i_228148] = tmp_228154;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void mainzicopy_228521(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 i",
            "nt block_dim2 = 2;\n    int32_t copy_gtid_228521;\n    int32_t copy_ltid_228522;\n    int32_t copy_gid_228523;\n    \n    copy_gtid_228521 = get_global_id(0);\n    copy_ltid_228522 = get_local_id(0);\n    copy_gid_228523 = get_group_id(0);\n    \n    int64_t slice_228528 = n_196692;\n    int64_t slice_228529 = m_196691 * slice_228528;\n    int64_t copy_i_228526 = squot64(sext_i32_i64(copy_gtid_228521),\n                                    slice_228528);\n    int64_t remnant_228530 = sext_i32_i64(copy_gtid_228521) - copy_i_228526 *\n            slice_228528;\n    int64_t copy_i_228527 = remnant_228530;\n    int64_t remnant_228531 = remnant_228530 - copy_i_228527;\n    \n    if (slt64(sext_i32_i64(copy_gtid_228521), m_196691 * n_196692)) {\n        float tmp_228532;\n        \n        tmp_228532 = ((__global\n                       float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                  (copy_i_228526 *\n                                                   ctx_param_ext_222546 +\n                                                   copy_i_228527 *\n                                                   ctx_param_ext_222548)];\n        ((__global float *) mem_223999)[copy_i_228527 * m_196691 +\n                                        copy_i_228526] = tmp_228532;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void mainzicopy_228743(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_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_228743;\n    int32_t copy_ltid_228744;\n    int32_t copy_gid_228745;\n    \n    copy_gtid_228743 = get_global_id(0);\n    copy_ltid_228744 = get_local_id(0);\n    copy_gid",
            "_228745 = get_group_id(0);\n    \n    int64_t slice_228750 = n_196692;\n    int64_t slice_228751 = m_196691 * slice_228750;\n    int64_t copy_i_228748 = squot64(sext_i32_i64(copy_gtid_228743),\n                                    slice_228750);\n    int64_t remnant_228752 = sext_i32_i64(copy_gtid_228743) - copy_i_228748 *\n            slice_228750;\n    int64_t copy_i_228749 = remnant_228752;\n    int64_t remnant_228753 = remnant_228752 - copy_i_228749;\n    \n    if (slt64(sext_i32_i64(copy_gtid_228743), m_196691 * n_196692)) {\n        float tmp_228754;\n        \n        tmp_228754 = ((__global\n                       float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                  (copy_i_228748 *\n                                                   ctx_param_ext_222546 +\n                                                   copy_i_228749 *\n                                                   ctx_param_ext_222548)];\n        ((__global float *) mem_224122)[copy_i_228749 * m_196691 +\n                                        copy_i_228748] = tmp_228754;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void mainzicopy_229016(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_229016;\n    int32_t copy_ltid_229017;\n    int32_t copy_gid_229018;\n    \n    copy_gtid_229016 = get_global_id(0);\n    copy_ltid_229017 = get_local_id(0);\n    copy_gid_229018 = get_group_id(0);\n    \n    int64_t slice_229023 = n_196692;\n    int64_t slice_229024 = m_196691 * slice_229023;\n    int64_t copy_i_229021 = squot64(sext_i32_i64(copy_gtid_229016),\n                 ",
            "                   slice_229023);\n    int64_t remnant_229025 = sext_i32_i64(copy_gtid_229016) - copy_i_229021 *\n            slice_229023;\n    int64_t copy_i_229022 = remnant_229025;\n    int64_t remnant_229026 = remnant_229025 - copy_i_229022;\n    \n    if (slt64(sext_i32_i64(copy_gtid_229016), m_196691 * n_196692)) {\n        float tmp_229027;\n        \n        tmp_229027 = ((__global\n                       float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                  (copy_i_229021 *\n                                                   ctx_param_ext_222546 +\n                                                   copy_i_229022 *\n                                                   ctx_param_ext_222548)];\n        ((__global float *) mem_224294)[copy_i_229022 * m_196691 +\n                                        copy_i_229021] = tmp_229027;\n    }\n    \n  error_0:\n    return;\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_225446;\n    int32_t local_tid_225447;\n    int64_t group_sizze_225450;\n    int32_t wave_sizze_225449;\n    int32_t group_tid_225448;\n    \n    global_tid_225446 = get_global_id(0);\n    local_tid_225447 = get_local_id(0);\n    group_sizze_225450 = get_local_size(0);\n    wave_sizze_225449 = LOCKSTEP_WIDTH;\n    group_tid_225448 = get_group_id(0);\n    \n    int32_t phys_tid_200128 = global_tid_225446;\n    int64_t global_tid_225451 = sext_i32_i64(group_tid_225448) *\n            segmap_group_sizze_2",
            "00123 + sext_i32_i64(local_tid_225447);\n    int64_t slice_225452 = n_196692;\n    int64_t slice_225453 = m_196691 * slice_225452;\n    int64_t gtid_200126 = squot64(global_tid_225451, slice_225452);\n    int64_t remnant_225454 = global_tid_225451 - gtid_200126 * slice_225452;\n    int64_t gtid_200127 = remnant_225454;\n    int64_t remnant_225455 = remnant_225454 - 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                                  i",
            "nt64_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_225466;\n    int32_t local_tid_225467;\n    int64_t group_sizze_225470;\n    int32_t wave_sizze_225469;\n    int32_t group_tid_225468;\n    \n    global_tid_225466 = get_global_id(0);\n    local_tid_225467 = get_local_id(0);\n    group_sizze_225470 = get_local_size(0);\n    wave_sizze_225469 = LOCKSTEP_WIDTH;\n    group_tid_225468 = get_group_id(0);\n    \n    int32_t phys_tid_200253 = global_tid_225466;\n    int64_t global_tid_225471 = sext_i32_i64(group_tid_225468) *\n            segmap_group_sizze_200247 + sext_i32_i64(local_tid_225467);\n    int64_t slice_225472 = defunc_0_f_res_196740;\n    int64_t slice_225473 = n_p_196694 * slice_225472;\n    int64_t slice_225474 = m_196691 * slice_225473;\n    int64_t gtid_200250 = squot64(global_tid_225471, slice_225473);\n    int64_t remnant_225475 = global_tid_225471 - gtid_200250 * slice_225473;\n    int64_t gtid_200251 = squot64(remnant_225475, slice_225472);\n    int64_t remnant_225476 = remnant_225475 - gtid_200251 * slice_225472;\n    int64_t gtid_200252 = remnant_225476;\n    int64_t remnant_225477 = remnant_225476 - 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_225645;\n    int32_t local_tid_225646;\n    int64_t group_sizze_225649;\n    int32_t wave_sizze_225648;\n    int32_t group_tid_225647;\n    \n    global_tid_225645 = get_global_id(0);\n    local_tid_225646 = get_local_id(0);\n    group_sizze_225649 = get_local_size(0);\n    wave_sizze_225648 = LOCKSTEP_WIDTH;\n    group_tid_225647 = get_group_id(0);\n    \n    int32_t phys_tid_200688 = global_tid_225645;\n    int64_t global_tid_225650 = sext_i32_i64(group_tid_225647) *\n            segmap_group_sizze_200682 + sext_i32_i64(local_tid_225646);\n    int64_t slice_225651 = defunc_0_f_res_196740;\n    int64_t slice_225652 = n_p_196694 * slice_225651;\n    int64_t slice_225653 = m_196691 * slice_225652;\n    int64_t gtid_200685 = squot64(global_tid_225650, slice_225652);\n    int64_t remnant_225654 = global_tid_225650 - gtid_200685 * slice_225652;\n    int64_t gtid_200686 = squot64(remnant_225654, slice_225651);\n    int64_t remnant_225655 = remnant_225654 - gtid_200686 * slice_225651;\n    int64_t gtid_200687 = remnant_225655;\n    int64_t remnant_225656 = remnant_225655 - 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_2006",
            "89);\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_225730;\n    int32_t local_tid_225731;\n    int64_t group_sizze_225734;\n    int32_t wave_sizze_225733;\n    int32_t group_tid_225732;\n    \n    global_tid_225730 = get_global_id(0);\n    local_tid_225731 = get_local_id(0);\n    group_sizze_225734 = get_local_size(0);\n    wave_sizze_225733 = LOCKSTEP_WIDTH;\n    group_tid_225732 = get_group_id(0);\n    \n    int32_t phys_tid_201901 = global_tid_225730;\n    int64_t global_tid_225735 = sext_i32_i64(group_tid_225732) *\n            segmap_group_sizze_201895 + sext_i32_i64(local_tid_225731);\n    int64_t slice_225736 = defunc_0_f_res_196740;\n    int64_t slice_225737 = n_p_196694 * slice_225736;\n    int64_t slice_225738 = m_196691 * slice_225737;\n    int64_t gtid_201898 = squot64(global_tid_225735, slice_225737);\n    int64_t remnant_225739 = global_tid_225735 - gtid_201898 * slice_225737;\n    int64_t gtid_201899 = squot64(remnant_225739, slice_225736);\n    int64_t remnant_225740 = remnant_225739 - gtid_201899 * slice_225736;\n    int64_t gtid_201900 = remnant_225740;\n    int64_t remnant_225741 = remnant_225740 - 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_225742;\n    int32_t local_tid_225743;\n    int64_t group_sizze_225746;\n    int32_t wave_sizze_225745;\n    int32_t group_tid_225744;\n    \n    global_tid_225742 = get_global_id(0);\n    local_tid_225743 = get_local_id(0);\n    group_sizze_225746 = get_local_size(0);\n    wave_sizze_225745 = LOCKSTEP_WIDTH;\n    group_tid_225744 = get_group_id(0);\n    \n    int32_t phys_tid_201915 = global_tid_225742;\n    int64_t global_tid_225747 = sext_i32_i64(group_tid_225744) *\n            segmap_group_sizze_201907 + sext_i32_i64(local_tid_225743);\n    int64_t slice_225748 = n_p_196694;\n    int64_t slice_225749 = m_196691 * slic",
            "e_225748;\n    int64_t gtid_201913 = squot64(global_tid_225747, slice_225748);\n    int64_t remnant_225750 = global_tid_225747 - gtid_201913 * slice_225748;\n    int64_t gtid_201914 = remnant_225750;\n    int64_t remnant_225751 = remnant_225750 - 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_arg_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_225752;\n    int32_t local_tid_225753;\n    int64_t group_sizze_225756;\n    int32_t wave_sizze_225755;\n    int32_t group_tid_225754;\n    \n    global_tid_225752 = get_global_id(0);\n    local_tid_225753 = get_local_id(0);\n    group_sizze_225756 = get_local_size(0);\n    wave_sizze_225755 = LOCKSTEP_WIDTH;\n    group_tid_225754 = get_group_id(0);\n    \n    int32_t phys_tid_201939 = global_tid_225752;\n    int64_t global_tid_225757 = sext_i32_i64(group_tid_225754) *\n            segmap_group_sizze_201932 + sext_i32_i64(local_tid_225753);\n    int64_t slice_225758 = s_n_m_196745;\n    int64_t slice_225759 = n_p_196694 * slice_225758;\n    int64_t slice_225760 = m_196691 * slice_225759;\n    int64_t gtid_201936 = squot64(global_tid_225757, slice_225759);\n    int64_t remnant_225761 = global_tid_225757 - gt",
            "id_201936 * slice_225759;\n    int64_t gtid_201937 = squot64(remnant_225761, slice_225758);\n    int64_t remnant_225762 = remnant_225761 - gtid_201937 * slice_225758;\n    int64_t gtid_201938 = remnant_225762;\n    int64_t remnant_225763 = remnant_225762 - 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_225764 = loop_cond_201976;\n            int64_t low_tmp_225765 = loopres_201972;\n            int64_t high_tmp_225766 = loopres_201973;\n            \n            loop_while_201959 = loop_while_tmp_225764;\n            low_201960 = low_tmp_225765;\n            high_201961 = high_tmp_225766;\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            bool 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_res_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_225767 = loop_cond_202017;\n            int64_t l_idx_tmp_225768 = loopres_202004;\n            int64_t r_idx_tmp_225769 = loopres_202005;\n            int64_t span_tmp_225770 = loopres_202006;\n            \n            loop_while_201981 = loop_while_tmp_225767;\n            l_idx_201982 = l_idx_tmp_225768;\n            r_idx_201983 = r_idx_tmp_225769;\n            span_201984 = span_tmp_225770;\n        }\n        idx_201977 = loop_while_201981;\n        idx_201978 = l_idx_201982;\n        idx_20197",
            "9 = 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_res_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 = s",
            "itofp_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_196745 +\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_225797;\n    int32_t local_tid_225798;\n    int64_t group_sizze_225801;\n    int32_t wave_sizze_225800;\n    int32_t group_tid_225799;\n    \n    global_tid_225797 = get_global_id(0);\n    local_tid_225798 = get_local_id(0);\n    group_sizze_225801 = get_local_size(0);\n    wave_sizze_225800 = LOCKSTEP_WIDTH;\n    group_tid_225799 = get_group_id(0);\n    \n    int32_t phys_tid_202549 = global_tid_225797;\n    int64_t global_tid_225802 = sext_i32_i64(group_tid_225799) *\n            segmap_group_sizze_202544 + sext_i32_i64(local_tid_225798);\n    int64_t slice_225803 = n_196692;\n    int64_t slice_225804 = m_196691 * slice_225803;\n    int64_t gtid_202547 = squot64(global_tid_225802, slice_225803);\n    int64_t remnant_",
            "225805 = global_tid_225802 - gtid_202547 * slice_225803;\n    int64_t gtid_202548 = remnant_225805;\n    int64_t remnant_225806 = remnant_225805 - 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)[gtid_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_225807;\n    int32_t local_tid_225808;\n    int64_t group_sizze_225811;\n    int32_t wave_sizze_225810;\n    int32_t group_tid_225809;\n    \n    global_tid_225807 = get_global_id(0);\n    local_tid_225808 = get_local_id(0);\n    group_sizze_225811 = get_local_size(0);\n    wave_sizze_225810 = LOCKSTEP_WIDTH;\n    group_tid_225809 = get_group_id(0);\n    \n    int32_t phys_tid_202561 = global_tid_225807",
            ";\n    int64_t global_tid_225812 = sext_i32_i64(group_tid_225809) *\n            segmap_group_sizze_202554 + sext_i32_i64(local_tid_225808);\n    int64_t slice_225813 = m_196691;\n    int64_t gtid_202560 = global_tid_225812;\n    int64_t remnant_225814 = global_tid_225812 - 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_225815;\n    int32_t local_tid_225816;\n    int64_t group_sizze_225819;\n    int32_t wave_sizze_225818;\n    int32_t group_tid_225817;\n    \n    global_tid_225815 = get_global_id(0);\n    local_tid_225816 = get_local_id(0);\n    group_sizze_225819 = get_local_size(0);\n    wave_sizze_225818 = LOCKSTEP_WIDTH;\n    group_tid_225817 = get_group_id(0);\n    \n    int32_t phys_tid_202582 = global_tid_225815;\n    int64_t global_tid_225820 = sext_i32_i64(group_tid_225817) *\n            segmap_group_sizze_202576 + sext_i32_i64(local_tid_225816);\n    int64_t slice_225821 = l_n_m_196752;\n    int64_t slice_225822 = m_196691 * slice_225821;\n    int64_t gtid_202580 = squot64(global_tid_225820, slice_225821);\n    int64_t remnant_225823 = global_tid_225820 - gtid_202580 * slice_225821;\n    int64_t gtid_202581 = remnant_225823;\n    int64_t remnant_225824 = remnant_225823 - 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_202",
            "607 = 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_225825 = loop_cond_202613;\n            int64_t low_tmp_225826 = loopres_202609;\n            int64_t high_tmp_225827 = loopres_202610;\n            \n            loop_while_202596 = loop_while_tmp_225825;\n            low_202597 = low_tmp_225826;\n            high_202598 = high_tmp_225827;\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_202",
            "637, 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_202620;\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 = loop",
            "res_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_225828 = loop_cond_202654;\n            int64_t l_idx_tmp_225829 = loopres_202641;\n            int64_t r_idx_tmp_225830 = loopres_202642;\n            int64_t span_tmp_225831 = loopres_202643;\n            \n            loop_while_202618 = loop_while_tmp_225828;\n            l_idx_202619 = l_idx_tmp_225829;\n            r_idx_202620 = r_idx_tmp_225830;\n            span_202621 = span_tmp_225831;\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, ma",
            "x_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        retu",
            "rn;\n    \n    int32_t global_tid_225857;\n    int32_t local_tid_225858;\n    int64_t group_sizze_225861;\n    int32_t wave_sizze_225860;\n    int32_t group_tid_225859;\n    \n    global_tid_225857 = get_global_id(0);\n    local_tid_225858 = get_local_id(0);\n    group_sizze_225861 = get_local_size(0);\n    wave_sizze_225860 = LOCKSTEP_WIDTH;\n    group_tid_225859 = get_group_id(0);\n    \n    int32_t phys_tid_203175 = global_tid_225857;\n    int64_t global_tid_225862 = sext_i32_i64(group_tid_225859) *\n            segmap_group_sizze_203170 + sext_i32_i64(local_tid_225858);\n    int64_t slice_225863 = n_196692;\n    int64_t slice_225864 = m_196691 * slice_225863;\n    int64_t gtid_203173 = squot64(global_tid_225862, slice_225863);\n    int64_t remnant_225865 = global_tid_225862 - gtid_203173 * slice_225863;\n    int64_t gtid_203174 = remnant_225865;\n    int64_t remnant_225866 = remnant_225865 - 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_225867;\n    int32_t local_tid_225868;\n    int64_t group_sizze_225871;\n    int32_t wave_sizze_225870;\n    int32_t group_tid_225869;\n    \n    global_tid_225867 = get_global_id(0);\n    local_tid_225868 = get_local_id(0);\n    group_sizze_225871 = get_local_size(0);\n    wave_sizze_225870 = LOCKSTEP_WIDTH;\n    group_tid_225869 = get_group_id(0);\n    \n    int32_t phys_tid_203187 = global_tid_225867;\n    int64_t global_tid_225872 = sext_i32_i64(group_tid_225869) *\n            segmap_group_sizze_203180 + sext_i32_i64(local_tid_225868);\n    int64_t slice_225873 = m_196691;\n    int64_t gtid_203186 = global_tid_225872;\n    int64_t remnant_225874 = global_tid_225872 - 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_225875;\n    int32_t local_tid_225876;\n    int64_t group_sizze_225879;\n    int32_t wave_sizze_225878;\n    int32_t group_tid_225877;\n    \n    global_tid_225875 = get_global_id(0);\n    local_tid_225876 = get_local_id(0);\n    group_sizze_225879 = get_local_size(0);\n    wave_sizze_225878 = LOCKSTEP_WIDTH;\n    group_tid_225877 = get_group_id(0);\n    \n    int32_t phys_tid_203208 = global_tid_225875;\n    int64_t global_tid_225880 = sext_i32_i64(group_tid_225877) *\n            segmap_group_sizze_203202 + sext_i32_i64(local_tid_225876);\n    int64_t slice_225881 = t_n_m_19",
            "6759;\n    int64_t slice_225882 = m_196691 * slice_225881;\n    int64_t gtid_203206 = squot64(global_tid_225880, slice_225881);\n    int64_t remnant_225883 = global_tid_225880 - gtid_203206 * slice_225881;\n    int64_t gtid_203207 = remnant_225883;\n    int64_t remnant_225884 = remnant_225883 - 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            if (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_225885 = loop_cond_203239;\n            int64_t low_tmp_225886 = loopres_203235;\n            int64_t high_tmp_225887 = loopres_203236;\n            \n            loop_while_203222 = loop_while_tmp_225885;\n            low_203223 = low_tmp_225886;\n            high_203224 = high_tmp_225887;\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 i",
            "dx_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_225888 = loop_cond_203280;\n            int64_t l_idx_tmp_225889 = loopres_203267;\n            int64_t r_idx_tmp_225890 = loopres_203268;\n            int64_t span_tmp_225891 = loopres_203269;\n            \n            loop_while_203244 = loop_while_tmp_225888;\n            l_idx_203245 = l_idx_tmp_225889;\n            r_idx_203246 = r_idx_tmp_225890;\n            span_203247 = span_tmp_225891;\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 inde",
            "x_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 = sub64(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_20",
            "3207] = 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_225932;\n    int32_t local_tid_225933;\n    int64_t group_sizze_225936;\n    int32_t wave_sizze_225935;\n    int32_t group_tid_225934;\n    \n    global_tid_225932 = get_global_id(0);\n    local_tid_225933 = get_local_id(0);\n    group_sizze_225936 = get_local_size(0);\n    wave_sizze_225935 = LOCKSTEP_WIDTH;\n    group_tid_225934 = get_group_id(0);\n    \n    int32_t phys_tid_203350 = global_tid_225932;\n    int64_t global_tid_225937 = sext_i32_i64(group_tid_225934) *\n            segmap_group_sizze_203345 + sext_i32_i64(local_tid_225933);\n    int64_t slice_225938 = n_196692;\n    int64_t slice_225939 = m_196691 * slice_225938;\n    int64_t gtid_203348 = squot64(global_tid_225937, slice_225938);\n    int64_t remnant_225940 = global_tid_225937 - gtid_203348 * slice_225938;\n    int64_t gtid_203349 = remnant_225940;\n    int64_t remnant_225941 = remnant_225940 - 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_225942;\n    int32_t local_tid_225943;\n    int64_t group_sizze_225946;\n    int32_t wave_sizze_225945;\n    int32_t group_tid_225944;\n    \n    global_tid_225942 = get_global_id(0);\n    local_tid_225943",
            " = get_local_id(0);\n    group_sizze_225946 = get_local_size(0);\n    wave_sizze_225945 = LOCKSTEP_WIDTH;\n    group_tid_225944 = get_group_id(0);\n    \n    int32_t phys_tid_203495 = global_tid_225942;\n    int64_t global_tid_225947 = sext_i32_i64(group_tid_225944) *\n            segmap_group_sizze_203488 + sext_i32_i64(local_tid_225943);\n    int64_t slice_225948 = defunc_0_f_res_196740;\n    int64_t slice_225949 = n_p_196694 * slice_225948;\n    int64_t slice_225950 = m_196691 * slice_225949;\n    int64_t gtid_203492 = squot64(global_tid_225947, slice_225949);\n    int64_t remnant_225951 = global_tid_225947 - gtid_203492 * slice_225949;\n    int64_t gtid_203493 = squot64(remnant_225951, slice_225948);\n    int64_t remnant_225952 = remnant_225951 - gtid_203493 * slice_225948;\n    int64_t gtid_203494 = remnant_225952;\n    int64_t remnant_225953 = remnant_225952 - 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, 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_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_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_203625 = global_tid_225958;\n    int32_t phys_group_id_225963;\n    \n    phys_group_id_225963 = get_group_id(0);\n    for (int32_t i_225964 = 0; i_225964 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          segmap_group_sizze_203620)) -\n                   phys_group_id_225963, sext_i64_i32(num_groups_203621));\n         i_225964++) {\n        int32_t virt_group_id_225965 = phys_group_id_225963 + i_225964 *\n                sext_i64_i32(num_groups_203621);\n        int64_t global_tid_225966 = sext_i32_i64(virt_group_id_225965) *\n                segmap_group_sizze_203620 + sext_i32_i64(local_tid_225959);\n        int64_t slice_225967 = m_196691;\n        int64_t gtid_203624 = global_tid_225966;\n        int64_t remnant_225968 = global_tid_225966 - 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_22",
            "1545;\n                        float redout_tmp_225971 = defunc_1_op_res_203656;\n                        \n                        redout_221545 = redout_tmp_225971;\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_196745, (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_225972 = defunc_1_op_res_203689;\n                        \n                        redout_221547 = redout_tmp_225972;\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_225973 = 0; i_225973 < n_p_196694; i_225973++) {\n                for (int64_t i_225974 = 0; i_225974 < s_n_m_196745;\n                     i_225974++) {\n                    float tm",
            "p_225975;\n                    \n                    tmp_225975 = ((__global\n                                   float *) color_225033)[phys_tid_203625 +\n                                                          (i_225973 *\n                                                           (num_threads_225153 *\n                                                            s_n_m_196745) +\n                                                           i_225974 *\n                                                           num_threads_225153)];\n                    ((__global float *) mem_222665)[gtid_203624 + (i_225973 *\n                                                                   (m_196691 *\n                                                                    s_n_m_196745) +\n                                                                   i_225974 *\n                                                                   m_196691)] =\n                        tmp_225975;\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_225976;\n    int32_t local_tid_225977;\n    int64_t group_sizze_225980;\n    int32_t wave_sizze_225979;\n    int32_t group_tid_225978;\n    \n    global_tid_225976 = get_global_id(0);\n    local_tid_225977 = get_local_id(0);\n    group_sizze_225980 = get_local_size(0);\n    wave_sizze_225979 = LOCKSTEP_WIDTH;\n    group_tid_225978 = get_group_id(0);\n    \n    int32_t phys_tid_204765 = global_tid_225976;\n    int32_t phys_group_id_225981;\n    \n    phys_group_id_225981 = get_group_id(0);\n    for (int32_t i_225982 = 0; i_225982 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * n_p_196694,\n                                          segmap_group_sizze_204744)) -\n                   phys_group_id_225981, sext_i64_i32(num_groups_204745));\n         i_225982++) {\n        int32_t virt_group_id_225983 = phys_group_id_225981 + i_225982 *\n                sext_i64_i32(num_groups_204745);\n        int64_t global_tid_225984 = sext_i32_i64(virt_group_id_225983) *\n                segmap_group_sizze_204744 + sext_i32_i64(local_tid_225977);\n        int64_t slice_225985 = n_p_196694;\n        int64_t slice_225986 = m_196691 * slice_225985;\n        int64_t gtid_204763 = squot64(global_tid_225984, slice_225985);\n        int64_t remnant_225987 = global_tid_225984 - gtid_204763 * slice_225985;\n        int64_t gtid_204764 = remnant_225987;\n        int64_t remnant_225988 = remnant_225987 - 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                        int",
            "64_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 tmp",
            "3_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_225990 = defunc_1_op_res_204789;\n                    \n                    redout_221553 = redout_tmp_225990;\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 redout_tmp_225991 = defunc_1_op_res_204822;\n                    \n                    redout_221555 = redout_tmp_225991;\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_225992 = 0; i_225992 < s_n_m_196745; i_225992++) {\n                float tmp_225993;\n                \n                tmp_225993 = ((__global float *) color_225034)[phys_tid_204765 +\n                                                               i_225992 *\n                                                               num_threads_225155];\n                ((__global float *) mem_222705)[gtid_204763 * n_p_196694 +\n                                                gtid_204764 + i_225992 *\n                                                (n_p_196694 * m_196691)] =\n                    tmp_225993;\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 j",
            "ump_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_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_226050;\n    int32_t local_tid_226051;\n    int64_t group_sizze_226054;\n    int32_t wave_sizze_226053;\n    int32_t group_tid_226052;\n    \n    global_tid_226050 = get_global_id(0);\n    local_tid_226051 = get_local_id(0);\n    group_sizze_226054 = get_local_size(0);\n    wave_sizze_226053 = LOCKSTEP_WIDTH;\n    group_tid_226052 = get_group_id(0);\n    \n    int32_t phys_tid_204973 = global_tid_226050;\n    int64_t global_tid_226055 = sext_i32_i64(group_tid_226052) *\n            segmap_group_sizze_204962 + sext_i32_i64(local_tid_226051);\n    int64_t slice_226056 = s_n_m_196745;\n    int64_t slice_226057 = n_p_196694 * slice_226056;\n    int64_t slice_226058 = m_196691 * slice_226057;\n    int64_t gtid_204970 = squot64(global_tid_226055, slice_226057);\n    int64_t remnant_226059 = global_tid_226055 - gtid_204970 * slice_226057;\n    int64_t gtid_204971 = squot64(remnant_226059, slice_226056);\n    int64_t remnant_226060 = remnant_226059 - gtid_204971 * slice_226056;\n    int64_t gtid_204972 = remnant_226060;\n    int64_t remnant_226061 = remnant_226060",
            " - 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_2",
            "04986;\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        float 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_2",
            "04996) {\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_226062 = defunc_1_op_res_204994;\n            \n            redout_221569 = redout_tmp_226062;\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 de",
            "func_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_226063 = defunc_1_op_res_205027;\n            \n            redout_221571 = redout_tmp_226063;\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_226064;\n    int32_t local_tid_226065;\n    int64_t group_sizze_226068;\n    int32_t wave_sizze_226067;\n    int32_t group_tid_226066;\n    \n    global_tid_226064 = get_global_id(0);\n    local_tid_226065 = get_local_id(0);\n    group_sizze_226068 = get_local_size(0);\n    wave_sizze_226067 = LOCKSTEP_WIDTH;\n    group_tid_226066 = get_group_id(0);\n    \n    int32_t phys_tid_205062 = global_tid_226064;\n    int64_t global_tid_226069 = sext_i32_i64(group_tid_226066) *\n            segmap_group_sizze_205055 + sext_i32_i64(local_tid_226065);\n    int64_t slice_226070 = s_n_m_196745;\n    int64_t slice_226071 = n_p_196694 * slice_226070;\n    int64_t slice_226072 = m_196691 * slice_226071;\n    int64_t gtid_205059 = squot64(global_tid_226069, slice_226071);\n    int64_t remnant_226073 = global_tid_226069 - gtid_205059 * slice_226071;\n    int64_t gtid_205060 = squot64(remnant_226073, slice_226070);\n    int64_t remnant_226074 = remnant_226073 - gtid_205060 * slice_226070;\n    int64_t gtid_205061 = remnant_226074;\n    int64_t remnant_226075 = remnant_226074 - 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_226152;\n    int32_t local_tid_226153;\n    int64_t group_sizze_226156;\n    int32_t wave_sizze_226155;\n    int32_t group_tid_226154;\n    \n    global_tid_226152 = get_global_id(0);\n    local_tid_226153 = get_local_id(0);\n    group_sizze_226156 = get_local_size(0);\n    wave_sizze_226155 = LOCKSTEP_WIDTH;\n    group_tid_226154 = get_group_id(0);\n    \n    int32_t phys_tid_205134 = global_tid_226152;\n    int64_t global_tid_226157 = sext_i32_i64(group_tid_226154) *\n            segmap_group_sizze_205127 + sext_i32_i64(local_tid_226153);\n    int64_t slice_226158 = s_n_m_196745;\n    int64_t slice_226159 = n_p_196694 * slice_226158;\n    int64_t slice_226160 = m_196691 * slice_226159;\n    int64_t gtid_205131 = squot64(global_tid_226157, slice_226159);\n    int64_t remnant_226161 = global_tid_226157 - gtid_205131 * slice_226159;\n    int64_t gtid_205132 = squot64(remnant_226161, slice_226158);\n    int64_t remnant_226162 = remnant_226161 - gtid_205132 * slice_226158;\n    int64_t gtid_205133 = remnant_226162;\n    int64_t remnant_226163 = remnant_226162 - 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 (cond_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_20",
            "5139;\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_226248;\n    int32_t local_tid_226249;\n    int64_t group_sizze_226252;\n    int32_t wave_sizze_226251;\n    int32_t group_tid_226250;\n    \n    global_tid_226248 = get_global_id(0);\n    local_tid_226249 = get_local_id(0);\n    group_sizze_226252 = get_local_size(0);\n    wave_sizze_226251 = LOCKSTEP_WIDTH;\n    group_tid_226250 = get_group_id(0);\n    \n    int32_t phys_tid_205348 = global_tid_226248;\n    int32_t phys_group_id_226253;\n    \n    phys_group_",
            "id_226253 = get_group_id(0);\n    for (int32_t i_226254 = 0; i_226254 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          segmap_group_sizze_205342)) -\n                   phys_group_id_226253, sext_i64_i32(num_groups_205343));\n         i_226254++) {\n        int32_t virt_group_id_226255 = phys_group_id_226253 + i_226254 *\n                sext_i64_i32(num_groups_205343);\n        int64_t global_tid_226256 = sext_i32_i64(virt_group_id_226255) *\n                segmap_group_sizze_205342 + sext_i32_i64(local_tid_226249);\n        int64_t slice_226257 = m_196691;\n        int64_t gtid_205347 = global_tid_226256;\n        int64_t remnant_226258 = global_tid_226256 - 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_205370 = 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_redu",
            "ce_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_226263 = defunc_1_op_res_205383;\n                        float redout_tmp_226264 = defunc_1_op_res_205386;\n                        float redout_tmp_226265 = defunc_1_op_res_205389;\n                        \n                        redout_221587 = redout_tmp_226263;\n                        redout_221588 = redout_tmp_226264;\n                        redout_221589 = redout_tmp_226265;\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                            defun",
            "c_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_226266 = defunc_1_op_res_205432;\n                        float redout_tmp_226267 = defunc_1_op_res_205435;\n                        \n                        redout_221591 = redout_tmp_226266;\n                        redout_221592 = redout_tmp_226267;\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_t",
            "hreads_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_226268 = 0; i_226268 < n_p_196694; i_226268++) {\n                for (int64_t i_226269 = 0; i_226269 < s_n_m_196745;\n                     i_226269++) {\n                    float tmp_226270;\n                    \n                    tmp_226270 = ((__global\n                                   float *) color_225040)[phys_tid_205348 +\n                                                          (i_226268 *\n                                                           (num_threads_225163 *\n                                                            s_n_m_196745) +\n                                                           i_226269 *\n                                                           num_threads_225163)];\n                    ((__global float *) mem_222903)[gtid_205347 + (i_226268 *\n                                                                   (m_196691 *\n                                                                    s_n_m_196745) +\n                                                                   i_226269 *\n                                                                   m_196691)] =\n                        tmp_226270;\n                }\n            ",
            "}\n            for (int64_t i_226271 = 0; i_226271 < n_p_196694; i_226271++) {\n                for (int64_t i_226272 = 0; i_226272 < s_n_m_196745;\n                     i_226272++) {\n                    float tmp_226273;\n                    \n                    tmp_226273 = ((__global\n                                   float *) color_225039)[phys_tid_205348 +\n                                                          (i_226271 *\n                                                           (num_threads_225163 *\n                                                            s_n_m_196745) +\n                                                           i_226272 *\n                                                           num_threads_225163)];\n                    ((__global float *) mem_222907)[gtid_205347 + (i_226271 *\n                                                                   (m_196691 *\n                                                                    s_n_m_196745) +\n                                                                   i_226272 *\n                                                                   m_196691)] =\n                        tmp_226273;\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_206779 (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_226274;\n    int32_t local_tid_226275;\n    int64_t group_sizze_226278;\n    int32_t wave_sizze_226277;\n    int32_t group_tid_226276;\n    \n    global_tid_226274 = get_global_id(0);\n    local_tid_226275 = get_local_id(0);\n    group_sizze_226278 = get_local_size(0);\n    wave_sizze_226277 = LOCKSTEP_WIDTH;\n    group_tid_226276 = get_group_id(0);\n    \n    int32_t phys_tid_206802 = global_tid_226274;\n    int32_t phys_group_id_226279;\n    \n    phys_group_id_226279 = get_group_id(0);\n    for (int32_t i_226280 = 0; i_226280 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * n_p_196694,\n                                          segmap_group_sizze_206779)) -\n                   phys_group_id_226279, sext_i64_i32(num_groups_206780));\n         i_226280++) {\n        int32_t virt_group_id_226281 = phys_group_id_226279 + i_226280 *\n                sext_i64_i32(num_groups_206780);\n        int64_t global_tid_226282 = sext_i32_i64(virt_group_id_226281) *\n                segmap_group_sizze_206779 + sext_i32_i64(local_tid_226275);\n        int64_t slice_226283 = n_p_196694;\n        int64_t slice_226284 = m_196691 * slice_226283;\n        int64_t gtid_206800 = squot64(global_tid_2",
            "26282, slice_226283);\n        int64_t remnant_226285 = global_tid_226282 - gtid_206800 * slice_226283;\n        int64_t gtid_206801 = remnant_226285;\n        int64_t remnant_226286 = remnant_226285 - 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_222039 < 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                    bo",
            "ol 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_226289 = defunc_1_op_res_206829;\n                    float redout_tmp_226290 = defunc_1_op_res_206832;\n                    float redout_tmp_226291 = defunc_1_op_res_206835;\n                    \n                    redout_221598 = redout_tmp_226289;\n                    redout_221599 = redout_tmp_226290;\n                    redout_221600 = redout_tmp_226291;\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_2068",
            "59 = 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, (int64_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_22160",
            "3 = 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_196",
            "694 *\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_226292 = defunc_1_op_res_206878;\n                    float redout_tmp_226293 = defunc_1_op_res_206881;\n                    \n                    redout_221602 = redout_tmp_226292;\n                    redout_221603 = redout_tmp_226293;\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_226294 = 0; i_226294 < s_n_m_196745; i_226294++) {\n                float tmp_226295;\n                \n                tmp_226295 = ((__global float *) color_225042)[phys_tid_206802 +\n                                                               i_226294 *\n                                                               num_threads_225166];\n                ((__global float *) mem_222962)[gtid_206800 * n_p_196694 +\n                                                gtid_206801 + i_226294 *\n                                                (n_p_196694 * m_196691)] =\n                    tmp_226295;\n            }\n            for (int64_t i_226296 = 0; i_226296 < s_n_m_196745; i_226296++) {\n                float tmp_226297;\n                \n                tmp_226297 = ((__global float *) color_225041)[phys_tid_206802 +\n                                                               i_226296 *\n                                                               num_threads_225166];\n                ((__global float *) mem_222966)[gtid_206800 * n_p_196694 +\n                                                gtid_206801 + i_226296 *\n                                                (n_p_196694 * m_196691)] =\n                    tmp_226297;\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 int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226380;\n    int32_t local_tid_226381;\n    int64_t group_sizze_226384;\n    int32_t wave_sizze_226383;\n    int32_t group_tid_226382;\n    \n    global_tid_226380 = get_global_id(0);\n    local_tid_226381 = get_local_id(0);\n    group_sizze_226384 = get_local_size(0);\n    wave_sizze_226383 = LOCKSTEP_WIDTH;\n    group_tid_226382 = get_group_id(0);\n    \n    int32_t phys_tid_207077 = global_tid_226380;\n    int64_t global_tid_226385 = sext_i32_i64(group_tid_226382) *\n            segmap_group_sizze_207064 + sext_i32_i64(local_tid_226381);\n    int64_t slice_226386 = s_n_m_196745;\n    int64_t slice_226387 = n_p_196694 * slice_226386;\n    int64_t slice_226388 = m_196691 * slice_226387;\n    int64_t gtid_207074 = squot64(global_tid_226385, slice_226387);\n    int64_t remnant_226389 = global_tid_226385 - gtid_207074 * slice_226387;\n    int64_t gtid_207075 = squot64(remnant_226389, slice_226386);\n    int64_t remnant_226390 = remnant_226389 - gtid_207075 * slice_226386;\n    int64_t gtid_207076 = remnant_226390;\n    int64_t remnant_226391 = remnant_226390 - 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((i",
            "nt64_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        redout_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_226392 = defunc_1_op_res_207100;\n            float redout_tmp_226393 = defunc_1_op_r",
            "es_207103;\n            float redout_tmp_226394 = defunc_1_op_res_207106;\n            \n            redout_221617 = redout_tmp_226392;\n            redout_221618 = redout_tmp_226393;\n            redout_221619 = redout_tmp_226394;\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_207130 = 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_207",
            "074 *\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                                                                 defu",
            "nc_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_207180 + 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_226395 = defunc_1_op_res_207149;\n            float redout_tmp_226396 = defunc_1_op_res_207152;\n            \n            redout_221621 = redout_tmp_226395;\n            redout_221622 = redout_tmp_226396;\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_20719",
            "4(__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_226397;\n    int32_t local_tid_226398;\n    int64_t group_sizze_226401;\n    int32_t wave_sizze_226400;\n    int32_t group_tid_226399;\n    \n    global_tid_226397 = get_global_id(0);\n    local_tid_226398 = get_local_id(0);\n    group_sizze_226401 = get_local_size(0);\n    wave_sizze_226400 = LOCKSTEP_WIDTH;\n    group_tid_226399 = get_group_id(0);\n    \n    int32_t phys_tid_207194 = global_tid_226397;\n    int64_t global_tid_226402 = sext_i32_i64(group_tid_226399) *\n            segmap_group_sizze_207187 + sext_i32_i64(local_tid_226398);\n    int64_t slice_226403 = s_n_m_196745;\n    int64_t slice_226404 = n_p_196694 * slice_226403;\n    int64_t slice_226405 = m_196691 * slice_226404;\n    int64_t gtid_207191 = squot64(global_tid_226402, slice_226404);\n    int64_t remnant_226406 = global_tid_226402 - gtid_207191 * slice_226404;\n    int64_t gtid_207192 = squot64(remnant_226406, slice_226403);\n    int64_t remnant_226407 = remnant_226406 - gtid_207192 * slice_226403;\n    int64_t gtid_207193 = remnant_226407;\n    int64_t remnant_226408 = remnant_226407 - 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_226513;\n    int32_t local_tid_226514;\n    int64_t group_sizze_226517;\n    int32_t wave_sizze_226516;\n    int32_t group_tid_226515;\n    \n    global_tid_226513 = get_global_id(0);\n    local_tid_226514 = get_local_id(0);\n    group_sizze_226517 = get_local_size(0);\n    wave_sizze_226516 = LOCKSTEP_WIDTH;\n    group_tid_226515 = get_group_id(0);\n    \n    int32_t phys_tid_207278 = global_tid_226513;\n    int64_t global_tid_226518 = sext_i32_i64(group_tid_226515) *\n            segmap_group_sizze_207269 + sext_i32_i64(local_tid_226514);\n    int64_t slice_226519 = s_n_m_196745;\n    int64_t slice_226520 = n_p_196694 * slice_226519;\n    int64_t slice_226521 = m_196691 * slice_226520;\n    int64_t gtid_207275 = squot64(global_tid_226518, slice_226520);\n    int64_t remnant_226522 = global_tid_226518 - gtid_207275 * slice_226520;\n    int64_t gtid_207276 = squot64(remnant_226522, slice_226519);\n    int64_t remnant_226523 = remnant_226522 - gtid_207276 * slice_226519;\n    int64_t gtid_207277 = remnant_226523;\n    int64_t remnant_226524 = remnant_226523 - 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              defu",
            "nc_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_207294 = 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_2072",
            "76 * 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_226623;\n    int32_t local_tid_226624;\n    int64_t group_sizze_226627;\n    int32_t wave_sizze_226626;\n    int32_t group_tid_226625;\n    \n    global_tid_226623 = get_global_id(0);\n    local_tid_226624 = get_local_id(0);\n    group_sizze_226627 = get_local_size(0);\n    wave_sizze_226626 = LOCKSTEP_WIDTH;\n    group_tid_226625 = get_group_id(0);\n    \n    int32_t phys_tid_207553 = global_tid_226623;\n    int32_t phys_group_id_226628;\n    \n    phys_group_id_226628 = get_group_id(0);\n    for (int32_t i_226629 = 0; i_226629 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          segmap_group_sizze_207547)) -\n                   phys_group_id_226628, sext_i64_i32(num_groups_207548));\n         i_226629++) {\n        int32_t virt_group_id_226630 = phys_group_id_226628 + i_226629 *\n                sext_i64_i32(num_groups_207548);\n        int64_t global_tid_226631 = sext_i32_i64(virt_group_id_226630) *\n                segmap_group_sizze_207547 + sext_i32_i64(local_tid_226624);\n        int64_t slice_226632 = m_196691;\n        int64_t gtid_207552 = global_tid_226631;\n        int64_t remnant_226633 = global_tid_226631 - 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_19",
            "6701, 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_226638 = defunc_1_op_res_207590;\n                        float redout_tmp_226639 = defunc_1_op_res_20",
            "7593;\n                        float redout_tmp_226640 = defunc_1_op_res_207596;\n                        float redout_tmp_226641 = defunc_1_op_res_207599;\n                        float redout_tmp_226642 = defunc_1_op_res_207602;\n                        \n                        redout_221638 = redout_tmp_226638;\n                        redout_221639 = redout_tmp_226639;\n                        redout_221640 = redout_tmp_226640;\n                        redout_221641 = redout_tmp_226641;\n                        redout_221642 = redout_tmp_226642;\n                    }\n                    defunc_2_reduce_res_207583 = 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_207644 = 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_207701;\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_226643 = defunc_1_op_res_207664;\n                        float redout_tmp_226644 = defunc_1_op_res_207667;\n                        \n                        redout_221644 = redout_tmp_226643;\n                        redout_221645 = redout_tmp_226644;\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_226645 = 0; i_226645 < n_p_196694; i_226645++) {\n                for (int64_t i_226646 = 0; i_226646 < s_n_m_196745;\n                     i_226646++) {\n                    float tmp_226647;\n                    \n                    tmp_226647 = ((__global\n                                   float *) color_225052)[phys_tid_207553 +\n                                                          (i_226645 *\n                                                           (num_threads_225175 *\n                                                            s_n_m_196745) +\n                                                           i_226646 *\n                                                           num_threads_225175)];\n                    ((__global float *) mem_223230)[gtid_207552 + (i_226645 *\n                                                                   (m_196691 *\n                                                                    s_n_m_196745) +\n                                                                   i_226646 *\n                                                                   m_196691)] =\n                        tmp_226647;\n                }\n            }\n            for (int64_t i_226648 = 0; i_226648 < n_p_196694; i_226648++) {\n                for (int64_t i_226649 = 0; i_226649 < s_n_m_196745;\n                     i_226649++) {\n                    float tmp_226650;\n                    \n                    tmp_226650 = ((__global\n                                   float *) color_225051)[phys_tid_2075",
            "53 +\n                                                          (i_226648 *\n                                                           (num_threads_225175 *\n                                                            s_n_m_196745) +\n                                                           i_226649 *\n                                                           num_threads_225175)];\n                    ((__global float *) mem_223234)[gtid_207552 + (i_226648 *\n                                                                   (m_196691 *\n                                                                    s_n_m_196745) +\n                                                                   i_226649 *\n                                                                   m_196691)] =\n                        tmp_226650;\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_2",
            "23289, __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_226651;\n    int32_t local_tid_226652;\n    int64_t group_sizze_226655;\n    int32_t wave_sizze_226654;\n    int32_t group_tid_226653;\n    \n    global_tid_226651 = get_global_id(0);\n    local_tid_226652 = get_local_id(0);\n    group_sizze_226655 = get_local_size(0);\n    wave_sizze_226654 = LOCKSTEP_WIDTH;\n    group_tid_226653 = get_group_id(0);\n    \n    int32_t phys_tid_209345 = global_tid_226651;\n    int32_t phys_group_id_226656;\n    \n    phys_group_id_226656 = get_group_id(0);\n    for (int32_t i_226657 = 0; i_226657 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * n_p_196694,\n                                          segmap_group_sizze_209322)) -\n                   phys_group_id_226656, sext_i64_i32(num_groups_209323));\n         i_226657++) {\n        int32_t virt_group_id_226658 = phys_group_id_226656 + i_226657 *\n                sext_i64_i32(num_groups_209323);\n        int64_t global_tid_226659 = sext_i32_i64(virt_group_id_226658) *\n                segmap_group_sizze_209322 + sext_i32_i64(local_tid_226652);\n        int64_t slice_226660 = n_p_196694;\n        int64_t slice_226661 = m_196691 * slice_226660;\n        int64_t gtid_209343 = squot64(global_tid_226659, slice_226660);\n        int64_t remnant_226662 = global_tid_226659 - gtid_209343 * slice_226660;\n        int64_t gtid_209344 = remnant_226662;\n        int64_t remnant_226663 = remnant_226662 - 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                        de",
            "func_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                                                    in",
            "t64_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_226666 = defunc_1_op_res_209374;\n                    float redout_tmp_226667 = defunc_1_op_res_209377;\n                    float redout_tmp_226668 = defunc_1_op_res_209380;\n                    float redout_tmp_226669 = defunc_1_op_res_209383;\n                    float redout_tmp_226670 = defunc_1_op_res_209386;\n                    \n                    redout_221651 = redout_tmp_226666;\n                    redout_221652 = redout_tmp_226667;\n                    redout_221653 = redout_tmp_226668;\n                    redout_221654 = redout_tmp_226669;\n                    redout_221655 = redout_tmp_226670;\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_226671 = defunc_1_op_res_209448;\n                    float redout_tmp_226672 = defunc_1_op_res_209451;\n                    \n                    redout_221657 = redout_tmp_226671;\n                    redout_221658 = redout_tmp_226672;\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_226673 = 0; i_226673 < s_n_m_196745; i_226673++) {\n                float tmp_226674;\n                \n                tmp_226674 = ((__global float *) color_225054)[phys_tid_209345 +\n                                                               i_226673 *\n                                                               num_threads_225178];\n                ((__global float *) mem_223289)[gtid_209343 * n_p_196694 +\n                                                gtid_209344 + i_226673 *\n                                                (n_p_196694 * m_196691)] =\n                    tmp_226674;\n            }\n            for (int64_t i_226675 = 0; i_226675 < s_n_m_196745; i_226675++) {\n                float tmp_226676;\n                \n                tmp_226676 = ((__global float *) color_225053)[phys_tid_209345 +\n                                                               i_226675 *\n                                                               num_threads_225178];\n                ((__global float *) mem_223293)[gtid_209343 * n_p_196694 +\n                                                gtid_209344 + i_226675 *\n                                                (n_p_196694 * m_196691)] =\n                    tmp_226676;\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_226775;\n    int32_t local_tid_226776;\n    int64_t group_sizze_226779;\n    int32_t wave_sizze_226778;\n    int32_t group_tid_226777;\n    \n    global_tid_226775 = get_global_id(0);\n    local_tid_226776 = get_local_id(0);\n    group_sizze_226779 = get_local_size(0);\n    wave_sizze_226778 = LOCKSTEP_WIDTH;\n    group_tid_226777 = get_group_id(0);\n    \n    int32_t phys_tid_209690 = global_tid_226775;\n    int64_t global_tid_226780 = sext_i32_i64(group_tid_226777) *\n            segmap_group_sizze_209677 + sext_i32_i64(local_tid_226776);\n    int64_t slice_226781 = s_n_m_196745;\n    int64_t slice_226782 = n_p_196694 * slice_226781;\n    int64_t slice_226783 = m_196691 * slice_226782;\n    int64_t gtid_209687 = squot64(global_tid_226780, slice_226782);\n    int64_t remnant_226784 = global_tid_226780 - gtid_209687 * slice_226782;\n    int64_t gtid_209688 = squot64(remnant_226784, slice_226781);\n    int64_t remnant_226785 = remnant_226784 - gtid_",
            "209688 * slice_226781;\n    int64_t gtid_209689 = remnant_226785;\n    int64_t remnant_226786 = remnant_226785 - 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_2096",
            "88 *\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            f",
            "loat 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 + redout_221675;\n            float defunc_1_op_res_209727 = x4w_j_209750 + redout_221676;\n            float redout_tmp_226787 = defunc_1_op_res_209715;\n            float redout_tmp_226788 = defunc_1_op_res_209718;\n            float redout_tmp_226789 = defunc_1_op_res_209721;\n            float redout_tmp_226790 = defunc_1_op_res_209724;\n            float redout_tmp_226791 = defunc_1_op_res_209727;\n            \n            redout_221672 = redout_tmp_226787;\n            redout_221673 = redout_tmp_226788;\n            redout_221674 = redout_tmp_226789;\n            redout_221675 = redout_tmp_226790;\n            redout_221676 = redout_tmp_226791;\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_20975",
            "4 - 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 = ((__globa",
            "l\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_209817 = 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_226792 = defunc_1_op_res_209789;\n            float redout_tmp_226793 = defunc_1_op_res_209792;\n            \n            redout_221678 = redout_tmp_226792;\n            redout_221679 = redout_tmp_226793;\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 mainzisegmap_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_226794;\n    int32_t local_tid_226795;\n    int64_t group_sizze_226798;\n    int32_t wave_sizze_226797;\n    int32_t group_tid_226796;\n    \n    global_tid_226794 = get_global_id(0);\n    local_tid_226795 = get_local_id(0);\n    group_sizze_226798 = get_local_size(0);\n    wave_sizze_226797 = LOCKSTEP_WIDTH;\n    group_tid_226796 = get_group_id(0);\n    \n    int32_t phys_tid_209839 = global_tid_226794;\n    int64_t global_tid_226799 = sext_i32_i64(group_tid_226796) *\n            segmap_group_sizze_209832 + sext_i32_i64(local_tid_226795);\n    int64_t slice_226800 = s_n_m_196745;\n    int64_t slice_226801 = n_p_196694 * slice_226800;\n    int64_t s",
            "lice_226802 = m_196691 * slice_226801;\n    int64_t gtid_209836 = squot64(global_tid_226799, slice_226801);\n    int64_t remnant_226803 = global_tid_226799 - gtid_209836 * slice_226801;\n    int64_t gtid_209837 = squot64(remnant_226803, slice_226800);\n    int64_t remnant_226804 = remnant_226803 - gtid_209837 * slice_226800;\n    int64_t gtid_209838 = remnant_226804;\n    int64_t remnant_226805 = remnant_226804 - 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_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_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_226938;\n    int32_t local_tid_226939;\n    int64_t group_sizze_226942;\n    int32_t wave_sizze_226941;\n    int32_t group_tid_226940;\n    \n    global_tid_226938 = get_global_id(0);\n    l",
            "ocal_tid_226939 = get_local_id(0);\n    group_sizze_226942 = get_local_size(0);\n    wave_sizze_226941 = LOCKSTEP_WIDTH;\n    group_tid_226940 = get_group_id(0);\n    \n    int32_t phys_tid_209935 = global_tid_226938;\n    int64_t global_tid_226943 = sext_i32_i64(group_tid_226940) *\n            segmap_group_sizze_209924 + sext_i32_i64(local_tid_226939);\n    int64_t slice_226944 = s_n_m_196745;\n    int64_t slice_226945 = n_p_196694 * slice_226944;\n    int64_t slice_226946 = m_196691 * slice_226945;\n    int64_t gtid_209932 = squot64(global_tid_226943, slice_226945);\n    int64_t remnant_226947 = global_tid_226943 - gtid_209932 * slice_226945;\n    int64_t gtid_209933 = squot64(remnant_226947, slice_226944);\n    int64_t remnant_226948 = remnant_226947 - gtid_209933 * slice_226944;\n    int64_t gtid_209934 = remnant_226948;\n    int64_t remnant_226949 = remnant_226948 - 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_209976;\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_2",
            "09933 * 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_227126;\n    int32_t local_tid_227127;\n    int64_t group_sizze_227130;\n    int32_t wave_sizze_227129;\n    int32_t group_tid_227128;\n    \n    global_tid_227126 = get_global_id(0);\n    local_tid_227127 = get_local_id(0);\n    group_sizze_227130 = get_local_size(0);\n    wave_sizze_227129 = LOCKSTEP_WIDTH;\n    group_tid_227128 = get_group_id(0);\n    \n    int32_t phys_tid_211496 = global_tid_227126;\n    int64_t global_tid_227131 = sext_i32_i64(group_tid_227128) *\n            segmap_group_sizze_211490 + sext_i32_i64(local_tid_227127);\n    int64_t slice_22",
            "7132 = pad_css_len_196741;\n    int64_t slice_227133 = n_p_196694 * slice_227132;\n    int64_t slice_227134 = m_196691 * slice_227133;\n    int64_t gtid_211493 = squot64(global_tid_227131, slice_227133);\n    int64_t remnant_227135 = global_tid_227131 - gtid_211493 * slice_227133;\n    int64_t gtid_211494 = squot64(remnant_227135, slice_227132);\n    int64_t remnant_227136 = remnant_227135 - gtid_211494 * slice_227132;\n    int64_t gtid_211495 = remnant_227136;\n    int64_t remnant_227137 = remnant_227136 - 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_211",
            "507;\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_211523 = 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                    int64_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_2115",
            "48;\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_22",
            "3543)[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_227138;\n    int32_t local_tid_227139;\n    int64_t group_sizze_227142;\n    int32_t wave_sizze_227141;\n    int32_t group_tid_227140;\n    \n    global_tid_227138 = get_global_id(0);\n    local_tid_227139 = get_local_id(0);\n    group_sizze_227142 = get_local_size(0);\n    wave_sizze_227141 = LOCKSTEP_WIDTH;\n    group_tid_227140 = get_group_id(0);\n    \n    int32_t phys_tid_211645 = global_tid_227138;\n    int64_t global_tid_227143 = sext_i32_i64(group_tid_227140) *\n            segmap_group_sizze_211640 + sext_i32_i64(local_tid_227139);\n    int64_t slice_227144 = C_len_196743;\n    int64_t slice_227145 = m_196691 * slice_227144;\n    int64_t gtid_211643 = squot64(global_tid_227143, slice_227144);\n    int64_t remnant_227146 = global_tid_227143 - gtid_211643 * slice_227144;\n    int64_t gtid_211644 = remnant_227146;\n    int64_t remnant_227147 = remnant_227146 - 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_227148;\n    int32_t local_tid_227149;\n    int64_t group_sizze_227152;\n    int32_t wave_sizze_227151;\n    int32_t group_tid_227150;\n    \n    global_tid_227148 = get_global_id(0);\n    local_tid_227149 = get_local_id(0);\n    group_sizze_227152 = get_local_size(0);\n    wave_sizze_227151 = LOCKSTEP_WIDTH;\n    group_tid_227150 = get_group_id(0);\n    \n    int32_t phys_tid_211681 = global_tid_227148;\n    int64_t global_tid_227153 = sext_i32_i64(group_tid_227150) *\n            segmap_group_sizze_211677 + sext_i32_i64(local_tid_227149);\n    int64_t slice_227154 = m_196691;\n    int64_t gtid_211680 = global_tid_227153;\n    int64_t remnant_227155 = global_tid_227153 - gtid_21",
            "1680;\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_227156 = defunc_1_op_res_211686;\n            \n            redout_222063 = redout_tmp_227156;\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_227329;\n    int32_t local_tid_227330;\n    int64_t group_sizze_227333;\n    int32_t wave_sizze_227332;\n    int32_t group_tid_227331;\n    \n    global_tid_227329 = get_global_id(0);\n    local_tid_227330 = get_local_id(0);\n    group_sizze_227333 = get_local_size(0);\n    wave_sizze_227332 = LOCKSTEP_WIDTH;\n    group_tid_227331 = get_group_id(0);\n    \n    int32_t phys_tid_211812 = global_tid_227329;\n    int64_t global_tid_227334 = sext_i32_i64(group_tid_227331) *\n            segmap_group_sizze_211808 + sext_i32_i64(local_tid_227330);\n    int64_t slice_227335 = m_196691;\n    int64_t gtid_211811 = global_tid_227334;\n    int64_t remnant_227336 = g",
            "lobal_tid_227334 - 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_227337 = defunc_1_op_res_211817;\n            \n            redout_222065 = redout_tmp_227337;\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_227510;\n    int32_t local_tid_227511;\n    int64_t group_sizze_227514;\n    int32_t wave_sizze_227513;\n    int32_t group_tid_227512;\n    \n    global_tid_227510 = get_global_id(0);\n    local_tid_227511 = get_local_id(0);\n    group_sizze_227514 = get_local_size(0);\n    wave_sizze_227513 = LOCKSTEP_WIDTH;\n    group_tid_227512 = get_group_id(0);\n    \n    int32_t phys_tid_211943 = global_tid_227510;\n    int64_t global_tid_227515 = sext_i32_i64(group_tid_227512) *\n            segmap_group_sizze_211939 + sext_i32_i64(local_tid_227511);\n    int64_t slice_227516 = m_196691;\n    int64_t gtid_211942 = global_tid_227515;\n    int64_t remnant_2275",
            "17 = global_tid_227515 - 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_227518 = defunc_1_op_res_211948;\n            \n            redout_222067 = redout_tmp_227518;\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_227706;\n    i",
            "nt32_t local_tid_227707;\n    int64_t group_sizze_227710;\n    int32_t wave_sizze_227709;\n    int32_t group_tid_227708;\n    \n    global_tid_227706 = get_global_id(0);\n    local_tid_227707 = get_local_id(0);\n    group_sizze_227710 = get_local_size(0);\n    wave_sizze_227709 = LOCKSTEP_WIDTH;\n    group_tid_227708 = get_group_id(0);\n    \n    int32_t phys_tid_212132 = global_tid_227706;\n    int32_t phys_group_id_227711;\n    \n    phys_group_id_227711 = get_group_id(0);\n    for (int32_t i_227712 = 0; i_227712 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          segmap_group_sizze_212127)) -\n                   phys_group_id_227711, sext_i64_i32(num_groups_212128));\n         i_227712++) {\n        int32_t virt_group_id_227713 = phys_group_id_227711 + i_227712 *\n                sext_i64_i32(num_groups_212128);\n        int64_t global_tid_227714 = sext_i32_i64(virt_group_id_227713) *\n                segmap_group_sizze_212127 + sext_i32_i64(local_tid_227707);\n        int64_t slice_227715 = m_196691;\n        int64_t gtid_212131 = global_tid_227714;\n        int64_t remnant_227716 = global_tid_227714 - 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((in",
            "t64_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_227718 = defunc_1_op_res_212147;\n                    \n                    redout_221429 = redout_tmp_227718;\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_227719 = defunc_1_op_res_212170;\n                    \n                    redout_221431 = redout_tmp_227719;\n                }\n                defunc_2_reduce_res_212167 = redout_221431;\n                ((__global float *) color_225074)[phys_tid_212132 + i_222071 *\n                                                  num_threads_225201] =\n                    defunc_2_reduce_res_212167;\n            }\n            for (int64_t i_227720 = 0; i_227720 < l_n_m_196752; i_227720++) {\n                float tmp_227721;\n                \n                tmp_227721 = ((__global float *) color_225074)[phys_tid_212132 +\n                                                               i_227720 *\n                                                               num_threads_225201];\n                ((__global float *) mem_223643)[gtid_212131 + i_227720 *\n                                                m_196691] = tmp_227721;\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_227722;\n    int32_t local_tid_227723;\n    int64_t group_sizze_227726;\n    int32_t wave_sizze_227725;\n    int32_t group_tid_227724;\n    \n    global_tid_227722 = get_global_id(0);\n    local_tid_227723 = get_local_id(0);\n    group_sizze_227726 = get_local_size(0);\n    wave_sizze_227725 = LOCKSTEP_WIDTH;\n    group_tid_227724 = get_group_id(0);\n    \n    int32_t phys_tid_212517 = global_tid_227722;\n    int64_t global_tid_227727 = sext_i32_i64(group_tid_227724) *\n            segmap_group_sizze_212508 + sext_i32_i64(local_tid_227723);\n    int64_t slice_227728 = l_n_m_196752;\n    int64_t slice_227729 = m_196691 * slice_227728;\n    int64_t gtid_212515 = squot64(global_tid_227727, slice_227728);\n    int64_t remnant_227730 = global_tid_227727 - gtid_212515 * slice_227728;\n    int64_t gtid_212516 = remnant_227730;\n    int64_t remnant_227731 = remnant_227730 - 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_212",
            "523 = 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_227732 = defunc_1_op_res_212529;\n            \n            redout_221437 = redout_tmp_227732;\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_212566 = 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_227733 = defunc_1_op_res_212552;\n            \n            redout_221439 = redout_tmp_227733;\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 block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227806;\n    int32_t local_tid_227807;\n    int64_t group_sizze_227810;\n    int32_t wave_sizze_227809;\n    int32_t group_tid_227808;\n    \n    global_tid_227806 = get_global_id(0);\n    local_tid_227807 = get_local_id(0);\n    group_sizze_227810 = get_local_size(0);\n    wave_sizze_227809 = LOCKSTEP_WIDTH;\n    group_tid_227808 = get_group_id(0);\n    \n    int32_t phys_tid_212634 = global_tid_227806;\n    int64_t global_tid_227811 = sext_i32_i64(group_tid_227808) *\n            segmap_group_sizze_212629 + sext_i32_i64(local_tid_227807);\n    int64_t slice_227812 = l_n_m_196752;\n    int64_t slice_227813 = m_196691 * slice_227812;\n    int64_t gtid_212632 = squot64(global_tid_227811, slice_227812);\n    int64_t remnant_227814 = global_tid_227811 - gtid_212632 * slice_227812;\n    int64_t gtid_212633 = remnant_227814;\n    int64_t remnant_227815 = remnant_227814 - 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_227905;\n    int32_t local_tid_227906;\n    int64_t group_sizze_227909;\n    int32_t wave_sizze_227908;\n    int32_t group_tid_227907;\n    \n    global_tid_227905 = get_global_id(0);\n    local_tid_227906 = get_local_id(0);\n    group_sizze_227909 = get_local_size(0);\n    wave_sizze_227908 = LOCKSTEP_WIDTH;\n    group_tid_227907 = get_group_id(0);\n    \n    int32_t phys_tid_212795 = global_tid_227905;\n    int32_t phys_group_id_227910;\n    \n    phys_group_id_227910 = get_group_id(0);\n    ",
            "for (int32_t i_227911 = 0; i_227911 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          segmap_group_sizze_212789)) -\n                   phys_group_id_227910, sext_i64_i32(num_groups_212790));\n         i_227911++) {\n        int32_t virt_group_id_227912 = phys_group_id_227910 + i_227911 *\n                sext_i64_i32(num_groups_212790);\n        int64_t global_tid_227913 = sext_i32_i64(virt_group_id_227912) *\n                segmap_group_sizze_212789 + sext_i32_i64(local_tid_227906);\n        int64_t slice_227914 = m_196691;\n        int64_t gtid_212794 = global_tid_227913;\n        int64_t remnant_227915 = global_tid_227913 - 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.0",
            "F;\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_212",
            "831 * 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                    float defunc_1_op_res_212819 = x2w_j_212839 + redout_221455;\n                    float redout_tmp_227918 = defunc_1_op_res_212813;\n                    float redout_tmp_227919 = defunc_1_op_res_212816;\n                    float redout_tmp_227920 = defunc_1_op_res_212819;\n                    \n                    redout_221453 = redout_tmp_227918;\n                    redout_221454 = redout_tmp_227919;\n                    redout_221455 = redout_tmp_227920;\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 defunc_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 = defu",
            "nc_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_227921 = defunc_1_op_res_212852;\n                    float redout_tmp_227922 = defunc_1_op_res_212855;\n                    \n                    redout_221457 = redout_tmp_227921;\n                    redout_221458 = redout_tmp_227922;\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_227923 = 0; i_227923 < l_n_m_196752; i_227923++) {\n                float tmp_227924;\n                \n                tmp_227924 = ((__global float *) color_225076)[phys_tid_212795 +\n                                                               i_227923 *\n                                                               num_threads_225207];\n                ((__global float *) mem_223716)[gtid_212794 + i_227923 *\n                                                m_196691] = tmp_227924;\n            }\n            for (int64_t i_227925 = 0; i_227925 < l_n_m_196752; i_227925++) {\n                float tmp_227926;\n                \n                tmp_227926 = ((__global float *) color_225075)[phys_tid_212795 +\n                                                               i_227925 *\n                                                               num_threads_225207];\n                ((__global float *) mem_223719)[gtid_212794 + i_227925 *\n                    ",
            "                            m_196691] = tmp_227926;\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_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_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_227927;\n    int32_t local_tid_227928;\n    int64_t group_sizze_227931;\n    int32_t wave_sizze_227930;\n    int32_t group_tid_227929;\n    \n    global_tid_227927 = get_global_id(0);\n    local_tid_227928 = get_local_id(0);\n    group_sizze_227931 = get_local_size(0);\n    wave_sizze_227930 = LOCKSTEP_WIDTH;\n    group_tid_227929 = get_group_id(0);\n    \n    int32_t phys_tid_213316 = global_tid_227927;\n    int64_t global_tid_227932 = sext_i32_i64(group_tid_227929) *\n            segmap_group_sizze_213305 + sext_i32_i64(local_tid_227928);\n    int64_t slice_227933 = l_n_m_196752;\n    int64_t slice_227934 = m_196691 * slice_227933;\n    i",
            "nt64_t gtid_213314 = squot64(global_tid_227932, slice_227933);\n    int64_t remnant_227935 = global_tid_227932 - gtid_213314 * slice_227933;\n    int64_t gtid_213315 = remnant_227935;\n    int64_t remnant_227936 = remnant_227935 - 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                defu",
            "nc_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_227937 = defunc_1_op_res_213330;\n            float redout_tmp_227938 = defunc_1_op_res_213333;\n            float redout_tmp_227939 = defunc_1_op_res_213336;\n            ",
            "\n            redout_221464 = redout_tmp_227937;\n            redout_221465 = redout_tmp_227938;\n            redout_221466 = redout_tmp_227939;\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        float 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_2225",
            "50)[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_227940 = defunc_1_op_res_213369;\n            float redout_tmp_227941 = defunc_1_op_res_213372;\n            \n            redout_221468 = redout_tmp_227940;\n            redout_221469 = redout_tmp_227941;\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 (mainzisegm",
            "ap_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_228042;\n    int32_t local_tid_228043;\n    int64_t group_sizze_228046;\n    int32_t wave_sizze_228045;\n    int32_t group_tid_228044;\n    \n    global_tid_228042 = get_global_id(0);\n    local_tid_228043 = get_local_id(0);\n    group_sizze_228046 = get_local_size(0);\n    wave_sizze_228045 = LOCKSTEP_WIDTH;\n    group_tid_228044 = get_group_id(0);\n    \n    int32_t phys_tid_213473 = global_tid_228042;\n    int64_t global_tid_228047 = sext_i32_i64(group_tid_228044) *\n            segmap_group_sizze_213466 + sext_i32_i64(local_tid_228043);\n    int64_t slice_228048 = l_n_m_196752;\n    int64_t slice_228049 = m_196691 * slice_228048;\n    int64_t gtid_213471 = squot64(global_tid_228047, slice_228048);\n    int64_t remnant_228050 = global_tid_228047 - gtid_213471 * slice_228048;\n    int64_t gtid_213472 = remnant_228050;\n    int64_t remnant_228051 = remnant_228050 - 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, __globa",
            "l\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_228155;\n    int32_t local_tid_228156;\n    int64_t group_sizze_228159;\n    int32_t wave_sizze_228158;\n    int32_t group_tid_228157;\n    \n    global_tid_228155 = get_global_id(0);\n    local_tid_228156 = get_local_id(0);\n    group_sizze_228159 = get_local_size(0);\n    wave_sizze_228158 = LOCKSTEP_WIDTH;\n    group_tid_228157 = get_group_id(0);\n    \n    int32_t phys_tid_213692 = global_tid_228155;\n    int32_t phys_group_id_228160;\n    \n    phys_group_id_228160 = get_group_id(0);\n    for (int32_t i_228161 = 0; i_228161 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          segmap_group_sizze_213686)) -\n                   phys_group_id_228160, sext_i64_i32(num_groups_213687));\n         i_228161++) {\n        int32_t virt_group_id_228162 = phys_group_id_228160 + i_228161 *\n                sext_i64_i32(num_groups_213687);\n        int64_t global_tid_228163 = sext_i32_i64(virt_group_id_228162) *\n                segmap_group_sizze_213686 + sext_i32_i64(local_tid_228156);\n        int64_t slice_228164 = m_196691;\n        int64_t gtid_213691 = global_tid_228163;\n        int64_t remnant_228165 = global_tid_228163 - 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_213",
            "701;\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_reduce_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 = x3",
            "w_j_213745 + redout_221486;\n                    float defunc_1_op_res_213724 = x4w_j_213746 + redout_221487;\n                    float redout_tmp_228168 = defunc_1_op_res_213712;\n                    float redout_tmp_228169 = defunc_1_op_res_213715;\n                    float redout_tmp_228170 = defunc_1_op_res_213718;\n                    float redout_tmp_228171 = defunc_1_op_res_213721;\n                    float redout_tmp_228172 = defunc_1_op_res_213724;\n                    \n                    redout_221483 = redout_tmp_228168;\n                    redout_221484 = redout_tmp_228169;\n                    redout_221485 = redout_tmp_228170;\n                    redout_221486 = redout_tmp_228171;\n                    redout_221487 = redout_tmp_228172;\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 = defunc_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_228173 = defunc_1_op_res_213776;\n                    float redout_tmp_228174 = defunc_1_op_res_213779;\n                    \n                    redout_221489 = redout_tmp_228173;\n                    redout_221490 = redout_tmp_228",
            "174;\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_228175 = 0; i_228175 < l_n_m_196752; i_228175++) {\n                float tmp_228176;\n                \n                tmp_228176 = ((__global float *) color_225078)[phys_tid_213692 +\n                                                               i_228175 *\n                                                               num_threads_225214];\n                ((__global float *) mem_223823)[gtid_213691 + i_228175 *\n                                                m_196691] = tmp_228176;\n            }\n            for (int64_t i_228177 = 0; i_228177 < l_n_m_196752; i_228177++) {\n                float tmp_228178;\n                \n                tmp_228178 = ((__global float *) color_225077)[phys_tid_213692 +\n                                                               i_228177 *\n                                                               num_threads_225214];\n                ((__global float *) mem_223826)[gtid_213691 + i_228177 *\n                                                m_196691] = tmp_228178;\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                                  in",
            "t64_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_228179;\n    int32_t local_tid_228180;\n    int64_t group_sizze_228183;\n    int32_t wave_sizze_228182;\n    int32_t group_tid_228181;\n    \n    global_tid_228179 = get_global_id(0);\n    local_tid_228180 = get_local_id(0);\n    group_sizze_228183 = get_local_size(0);\n    wave_sizze_228182 = LOCKSTEP_WIDTH;\n    group_tid_228181 = get_group_id(0);\n    \n    int32_t phys_tid_214361 = global_tid_228179;\n    int64_t global_tid_228184 = sext_i32_i64(group_tid_228181) *\n            segmap_group_sizze_214350 + sext_i32_i64(local_tid_228180);\n    int64_t slice_228185 = l_n_m_196752;\n    int64_t slice_228186 = m_196691 * slice_228185;\n    int64_t gtid_214359 = squot64(global_tid_228184, slice_228185);\n    int64_t remnant_228187 = global_tid_228184 - gtid_214359 * slice_228185;\n    int64_t gtid_214360 = remnant_228187;\n    int64_t remnant_228188 = remnant_228187 - 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_reduce_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_228189 = defunc_1_op_res_214377;\n            float redout_tmp_228190 = defunc_1_op_res_214380;\n            float redout_tmp_228191 = def",
            "unc_1_op_res_214383;\n            float redout_tmp_228192 = defunc_1_op_res_214386;\n            float redout_tmp_228193 = defunc_1_op_res_214389;\n            \n            redout_221496 = redout_tmp_228189;\n            redout_221497 = redout_tmp_228190;\n            redout_221498 = redout_tmp_228191;\n            redout_221499 = redout_tmp_228192;\n            redout_221500 = redout_tmp_228193;\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_214",
            "372 * 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_228194 = defunc_1_op_res_214441;\n            float redout_tmp_228195 = defunc_1_op_res_214444;\n            \n            redout_221502 = redout_tmp_228194;\n            redout_221503 = redout_tmp_228195;\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_228324;\n    int32_t local_tid_228325;\n    int64_t group_sizze_228328;\n    int32_t wave_sizze_228327;\n    int32_t group_tid_228326;\n    \n    global_tid_228324 = get_global_id(0);\n    local_tid_228325 = get_local_id(0);\n    group_sizze_228328 = get_local_size(0);\n    wave_sizze_228327 = LOCKSTEP_WIDTH;\n    group_tid_228326 = get_group_id(0);\n    \n    int32_t phys_tid_214562 = global_tid_228324;\n    int64_t global_tid_228329 = sext_i32_i64(group_tid_228326) *\n            segmap_group_sizze_214553 + sext_i32_i64(local_tid_228325);\n    int64_t slice_228330 = l_n_m_196752;\n    int64_t slice_228331 = m_196691 * slice_228330;\n    int64_t gtid_214560 = squot64(global_tid_228329, slice_228330);\n    int64_t remnant_228332 = global_tid_228329 - gtid_214560 * slice_228330;\n    int64_t gtid_214561 = remnant_228332;\n    int64_t remnant_228333 = remnant_228332 - 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        fl",
            "oat 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                                  unsign",
            "ed 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_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_215432 = global_tid_228498;\n    int64_t global_tid_228503 = sext_i32_i64(group_tid_228500) *\n            segmap_group_sizze_215427 + sext_i32_i64(local_tid_228499);\n    int64_t slice_228504 = n_196692;\n    int64_t slice_228505 = m_196691 * slice_228504;\n    int64_t gtid_215430 = squot64(global_tid_228503, slice_228504);\n    int64_t remnant_228506 = global_tid_228503 - gtid_215430 * slice_228504;\n    int64_t gtid_215431 = remnant_228506;\n    int64_t remnant_228507 = remnant_228506 - 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_ar",
            "g_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_228508;\n    int32_t local_tid_228509;\n    int64_t group_sizze_228512;\n    int32_t wave_sizze_228511;\n    int32_t group_tid_228510;\n    \n    global_tid_228508 = get_global_id(0);\n    local_tid_228509 = get_local_id(0);\n    group_sizze_228512 = get_local_size(0);\n    wave_sizze_228511 = LOCKSTEP_WIDTH;\n    group_tid_228510 = get_group_id(0);\n    \n    int32_t phys_tid_215527 = global_tid_228508;\n    int64_t global_tid_228513 = sext_i32_i64(group_tid_228510) *\n            segmap_group_sizze_215522 + sext_i32_i64(local_tid_228509);\n    int64_t slice_228514 = n_196692;\n    int64_t slice_228515 = m_196691 * slice_228514;\n    int64_t gtid_215525 = squot64(global_tid_228513, slice_228514);\n    int64_t remnant_228516 = global_tid_228513 - gtid_215525 * slice_228514;\n    int64_t gtid_215526 = remnant_228516;\n    int64_t remnant_228517 = remnant_228516 - 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_sizz",
            "e_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 *ext_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_228533;\n    int32_t local_tid_228534;\n    int64_t group_sizze_228537;\n    int32_t wave_sizze_228536;\n    int32_t group_tid_228535;\n    \n    global_tid_228533 = get_global_id(0);\n    local_tid_228534 = get_local_id(0);\n    group_sizze_",
            "228537 = get_local_size(0);\n    wave_sizze_228536 = LOCKSTEP_WIDTH;\n    group_tid_228535 = get_group_id(0);\n    \n    int32_t phys_tid_215634 = global_tid_228533;\n    int32_t phys_group_id_228538;\n    \n    phys_group_id_228538 = get_group_id(0);\n    for (int32_t i_228539 = 0; i_228539 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          segmap_group_sizze_215629)) -\n                   phys_group_id_228538, sext_i64_i32(num_groups_215630));\n         i_228539++) {\n        int32_t virt_group_id_228540 = phys_group_id_228538 + i_228539 *\n                sext_i64_i32(num_groups_215630);\n        int64_t global_tid_228541 = sext_i32_i64(virt_group_id_228540) *\n                segmap_group_sizze_215629 + sext_i32_i64(local_tid_228534);\n        int64_t slice_228542 = m_196691;\n        int64_t gtid_215633 = global_tid_228541;\n        int64_t remnant_228543 = global_tid_228541 - 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_215653;\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_failure = 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_215667;\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_228548 = defunc_1_op_res_215670;\n                    \n                    redout_221320 = redout_tmp_228548;\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_re",
            "s_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_215713 = 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_228549 = defunc_1_op_res_215694;\n                    \n                    redout_221322 = redout_tmp_228549;\n                }\n                defunc_2_reduce_res_215691 = redout_221322;\n                ((__global fl",
            "oat *) color_225087)[phys_tid_215634 + i_222100 *\n                                                  num_threads_225226] =\n                    defunc_2_reduce_res_215691;\n            }\n            for (int64_t i_228550 = 0; i_228550 < t_n_m_196759; i_228550++) {\n                float tmp_228551;\n                \n                tmp_228551 = ((__global float *) color_225087)[phys_tid_215634 +\n                                                               i_228550 *\n                                                               num_threads_225226];\n                ((__global float *) mem_224063)[gtid_215633 + i_228550 *\n                                                m_196691] = tmp_228551;\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_228552;\n    int32_t local_tid_228553;\n    int64_t group_sizze_228556;\n    int32_t wave_sizze_228555;\n    int32_t group_tid_228554;\n    \n    global_tid_228552 = get_global_id(0);\n    local_tid_228553 = get_local_id(0);\n    group_sizze_228556 = get_local_size(0);\n    wave_sizze_228555 = LOCKSTEP_WIDTH;\n    group_tid_228554 = get_group_id(0);\n    \n    int32_t phys_tid_216150 = global_tid_228552;\n    int64_t global_tid_228557 = sext_i32_i64(group_tid_228554) *\n            segmap_group_sizze_216145 + sext_i32_i64(local_tid_228553);\n    int64_t slice_",
            "228558 = n_196692;\n    int64_t slice_228559 = m_196691 * slice_228558;\n    int64_t gtid_216148 = squot64(global_tid_228557, slice_228558);\n    int64_t remnant_228560 = global_tid_228557 - gtid_216148 * slice_228558;\n    int64_t gtid_216149 = remnant_228560;\n    int64_t remnant_228561 = remnant_228560 - 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_di",
            "m2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228562;\n    int32_t local_tid_228563;\n    int64_t group_sizze_228566;\n    int32_t wave_sizze_228565;\n    int32_t group_tid_228564;\n    \n    global_tid_228562 = get_global_id(0);\n    local_tid_228563 = get_local_id(0);\n    group_sizze_228566 = get_local_size(0);\n    wave_sizze_228565 = LOCKSTEP_WIDTH;\n    group_tid_228564 = get_group_id(0);\n    \n    int32_t phys_tid_216167 = global_tid_228562;\n    int64_t global_tid_228567 = sext_i32_i64(group_tid_228564) *\n            segmap_group_sizze_216161 + sext_i32_i64(local_tid_228563);\n    int64_t slice_228568 = n_196692;\n    int64_t slice_228569 = m_196691 * slice_228568;\n    int64_t gtid_216165 = squot64(global_tid_228567, slice_228568);\n    int64_t remnant_228570 = global_tid_228567 - gtid_216165 * slice_228568;\n    int64_t gtid_216166 = remnant_228570;\n    int64_t remnant_228571 = remnant_228570 - 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 flo",
            "at *) 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_228572;\n    int32_t local_tid_228573;\n    int64_t group_sizze_228576;\n    int32_t wave_sizze_228575;\n    int32_t group_tid_228574;\n    \n    global_tid_228572 = get_global_id(0);\n    local_tid_228573 = get_local_id(0);\n    group_sizze_228576 = get_local_size(0);\n    wave_sizze_228575 = LOCKSTEP_WIDTH;\n    group_tid_228574 = get_group_id(0);\n    \n    int32_t phys_tid_216195 = global_tid_228572;\n    int64_t global_tid_228577 = sext_i32_i64(group_tid_228574) *\n            segmap_group_sizze_216186 + sext_i32_i64(local_tid_228573);\n    int64_t slice_228578 = t_n_m_196759;\n    int64_t slice_228579 = m_196691 * slice_228578;\n    int64_t gtid_216193 = squot64(global_tid_228577, slice_228578);\n    int64_t remnant_228580 = global_tid_228577 - gtid_216193 * slice_228578;\n    int64_t gtid_216194 ",
            "= remnant_228580;\n    int64_t remnant_228581 = remnant_228580 - 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_222517)[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_228582 = defunc_1_op_res_216209;\n            \n            redout_221328 = redout_tmp_228582;\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_228583 = defunc_1_op_res_216233;\n            \n            redout_221330 = redout_tmp_228583;\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 gl",
            "obal_tid_228656;\n    int32_t local_tid_228657;\n    int64_t group_sizze_228660;\n    int32_t wave_sizze_228659;\n    int32_t group_tid_228658;\n    \n    global_tid_228656 = get_global_id(0);\n    local_tid_228657 = get_local_id(0);\n    group_sizze_228660 = get_local_size(0);\n    wave_sizze_228659 = LOCKSTEP_WIDTH;\n    group_tid_228658 = get_group_id(0);\n    \n    int32_t phys_tid_216319 = global_tid_228656;\n    int64_t global_tid_228661 = sext_i32_i64(group_tid_228658) *\n            segmap_group_sizze_216314 + sext_i32_i64(local_tid_228657);\n    int64_t slice_228662 = t_n_m_196759;\n    int64_t slice_228663 = m_196691 * slice_228662;\n    int64_t gtid_216317 = squot64(global_tid_228661, slice_228662);\n    int64_t remnant_228664 = global_tid_228661 - gtid_216317 * slice_228662;\n    int64_t gtid_216318 = remnant_228664;\n    int64_t remnant_228665 = remnant_228664 - 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, __global\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_228755;\n    int32_t local_tid_228756;\n    int64_t group_sizze_228759;\n    int32_t wave_sizze_228758;\n    int32_t group_tid_228757;\n    \n    global_tid_228755 = get_global_id(0);\n    local_tid_228756 = get_local_id(0);\n    group_sizze_228759 = get_local_size(0);\n    wave_sizze_228758 = LOCKSTEP_WIDTH;\n    group_tid_228757 = get_group_id(0);\n    \n    int32_t phys_tid_216506 = global_tid_228755;\n    int32_t phys_group_id_228760;\n    \n    phys_group_id_228760 = get_group_id(0);\n    for (int32_t i_228761 = 0; i_228761 <\n         sd",
            "iv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          segmap_group_sizze_216500)) -\n                   phys_group_id_228760, sext_i64_i32(num_groups_216501));\n         i_228761++) {\n        int32_t virt_group_id_228762 = phys_group_id_228760 + i_228761 *\n                sext_i64_i32(num_groups_216501);\n        int64_t global_tid_228763 = sext_i32_i64(virt_group_id_228762) *\n                segmap_group_sizze_216500 + sext_i32_i64(local_tid_228756);\n        int64_t slice_228764 = m_196691;\n        int64_t gtid_216505 = global_tid_228763;\n        int64_t remnant_228765 = global_tid_228763 - 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 con",
            "d_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_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_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                int",
            "64_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                    } el",
            "se {\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_228771 = defunc_1_op_res_216545;\n                    float redout_tmp_228772 = defunc_1_op_res_216548;\n                    float redout_tmp_228773 = defunc_1_op_res_216551;",
            "\n                    \n                    redout_221344 = redout_tmp_228771;\n                    redout_221345 = redout_tmp_228772;\n                    redout_221346 = redout_tmp_228773;\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_reduce_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_21",
            "6595 * 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)[phys_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_228774 = defunc_1_op_res_216585;\n                    float redout_tmp_228775 = defunc_1_op_res_216588;\n                    \n                    redout_221348 = redout_t",
            "mp_228774;\n                    redout_221349 = redout_tmp_228775;\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_228776 = 0; i_228776 < t_n_m_196759; i_228776++) {\n                float tmp_228777;\n                \n                tmp_228777 = ((__global float *) color_225092)[phys_tid_216506 +\n                                                               i_228776 *\n                                                               num_threads_225236];\n                ((__global float *) mem_224201)[gtid_216505 + i_228776 *\n                                                m_196691] = tmp_228777;\n            }\n            for (int64_t i_228778 = 0; i_228778 < t_n_m_196759; i_228778++) {\n                float tmp_228779;\n                \n                tmp_228779 = ((__global float *) color_225091)[phys_tid_216506 +\n                                                               i_228778 *\n                                                               num_threads_225236];\n                ((__global float *) mem_224204)[gtid_216505 + i_228778 *\n                                                m_196691] = tmp_228779;\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_228780;\n    int32_t local_tid_228781;\n    int64_t group_sizze_228784;\n    int32_t wave_sizze_228783;\n    int32_t group_tid_228782;\n    \n    global_tid_228780 = get_global_id(0);\n    local_tid_228781 = get_local_id(0);\n    group_sizze_228784 = get_local_size(0);\n    wave_sizze_228783 = LOCKSTEP_WIDTH;\n    group_tid_228782 = get_group_id(0);\n    \n    int32_t phys_tid_217156 = global_tid_228780;\n    int64_t global_tid_228785 = sext_i32_i64(group_tid_228782) *\n            segmap_group_sizze_217151 + sext_i32_i64(local_tid_228781);\n    int64_t slice_228786 = n_196692;\n    int64_t slice_228787 = m_196691 * slice_228786;\n    int64_t gtid_217154 = squot64(global_tid_228785, slice_228786);\n    int64_t remnant_228788 = global_tid_228785 - gtid_217154 * slice_228786;\n    int64_t gtid_217155 = remnant_228788;\n    int64_t remnant_228789 = remnant_228788 - 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 mainzis",
            "egmap_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_228790;\n    int32_t local_tid_228791;\n    int64_t group_sizze_228794;\n    int32_t wave_sizze_228793;\n    int32_t group_tid_228792;\n    \n    global_tid_228790 = get_global_id(0);\n    local_tid_228791 = get_local_id(0);\n    group_sizze_228794 = get_local_size(0);\n    wave_sizze_228793 = LOCKSTEP_WIDTH;\n    group_tid_228792 = get_group_id(0);\n    \n    int32_t phys_tid_217173 = global_tid_228790;\n    int64_t global_tid_228795 = sext_i32_i64(group_tid_228792) *\n            segmap_group_sizze_217167 + sext_i32_i64(local_tid_228791);\n    int64_t slice_228796 = n_196692;\n    int64_t slice_228797 = m_196691 * slice_228796;\n    int64_t gtid_217171 = squot64(global_tid_228795, slice_228796);\n    int64_t remnant_228798 = global_tid_228795 - gtid_217171 * slice_228796;\n    int64_t gtid_217172 = remnant_228798;\n    int64_t remnant_228799 = remnant_228798 - gtid_217172;\n    \n    if (slt64(gtid_217171, m_196691) && slt64(gtid_217172, n_196692)) {\n        i",
            "nt64_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_228800;\n    int32_t local_tid_228801;\n    int64_t group_sizze_228804;\n    int32_t wave_sizze_228803;\n    int32_t group_tid_228802;\n    \n    global_tid_228800 = get_global_id(0);\n    local_tid_228801 = get_local_id(0);\n    group_sizze_228804 = get_local_size(0);\n    wave_sizze_228803 = LOCKSTEP_WIDTH;\n    group_tid_228802 = get_group_id(0);\n    \n    int32_t phys_tid_217203 = global_tid_228800;\n    int64_t global_tid_228805 = sext_i32_i64(group_tid_228802) *\n            segmap_group_sizze_217192 + sext_i32_i64(local_tid_228801);\n    int64_t slice_228806 = t_n_m_196759;\n    int64_t slice_228807 = m_196691 * slice_228806;\n    int64_t gtid_217201 = squot64(global_tid_228805, slice_228806);\n    int64_t remnant_228808 = global_tid_228805 - gtid_217201 * slice_228806;\n    int64_t gtid_217202 = remnant_228808;\n    int64_t remnant_228809 = remnant_228808 - 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            int",
            "64_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_228810 = defunc_1_op_res_217219;\n            float redout_tmp_228811 = defunc_1_op_res_217222;\n            float redout_tmp_228812 = defunc_1_op_res_217225;\n            \n            redout_221355 = redout_tmp_228810;\n            redout_221356 = redout_tmp_228811;\n            redout_221357 = redout_tmp_228812;\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_217209, 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_228813 = defunc_1_op_res_217259;\n            float redout_tmp_228814 = defunc_1_op_res_217262;\n            \n            redout_221359 = redout_tmp_228813;\n            redout_221360 = redout_tmp_228814;\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_228915;\n    int32_t local_tid_228916;\n    int64_t group_sizze_228919;\n    int32_t wave_sizze_228918;\n    int32_t group_tid_228917;\n    \n    global_tid_228915 = get_global_id(0);\n    local_tid_228916 = get_local_id(0);\n    group_sizze_228919 = get_local_size(0);\n    wave_sizze_228918 = LOCKSTEP_WIDTH;\n    group_tid_228917 = get_group_id(0);\n    \n    int32_",
            "t phys_tid_217367 = global_tid_228915;\n    int64_t global_tid_228920 = sext_i32_i64(group_tid_228917) *\n            segmap_group_sizze_217360 + sext_i32_i64(local_tid_228916);\n    int64_t slice_228921 = t_n_m_196759;\n    int64_t slice_228922 = m_196691 * slice_228921;\n    int64_t gtid_217365 = squot64(global_tid_228920, slice_228921);\n    int64_t remnant_228923 = global_tid_228920 - gtid_217365 * slice_228921;\n    int64_t gtid_217366 = remnant_228923;\n    int64_t remnant_228924 = remnant_228923 - gtid_217366;\n    \n    if (slt64(gtid_217365, m_196691) && slt64(gtid_217366, t_n_m_196759)) {\n        float defunc_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_229028;\n    int32_t local_tid_229029;\n    int64_t group_sizze_229032;\n    int32_t wave_sizze_229031;\n    int32_t group_tid_229030;\n    \n    global_tid_229028 = get_global_id(0);\n    local_tid_229029 = get_local_id(0);\n    group_sizze_229032 = get_local_size(0);\n    wave_sizze_229031 = LOCKSTEP_WIDTH;\n    group_tid_229030 = get_group_id(0);\n    \n    int32_t phys_tid_217612 = global_tid_229028;\n    int32_t phys_group_id_229033;\n    \n    phys_group_id_229033 = get_group_id(0);\n    for (int32_t i_229034 = 0; i_229034 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          segmap_group_sizze_217606)) -\n                   phys_group_id_229033, sext_i64_i32(num_groups_217607));\n         i_229034++) {\n        int32_t virt_group_id_229035 = phys_group_id_229033 + i_229034 *\n                sext_i64_i32(num_groups_217607);\n        int64_t global_tid_229036 = sext_i32_i64(virt_group_id_229035) *\n                segmap_group_sizze_217606 + sext_i32_i64(local_tid_229029);\n        int64_t slice_229037 = m_196691;\n        int64_t gtid_217611 = global_tid_229036;\n        int64_t remnant_229038 = global_tid_229036 - 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_229044 = defunc_1_op_res_217653;\n                    float redout_tmp_229045 = defunc_1_op_res_217656;\n                    float redout_tmp_229046 = defunc_1_op_res_217659;\n                    float redout_tmp_229047 = defunc_1_op_res_217662;\n                    float redout_tmp_229048 = defunc_1_op_res_217665;\n                    \n                    redout_221374 = redout_tmp_229044;\n                    redout_221375 = redout_tmp_229045;\n                    redout_221376 = redout_tmp_229046;\n                    redout_221377 = redout_tmp_229047;\n        ",
            "            redout_221378 = redout_tmp_229048;\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_229049 = defunc_1_op_res_217718;\n                    float redout_tmp_229050 = defunc_1_op_res_217721;\n                    \n                    redout_221380 = redout_tmp_229049;\n                    redout_221381 = redout_tmp_229050;\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_229051 = 0; i_229051 < t_n_m_196759; i_229051++) {\n                float tmp_229052;\n                \n                tmp_229052 = ((__global float *) color_225097)[phys_tid_217612 +\n                                                               i_229051 *\n                                                               num_threads_225247];\n                ((__global float *) mem_224373)[gtid_217611 + i_229051 *\n                                                m_196691] = tmp_229052;\n            }\n            for (int64_t i_229053 = 0; i_229053 < t_n_m_196759; i_229053++) {\n                float tmp_229054;\n                \n                tmp_229054 = ((__global float *) color_225096)[phys_tid_217612 +\n                                                               i_229053 *\n                                                               num_threads_225247];\n                ((__global float *) mem_224376)[gtid_217611 + i_229053 *\n                                                m_196691] = tmp_229054;\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 bl",
            "ock_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229055;\n    int32_t local_tid_229056;\n    int64_t group_sizze_229059;\n    int32_t wave_sizze_229058;\n    int32_t group_tid_229057;\n    \n    global_tid_229055 = get_global_id(0);\n    local_tid_229056 = get_local_id(0);\n    group_sizze_229059 = get_local_size(0);\n    wave_sizze_229058 = LOCKSTEP_WIDTH;\n    group_tid_229057 = get_group_id(0);\n    \n    int32_t phys_tid_218410 = global_tid_229055;\n    int64_t global_tid_229060 = sext_i32_i64(group_tid_229057) *\n            segmap_group_sizze_218405 + sext_i32_i64(local_tid_229056);\n    int64_t slice_229061 = n_196692;\n    int64_t slice_229062 = m_196691 * slice_229061;\n    int64_t gtid_218408 = squot64(global_tid_229060, slice_229061);\n    int64_t remnant_229063 = global_tid_229060 - gtid_218408 * slice_229061;\n    int64_t gtid_218409 = remnant_229063;\n    int64_t remnant_229064 = remnant_229063 - 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_229065;\n    int32_t local_tid_229066;\n    int64_t group_sizze_229069;\n    int32_t wave_sizze_229068;\n    int32_t group_tid_229067;\n    \n    global_tid_229065 = get_global_id(0);\n    local_tid_229066 = get_local_id(0);\n    group_sizze_229069 = get_local_size(0);\n    wave_sizze_229068 = LOCKSTEP_WIDTH;\n    group_tid_229067 = get_group_id(0);\n    \n    int32_t phys_tid_218427 = global_tid_229065;\n    int64_t global_tid_229070 = sext_i32_i64(group_tid_229067) *\n            segmap_group_sizze_218421 + sext_i32_i64(local_tid_229066);\n    int64_t slice_229071 = n_196692;\n    int64_t slice_229072 = m_196691 * slice_229071;\n    int64_t gtid_218425 = squot64(global_tid_229070, slice_229071);\n    int64_t remnant_229073 = global_tid_229070 - gtid_218425 * slice_229071;\n    int64_t gtid_218426 = remnant_229073;\n    int64_t remnant_229074 = remnant_229073 - 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_218426] =\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_229075;\n    int32_t local_tid_229076;\n    int64_t g",
            "roup_sizze_229079;\n    int32_t wave_sizze_229078;\n    int32_t group_tid_229077;\n    \n    global_tid_229075 = get_global_id(0);\n    local_tid_229076 = get_local_id(0);\n    group_sizze_229079 = get_local_size(0);\n    wave_sizze_229078 = LOCKSTEP_WIDTH;\n    group_tid_229077 = get_group_id(0);\n    \n    int32_t phys_tid_218457 = global_tid_229075;\n    int64_t global_tid_229080 = sext_i32_i64(group_tid_229077) *\n            segmap_group_sizze_218446 + sext_i32_i64(local_tid_229076);\n    int64_t slice_229081 = t_n_m_196759;\n    int64_t slice_229082 = m_196691 * slice_229081;\n    int64_t gtid_218455 = squot64(global_tid_229080, slice_229081);\n    int64_t remnant_229083 = global_tid_229080 - gtid_218455 * slice_229081;\n    int64_t gtid_218456 = remnant_229083;\n    int64_t remnant_229084 = remnant_229083 - 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_2213",
            "88;\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 = defunc_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_229085 = defunc_1_op_res_218475;\n            float redout_tmp_229086 = defunc_1_op_res_218478;\n            float redout_tmp_229087 = defunc_1_op_res_218481;\n            float redout_tmp_229088 = defunc_1_op_res_218484;\n            float redout_tmp_229089 = defunc_1_op_res_218487;\n            \n            redout_221387 = redout_tmp_229085;\n            redout_221388 = redout_tmp_229086;\n            redout_221389 = redout_tmp_229087;\n            redout_221390 = redout_tmp_229088;\n            redout_221391 = redout_tmp_229089;\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_221",
            "395 < 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_21",
            "8556;\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_221",
            "393;\n            float defunc_1_op_res_218543 = defunc_9_slope_fun_res_218579 +\n                  redout_221394;\n            float redout_tmp_229090 = defunc_1_op_res_218540;\n            float redout_tmp_229091 = defunc_1_op_res_218543;\n            \n            redout_221393 = redout_tmp_229090;\n            redout_221394 = redout_tmp_229091;\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_res_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_229220;\n    int32_t local_tid_229221;\n    int64_t group",
            "_sizze_229224;\n    int32_t wave_sizze_229223;\n    int32_t group_tid_229222;\n    \n    global_tid_229220 = get_global_id(0);\n    local_tid_229221 = get_local_id(0);\n    group_sizze_229224 = get_local_size(0);\n    wave_sizze_229223 = LOCKSTEP_WIDTH;\n    group_tid_229222 = get_group_id(0);\n    \n    int32_t phys_tid_218665 = global_tid_229220;\n    int64_t global_tid_229225 = sext_i32_i64(group_tid_229222) *\n            segmap_group_sizze_218656 + sext_i32_i64(local_tid_229221);\n    int64_t slice_229226 = t_n_m_196759;\n    int64_t slice_229227 = m_196691 * slice_229226;\n    int64_t gtid_218663 = squot64(global_tid_229225, slice_229226);\n    int64_t remnant_229228 = global_tid_229225 - gtid_218663 * slice_229226;\n    int64_t gtid_218664 = remnant_229228;\n    int64_t remnant_229229 = remnant_229228 - 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        flo",
            "at 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_229318;\n    int32_t local_tid_229319;\n    int64_t group_sizze_229322;\n    int32_t wave_sizze_229321;\n    int32_t group_tid_229320;\n    \n    global_tid_229318 = get_global_id(0);\n    local_tid_229319 = get_local_id(0);\n    group_sizze_229322 = get_local_size(0);\n    wave_sizze_229321 = LOCKSTEP_WIDTH;\n    group_tid_229320 = get_group_id(0);\n    \n    int32_t phys_tid_218956 = global_tid_229318;\n    i",
            "nt64_t global_tid_229323 = sext_i32_i64(group_tid_229320) *\n            segmap_group_sizze_218951 + sext_i32_i64(local_tid_229319);\n    int64_t slice_229324 = n_196692;\n    int64_t slice_229325 = m_196691 * slice_229324;\n    int64_t gtid_218954 = squot64(global_tid_229323, slice_229324);\n    int64_t remnant_229326 = global_tid_229323 - gtid_218954 * slice_229324;\n    int64_t gtid_218955 = remnant_229326;\n    int64_t remnant_229327 = remnant_229326 - 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    #defi",
            "ne 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_229328;\n    int32_t local_tid_229329;\n    int64_t group_sizze_229332;\n    int32_t wave_sizze_229331;\n    int32_t group_tid_229330;\n    \n    global_tid_229328 = get_global_id(0);\n    local_tid_229329 = get_local_id(0);\n    group_sizze_229332 = get_local_size(0);\n    wave_sizze_229331 = LOCKSTEP_WIDTH;\n    group_tid_229330 = get_group_id(0);\n    \n    int32_t phys_tid_218973 = global_tid_229328;\n    int64_t global_tid_229333 = sext_i32_i64(group_tid_229330) *\n            segmap_group_sizze_218967 + sext_i32_i64(local_tid_229329);\n    int64_t slice_229334 = n_196692;\n    int64_t slice_229335 = m_196691 * slice_229334;\n    int64_t gtid_218971 = squot64(global_tid_229333, slice_229334);\n    int64_t remnant_229336 = global_tid_229333 - gtid_218971 * slice_229334;\n    int64_t gtid_218972 = remnant_229336;\n    int64_t remnant_229337 = remnant_229336 - 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.0",
            "F;\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_229358;\n    int32_t local_tid_229359;\n    int64_t group_sizze_229362;\n    int32_t wave_sizze_229361;\n    int32_t group_tid_229360;\n    \n    global_tid_229358 = get_global_id(0);\n    local_tid_229359 = get_local_id(0);\n    group_sizze_229362 = get_local_size(0);\n    wave_sizze_229361 = LOCKSTEP_WIDTH;\n    group_tid_229360 = get_group_id(0);\n    \n    int32_t phys_tid_219268 = global_tid_229358;\n    int64_t global_tid_229363 = sext_i32_i64(group_tid_229360) *\n            segmap_group_sizze_219263 + sext_i32_i64(local_tid_229359);\n    int64_t slice_229364 = n_196692;\n    int64_t slice_229365 = m_196691 * slice_229364;\n    int64_t gtid_219266 = squot64(global_tid_229363, slice_229364);\n    int64_t remnant_229366 = global_tid_229363 - gtid_219266 * slice_229364;\n    int64_t gtid_219267 = remnant_229366;\n    int64_t remnant_229367 = remnant_229366 - 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, __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_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_229368;\n    int32_t local_tid_229369;\n    int64_t group_sizze_229372;\n    int32_t wave_sizze_229371;\n    int32_t group_tid_229370;\n    \n    global_tid_229368 = get_global_id(0);\n    local_tid_229369 = get_local_id(0);\n    group_sizze_229372 = get_local_size(0);\n    wave_sizze_229371 = LOCKSTEP_WIDTH;\n    group_tid_229370 = get_group_id(0);\n    \n    int32_t phys_tid_219285 = global_tid_229368;\n    int64_t global_tid_229373 = sext_i32_i64(group_tid_2",
            "29370) *\n            segmap_group_sizze_219279 + sext_i32_i64(local_tid_229369);\n    int64_t slice_229374 = n_196692;\n    int64_t slice_229375 = m_196691 * slice_229374;\n    int64_t gtid_219283 = squot64(global_tid_229373, slice_229374);\n    int64_t remnant_229376 = global_tid_229373 - gtid_219283 * slice_229374;\n    int64_t gtid_219284 = remnant_229376;\n    int64_t remnant_229377 = remnant_229376 - 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_229404;\n    int32_t local_tid_229405;\n    int64_t group_sizze_229408;\n    int32_t wave_sizze_229407;\n    int32_t group_tid_229406;\n    \n    global_tid_229404 = get_global_id(0);\n    local_tid_229405 = get_local_id(0);\n    group_sizze_229408 = get_local_size(0);\n    wave_sizze_229407 = LOCKSTEP_WIDTH;\n    group_tid_229406 = get_group_id(0);\n    \n    int32_t phys_tid_219672 = global_tid_229404;\n    int64_t global_tid_229409 = sext_i32_i64(group_tid_229406) *\n            segmap_group_sizze_219667 + sext_i32_i64(local_tid_229405);\n    int64_t slice_229410 = n_196692;\n    int64_t slice_229411 = m_196691 * slice_229410;\n    int64_t gtid_219670 = squot64(global_tid_229409, slice_229410);\n    int64_t remnant_229412 = global_tid_229409 - gtid_219670 * slice_229410;\n    int64_t gtid_219671 = remnant_229412;\n    int64_t remnant_229413 = remnant_229412 - 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_229414;\n    int32_t local_tid_229415;\n    int64_t group_sizze_229418;\n    int32_t wave_sizze_229417;\n    int32_t group_tid_229416;\n    \n    global_tid_229414 = get_global_id(0);\n    local_tid_229415 = get_local_id(0);\n    group_sizze_229418 = get_local_size(0);\n    wave_sizze_229417 = LOCKSTEP_WIDTH;\n    group_tid_229416 = get_group_id(0);\n    \n    int32_t phys_tid_219689 = global_tid_229414;\n    int64_t global_tid_229419 = sext_i32_i64(group_tid_229416) *\n            segmap_group_sizze_219683 + sext_i32_i64(local_tid_229415);\n    int64_t slice_229420 = n_196692;\n    int64_t slice_229421 = m_196691 * slice_229420;\n    int64_t gtid_219687 = squot64(global_tid_229419, slice_229420);\n    int64_t remnant_229422 = global_tid_229419 - gtid_219687 * slice_229420;\n    int64_t gtid_219688 = remnant_229422;\n    int64_t remnant_229423 = remnant_229422 - 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_219699 = 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_229454;\n    int32_t local_tid_229455;\n    int64_t group_sizze_229458;\n    int32_t wave_sizze_229457;\n    int32_t group_tid_229456;\n    \n    global_tid_229454 = get_global_id(0);\n  ",
            "  local_tid_229455 = get_local_id(0);\n    group_sizze_229458 = get_local_size(0);\n    wave_sizze_229457 = LOCKSTEP_WIDTH;\n    group_tid_229456 = get_group_id(0);\n    \n    int32_t phys_tid_219977 = global_tid_229454;\n    int64_t global_tid_229459 = sext_i32_i64(group_tid_229456) *\n            segmap_group_sizze_219972 + sext_i32_i64(local_tid_229455);\n    int64_t slice_229460 = n_196692;\n    int64_t slice_229461 = m_196691 * slice_229460;\n    int64_t gtid_219975 = squot64(global_tid_229459, slice_229460);\n    int64_t remnant_229462 = global_tid_229459 - gtid_219975 * slice_229460;\n    int64_t gtid_219976 = remnant_229462;\n    int64_t remnant_229463 = remnant_229462 - 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_229476;\n    int32_t local_tid_229477;\n    int64_t group_sizze_229480;\n    int32_t wave_sizze_229479;\n    int32_t group_tid_229478;\n ",
            "   \n    global_tid_229476 = get_global_id(0);\n    local_tid_229477 = get_local_id(0);\n    group_sizze_229480 = get_local_size(0);\n    wave_sizze_229479 = LOCKSTEP_WIDTH;\n    group_tid_229478 = get_group_id(0);\n    \n    int32_t phys_tid_220194 = global_tid_229476;\n    int64_t global_tid_229481 = sext_i32_i64(group_tid_229478) *\n            segmap_group_sizze_220189 + sext_i32_i64(local_tid_229477);\n    int64_t slice_229482 = n_196692;\n    int64_t slice_229483 = m_196691 * slice_229482;\n    int64_t gtid_220192 = squot64(global_tid_229481, slice_229482);\n    int64_t remnant_229484 = global_tid_229481 - gtid_220192 * slice_229482;\n    int64_t gtid_220193 = remnant_229484;\n    int64_t remnant_229485 = remnant_229484 - 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 char *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_229486;\n    int32_t local_tid_229487;\n    int64_t group_sizze_229490;\n    int32_t wave_sizze_229489;\n    int32_t group_tid_229488;\n    \n    global_tid_229486 = get_global_id(0);\n    local_tid_229487 = get_local_id(0);\n    group_sizze_229490 = get_local_size(0);\n    wave_sizze_229489 = LOCKSTEP_WIDTH;\n    group_tid_229488 = get_group_id(0);\n    \n    int32_t phys_tid_220215 = global_tid_229486;\n    int64_t global_tid_229491 = sext_i32_i64(group_tid_229488) *\n            segmap_group_sizze_220210 + sext_i32_i64(local_tid_229487);\n    int64_t slice_229492 = n_196692;\n    int64_t slice_229493 = m_196691 * slice_229492;\n    int64_t gtid_220213 = squot64(global_tid_229491, slice_229492);\n    int64_t remnant_229494 = global_tid_229491 - gtid_220213 * slice_229492;\n    int64_t gtid_220214 = remnant_229494;\n    int64_t remnant_229495 = remnant_229494 - 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 *co",
            "lor_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_229499;\n    int32_t local_tid_229500;\n    int64_t group_sizze_229503;\n    int32_t wave_sizze_229502;\n    int32_t group_tid_229501;\n    \n    global_tid_229499 = get_global_id(0);\n    local_tid_229500 = get_local_id(0);\n    group_sizze_229503 = get_local_size(0);\n    wave_sizze_229502 = LOCKSTEP_WIDTH;\n    group_tid_229501 = get_group_id(0);\n    \n    int32_t phys_tid_220339 = global_tid_229499;\n    int32_t phys_group_id_229504;\n    \n    phys_group_id_229504 = get_group_id(0);\n    for (int32_t i_229505 = 0; i_229505 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          segmap_group_sizze_220334)) -\n                   phys_group_id_229504, sext_i64_i32(num_groups_220335));\n         i_229505++) {\n        int32_t virt_group_id_229506 = phys_group_id_229504 + i_229505 *\n                sext_i64_i32(num_groups_220335);\n        int64_t global_tid_229507 = sext_i32_i64(virt_group_id_229506) *\n                segmap_group_sizze_220334 + sext_i32_i64(local_tid_229500);\n        int64_t slice_229508 = m_196691;\n        int64_t gtid_220338 = global_tid_229507;\n        int64_t remnant_229509 = global_tid_229507 - gtid_220338;\n        \n        if (slt64(gtid_220338, m_196691)) {\n            for (int64_t i_229510 = 0; i_229510 < n_196692; i_229510++) {\n           ",
            "     float tmp_229511;\n                \n                tmp_229511 = ((__global float *) mem_224630)[gtid_220338 +\n                                                             i_229510 *\n                                                             m_196691];\n                ((__global float *) color_225109)[phys_tid_220339 + i_229510 *\n                                                  num_threads_225271] =\n                    tmp_229511;\n            }\n            \n            __global unsigned char *ext_mem_224733;\n            __global unsigned char *ext_mem_unused_225003;\n            __global unsigned char *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_2203",
            "65;\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_r",
            "es_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_229515 = defunc_1_op_res_220361;\n                    int64_t scanacc_tmp_229516 = defunc_1_op_res_220362;\n                    int64_t scanacc_tmp_229517 = defunc_1_op_res_220363;\n                    int64_t scanacc_tmp_229518 = defunc_1_op_res_220364;\n                    \n                    scanacc_222143 = scanacc_tmp_229515;\n                    scanacc_222144 = scanacc_tmp_229516;\n                    scanacc_222145 = scanacc_tmp_229517;\n                    scanacc_222146 = scanacc_tmp_229518;\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_229524 = 0; i_229524 < n_196692; i_229524++) {\n                    float tmp_229525;\n                    \n                    tmp_229525 = ((__global\n                                   float *) mem_param_224640)[phys_tid_220339 +\n                                                              i_229524 *\n                                                              num_threads_225271];\n                    ((__global float *) mem_param_out_225004)[phys_tid_220339 +\n                                                              i_229524 *\n                                                              num_threads_225271] =\n                        tmp_229525;\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_229527 = 0; i_229527 < (int64_t) 1;\n                             i_229527++) {\n                            float tmp_229528;\n                            \n                            tmp_229528 = ((__global\n                                           float *) mem_param_224640)[phys_tid_220339 +\n                                                                      num_threads_225271 *\n                                                                      write_iter_222162 +\n                                                                      i_229527 *\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_229527 *\n                                                             num_threads_225271] =\n                                tmp_229528;\n                        }\n                    }\n                }\n                \n                __global unsigned char *mem_param_tmp_229512;\n                \n                mem_param_tmp_229512 = mem_param_out_225004;\n                \n                __global unsigned char *mem_param_out_tmp_229513;\n                \n                mem_param_out_tmp_229513 = mem_param_224640;\n                mem_param_224640 = mem_param_t",
            "mp_229512;\n                mem_param_out_225004 = mem_param_out_tmp_229513;\n            }\n            ext_mem_224733 = mem_param_224640;\n            ext_mem_unused_225003 = mem_param_out_225004;\n            for (int64_t i_229529 = 0; i_229529 < n_196692; i_229529++) {\n                float tmp_229530;\n                \n                tmp_229530 = ((__global\n                               float *) ext_mem_224733)[phys_tid_220339 +\n                                                        i_229529 *\n                                                        num_threads_225271];\n                ((__global float *) mem_224740)[gtid_220338 + i_229529 *\n                                                m_196691] = tmp_229530;\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_229874;\n    int32_t local_tid_229875;\n    int64_t group_sizze_229878;\n    int32_t wave_sizze_229877;\n    int32_t group_tid_229876;\n    \n    global_tid_229874 = get_global_id(0);\n    local_t",
            "id_229875 = get_local_id(0);\n    group_sizze_229878 = get_local_size(0);\n    wave_sizze_229877 = LOCKSTEP_WIDTH;\n    group_tid_229876 = get_group_id(0);\n    \n    int32_t phys_tid_221037 = global_tid_229874;\n    int64_t global_tid_229879 = sext_i32_i64(group_tid_229876) *\n            segmap_group_sizze_221032 + sext_i32_i64(local_tid_229875);\n    int64_t slice_229880 = n_196692;\n    int64_t slice_229881 = m_196691 * slice_229880;\n    int64_t gtid_221035 = squot64(global_tid_229879, slice_229880);\n    int64_t remnant_229882 = global_tid_229879 - gtid_221035 * slice_229880;\n    int64_t gtid_221036 = remnant_229882;\n    int64_t remnant_229883 = remnant_229882 - 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_221052, (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_s",
            "izze_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_229888;\n    int32_t local_tid_229889;\n    int64_t group_sizze_229892;\n    int32_t wave_sizze_229891;\n    int32_t group_tid_229890;\n    \n    global_tid_229888 = get_global_id(0);\n    local_tid_229889 = get_local_id(0);\n    group_sizze_229892 = get_local_size(0);\n    wave_sizze_229891 = LOCKSTEP_WIDTH;\n    group_tid_229890 = get_group_id(0);\n    \n    int32_t phys_tid_221092 = global_tid_229888;\n    int64_t global_tid_229893 = sext_i32_i64(group_tid_229890) *\n            segmap_group_sizze_221086 + sext_i32_i64(local_tid_229889);\n    int64_t slice_229894 = m_196691;\n    int64_t gtid_221091 = global_tid_229893;\n    int64_t remnant_229895 = global_tid_229893 - 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_229896 = defunc_1_op_res_221097;\n            \n            redout_222171 = redout_tmp_229896;\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 (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229965;\n    int32_t local_tid_229966;\n    int64_t group_sizze_229969;\n    int32_t wave_sizze_229968;\n    int32_t group_tid_229967;\n    \n    global_tid_229965 = get_global_id(0);\n    local_tid_229966 = get_local_id(0);\n    group_sizze_229969 = get_local_size(0);\n    wave_sizze_229968 = LOCKSTEP_WIDTH;\n    group_tid_229967 = get_group_id(0);\n    \n    int32_t phys_tid_221154 = global_tid_229965;\n    int64_t global_tid_229970 = sext_i32_i64(group_tid_229967) *\n            segmap_group_sizze_221148 + sext_i32_i64(local_tid_229966);\n    int64_t slice_229971 = m_196691;\n    int64_t gtid_221153 = global_tid_229970;\n    int64_t remnant_229972 = global_tid_229970 - 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_221",
            "148\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_229974;\n    int32_t local_tid_229975;\n    int64_t group_sizze_229978;\n    int32_t wave_sizze_229977;\n    int32_t group_tid_229976;\n    \n    global_tid_229974 = get_global_id(0);\n    local_tid_229975 = get_local_id(0);\n    group_sizze_229978 = get_local_size(0);\n    wave_sizze_229977 = LOCKSTEP_WIDTH;\n    group_tid_229976 = get_group_id(0);\n    \n    int32_t phys_tid_221240 = global_tid_229974;\n    int64_t global_tid_229979 = sext_i32_i64(group_tid_229976) *\n            segmap_group_sizze_221235 + sext_i32_i64(local_tid_229975);\n    int64_t slice_229980 = n_196692;\n    int64_t slice_229981 = m_196691 * slice_229980;\n    int64_t gtid_221238 = squot64(global_tid_229979, slice_229980);\n    int64_t remnant_229982 = global_tid_229979 - gtid_221238 * slice_229980;\n    int64_t gtid_221239 = remnant_229982;\n    int64_t remnant_229983 = remnant_229982 - 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_221252;\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_229984;\n    int32_t local_tid_229985;\n    int64_t group_sizze_229988;\n    int32_t wave_sizze_229987;\n    int32_t group_tid_229986;\n    \n    global_tid_229984 = get_global_id(0);\n    local_tid_229985 = get_local_id(0);\n    group_sizze_229988 = get_local_size(0);\n    wave_sizze_229987 = LOCKSTEP_WIDTH;\n    group_tid_229986 = get_group_id(0);\n    \n    int32_t phys_tid_221310 = global_tid_229984;\n    int64_t global_tid_229989 = sext_i32_i64(group_tid_229986) *\n            segmap_group_sizze_221305 + sext_i32_i64(local_tid_229985);\n    int64_t slice_229990 = n_196692;\n    int64_t slice_229991 = m_196691 * slice_229990;\n    int64_t gtid_221308 = squot64(global_tid_229989, slice_229990);\n    int64_t remnant_229992 = global_tid_229989 - gtid_221308 * slice_229990;\n    int64_t gtid_221309 = remnant_229992;\n    int64_t remnant_229993 = remnant_229992 - 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        fl",
            "oat 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                                             uint color_225012_backing_offset_0,\n                                             uint color_225011_backing_offset_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    volatile unsigned char *color_225012_backing_1 =\n                           &shared_mem[color_225012_backing_offset_0];\n    volatile unsigned char *color_225011_backing_0 =\n                           &shared_mem[color_225011_backing_offset_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_i64(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_bound",
            "s_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_222",
            "225)[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                                             uint color_225014_backing_offset_0,\n                                             uint color_225013_backing_offset_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    volatile unsigned char *color_225014_backing_1 =\n                           &shared_mem[color_225014_backing_offset_0];\n    volatile unsigned char *color_225013_backing_0 =\n                           &shared_mem[color_225013_backing_offset_1];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225479;\n    int32_t local_tid_225480;\n    int64_t group_sizze_225483;\n    int32_t wave_sizze_225482;\n    int32_t group_tid_225481;\n    \n    global_tid_225479 = get_global_id(0);\n    local_tid_225480 = get_local_id(0);\n    group_sizze_225483 = get_local_size(0);\n    wave_sizze_225482 = LOCKSTEP_WIDTH;\n    group_tid_225481 = get_group_id(0);\n    \n    int32_t phys_tid_200331 = group_tid_225481;\n    int64_t slice_225486 = defunc_0_f_res_196740;\n    int64_t slice_225487 = n_p_196694 * slice_225486;\n    int64_t ltid_pre_225484 = squot64(sext_i32_i64(local_tid_225480),\n                                      slice_225486);\n    int64_t remnant_225488 = sext_i32_i64(local_tid_225480) - ltid_pre_225484 *\n            slice_225486;\n    int64_t ltid_pre_225485 = remnant_225488;\n    int64_t remnant_225489 = remnant_225488 - ltid_pre_225485;\n    int64_t slice_225490 = m_196691;\n    int64_t gtid_200330 = sext_i32_i64(group_tid_225481);\n    int64_t remnant_225491 = sext_i32_i64(group_tid_225481) - 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_225484));\n    int64_t gtid_200336 = sext_i32_i64(sext_i64_i32(ltid_pre_225485));\n    int32_t phys",
            "_tid_200337 = local_tid_225480;\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_225492 = n_p_196694 * defunc_0_f_res_196740;\n    int64_t x_200338;\n    int64_t x_200339;\n    int64_t x_225494;\n    int64_t x_225495;\n    bool ltid_in_bounds_225497 = slt64(sext_i32_i64(local_tid_225480),\n                                       n_p_196694 * defunc_0_f_res_196740);\n    int32_t skip_threads_225498;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_225497) {\n            x_200339 = ((volatile __local\n                         int64_t *) color_225014)[sext_i32_i64(local_tid_225480)];\n            if ((local_tid_225480 - squot32(local_tid_225480, 32) * 32) == 0) {\n                x_200338 = x_200339;\n            }\n        }\n    }\n    // in-block scan (hopefully no barriers needed)\n    {\n        skip_threads_225498 = 1;\n        while (slt32(skip_threads_225498, 32)) {\n            bool thread_active_225499 = sle32(skip_threads_225498,\n                                              local_tid_225480 -\n          ",
            "                                    squot32(local_tid_225480, 32) *\n                                              32) && ltid_in_bounds_225497;\n            \n            if (thread_active_225499) {\n                // read operands\n                {\n                    x_200338 = ((volatile __local\n                                 int64_t *) color_225014)[sext_i32_i64(local_tid_225480) -\n                                                          sext_i32_i64(skip_threads_225498)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_225500 =\n                     slt64(srem64(sext_i32_i64(local_tid_225480),\n                                  defunc_0_f_res_196740),\n                           sext_i32_i64(local_tid_225480) -\n                           sext_i32_i64(local_tid_225480 -\n                           skip_threads_225498));\n                \n                if (thread_active_225499 && inactive_225500) {\n                    x_200338 = x_200339;\n                }\n                if (thread_active_225499) {\n                    if (!inactive_225500) {\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_225482, skip_threads_225498)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_225499) {\n                // write result\n                {\n                    ((volatile __local\n                      int64_t *) color_225014)[sext_i32_i64(local_tid_225480)] =\n                        x_200338;\n                    x_200339 = x_200338;\n                }\n            }\n            if (sle32(wave_sizze_225482, skip_threads_225498)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_22",
            "5498 *= 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_225480 - squot32(local_tid_225480, 32) * 32) == 31 &&\n            ltid_in_bounds_225497) {\n            ((volatile __local\n              int64_t *) color_225014)[sext_i32_i64(squot32(local_tid_225480,\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_225501;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_225480, 32) == 0 && ltid_in_bounds_225497) {\n                x_225495 = ((volatile __local\n                             int64_t *) color_225014)[sext_i32_i64(local_tid_225480)];\n                if ((local_tid_225480 - squot32(local_tid_225480, 32) * 32) ==\n                    0) {\n                    x_225494 = x_225495;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_225501 = 1;\n            while (slt32(skip_threads_225501, 32)) {\n                bool thread_active_225502 = sle32(skip_threads_225501,\n                                                  local_tid_225480 -\n                                                  squot32(local_tid_225480,\n                                                          32) * 32) &&\n                     (squot32(local_tid_225480, 32) == 0 &&\n                      ltid_in_bounds_225497);\n                \n                if (thread_active_225502) {\n                    // read operands\n                    {\n                        x_225494 = ((volatile __local\n                                     int64_t *) color_225014)[sext_i32_i64(local_tid_225480) -\n                                                              sext_i32_i64(skip_threads_225501)];\n               ",
            "     }\n                }\n                // perform operation\n                {\n                    bool inactive_225503 =\n                         slt64(srem64(sext_i32_i64(local_tid_225480 * 32 + 32 -\n                                      1), defunc_0_f_res_196740),\n                               sext_i32_i64(local_tid_225480 * 32 + 32 - 1) -\n                               sext_i32_i64((local_tid_225480 -\n                                             skip_threads_225501) * 32 + 32 -\n                               1));\n                    \n                    if (thread_active_225502 && inactive_225503) {\n                        x_225494 = x_225495;\n                    }\n                    if (thread_active_225502) {\n                        if (!inactive_225503) {\n                            int64_t defunc_1_op_res_225496 = add64(x_225494,\n                                                                   x_225495);\n                            \n                            x_225494 = defunc_1_op_res_225496;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_225482, skip_threads_225501)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_225502) {\n                    // write result\n                    {\n                        ((volatile __local\n                          int64_t *) color_225014)[sext_i32_i64(local_tid_225480)] =\n                            x_225494;\n                        x_225495 = x_225494;\n                    }\n                }\n                if (sle32(wave_sizze_225482, skip_threads_225501)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_225501 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_225504 = squot32(local_tid_225480, 32) == 0 ||\n         !ltid_in_bounds_225497;\n    \n    // carry-in for every block except the first\n    {\n        // r",
            "ead operands\n        {\n            if (!no_carry_in_225504) {\n                x_200339 = x_200338;\n                x_200338 = ((__local\n                             int64_t *) color_225014)[sext_i32_i64(squot32(local_tid_225480,\n                                                                           32)) -\n                                                      (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_225505 = slt64(srem64(sext_i32_i64(local_tid_225480),\n                                                defunc_0_f_res_196740),\n                                         sext_i32_i64(local_tid_225480) -\n                                         sext_i32_i64(squot32(local_tid_225480,\n                                                              32) * 32 - 1));\n            \n            if (!no_carry_in_225504) {\n                if (inactive_225505) {\n                    x_200338 = x_200339;\n                }\n            }\n            if (!no_carry_in_225504) {\n                if (!inactive_225505) {\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_225504) {\n                ((__local\n                  int64_t *) color_225014)[sext_i32_i64(local_tid_225480)] =\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_225480, 32) == 0 && ltid_in_bounds_225497) {\n            ((__local int64_t *) color_225014)[sext_i32_i64(local_tid_225480)] =\n                x_200339;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_225506 = 0; i_225506 < sdiv_up64(n_p_196694 *\n                                                    defunc_0_f_res_196740 -\n                                ",
            "                    sext_i32_i64(local_tid_225480),\n                                                    computed_group_sizze_200270);\n         i_225506++) {\n        ((__local int64_t *) color_225013)[squot64(i_225506 *\n                                                   computed_group_sizze_200270 +\n                                                   sext_i32_i64(local_tid_225480),\n                                                   defunc_0_f_res_196740) *\n                                           defunc_0_f_res_196740 + (i_225506 *\n                                                                    computed_group_sizze_200270 +\n                                                                    sext_i32_i64(local_tid_225480) -\n                                                                    squot64(i_225506 *\n                                                                            computed_group_sizze_200270 +\n                                                                            sext_i32_i64(local_tid_225480),\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_225484));\n    int64_t gtid_200358 = sext_i32_i64(sext_i64_i32(ltid_pre_225485));\n    int32_t phys_tid_200359 = local_tid_225480;\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_225507 = 0; i_225507 < sdiv_up64(n_p_196694 *\n                                                    defunc_0_f_res_196740 -\n                                                    sext_i32_i64(local_tid_225480),\n                                                    computed_group_sizze_200270);\n         i_225507++) {\n        int64_t tmp_225508;\n        \n        tmp_225508 = ((__local int64_t *) color_225013)[squot64(i_225507 *\n                                                                computed_group_sizze_200270 +\n                                                                sext_i32_i64(local_tid_225480),\n                        ",
            "                                        defunc_0_f_res_196740) *\n                                                        defunc_0_f_res_196740 +\n                                                        (i_225507 *\n                                                         computed_group_sizze_200270 +\n                                                         sext_i32_i64(local_tid_225480) -\n                                                         squot64(i_225507 *\n                                                                 computed_group_sizze_200270 +\n                                                                 sext_i32_i64(local_tid_225480),\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_225507 *\n                                                  computed_group_sizze_200270 +\n                                                  sext_i32_i64(local_tid_225480),\n                                                  defunc_0_f_res_196740) *\n                                          defunc_0_f_res_196740 + (i_225507 *\n                                                                   computed_group_sizze_200270 +\n                                                                   sext_i32_i64(local_tid_225480) -\n                                                                   squot64(i_225507 *\n                                                                           computed_group_sizze_200270 +\n                                                                           sext_i32_i64(local_tid_225480),\n                                                                           defunc_0_f_res_196740) *\n                                               ",
            "                    defunc_0_f_res_196740)] =\n            tmp_225508;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_225509 = 0; i_225509 < sdiv_up64(n_p_196694 -\n                                                    sext_i32_i64(local_tid_225480),\n                                                    computed_group_sizze_200270);\n         i_225509++) {\n        int64_t tmp_225510;\n        \n        tmp_225510 = ((__local int64_t *) color_225014)[i_196831 + (i_225509 *\n                                                                    computed_group_sizze_200270 +\n                                                                    sext_i32_i64(local_tid_225480)) *\n                                                        defunc_0_f_res_196740];\n        ((__global int64_t *) mem_222283)[gtid_200330 * n_p_196694 + (i_225509 *\n                                                                      computed_group_sizze_200270 +\n                                                                      sext_i32_i64(local_tid_225480))] =\n            tmp_225510;\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                                             uint color_225016_backing_offset_0,\n                                             uint color_225015_backing_offset_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    volatile unsigned",
            " char *color_225016_backing_1 =\n                           &shared_mem[color_225016_backing_offset_0];\n    volatile unsigned char *color_225015_backing_0 =\n                           &shared_mem[color_225015_backing_offset_1];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225511;\n    int32_t local_tid_225512;\n    int64_t group_sizze_225515;\n    int32_t wave_sizze_225514;\n    int32_t group_tid_225513;\n    \n    global_tid_225511 = get_global_id(0);\n    local_tid_225512 = get_local_id(0);\n    group_sizze_225515 = get_local_size(0);\n    wave_sizze_225514 = LOCKSTEP_WIDTH;\n    group_tid_225513 = get_group_id(0);\n    \n    int32_t phys_tid_200607 = group_tid_225513;\n    int64_t slice_225517 = defunc_0_f_res_196740;\n    int64_t ltid_pre_225516 = sext_i32_i64(local_tid_225512);\n    int64_t remnant_225518 = sext_i32_i64(local_tid_225512) - ltid_pre_225516;\n    int64_t slice_225519 = n_p_196694;\n    int64_t slice_225520 = m_196691 * slice_225519;\n    int64_t gtid_200605 = squot64(sext_i32_i64(group_tid_225513), slice_225519);\n    int64_t remnant_225521 = sext_i32_i64(group_tid_225513) - gtid_200605 *\n            slice_225519;\n    int64_t gtid_200606 = remnant_225521;\n    int64_t remnant_225522 = remnant_225521 - 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_225516));\n    int32_t phys_tid_200612 = local_tid_225512;\n    float x_200616;\n    \n    x_200616 = ((__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                                               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_225523 = defunc_0_f_res_196740;\n    int64_t x_200613;\n    int64_t x_200614;\n    int64_t x_225525;\n    int64_t x_225526;\n    bool ltid_in_bounds_225528 = slt64(sext_i32_i64(local_tid_225512),\n                                       defunc_0_f_res_196740);\n    int32_t skip_threads_225529;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_225528) {\n            x_200614 = ((volatile __local\n                         int64_t *) color_225016)[sext_i32_i64(local_tid_225512)];\n            if ((local_tid_225512 - squot32(local_tid_225512, 32) * 32) == 0) {\n                x_200613 = x_200614;\n            }\n        }\n    }\n    // in-block scan (hopefully no barriers needed)\n    {\n        skip_threads_225529 = 1;\n        while (slt32(skip_threads_225529, 32)) {\n            bool thread_active_225530 = sle32(skip_threads_225529,\n                                              local_tid_225512 -\n                                              squot32(local_tid_225512, 32) *\n                                              32) && ltid_in_bounds_225528;\n            \n            if (thread_active_225530) {\n                // read operands\n                {\n                    x_200613 = ((volatile __local\n                                 int64_t *) color_225016)[sext_i32_i64(local_tid_225512) -\n                                                          sext_i32_i64(skip_threads_225529)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_225531 =\n                     slt64(srem64(sext_i32_i64(local_tid_225512),\n                                  defunc_0_f_res_196740)",
            ",\n                           sext_i32_i64(local_tid_225512) -\n                           sext_i32_i64(local_tid_225512 -\n                           skip_threads_225529));\n                \n                if (thread_active_225530 && inactive_225531) {\n                    x_200613 = x_200614;\n                }\n                if (thread_active_225530) {\n                    if (!inactive_225531) {\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_225514, skip_threads_225529)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_225530) {\n                // write result\n                {\n                    ((volatile __local\n                      int64_t *) color_225016)[sext_i32_i64(local_tid_225512)] =\n                        x_200613;\n                    x_200614 = x_200613;\n                }\n            }\n            if (sle32(wave_sizze_225514, skip_threads_225529)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_225529 *= 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_225512 - squot32(local_tid_225512, 32) * 32) == 31 &&\n            ltid_in_bounds_225528) {\n            ((volatile __local\n              int64_t *) color_225016)[sext_i32_i64(squot32(local_tid_225512,\n                                                            32))] = x_200613;\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_225532;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_225512, 32) == 0 &&",
            " ltid_in_bounds_225528) {\n                x_225526 = ((volatile __local\n                             int64_t *) color_225016)[sext_i32_i64(local_tid_225512)];\n                if ((local_tid_225512 - squot32(local_tid_225512, 32) * 32) ==\n                    0) {\n                    x_225525 = x_225526;\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_225512 -\n                                                  squot32(local_tid_225512,\n                                                          32) * 32) &&\n                     (squot32(local_tid_225512, 32) == 0 &&\n                      ltid_in_bounds_225528);\n                \n                if (thread_active_225533) {\n                    // read operands\n                    {\n                        x_225525 = ((volatile __local\n                                     int64_t *) color_225016)[sext_i32_i64(local_tid_225512) -\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_225512 * 32 + 32 -\n                                      1), defunc_0_f_res_196740),\n                               sext_i32_i64(local_tid_225512 * 32 + 32 - 1) -\n                               sext_i32_i64((local_tid_225512 -\n                                             skip_threads_225532) * 32 + 32 -\n                               1));\n                    \n                    if (thread_active_225533 && inactive_225534) {\n                        x_225525 = x_225526;\n                    }\n                    if (thread_active_22553",
            "3) {\n                        if (!inactive_225534) {\n                            int64_t defunc_1_op_res_225527 = add64(x_225525,\n                                                                   x_225526);\n                            \n                            x_225525 = defunc_1_op_res_225527;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_225514, 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 *) color_225016)[sext_i32_i64(local_tid_225512)] =\n                            x_225525;\n                        x_225526 = x_225525;\n                    }\n                }\n                if (sle32(wave_sizze_225514, skip_threads_225532)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_225532 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_225535 = squot32(local_tid_225512, 32) == 0 ||\n         !ltid_in_bounds_225528;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_225535) {\n                x_200614 = x_200613;\n                x_200613 = ((__local\n                             int64_t *) color_225016)[sext_i32_i64(squot32(local_tid_225512,\n                                                                           32)) -\n                                                      (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_225536 = slt64(srem64(sext_i32_i64(local_tid_225512),\n                                                defunc_0_f_res_196740),\n                                         sext_i32_i64(local_tid_225512) -\n                                         sext_i32_i64(s",
            "quot32(local_tid_225512,\n                                                              32) * 32 - 1));\n            \n            if (!no_carry_in_225535) {\n                if (inactive_225536) {\n                    x_200613 = x_200614;\n                }\n            }\n            if (!no_carry_in_225535) {\n                if (!inactive_225536) {\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_225535) {\n                ((__local\n                  int64_t *) color_225016)[sext_i32_i64(local_tid_225512)] =\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_225512, 32) == 0 && ltid_in_bounds_225528) {\n            ((__local int64_t *) color_225016)[sext_i32_i64(local_tid_225512)] =\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_225512)] =\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_225516));\n    int32_t phys_tid_200624 = local_tid_225512;\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_225537;\n    \n    tmp_225537 = ((__local\n                   int64_t *) color_225015)[sext_i32_i64(local_tid_225512)];\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_225512)] =\n        tmp_225537;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    if (local_tid_225512 == 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                                             uint color_225023_backing_offset_0,\n                                             uint color_225022_backing_offset_1,\n                                             uint color_225021_backing_offset_2,\n                                             uint color_225020_backing_offset_3,\n                                             uint color_225019_backing_offset_4,\n                                       ",
            "      uint color_225018_backing_offset_5,\n                                             uint color_225017_backing_offset_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    volatile unsigned char *color_225023_backing_6 =\n                           &shared_mem[color_225023_backing_offset_0];\n    volatile unsigned char *color_225022_backing_5 =\n                           &shared_mem[color_225022_backing_offset_1];\n    volatile unsigned char *color_225021_backing_4 =\n                           &shared_mem[color_225021_backing_of",
            "fset_2];\n    volatile unsigned char *color_225020_backing_3 =\n                           &shared_mem[color_225020_backing_offset_3];\n    volatile unsigned char *color_225019_backing_2 =\n                           &shared_mem[color_225019_backing_offset_4];\n    volatile unsigned char *color_225018_backing_1 =\n                           &shared_mem[color_225018_backing_offset_5];\n    volatile unsigned char *color_225017_backing_0 =\n                           &shared_mem[color_225017_backing_offset_6];\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_225671;\n    int32_t local_tid_225672;\n    int64_t group_sizze_225675;\n    int32_t wave_sizze_225674;\n    int32_t group_tid_225673;\n    \n    global_tid_225671 = get_global_id(0);\n    local_tid_225672 = get_local_id(0);\n    group_sizze_225675 = get_local_size(0);\n    wave_sizze_225674 = LOCKSTEP_WIDTH;\n    group_tid_225673 = get_group_id(0);\n    \n    int32_t phys_tid_200860 = group_tid_225673;\n    int64_t slice_225677 = n_p_196694;\n    int64_t ltid_pre_225676 = sext_i32_i64(local_tid_225672);\n    int64_t remnant_225678 = sext_i32_i64(local_tid_225672) - ltid_pre_225676;\n    int64_t slice_225681 = defunc_0_f_res_196740;\n    int64_t slice_225682 = n_p_196694 * slice_225681;\n    int64_t ltid_pre_225679 = squot64(sext_i32_i64(local_tid_225672),\n                                      slice_225681);\n    int64_t remnant_225683 = sext_i32_i64(local_tid_225672) - ltid_pre_225679 *\n            slice_225681;\n    int64_t ltid_pre_225680 = remnant_225683;\n    int64_t remnant_225684 = remnant_225683 - ltid_pre_225680;\n    int64_t slice_225687 = s_n_m_196745;\n    int64_t slice_225688 = n_p_196694 * slice_225687;\n    int64_t ltid_pre_225685 = squot64(sext_i32_i64(local_tid_225672),\n                                      slice_2256",
            "87);\n    int64_t remnant_225689 = sext_i32_i64(local_tid_225672) - ltid_pre_225685 *\n            slice_225687;\n    int64_t ltid_pre_225686 = remnant_225689;\n    int64_t remnant_225690 = remnant_225689 - ltid_pre_225686;\n    int64_t slice_225691 = m_196691;\n    int64_t gtid_200859 = sext_i32_i64(group_tid_225673);\n    int64_t remnant_225692 = sext_i32_i64(group_tid_225673) - 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 unsigned 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_225679));\n    int64_t gtid_200867 = sext_i32_i64(sext_i64_i32(ltid_pre_225680));\n    int32_t phys_tid_200868 = local_tid_225672;\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_225676));\n    int32_t phys_tid_200876 = local_tid_225672;\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_225685));\n    int64_t gtid_200888 = sext_i32_i64(sext_i64_i32(ltid_pre_225686));\n    int32_t phys_tid_200889 = local_tid_225672;\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 int",
            "64_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_200",
            "914 = 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 = true;\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_225693 = loop_cond_200926;\n            int64_t low_tmp_225694 = loopres_200922;\n            int64_t high_tmp_225695 = loopres_200923;\n            \n            loop_while_200909 = loop_while_tmp_225693;\n            low_200910 = low_tmp_225694;\n            high_200911 = high_tmp_225695;\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_200931;\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            } e",
            "lse {\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_225696 = loop_cond_200967;\n            int64_t l_idx_tmp_225697 = loopres_200954;\n            int64_t r_idx_tmp_225698 = loopres_200955;\n            int64_t span_tmp_225699 = loopres_200956;\n         ",
            "   \n            loop_while_200931 = loop_while_tmp_225696;\n            l_idx_200932 = l_idx_tmp_225697;\n            r_idx_200933 = r_idx_tmp_225698;\n            span_200934 = span_tmp_225699;\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        f",
            "loat 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_225700 = 0; i_225700 < sdiv_up64(n_p_196694 * s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_225672),\n                                                    computed_group_sizze_200702);\n         i_225700++) {\n        int64_t tmp_225701;\n        \n        tmp_225701 = ((__local int64_t *) color_225017)[squot64(i_225700 *\n                                                                computed_group_sizze_200702 +\n                                                                sext_i32_i64(local_tid_225672),\n                                                                s_n_m_196745) *\n                                                        s_n_m_196745 +\n                                                        (i_225700 *\n                                                         computed_group_sizze_200702 +\n                                                         sext_i32_i64(local_tid_225672) -\n                                                         squot64(i_225700 *\n                                                                 computed_group_sizze_200702 +\n                                                                 sext_i32_i64(local_tid_225672),\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_225700 *\n                                                  computed_group_sizze_200702 +\n                                                  sext_i32_i64(local_tid_225672),\n                                                  s_n_m_196745) * s_n_m_196745 +\n                                          (i_225700 *\n                                           computed_group_sizze_200702 +\n                                           sext_i32_i64(local_tid_225672) -\n                                           squot64(i_225700 *\n                                                   computed_group_sizze_200702 +\n                                                   sext_i32_i64(local_tid_225672),\n                                                   s_n_m_196745) *\n                                           s_n_m_196745)] = tmp_225701;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_225702 = 0; i_225702 < sdiv_up64(n_p_196694 * s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_225672),\n                                                    computed_group_sizze_200702);\n         i_225702++) {\n        float tmp_225703;\n        \n        tmp_225703 = ((__local float *) color_225018)[squot64(i_225702 *\n                                                              computed_group_sizze_200702 +\n                                                              sext_i32_i64(local_tid_225672),\n                                                              s_n_m_196745) *\n                                                      s_n_m_196745 + (i_225702 *\n                                                                      computed_group_sizze_200702 +\n                                                                      sext_i32_i64(local_tid_225672) -\n                                                                      squot64(i_225702 *\n                                        ",
            "                                      computed_group_sizze_200702 +\n                                                                              sext_i32_i64(local_tid_225672),\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_225702 *\n                                                computed_group_sizze_200702 +\n                                                sext_i32_i64(local_tid_225672),\n                                                s_n_m_196745) * s_n_m_196745 +\n                                        (i_225702 *\n                                         computed_group_sizze_200702 +\n                                         sext_i32_i64(local_tid_225672) -\n                                         squot64(i_225702 *\n                                                 computed_group_sizze_200702 +\n                                                 sext_i32_i64(local_tid_225672),\n                                                 s_n_m_196745) *\n                                         s_n_m_196745)] = tmp_225703;\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                                             uint color_225026_backing_offset_0,\n                                             uint color_225025_backing_offset_1,\n                                             uint color_225024_backing_offset_2,\n                                             int64_t m_196691,\n                                             int6",
            "4_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    volatile unsigned char *color_225026_backing_2 =\n                           &shared_mem[color_225026_backing_offset_0];\n    volatile unsigned char *color_225025_backing_1 =\n                           &shared_mem[color_225025_backing_offset_1];\n    volatile unsigned char *color_225024_backing_0 =\n                           &shared_mem[color_225024_backing_offset_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_M",
            "EM_FENCE);\n    \n    int32_t global_tid_225704;\n    int32_t local_tid_225705;\n    int64_t group_sizze_225708;\n    int32_t wave_sizze_225707;\n    int32_t group_tid_225706;\n    \n    global_tid_225704 = get_global_id(0);\n    local_tid_225705 = get_local_id(0);\n    group_sizze_225708 = get_local_size(0);\n    wave_sizze_225707 = LOCKSTEP_WIDTH;\n    group_tid_225706 = get_group_id(0);\n    \n    int32_t phys_tid_201764 = group_tid_225706;\n    int64_t slice_225710 = defunc_0_f_res_196740;\n    int64_t ltid_pre_225709 = sext_i32_i64(local_tid_225705);\n    int64_t remnant_225711 = sext_i32_i64(local_tid_225705) - ltid_pre_225709;\n    int64_t slice_225713 = s_n_m_196745;\n    int64_t ltid_pre_225712 = sext_i32_i64(local_tid_225705);\n    int64_t remnant_225714 = sext_i32_i64(local_tid_225705) - ltid_pre_225712;\n    int64_t slice_225715 = n_p_196694;\n    int64_t slice_225716 = m_196691 * slice_225715;\n    int64_t gtid_201762 = squot64(sext_i32_i64(group_tid_225706), slice_225715);\n    int64_t remnant_225717 = sext_i32_i64(group_tid_225706) - gtid_201762 *\n            slice_225715;\n    int64_t gtid_201763 = remnant_225717;\n    int64_t remnant_225718 = remnant_225717 - 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_225709));\n    int32_t phys_tid_201770 = local_tid_225705;\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_20176",
            "2 *\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_225712));\n    int32_t phys_tid_201783 = local_tid_225705;\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                i",
            "nt64_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_225719 = loop_cond_201815;\n            int64_t low_tmp_225720 = loopres_201811;\n            int64_t high_tmp_225721 = loopres_201812;\n            \n            loop_while_201798 = loop_while_tmp_225719;\n            low_201799 = low_tmp_225720;\n            high_201800 = high_tmp_225721;\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_225722 = loop_cond_201856;\n            int64_t l_idx_tmp_225723 = loopres_201843;\n            int64_t r_idx_tmp_225724 = loopres_201844;\n            int64_t span_tmp_225725 = loopres_201845;\n            \n            loop_while_201820 = loop_while_tmp_225722;\n            l_idx_201821 = l_idx_tmp_225723;\n            r_idx_201822 = r_idx_tmp_225724;\n            span_201823 = span_tmp_225725;\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_2018",
            "59 = 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_201870 = 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_20187",
            "6, 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 float *) 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_225726 = 0; i_225726 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_225705),\n                                                    computed_group_sizze_201750);\n         i_225726++) {\n        int64_t tmp_225727;\n        \n        tmp_225727 = ((__local int64_t *) color_225024)[i_225726 *\n                                                        computed_group_sizze_201750 +\n                                                        sext_i32_i64(local_tid_225705)];\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_225726 *\n                                           computed_group_sizze_201750 +\n                                           sext_i32_i64(local_tid_225705))] =\n            tmp_225727;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_225728 = 0; i_225728 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_225705),\n                                                    computed_group_sizze_201750);\n         i_225728++) {\n        float tmp_225729;\n        \n        tmp_225729 = ((__local float *) color_225025)[i_225728 *\n                                                      computed_group_sizze_201750 +\n                                                      sext_i32_i64(local_tid_225705",
            ")];\n        ((__global float *) mem_222382)[gtid_201762 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_201763 * s_n_m_196745 + (i_225728 *\n                                                                      computed_group_sizze_201750 +\n                                                                      sext_i32_i64(local_tid_225705))] =\n            tmp_225729;\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                                             uint color_225029_backing_offset_0,\n                                             uint color_225028_backing_offset_1,\n                                             uint color_225027_backing_offset_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    volatile unsigned char *color_225029_backing_2 =\n                           &shared_mem[color_225029_backing_offset_0];\n    volatile unsigned char *color_225028_backing_1 =\n                           &shared_mem[color_225028_backing_offset_1];\n    volatile unsigned char *color_225027_backing_0 =\n                           &shared_mem[color_225027_backing_offset_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_225773;\n    int32_t local_tid_225774;\n    int64_t group_sizze_225777;\n    int32_t wave_sizze_225776;\n    int32_t group_tid_225775;\n    \n    global_tid_225773 = get_global_id(0);\n    local_tid_225774 = get_local_id(0);\n    group_sizze_225777 = get_local_size(0);\n    wave_sizze_225776 = LOCKSTEP_WIDTH;\n    group_tid_225775 = get_group_id(0);\n    \n    int32_t phys_tid_202165 = group_tid_225775;\n    int64_t slice_225779 = n_196692;\n    int64_t ltid_pre_225778 = sext_i32_i64(local_tid_225774);\n    int64_t remnant_225780 = sext_i32_i64(local_tid_225774) - ltid_pre_225778;\n    int64_t slice_225782 = l_n_m_196752;\n    int64_t ltid_pre_225781 = sext_i32_i64(local_tid_225774);\n    int64_t remnant_225783 = sext_i32_i64(local_tid_225774) - ltid_pre_225781;\n    int64_t slice_225784 = m_196691;\n    int64_t gtid_202164 = sext_i32_i64(group_tid_225775);\n    int64_t remnant_225785 = sext_i32_i64(group_tid_225775) - 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_225778));\n    int32_t phys_tid_202171 = local_tid_225774;\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_225781));\n    int32_t phys_tid_202184 = local_tid_225774;\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        h",
            "igh_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_225786 = loop_cond_202209;\n            int64_t low_tmp_225787 = loopres_202205;\n            int64_t high_tmp_225788 = loopres_202206;\n            \n            loop_while_202192 = loop_while_tmp_225786;\n            low_202193 = low_tmp_225787;\n            high_202194 = high_tmp_225788;\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_2",
            "02226 = ((__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_202242 = !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_225789 = loop_cond_202250;\n            int64_t l_idx_tmp_225790 = loopres_202237;\n            int64_t r_idx_tmp_225791 = loopres_202238;\n            int64_t span_tmp_225792 = loopres_202239;\n            \n            loop_while_202214 = loop_while_tmp_225789;\n            l_idx_202215 = l_idx_tmp_225790;\n            r_idx_202216 = r_idx_tmp_225791;\n            span_202217 = span_tmp_225792;\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        int",
            "64_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_202266;\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_225793 = 0; i_225793 < sdiv_up64(l_n_m_196752 -\n                                                    sext_i32_i64(local_tid_225774),\n                                                    computed_group_sizze_202056);\n         i_225793++) {\n        int64_t tmp_225794;\n        \n        tmp_225794 = ((__local int64_t *) color_225027)[i_225793 *\n                                                        computed_group_sizze_202056 +\n                                                        sext_i32_i64(local_tid_225774)];\n        ((__global int64_t *) mem_222436)[gtid_202164 * l_n_m_196752 +\n                                          (i_225793 *\n                                           computed_group_sizze_202056 +\n                                           sext_i32_i64(local_tid_225774))] =\n            tmp_225794;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_225795 = 0; i_225795 < sdiv_up64(l_n_m_196752 -\n                                                    sext_i32_i64(local_tid_225774),\n                                                    computed_group_sizze_202056);\n         i_225795++) {\n        float tmp_225796;\n        \n        tmp_225796 = ((__local float *) color_225028)[i_225795 *\n                                                      computed_group_sizze_202056 +\n                                                      sext_i32_i64(loc",
            "al_tid_225774)];\n        ((__global float *) mem_222440)[gtid_202164 * l_n_m_196752 + (i_225795 *\n                                                                      computed_group_sizze_202056 +\n                                                                      sext_i32_i64(local_tid_225774))] =\n            tmp_225796;\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                                             uint color_225032_backing_offset_0,\n                                             uint color_225031_backing_offset_1,\n                                             uint color_225030_backing_offset_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 *me",
            "m_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    volatile unsigned char *color_225032_backing_2 =\n                           &shared_mem[color_225032_backing_offset_0];\n    volatile unsigned char *color_225031_backing_1 =\n                           &shared_mem[color_225031_backing_offset_1];\n    volatile unsigned char *color_225030_backing_0 =\n                           &shared_mem[color_225030_backing_offset_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_225833;\n    int32_t local_tid_225834;\n    int64_t group_sizze_225837;\n    int32_t wave_sizze_225836;\n    int32_t group_tid_225835;\n    \n    global_tid_225833 = get_global_id(0);\n    local_tid_225834 = get_local_id(0);\n    group_sizze_225837 = get_local_size(0);\n    wave_sizze_225836 = LOCKSTEP_WIDTH;\n    group_tid_225835 = get_group_id(0);\n    \n    int32_t phys_tid_202791 = group_tid_225835;\n    int64_t slice_225839 = n_196692;\n    int64_t ltid_pre_225838 = sext_i32_i64(local_tid_225834);\n    int64_t remnant_225840 = sext_i32_i64(local_tid_225834) - ltid_pre_225838;\n    int64_t slice_225842 = t_n_m_196759;\n    int64_t ltid_pre_225841 = sext_i32_i64(local_tid_225834);\n    int64_t remnant_225843 = sext_i32_i64(local_tid_225834) - ltid_pre_225841;\n    int64_t slice_225844 = m_196691;\n    int64_t gtid_202790 = sext_i32_i64(group_tid_225835);\n    int64_t remnant_225845 = sext_i32_i64(group_tid_225835) - 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    __loca",
            "l 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_225838));\n    int32_t phys_tid_202797 = local_tid_225834;\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_225841));\n    int32_t phys_tid_202810 = local_tid_225834;\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_225846 = loop_cond_202835;\n            int64_t low_tmp",
            "_225847 = loopres_202831;\n            int64_t high_tmp_225848 = loopres_202832;\n            \n            loop_while_202818 = loop_while_tmp_225846;\n            low_202819 = low_tmp_225847;\n            high_202820 = high_tmp_225848;\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_225849 = loop_cond_202876;\n            int64_t l_idx_tmp_225850 = loopres_202863;\n            int64_t r_idx_tmp_225851 = loopres_202864;\n            int64_t span_tmp_225852 = loopres_202865;\n            \n            loop_while_202840 = loop_while_tmp_225849;\n            l_idx_202841 = l_idx_tmp_225850;\n            r_idx_202842 = r_idx_tmp_225851;\n            span_202843 = span_tmp_225852;\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(global_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_225853 = 0; i_225853 < sdiv_up64(t_n_m_196759 -\n                                                    sext_i32_i64(local_tid_225834),\n                                                    computed_group_sizze_202682);\n         i_225853++) {\n        int64_t tmp_225854;\n        \n        tmp_225854 = ((__local int64_t *) color_225030)[i_225853 *\n                                                        computed_group_sizze_202682 +\n                                                        sext_i32_i64(local_tid_225834)];\n        ((__global int64_t *) mem_222485)[gtid_202790 * t_n_m_196759 +\n                                          (i_225853 *\n                                           computed_group_sizze_202682 +\n                                           sext_i32_i64(local_tid_225834))] =\n            tmp_225854;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_225855 = 0; i_225855 < sdiv_up64(t_n_m_196759 -\n                                                    sext_i32_i64(local_tid_225834),\n                                                    computed_group_sizze_202682);\n         i_225855++) {\n        float tmp_225856;\n        \n        tmp_225856 = ((__local float *) color_225031)[i_225855 *\n                                                      computed_group_sizze_202682 +\n                                                      sext_i32_i64(local_tid_225834)];\n        ((__global float *) mem_222489)[gtid_202790 * t_n_m_196759 + (i_225855 *\n                            ",
            "                                          computed_group_sizze_202682 +\n                                                                      sext_i32_i64(local_tid_225834))] =\n            tmp_225856;\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                                             uint red_arr_mem_226030_backing_offset_0,\n                                             uint red_arr_mem_226012_backing_offset_1,\n                                             uint color_225038_backing_offset_2,\n                                             uint color_225037_backing_offset_3,\n                                             uint color_225036_backing_offset_4,\n                                             uint color_225035_backing_offset_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_2225",
            "83,\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    volatile unsigned char *red_arr_mem_226030_backing_5 =\n                           &shared_mem[red_arr_mem_226030_backing_offset_0];\n    volatile unsigned char *red_arr_mem_226012_backing_4 =\n                           &shared_mem[red_arr_mem_226012_backing_offset_1];\n    volatile unsigned char *color_225038_backing_3 =\n                           &shared_mem[color_225038_backing_offset_2];\n    volatile unsigned char *color_225037_backing_2 =\n                           &shared_mem[color_225037_backing_offset_3];\n    volatile unsigned char *color_225036_backing_1 =\n                           &shared_mem[color_225036_backing_offset_4];\n    volatile unsigned char *color_225035_backing_0 =\n                           &shared_mem[color_225035_backing_offset_5];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225994;\n    int32_t local_tid_225995;\n    int64_t group_sizze_225998;\n    int32_t wave_sizze_225997;\n    int32_t group_tid_225996;\n    \n    global_tid_225994 = get_global_id(0);\n    local_tid_225995 = get_local_id(0);\n    group_sizze_225998 = get_local_size(0);\n    wave_sizze_225997 = LOCKSTEP_WIDTH;\n    group_tid_225996 = get_group_id(0);\n    \n    int32_t phys_tid_204851 = group_tid_225996;\n    int64_t slice_226000 = s_n_m_196745;\n    int64_t ltid_pre_225999 = sext_i32_i64(local_tid_225995);\n    int64_t remnant_226001 = sext_i32_i64(local_tid_225995) - ltid_pre_225999;\n    int64_t slice_226004 = q_s_196695;\n    int64_t slice_226005 = s_n_m_196745 * slice_226004;\n    int64_t ltid_pre_226002 = squot64(sext_i32_i64(local_tid_225995),\n                                      slice_226004);\n    int64_t remnant_226006 = sext_i32_i64(local_tid_225995) - ltid_pre_226002 *\n            slice_22",
            "6004;\n    int64_t ltid_pre_226003 = remnant_226006;\n    int64_t remnant_226007 = remnant_226006 - ltid_pre_226003;\n    int64_t slice_226008 = n_p_196694;\n    int64_t slice_226009 = m_196691 * slice_226008;\n    int64_t gtid_204849 = squot64(sext_i32_i64(group_tid_225996), slice_226008);\n    int64_t remnant_226010 = sext_i32_i64(group_tid_225996) - gtid_204849 *\n            slice_226008;\n    int64_t gtid_204850 = remnant_226010;\n    int64_t remnant_226011 = remnant_226010 - 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_225999));\n    int32_t phys_tid_204866 = local_tid_225995;\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_226002));\n    int64_t gtid_204880 = sext_i32_i64(sext_i64_i32(ltid_pre_226003));\n    int32_t phys_tid_204881 = local_tid_225995;\n    __local unsigned char *red_arr_mem_226012;\n    \n    red_arr_mem_226012 = (__local unsigned char *) red_arr_mem_226012_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 (cond_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_226012)[gtid_204879 * q_s_196695 +\n                                               gtid_204880] = w_j_204906;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t dims_flat_226014 = s_n_m_196745 * q_s_196695;\n    float x_204882;\n    float x_204883;\n    float x_226016;\n    float x_226017;\n    bool ltid_in_bounds_226019 = slt64(sext_i32_i64(local_tid_225995),\n                                       s_n_m_196745 * q_s_196695);\n    int32_t skip_threads_226020;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_226019) {\n            x_204883 = ((volatile __local\n                         float *) red_arr_mem_226012)[sext_i32_i64(local_tid_225995)];\n            if ((local_tid_225995 - squot32(local_tid_225995, 32) * 32) == 0) {\n                x_204882 = x_204883;\n            }\n        }\n    }\n    // in-block scan (hopefully no barriers needed)\n    {\n        skip_threads_226020 = 1;\n        while (slt32(skip_threads_226020, 32)) {\n            bool thread_active_226021 = sle32(skip_threads_226020,\n                                              local_ti",
            "d_225995 -\n                                              squot32(local_tid_225995, 32) *\n                                              32) && ltid_in_bounds_226019;\n            \n            if (thread_active_226021) {\n                // read operands\n                {\n                    x_204882 = ((volatile __local\n                                 float *) red_arr_mem_226012)[sext_i32_i64(local_tid_225995) -\n                                                              sext_i32_i64(skip_threads_226020)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_226022 =\n                     slt64(srem64(sext_i32_i64(local_tid_225995), q_s_196695),\n                           sext_i32_i64(local_tid_225995) -\n                           sext_i32_i64(local_tid_225995 -\n                           skip_threads_226020));\n                \n                if (thread_active_226021 && inactive_226022) {\n                    x_204882 = x_204883;\n                }\n                if (thread_active_226021) {\n                    if (!inactive_226022) {\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_225997, skip_threads_226020)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_226021) {\n                // write result\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_226012)[sext_i32_i64(local_tid_225995)] =\n                        x_204882;\n                    x_204883 = x_204882;\n                }\n            }\n            if (sle32(wave_sizze_225997, skip_threads_226020)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_226020 *= 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_225995 - squot32(local_tid_225995, 32) * 32) == 31 &&\n            ltid_in_bounds_226019) {\n            ((volatile __local\n              float *) red_arr_mem_226012)[sext_i32_i64(squot32(local_tid_225995,\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_226023;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_225995, 32) == 0 && ltid_in_bounds_226019) {\n                x_226017 = ((volatile __local\n                             float *) red_arr_mem_226012)[sext_i32_i64(local_tid_225995)];\n                if ((local_tid_225995 - squot32(local_tid_225995, 32) * 32) ==\n                    0) {\n                    x_226016 = x_226017;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_226023 = 1;\n            while (slt32(skip_threads_226023, 32)) {\n                bool thread_active_226024 = sle32(skip_threads_226023,\n                                                  local_tid_225995 -\n                                                  squot32(local_tid_225995,\n                                                          32) * 32) &&\n                     (squot32(local_tid_225995, 32) == 0 &&\n                      ltid_in_bounds_226019);\n                \n                if (thread_active_226024) {\n                    // read operands\n                    {\n                        x_226016 = ((volatile __local\n                                     float *) red_arr_mem_226012)[sext_i32_i64(local_tid_225995) -\n                                                                  sext_i32_i64(skip_threads_226023)];\n                    }\n                }\n                // per",
            "form operation\n                {\n                    bool inactive_226025 =\n                         slt64(srem64(sext_i32_i64(local_tid_225995 * 32 + 32 -\n                                      1), q_s_196695),\n                               sext_i32_i64(local_tid_225995 * 32 + 32 - 1) -\n                               sext_i32_i64((local_tid_225995 -\n                                             skip_threads_226023) * 32 + 32 -\n                               1));\n                    \n                    if (thread_active_226024 && inactive_226025) {\n                        x_226016 = x_226017;\n                    }\n                    if (thread_active_226024) {\n                        if (!inactive_226025) {\n                            float defunc_1_op_res_226018 = x_226016 + x_226017;\n                            \n                            x_226016 = defunc_1_op_res_226018;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_225997, skip_threads_226023)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_226024) {\n                    // write result\n                    {\n                        ((volatile __local\n                          float *) red_arr_mem_226012)[sext_i32_i64(local_tid_225995)] =\n                            x_226016;\n                        x_226017 = x_226016;\n                    }\n                }\n                if (sle32(wave_sizze_225997, skip_threads_226023)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_226023 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_226026 = squot32(local_tid_225995, 32) == 0 ||\n         !ltid_in_bounds_226019;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_226026) {\n                x_204883 = x_204882;\n                x_204882 = ((_",
            "_local\n                             float *) red_arr_mem_226012)[sext_i32_i64(squot32(local_tid_225995,\n                                                                               32)) -\n                                                          (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_226027 = slt64(srem64(sext_i32_i64(local_tid_225995),\n                                                q_s_196695),\n                                         sext_i32_i64(local_tid_225995) -\n                                         sext_i32_i64(squot32(local_tid_225995,\n                                                              32) * 32 - 1));\n            \n            if (!no_carry_in_226026) {\n                if (inactive_226027) {\n                    x_204882 = x_204883;\n                }\n            }\n            if (!no_carry_in_226026) {\n                if (!inactive_226027) {\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_226026) {\n                ((__local\n                  float *) red_arr_mem_226012)[sext_i32_i64(local_tid_225995)] =\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_225995, 32) == 0 && ltid_in_bounds_226019) {\n            ((__local\n              float *) red_arr_mem_226012)[sext_i32_i64(local_tid_225995)] =\n                x_204883;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226028 = 0; i_226028 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_225995),\n                                                    computed_group_sizze_204753);\n         i_226028++)",
            " {\n        float tmp_226029;\n        \n        tmp_226029 = ((__local float *) red_arr_mem_226012)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226028 *\n                                                             computed_group_sizze_204753 +\n                                                             sext_i32_i64(local_tid_225995)) *\n                                                            q_s_196695];\n        ((__local float *) color_225035)[i_226028 *\n                                         computed_group_sizze_204753 +\n                                         sext_i32_i64(local_tid_225995)] =\n            tmp_226029;\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_225999));\n    int32_t phys_tid_204910 = local_tid_225995;\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, (i",
            "nt64_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_226002));\n    int64_t gtid_204926 = sext_i32_i64(sext_i64_i32(ltid_pre_226003));\n    int32_t phys_tid_204927 = local_tid_225995;\n    __local unsigned char *red_arr_mem_226030;\n    \n    red_arr_mem_226030 = (__local unsigned char *) red_arr_mem_226030_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_fun_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_226030)[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_226032 = s_n_m_196745 * q_s_196695;\n    float x_204928;\n    float x_204929;\n    float x_226034;\n    float x_226035;\n    bool ltid_in_bounds_226037 = slt64(sext_i32_i64(local_tid_225995),\n                                       s_n_m_196745 * q_s_196695);\n    int32_t skip_threads_226038;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_226037) {\n            x_204929 = ((volatile __local\n                         float *) red_arr_mem_226030)[sext_i32_i64(local_tid_225995)];\n            if ((local_tid_225995 - squot32(local_tid_225995, 32) * 32) == 0) {\n                x_204928 = x_204929;\n            }\n        }\n    }\n    // in-block scan (hopefully no barriers needed)\n    {\n        skip_threads_226038 = 1;\n        while (slt32(skip_threads_226038, 32)) {\n            bool thread_active_226039 = sle32(skip_threads_226038,\n                                              local_tid_225995 -\n                                              squot32(local_tid_225995, 32) *\n                                              32) && ltid_in_bounds_226037;\n            \n            if (thread_active_226039) {\n                // read operands\n                {\n                    x_204928 = ((volatile __local\n                                 float *) red_arr_mem_226030)[sext_i32_i64(local_tid_225995) -\n                                                              sext_i32_i64(skip_threads_226038)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_226040 =\n                     slt64(srem64(sext_i32_i64(local_tid_225995), q_s_196695),\n                           sext_i32_i64(local_tid_225995) -\n                           sext_i32_i64(local_tid_225995 -\n                           skip_threads_226038));\n                \n                if (thread_active_226039 && inactive_226040) ",
            "{\n                    x_204928 = x_204929;\n                }\n                if (thread_active_226039) {\n                    if (!inactive_226040) {\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_225997, skip_threads_226038)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_226039) {\n                // write result\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_226030)[sext_i32_i64(local_tid_225995)] =\n                        x_204928;\n                    x_204929 = x_204928;\n                }\n            }\n            if (sle32(wave_sizze_225997, skip_threads_226038)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_226038 *= 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_225995 - squot32(local_tid_225995, 32) * 32) == 31 &&\n            ltid_in_bounds_226037) {\n            ((volatile __local\n              float *) red_arr_mem_226030)[sext_i32_i64(squot32(local_tid_225995,\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_226041;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_225995, 32) == 0 && ltid_in_bounds_226037) {\n                x_226035 = ((volatile __local\n                             float *) red_arr_mem_226030)[sext_i32_i64(local_tid_225995)];\n                if ((local_tid_225995 - squot32(local_tid_225995, 32) * 32) ==\n                    0) {\n                    x_226",
            "034 = x_226035;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_226041 = 1;\n            while (slt32(skip_threads_226041, 32)) {\n                bool thread_active_226042 = sle32(skip_threads_226041,\n                                                  local_tid_225995 -\n                                                  squot32(local_tid_225995,\n                                                          32) * 32) &&\n                     (squot32(local_tid_225995, 32) == 0 &&\n                      ltid_in_bounds_226037);\n                \n                if (thread_active_226042) {\n                    // read operands\n                    {\n                        x_226034 = ((volatile __local\n                                     float *) red_arr_mem_226030)[sext_i32_i64(local_tid_225995) -\n                                                                  sext_i32_i64(skip_threads_226041)];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_226043 =\n                         slt64(srem64(sext_i32_i64(local_tid_225995 * 32 + 32 -\n                                      1), q_s_196695),\n                               sext_i32_i64(local_tid_225995 * 32 + 32 - 1) -\n                               sext_i32_i64((local_tid_225995 -\n                                             skip_threads_226041) * 32 + 32 -\n                               1));\n                    \n                    if (thread_active_226042 && inactive_226043) {\n                        x_226034 = x_226035;\n                    }\n                    if (thread_active_226042) {\n                        if (!inactive_226043) {\n                            float defunc_1_op_res_226036 = x_226034 + x_226035;\n                            \n                            x_226034 = defunc_1_op_res_226036;\n                        }\n                    }\n                }\n",
            "                if (sle32(wave_sizze_225997, skip_threads_226041)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_226042) {\n                    // write result\n                    {\n                        ((volatile __local\n                          float *) red_arr_mem_226030)[sext_i32_i64(local_tid_225995)] =\n                            x_226034;\n                        x_226035 = x_226034;\n                    }\n                }\n                if (sle32(wave_sizze_225997, skip_threads_226041)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_226041 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_226044 = squot32(local_tid_225995, 32) == 0 ||\n         !ltid_in_bounds_226037;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_226044) {\n                x_204929 = x_204928;\n                x_204928 = ((__local\n                             float *) red_arr_mem_226030)[sext_i32_i64(squot32(local_tid_225995,\n                                                                               32)) -\n                                                          (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_226045 = slt64(srem64(sext_i32_i64(local_tid_225995),\n                                                q_s_196695),\n                                         sext_i32_i64(local_tid_225995) -\n                                         sext_i32_i64(squot32(local_tid_225995,\n                                                              32) * 32 - 1));\n            \n            if (!no_carry_in_226044) {\n                if (inactive_226045) {\n                    x_204928 = x_204929;\n                }\n            }\n            if (!no_carry_in_226044) {\n                if (!inactive_226045) {\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_226044) {\n                ((__local\n                  float *) red_arr_mem_226030)[sext_i32_i64(local_tid_225995)] =\n                    x_204928;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // restore correct values for first block\n    {\n        if (squot32(local_tid_225995, 32) == 0 && ltid_in_bounds_226037) {\n            ((__local\n              float *) red_arr_mem_226030)[sext_i32_i64(local_tid_225995)] =\n                x_204929;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226046 = 0; i_226046 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_225995),\n                                                    computed_group_sizze_204753);\n         i_226046++) {\n        float tmp_226047;\n        \n        tmp_226047 = ((__local float *) red_arr_mem_226030)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226046 *\n                                                             computed_group_sizze_204753 +\n                                                             sext_i32_i64(local_tid_225995)) *\n                                                            q_s_196695];\n        ((__local float *) color_225035)[i_226046 *\n                                         computed_group_sizze_204753 +\n                                         sext_i32_i64(local_tid_225995)] =\n            tmp_226047;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226048 = 0; i_226048 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_22",
            "5995),\n                                                    computed_group_sizze_204753);\n         i_226048++) {\n        float tmp_226049;\n        \n        tmp_226049 = ((__local float *) color_225035)[i_226048 *\n                                                      computed_group_sizze_204753 +\n                                                      sext_i32_i64(local_tid_225995)];\n        ((__global float *) mem_222732)[gtid_204849 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_204850 * s_n_m_196745 + (i_226048 *\n                                                                      computed_group_sizze_204753 +\n                                                                      sext_i32_i64(local_tid_225995))] =\n            tmp_226049;\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                                             uint red_arr_mem_226352_backing_offset_0,\n                                             uint red_arr_mem_226350_backing_offset_1,\n                                             uint red_arr_mem_226320_backing_offset_2,\n                                             uint red_arr_mem_226318_backing_offset_3,\n                                             uint red_arr_mem_226316_backing_offset_4,\n                                             uint color_225050_backing_offset_5,\n                                             uint color_225049_backing_offset_6,\n                                             uint color_225048_backing_offset_7,\n                                             uint color_225047_backing_offset_8,\n                                             uint color_225046_backing_offset_9,\n                                             uint color_225045_backing_offset_10,\n                                             uint color_225044_backing_offset_11,\n                   ",
            "                          uint color_225043_backing_offset_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 block_dim1 = 1;\n    const int block_dim2 = 2;\n    volatile unsigned char *red_arr_mem_226352_backing_12 =\n                           &shared_mem[red_arr_mem_226352_backing_offset_0];\n    volatile unsigned char *red_arr_mem_226350_backing_11 =\n                           &shared_mem[red_arr_mem_226350_backing_offset_1];\n    volatile unsigned char *red_arr_mem_226320_backing_10 =\n                           &shared_mem[red_arr_mem_226320_backing_offset_2];\n    volatile unsigned char *red",
            "_arr_mem_226318_backing_9 =\n                           &shared_mem[red_arr_mem_226318_backing_offset_3];\n    volatile unsigned char *red_arr_mem_226316_backing_8 =\n                           &shared_mem[red_arr_mem_226316_backing_offset_4];\n    volatile unsigned char *color_225050_backing_7 =\n                           &shared_mem[color_225050_backing_offset_5];\n    volatile unsigned char *color_225049_backing_6 =\n                           &shared_mem[color_225049_backing_offset_6];\n    volatile unsigned char *color_225048_backing_5 =\n                           &shared_mem[color_225048_backing_offset_7];\n    volatile unsigned char *color_225047_backing_4 =\n                           &shared_mem[color_225047_backing_offset_8];\n    volatile unsigned char *color_225046_backing_3 =\n                           &shared_mem[color_225046_backing_offset_9];\n    volatile unsigned char *color_225045_backing_2 =\n                           &shared_mem[color_225045_backing_offset_10];\n    volatile unsigned char *color_225044_backing_1 =\n                           &shared_mem[color_225044_backing_offset_11];\n    volatile unsigned char *color_225043_backing_0 =\n                           &shared_mem[color_225043_backing_offset_12];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226298;\n    int32_t local_tid_226299;\n    int64_t group_sizze_226302;\n    int32_t wave_sizze_226301;\n    int32_t group_tid_226300;\n    \n    global_tid_226298 = get_global_id(0);\n    local_tid_226299 = get_local_id(0);\n    group_sizze_226302 = get_local_size(0);\n    wave_sizze_226301 = LOCKSTEP_WIDTH;\n    group_tid_226300 = get_group_id(0);\n    \n    int32_t phys_tid_206919 = group_tid_226300;\n    int64_t slice_226304 = s_n_m_196745;\n    int64_t ltid_pre_226303 = sext_i32_i64(local_tid_226299);\n    int64_t remnant_226305 = sext_i32_i64(local_tid_226299) - ltid_pre_226303;\n    int64_t slice_226308 = q_s_196695;\n    int64_t slice_226309 = s_n_m_196745 * slice_226308;\n    int64_t l",
            "tid_pre_226306 = squot64(sext_i32_i64(local_tid_226299),\n                                      slice_226308);\n    int64_t remnant_226310 = sext_i32_i64(local_tid_226299) - ltid_pre_226306 *\n            slice_226308;\n    int64_t ltid_pre_226307 = remnant_226310;\n    int64_t remnant_226311 = remnant_226310 - ltid_pre_226307;\n    int64_t slice_226312 = n_p_196694;\n    int64_t slice_226313 = m_196691 * slice_226312;\n    int64_t gtid_206917 = squot64(sext_i32_i64(group_tid_226300), slice_226312);\n    int64_t remnant_226314 = sext_i32_i64(group_tid_226300) - gtid_206917 *\n            slice_226312;\n    int64_t gtid_206918 = remnant_226314;\n    int64_t remnant_226315 = remnant_226314 - 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_226303));\n    int32_t phys_tid_206934 = local_tid_226299;\n    \n    if (slt64(gtid_206933, s_n_m_1967",
            "45)) {\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_206939) {\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_226306));\n    int64_t gtid_206950 = sext_i32_i64(sext_i64_i32(ltid_pre_226307));\n    int32_t phys_tid_206951 = local_tid_226299;\n    __local unsigned char *red_arr_mem_226316;\n    \n    red_arr_mem_226316 = (__local unsigned char *) red_arr_mem_226316_backing_8;\n    \n    __local unsigned char *red_arr_mem_226318;\n    \n    red_arr_mem_226318 = (__local unsigned char *) red_arr_mem_226318_backing_9;\n    \n    __local unsigned char *red_arr_mem_226320;\n    \n    red_arr_mem_226320 = (__local\n            ",
            "              unsigned char *) red_arr_mem_226320_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_226316)[gtid_206949 * q_s_196695 +\n                                               gtid_206950] = w_j_206982;\n        ((__local float *) red_arr_mem_226318)[gtid_206949 * q_s_196695 +\n                                               gtid_206950] = xw_j_206983;\n        ((__local float *) red_arr_mem_226320)[gtid_206949 * q_s_196695 +\n                                               gtid_206950] = x2w_j_206984;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t dims_flat_226322 = 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_226326;\n    float x_226327;\n    float x_226328;\n    float x_226329;\n    float x_226330;\n    float x_226331;\n    bool ltid_in_bounds_226335 = slt64(sext_i32_i64(local_tid_226299),\n                                       s_n_m_196745 * q_s_196695);\n    int32_t skip_threads_226336;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_226335) {\n            x_206955 = ((volatile __local\n                         float *) red_arr_mem_226316)[sext_i32_i64(local_tid_226299)];\n            x_206956 = ((volatile __local\n                         float *) red_arr_mem_226318)[sext_i32_i64(local_tid_226299)];\n            x_206957 = ((volatile __local\n                         float *) red_arr_mem_226320)[sext_i32_i64(local_tid_226299)];\n            if ((local_tid_226299 - squot32(local_tid_226299, 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_226336 = 1;\n        while (slt32(skip_threads_226336, 32)) {\n            bool thread_active_226337 = sle32(skip_threads_226336,\n                                              local_tid_226299 -\n                                              squot32(local_tid_226299, 32)",
            " *\n                                              32) && ltid_in_bounds_226335;\n            \n            if (thread_active_226337) {\n                // read operands\n                {\n                    x_206952 = ((volatile __local\n                                 float *) red_arr_mem_226316)[sext_i32_i64(local_tid_226299) -\n                                                              sext_i32_i64(skip_threads_226336)];\n                    x_206953 = ((volatile __local\n                                 float *) red_arr_mem_226318)[sext_i32_i64(local_tid_226299) -\n                                                              sext_i32_i64(skip_threads_226336)];\n                    x_206954 = ((volatile __local\n                                 float *) red_arr_mem_226320)[sext_i32_i64(local_tid_226299) -\n                                                              sext_i32_i64(skip_threads_226336)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_226338 =\n                     slt64(srem64(sext_i32_i64(local_tid_226299), q_s_196695),\n                           sext_i32_i64(local_tid_226299) -\n                           sext_i32_i64(local_tid_226299 -\n                           skip_threads_226336));\n                \n                if (thread_active_226337 && inactive_226338) {\n                    x_206952 = x_206955;\n                    x_206953 = x_206956;\n                    x_206954 = x_206957;\n                }\n                if (thread_active_226337) {\n                    if (!inactive_226338) {\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_226301, skip_threads_226336)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_226337) {\n                // write result\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_226316)[sext_i32_i64(local_tid_226299)] =\n                        x_206952;\n                    x_206955 = x_206952;\n                    ((volatile __local\n                      float *) red_arr_mem_226318)[sext_i32_i64(local_tid_226299)] =\n                        x_206953;\n                    x_206956 = x_206953;\n                    ((volatile __local\n                      float *) red_arr_mem_226320)[sext_i32_i64(local_tid_226299)] =\n                        x_206954;\n                    x_206957 = x_206954;\n                }\n            }\n            if (sle32(wave_sizze_226301, skip_threads_226336)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_226336 *= 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_226299 - squot32(local_tid_226299, 32) * 32) == 31 &&\n            ltid_in_bounds_226335) {\n            ((volatile __local\n              float *) red_arr_mem_226316)[sext_i32_i64(squot32(local_tid_226299,\n                                                                32))] =\n                x_206952;\n            ((volatile __local\n              float *) red_arr_mem_226318)[sext_i32_i64(squot32(local_tid_226299,\n                                                                32))] =\n                x_206953;\n            ((volatile __local\n              float *) red_arr_mem_226320)[sext_i32_i64(squot32(local_tid_226299,\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_226339;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_226299, 32) == 0 && ltid_in_bounds_226335) {\n                x_226329 = ((volatile __local\n                             float *) red_arr_mem_226316)[sext_i32_i64(local_tid_226299)];\n                x_226330 = ((volatile __local\n                             float *) red_arr_mem_226318)[sext_i32_i64(local_tid_226299)];\n                x_226331 = ((volatile __local\n                             float *) red_arr_mem_226320)[sext_i32_i64(local_tid_226299)];\n                if ((local_tid_226299 - squot32(local_tid_226299, 32) * 32) ==\n                    0) {\n                    x_226326 = x_226329;\n                    x_226327 = x_226330;\n                    x_226328 = x_226331;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_226339 = 1;\n            while (slt32(skip_threads_226339, 32)) {\n                bool thread_active_226340 = sle32(skip_threads_226339,\n                                                  local_tid_226299 -\n                                                  squot32(local_tid_226299,\n                                                          32) * 32) &&\n                     (squot32(local_tid_226299, 32) == 0 &&\n                      ltid_in_bounds_226335);\n                \n                if (thread_active_226340) {\n                    // read operands\n                    {\n                        x_226326 = ((volatile __local\n                                     float *) red_arr_mem_226316)[sext_i32_i64(local_tid_226299) -\n                                                                  sext_i32_i64(skip_threads_226339)];\n                        x_226327 = ((volatile __local\n                                     float *) red_arr_mem_226318)[sext_i32_i64(l",
            "ocal_tid_226299) -\n                                                                  sext_i32_i64(skip_threads_226339)];\n                        x_226328 = ((volatile __local\n                                     float *) red_arr_mem_226320)[sext_i32_i64(local_tid_226299) -\n                                                                  sext_i32_i64(skip_threads_226339)];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_226341 =\n                         slt64(srem64(sext_i32_i64(local_tid_226299 * 32 + 32 -\n                                      1), q_s_196695),\n                               sext_i32_i64(local_tid_226299 * 32 + 32 - 1) -\n                               sext_i32_i64((local_tid_226299 -\n                                             skip_threads_226339) * 32 + 32 -\n                               1));\n                    \n                    if (thread_active_226340 && inactive_226341) {\n                        x_226326 = x_226329;\n                        x_226327 = x_226330;\n                        x_226328 = x_226331;\n                    }\n                    if (thread_active_226340) {\n                        if (!inactive_226341) {\n                            float defunc_1_op_res_226332 = x_226326 + x_226329;\n                            float defunc_1_op_res_226333 = x_226327 + x_226330;\n                            float defunc_1_op_res_226334 = x_226328 + x_226331;\n                            \n                            x_226326 = defunc_1_op_res_226332;\n                            x_226327 = defunc_1_op_res_226333;\n                            x_226328 = defunc_1_op_res_226334;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_226301, skip_threads_226339)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_226340) {\n                    // write result\n             ",
            "       {\n                        ((volatile __local\n                          float *) red_arr_mem_226316)[sext_i32_i64(local_tid_226299)] =\n                            x_226326;\n                        x_226329 = x_226326;\n                        ((volatile __local\n                          float *) red_arr_mem_226318)[sext_i32_i64(local_tid_226299)] =\n                            x_226327;\n                        x_226330 = x_226327;\n                        ((volatile __local\n                          float *) red_arr_mem_226320)[sext_i32_i64(local_tid_226299)] =\n                            x_226328;\n                        x_226331 = x_226328;\n                    }\n                }\n                if (sle32(wave_sizze_226301, skip_threads_226339)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_226339 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_226342 = squot32(local_tid_226299, 32) == 0 ||\n         !ltid_in_bounds_226335;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_226342) {\n                x_206955 = x_206952;\n                x_206956 = x_206953;\n                x_206957 = x_206954;\n                x_206952 = ((__local\n                             float *) red_arr_mem_226316)[sext_i32_i64(squot32(local_tid_226299,\n                                                                               32)) -\n                                                          (int64_t) 1];\n                x_206953 = ((__local\n                             float *) red_arr_mem_226318)[sext_i32_i64(squot32(local_tid_226299,\n                                                                               32)) -\n                                                          (int64_t) 1];\n                x_206954 = ((__local\n                             float *) red_arr_mem_226320)[sext_i32_i64(squot32(local_tid_22",
            "6299,\n                                                                               32)) -\n                                                          (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_226343 = slt64(srem64(sext_i32_i64(local_tid_226299),\n                                                q_s_196695),\n                                         sext_i32_i64(local_tid_226299) -\n                                         sext_i32_i64(squot32(local_tid_226299,\n                                                              32) * 32 - 1));\n            \n            if (!no_carry_in_226342) {\n                if (inactive_226343) {\n                    x_206952 = x_206955;\n                    x_206953 = x_206956;\n                    x_206954 = x_206957;\n                }\n            }\n            if (!no_carry_in_226342) {\n                if (!inactive_226343) {\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_226342) {\n                ((__local\n                  float *) red_arr_mem_226316)[sext_i32_i64(local_tid_226299)] =\n                    x_206952;\n                ((__local\n                  float *) red_arr_mem_226318)[sext_i32_i64(local_tid_226299)] =\n                    x_206953;\n                ((__local\n                  float *) red_arr_mem_226320)[sext_i32_i64(local_tid_226299)] =\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_226299, 32) == 0 && ltid_in_bounds_226335) {\n            ((__local\n              float *) red_arr_mem_226316)[sext_i32_i64(local_tid_226299)] =\n                x_206955;\n            ((__local\n              float *) red_arr_mem_226318)[sext_i32_i64(local_tid_226299)] =\n                x_206956;\n            ((__local\n              float *) red_arr_mem_226320)[sext_i32_i64(local_tid_226299)] =\n                x_206957;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226344 = 0; i_226344 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226299),\n                                                    computed_group_sizze_206788);\n         i_226344++) {\n        float tmp_226345;\n        \n        tmp_226345 = ((__local float *) red_arr_mem_226316)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226344 *\n                                                             computed_group_sizze_206788 +\n                                                             sext_i32_i64(local_tid_226299)) *\n                                                            q_s_196695];\n        ((__local float *) color_225049)[i_226344 *\n                                         computed_group_sizze_206788 +\n                                         sext_i32_i64(local_tid_226299)] =\n            tmp_226345;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226346 = 0; i_226346 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226299),\n                                                    computed_group_sizze_206788);\n         i_226346++) {\n        float tmp_226347;\n        \n        tmp_226347 = ((__local float *) red_arr_mem_226318)[q_s_196695 -\n                                                            (int64_t) 1 +\n                      ",
            "                                      (i_226346 *\n                                                             computed_group_sizze_206788 +\n                                                             sext_i32_i64(local_tid_226299)) *\n                                                            q_s_196695];\n        ((__local float *) color_225044)[i_226346 *\n                                         computed_group_sizze_206788 +\n                                         sext_i32_i64(local_tid_226299)] =\n            tmp_226347;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226348 = 0; i_226348 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226299),\n                                                    computed_group_sizze_206788);\n         i_226348++) {\n        float tmp_226349;\n        \n        tmp_226349 = ((__local float *) red_arr_mem_226320)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226348 *\n                                                             computed_group_sizze_206788 +\n                                                             sext_i32_i64(local_tid_226299)) *\n                                                            q_s_196695];\n        ((__local float *) color_225043)[i_226348 *\n                                         computed_group_sizze_206788 +\n                                         sext_i32_i64(local_tid_226299)] =\n            tmp_226349;\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_226303));\n    int32_t phys_tid_206990 = local_tid_226299;\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_207004;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t gtid_207015 = sext_i32_i64(sext_i64_i32(ltid_pre_226306));\n    int64_t gtid_207016 = sext_i32_i64(sext_i64_i32(ltid_pre_226307));\n    int32_t phys_tid_207017 = local_tid_226299;\n    __local unsigned char *red_arr_mem_226350;\n    \n    red_arr_mem_226350 = (__local\n                          unsigned char *) red_arr_mem_226350_backing_11;\n    \n    __local unsigned char *red_arr_mem_226352;\n    \n    red_arr_mem_226352 = (__local\n                          unsigned char *) red_arr_mem_226352_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)[g",
            "tid_206917 *\n                                                             (defunc_0_f_res_196740 *\n                                                              n_p_196694) +\n                                                             gtid_206918 *\n                                                             defunc_0_f_res_196740 +\n                                                             i_207037];\n            defunc_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_226350)[gtid_207015 * q_s_196695 +\n                                               gtid_207016] =\n            defunc_9_fit_fun_res_207056;\n        ((__local float *) red_arr_mem_226352)[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_226354 = 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_226357;\n    float x_226358;\n    float x_226359;\n    float x_226360;\n    bool ltid_in_bounds_226363 = slt64(sext_i32_i64(local_tid_226299),\n                                       s_n_m_196745 * q_s_196695);\n    int32_t skip_threads_226364;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_226363) {\n            x_207020 = ((volatile __local\n                         float *) red_arr_mem_226350)[sext_i32_i64(local_tid_226299)];\n            x_207021 = ((volatile __local\n                         float *) red_arr_mem_226352)[sext_i32_i64(local_tid_226299)];\n            if ((local_tid_226299 - squot32(local_tid_226299, 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_226364 = 1;\n        while (slt32(skip_threads_226364, 32)) {\n            boo",
            "l thread_active_226365 = sle32(skip_threads_226364,\n                                              local_tid_226299 -\n                                              squot32(local_tid_226299, 32) *\n                                              32) && ltid_in_bounds_226363;\n            \n            if (thread_active_226365) {\n                // read operands\n                {\n                    x_207018 = ((volatile __local\n                                 float *) red_arr_mem_226350)[sext_i32_i64(local_tid_226299) -\n                                                              sext_i32_i64(skip_threads_226364)];\n                    x_207019 = ((volatile __local\n                                 float *) red_arr_mem_226352)[sext_i32_i64(local_tid_226299) -\n                                                              sext_i32_i64(skip_threads_226364)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_226366 =\n                     slt64(srem64(sext_i32_i64(local_tid_226299), q_s_196695),\n                           sext_i32_i64(local_tid_226299) -\n                           sext_i32_i64(local_tid_226299 -\n                           skip_threads_226364));\n                \n                if (thread_active_226365 && inactive_226366) {\n                    x_207018 = x_207020;\n                    x_207019 = x_207021;\n                }\n                if (thread_active_226365) {\n                    if (!inactive_226366) {\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_226301, skip_threads_226364)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_2",
            "26365) {\n                // write result\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_226350)[sext_i32_i64(local_tid_226299)] =\n                        x_207018;\n                    x_207020 = x_207018;\n                    ((volatile __local\n                      float *) red_arr_mem_226352)[sext_i32_i64(local_tid_226299)] =\n                        x_207019;\n                    x_207021 = x_207019;\n                }\n            }\n            if (sle32(wave_sizze_226301, skip_threads_226364)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_226364 *= 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_226299 - squot32(local_tid_226299, 32) * 32) == 31 &&\n            ltid_in_bounds_226363) {\n            ((volatile __local\n              float *) red_arr_mem_226350)[sext_i32_i64(squot32(local_tid_226299,\n                                                                32))] =\n                x_207018;\n            ((volatile __local\n              float *) red_arr_mem_226352)[sext_i32_i64(squot32(local_tid_226299,\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_226367;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_226299, 32) == 0 && ltid_in_bounds_226363) {\n                x_226359 = ((volatile __local\n                             float *) red_arr_mem_226350)[sext_i32_i64(local_tid_226299)];\n                x_226360 = ((volatile __local\n                             float *) red_arr_mem_226352)[sext_i32_i64(local_tid_226299)];\n                if ((local_tid_226299 - squot32(local_tid_226299, 32) * 32) ==\n                    0)",
            " {\n                    x_226357 = x_226359;\n                    x_226358 = x_226360;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_226367 = 1;\n            while (slt32(skip_threads_226367, 32)) {\n                bool thread_active_226368 = sle32(skip_threads_226367,\n                                                  local_tid_226299 -\n                                                  squot32(local_tid_226299,\n                                                          32) * 32) &&\n                     (squot32(local_tid_226299, 32) == 0 &&\n                      ltid_in_bounds_226363);\n                \n                if (thread_active_226368) {\n                    // read operands\n                    {\n                        x_226357 = ((volatile __local\n                                     float *) red_arr_mem_226350)[sext_i32_i64(local_tid_226299) -\n                                                                  sext_i32_i64(skip_threads_226367)];\n                        x_226358 = ((volatile __local\n                                     float *) red_arr_mem_226352)[sext_i32_i64(local_tid_226299) -\n                                                                  sext_i32_i64(skip_threads_226367)];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_226369 =\n                         slt64(srem64(sext_i32_i64(local_tid_226299 * 32 + 32 -\n                                      1), q_s_196695),\n                               sext_i32_i64(local_tid_226299 * 32 + 32 - 1) -\n                               sext_i32_i64((local_tid_226299 -\n                                             skip_threads_226367) * 32 + 32 -\n                               1));\n                    \n                    if (thread_active_226368 && inactive_226369) {\n                        x_226357 = x_226359;\n                        x_226358",
            " = x_226360;\n                    }\n                    if (thread_active_226368) {\n                        if (!inactive_226369) {\n                            float defunc_1_op_res_226361 = x_226357 + x_226359;\n                            float defunc_1_op_res_226362 = x_226358 + x_226360;\n                            \n                            x_226357 = defunc_1_op_res_226361;\n                            x_226358 = defunc_1_op_res_226362;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_226301, skip_threads_226367)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_226368) {\n                    // write result\n                    {\n                        ((volatile __local\n                          float *) red_arr_mem_226350)[sext_i32_i64(local_tid_226299)] =\n                            x_226357;\n                        x_226359 = x_226357;\n                        ((volatile __local\n                          float *) red_arr_mem_226352)[sext_i32_i64(local_tid_226299)] =\n                            x_226358;\n                        x_226360 = x_226358;\n                    }\n                }\n                if (sle32(wave_sizze_226301, skip_threads_226367)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_226367 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_226370 = squot32(local_tid_226299, 32) == 0 ||\n         !ltid_in_bounds_226363;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_226370) {\n                x_207020 = x_207018;\n                x_207021 = x_207019;\n                x_207018 = ((__local\n                             float *) red_arr_mem_226350)[sext_i32_i64(squot32(local_tid_226299,\n                                                                               32)) -\n  ",
            "                                                        (int64_t) 1];\n                x_207019 = ((__local\n                             float *) red_arr_mem_226352)[sext_i32_i64(squot32(local_tid_226299,\n                                                                               32)) -\n                                                          (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_226371 = slt64(srem64(sext_i32_i64(local_tid_226299),\n                                                q_s_196695),\n                                         sext_i32_i64(local_tid_226299) -\n                                         sext_i32_i64(squot32(local_tid_226299,\n                                                              32) * 32 - 1));\n            \n            if (!no_carry_in_226370) {\n                if (inactive_226371) {\n                    x_207018 = x_207020;\n                    x_207019 = x_207021;\n                }\n            }\n            if (!no_carry_in_226370) {\n                if (!inactive_226371) {\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_226370) {\n                ((__local\n                  float *) red_arr_mem_226350)[sext_i32_i64(local_tid_226299)] =\n                    x_207018;\n                ((__local\n                  float *) red_arr_mem_226352)[sext_i32_i64(local_tid_226299)] =\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_226299, 32) == 0 && ltid_in_bounds_226363) {\n            ((__local\n              float *) red_arr_mem_",
            "226350)[sext_i32_i64(local_tid_226299)] =\n                x_207020;\n            ((__local\n              float *) red_arr_mem_226352)[sext_i32_i64(local_tid_226299)] =\n                x_207021;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226372 = 0; i_226372 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226299),\n                                                    computed_group_sizze_206788);\n         i_226372++) {\n        float tmp_226373;\n        \n        tmp_226373 = ((__local float *) red_arr_mem_226350)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226372 *\n                                                             computed_group_sizze_206788 +\n                                                             sext_i32_i64(local_tid_226299)) *\n                                                            q_s_196695];\n        ((__local float *) color_225044)[i_226372 *\n                                         computed_group_sizze_206788 +\n                                         sext_i32_i64(local_tid_226299)] =\n            tmp_226373;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226374 = 0; i_226374 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226299),\n                                                    computed_group_sizze_206788);\n         i_226374++) {\n        float tmp_226375;\n        \n        tmp_226375 = ((__local float *) red_arr_mem_226352)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226374 *\n                                                             computed_group_sizze_206788 +\n                                                             sext_i32_i64(local_tid_226299)",
            ") *\n                                                            q_s_196695];\n        ((__local float *) color_225043)[i_226374 *\n                                         computed_group_sizze_206788 +\n                                         sext_i32_i64(local_tid_226299)] =\n            tmp_226375;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226376 = 0; i_226376 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226299),\n                                                    computed_group_sizze_206788);\n         i_226376++) {\n        float tmp_226377;\n        \n        tmp_226377 = ((__local float *) color_225044)[i_226376 *\n                                                      computed_group_sizze_206788 +\n                                                      sext_i32_i64(local_tid_226299)];\n        ((__global float *) mem_223008)[gtid_206917 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_206918 * s_n_m_196745 + (i_226376 *\n                                                                      computed_group_sizze_206788 +\n                                                                      sext_i32_i64(local_tid_226299))] =\n            tmp_226377;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226378 = 0; i_226378 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226299),\n                                                    computed_group_sizze_206788);\n         i_226378++) {\n        float tmp_226379;\n        \n        tmp_226379 = ((__local float *) color_225043)[i_226378 *\n                                                      computed_group_sizze_206788 +\n                                                      sext_i32_i64(local_tid_226299)];\n        ((__global float *) mem_223013)[gtid_206917 * (s_n_m_196745 *\n              ",
            "                                         n_p_196694) +\n                                        gtid_206918 * s_n_m_196745 + (i_226378 *\n                                                                      computed_group_sizze_206788 +\n                                                                      sext_i32_i64(local_tid_226299))] =\n            tmp_226379;\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                                             uint red_arr_mem_226747_backing_offset_0,\n                                             uint red_arr_mem_226745_backing_offset_1,\n                                             uint red_arr_mem_226703_backing_offset_2,\n                                             uint red_arr_mem_226701_backing_offset_3,\n                                             uint red_arr_mem_226699_backing_offset_4,\n                                             uint red_arr_mem_226697_backing_offset_5,\n                                             uint red_arr_mem_226695_backing_offset_6,\n                                             uint color_225066_backing_offset_7,\n                                             uint color_225065_backing_offset_8,\n                                             uint color_225064_backing_offset_9,\n                                             uint color_225063_backing_offset_10,\n                                             uint color_225062_backing_offset_11,\n                                             uint color_225061_backing_offset_12,\n                                             uint color_225060_backing_offset_13,\n                                             uint color_225059_backing_offset_14,\n                                             uint color_225058_backing_offset_15,\n                                             uint color_225057_backing_offset_16,\n                                             uint color_225056_b",
            "acking_offset_17,\n                                             uint color_225055_backing_offset_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    volatile unsigned char *red_arr_mem_226747_backing_18 =\n                           &shared_mem[red_arr_mem_226747_backing_offset_0];\n    volatile unsigned char *red_arr_mem_226745_backing_17 =\n                           &shared_mem[red_arr_mem_226745_backing_offset_1];\n    volatile unsigned char *red_arr_mem_226703_backing_16 =\n                           &shared_mem[red_arr_mem_226703_backing_offse",
            "t_2];\n    volatile unsigned char *red_arr_mem_226701_backing_15 =\n                           &shared_mem[red_arr_mem_226701_backing_offset_3];\n    volatile unsigned char *red_arr_mem_226699_backing_14 =\n                           &shared_mem[red_arr_mem_226699_backing_offset_4];\n    volatile unsigned char *red_arr_mem_226697_backing_13 =\n                           &shared_mem[red_arr_mem_226697_backing_offset_5];\n    volatile unsigned char *red_arr_mem_226695_backing_12 =\n                           &shared_mem[red_arr_mem_226695_backing_offset_6];\n    volatile unsigned char *color_225066_backing_11 =\n                           &shared_mem[color_225066_backing_offset_7];\n    volatile unsigned char *color_225065_backing_10 =\n                           &shared_mem[color_225065_backing_offset_8];\n    volatile unsigned char *color_225064_backing_9 =\n                           &shared_mem[color_225064_backing_offset_9];\n    volatile unsigned char *color_225063_backing_8 =\n                           &shared_mem[color_225063_backing_offset_10];\n    volatile unsigned char *color_225062_backing_7 =\n                           &shared_mem[color_225062_backing_offset_11];\n    volatile unsigned char *color_225061_backing_6 =\n                           &shared_mem[color_225061_backing_offset_12];\n    volatile unsigned char *color_225060_backing_5 =\n                           &shared_mem[color_225060_backing_offset_13];\n    volatile unsigned char *color_225059_backing_4 =\n                           &shared_mem[color_225059_backing_offset_14];\n    volatile unsigned char *color_225058_backing_3 =\n                           &shared_mem[color_225058_backing_offset_15];\n    volatile unsigned char *color_225057_backing_2 =\n                           &shared_mem[color_225057_backing_offset_16];\n    volatile unsigned char *color_225056_backing_1 =\n                           &shared_mem[color_225056_backing_offset_17];\n    volatile unsigned char *color_225055_backing_0 =\n                   ",
            "        &shared_mem[color_225055_backing_offset_18];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226677;\n    int32_t local_tid_226678;\n    int64_t group_sizze_226681;\n    int32_t wave_sizze_226680;\n    int32_t group_tid_226679;\n    \n    global_tid_226677 = get_global_id(0);\n    local_tid_226678 = get_local_id(0);\n    group_sizze_226681 = get_local_size(0);\n    wave_sizze_226680 = LOCKSTEP_WIDTH;\n    group_tid_226679 = get_group_id(0);\n    \n    int32_t phys_tid_209494 = group_tid_226679;\n    int64_t slice_226683 = s_n_m_196745;\n    int64_t ltid_pre_226682 = sext_i32_i64(local_tid_226678);\n    int64_t remnant_226684 = sext_i32_i64(local_tid_226678) - ltid_pre_226682;\n    int64_t slice_226687 = q_s_196695;\n    int64_t slice_226688 = s_n_m_196745 * slice_226687;\n    int64_t ltid_pre_226685 = squot64(sext_i32_i64(local_tid_226678),\n                                      slice_226687);\n    int64_t remnant_226689 = sext_i32_i64(local_tid_226678) - ltid_pre_226685 *\n            slice_226687;\n    int64_t ltid_pre_226686 = remnant_226689;\n    int64_t remnant_226690 = remnant_226689 - ltid_pre_226686;\n    int64_t slice_226691 = n_p_196694;\n    int64_t slice_226692 = m_196691 * slice_226691;\n    int64_t gtid_209492 = squot64(sext_i32_i64(group_tid_226679), slice_226691);\n    int64_t remnant_226693 = sext_i32_i64(group_tid_226679) - gtid_209492 *\n            slice_226691;\n    int64_t gtid_209493 = remnant_226693;\n    int64_t remnant_226694 = remnant_226693 - gtid_209493;\n    __local unsigned char *color_225055;\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_226682));\n    int32_t phys_tid_209509 = local_tid_226678;\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_226685));\n    int64_t gtid_209527 = sext_i32_i64(sext_i64_i32(ltid_pre_226686));\n    int32_t phys_tid_209528 = local_tid_226678;\n    __local unsigned char *red_arr_mem_226695;\n    \n    red_arr_mem_226695 = (__local\n                          unsigned char *) red_arr_mem_226695_backing_12;\n    \n    __local unsigned char *red_arr_mem_226697;\n    \n    red_arr_mem_226697 = (__local\n                          unsigned char *) red_arr_mem_226697_backing_13;\n    \n    __local unsigned char *red_arr_mem_226699;\n    \n    red_arr_mem_226699 = (__local\n                          unsigned char *) red_arr_mem_226699_backing_14;\n    \n    __local unsigned char *red_arr_mem_226701;\n    \n    red_arr_mem_226701 = (__local\n                          unsigned char *) red_arr_mem_226701_backing_15;\n    \n    __local unsigned char *red_arr_mem_226703;\n    \n    red_arr_mem_226703 = (__local\n                          unsigned char *) red_arr_mem_226703_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_226695)[gtid_209526 * q_s_196695 +\n                                               gtid_209527] = w_j_209565;\n        ((__local float *) red_arr_",
            "mem_226697)[gtid_209526 * q_s_196695 +\n                                               gtid_209527] = xw_j_209566;\n        ((__local float *) red_arr_mem_226699)[gtid_209526 * q_s_196695 +\n                                               gtid_209527] = x2w_j_209567;\n        ((__local float *) red_arr_mem_226701)[gtid_209526 * q_s_196695 +\n                                               gtid_209527] = x3w_j_209568;\n        ((__local float *) red_arr_mem_226703)[gtid_209526 * q_s_196695 +\n                                               gtid_209527] = x4w_j_209569;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t dims_flat_226705 = 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_226711;\n    float x_226712;\n    float x_226713;\n    float x_226714;\n    float x_226715;\n    float x_226716;\n    float x_226717;\n    float x_226718;\n    float x_226719;\n    float x_226720;\n    bool ltid_in_bounds_226726 = slt64(sext_i32_i64(local_tid_226678),\n                                       s_n_m_196745 * q_s_196695);\n    int32_t skip_threads_226727;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_226726) {\n            x_209534 = ((volatile __local\n                         float *) red_arr_mem_226695)[sext_i32_i64(local_tid_226678)];\n            x_209535 = ((volatile __local\n                         float *) red_arr_mem_226697)[sext_i32_i64(local_tid_226678)];\n            x_209536 = ((volatile __local\n                         float *) red_arr_mem_226699)[sext_i32_i64(local_tid_226678)];\n            x_209537 = ((volatile __local\n                         float *) red_arr_mem_226701)[sext_i32_i64(local_tid_226678)];\n            x_209538 = ((volatile __local\n                         float *) red_arr_mem_226703)[sext_i32_i64(local_tid_226678)];\n            if ((local_tid_226678",
            " - squot32(local_tid_226678, 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_226727 = 1;\n        while (slt32(skip_threads_226727, 32)) {\n            bool thread_active_226728 = sle32(skip_threads_226727,\n                                              local_tid_226678 -\n                                              squot32(local_tid_226678, 32) *\n                                              32) && ltid_in_bounds_226726;\n            \n            if (thread_active_226728) {\n                // read operands\n                {\n                    x_209529 = ((volatile __local\n                                 float *) red_arr_mem_226695)[sext_i32_i64(local_tid_226678) -\n                                                              sext_i32_i64(skip_threads_226727)];\n                    x_209530 = ((volatile __local\n                                 float *) red_arr_mem_226697)[sext_i32_i64(local_tid_226678) -\n                                                              sext_i32_i64(skip_threads_226727)];\n                    x_209531 = ((volatile __local\n                                 float *) red_arr_mem_226699)[sext_i32_i64(local_tid_226678) -\n                                                              sext_i32_i64(skip_threads_226727)];\n                    x_209532 = ((volatile __local\n                                 float *) red_arr_mem_226701)[sext_i32_i64(local_tid_226678) -\n                                                              sext_i32_i64(skip_threads_226727)];\n                    x_209533 = ((volatile __local\n                                 float *) red_arr_mem_226703)[sext_i32_i64(local_tid_226678) -\n                                                              sext_i32_i64(skip_threads_226",
            "727)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_226729 =\n                     slt64(srem64(sext_i32_i64(local_tid_226678), q_s_196695),\n                           sext_i32_i64(local_tid_226678) -\n                           sext_i32_i64(local_tid_226678 -\n                           skip_threads_226727));\n                \n                if (thread_active_226728 && inactive_226729) {\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_226728) {\n                    if (!inactive_226729) {\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_226680, skip_threads_226727)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_226728) {\n                // write result\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_226695)[sext_i32_i64(local_tid_226678)] =\n                        x_209529;\n                    x_209534 = x_209529;\n                    ((volatile __local\n                      float *",
            ") red_arr_mem_226697)[sext_i32_i64(local_tid_226678)] =\n                        x_209530;\n                    x_209535 = x_209530;\n                    ((volatile __local\n                      float *) red_arr_mem_226699)[sext_i32_i64(local_tid_226678)] =\n                        x_209531;\n                    x_209536 = x_209531;\n                    ((volatile __local\n                      float *) red_arr_mem_226701)[sext_i32_i64(local_tid_226678)] =\n                        x_209532;\n                    x_209537 = x_209532;\n                    ((volatile __local\n                      float *) red_arr_mem_226703)[sext_i32_i64(local_tid_226678)] =\n                        x_209533;\n                    x_209538 = x_209533;\n                }\n            }\n            if (sle32(wave_sizze_226680, skip_threads_226727)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_226727 *= 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_226678 - squot32(local_tid_226678, 32) * 32) == 31 &&\n            ltid_in_bounds_226726) {\n            ((volatile __local\n              float *) red_arr_mem_226695)[sext_i32_i64(squot32(local_tid_226678,\n                                                                32))] =\n                x_209529;\n            ((volatile __local\n              float *) red_arr_mem_226697)[sext_i32_i64(squot32(local_tid_226678,\n                                                                32))] =\n                x_209530;\n            ((volatile __local\n              float *) red_arr_mem_226699)[sext_i32_i64(squot32(local_tid_226678,\n                                                                32))] =\n                x_209531;\n            ((volatile __local\n              float *) red_arr_mem_226701)[sext_i32_i64(squot32(local_tid_226678,\n                                                                32))] =\n                x_209532;",
            "\n            ((volatile __local\n              float *) red_arr_mem_226703)[sext_i32_i64(squot32(local_tid_226678,\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_226730;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_226678, 32) == 0 && ltid_in_bounds_226726) {\n                x_226716 = ((volatile __local\n                             float *) red_arr_mem_226695)[sext_i32_i64(local_tid_226678)];\n                x_226717 = ((volatile __local\n                             float *) red_arr_mem_226697)[sext_i32_i64(local_tid_226678)];\n                x_226718 = ((volatile __local\n                             float *) red_arr_mem_226699)[sext_i32_i64(local_tid_226678)];\n                x_226719 = ((volatile __local\n                             float *) red_arr_mem_226701)[sext_i32_i64(local_tid_226678)];\n                x_226720 = ((volatile __local\n                             float *) red_arr_mem_226703)[sext_i32_i64(local_tid_226678)];\n                if ((local_tid_226678 - squot32(local_tid_226678, 32) * 32) ==\n                    0) {\n                    x_226711 = x_226716;\n                    x_226712 = x_226717;\n                    x_226713 = x_226718;\n                    x_226714 = x_226719;\n                    x_226715 = x_226720;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_226730 = 1;\n            while (slt32(skip_threads_226730, 32)) {\n                bool thread_active_226731 = sle32(skip_threads_226730,\n                                                  local_tid_226678 -\n                                                  squot32(local_tid_226678,\n                                                          32) *",
            " 32) &&\n                     (squot32(local_tid_226678, 32) == 0 &&\n                      ltid_in_bounds_226726);\n                \n                if (thread_active_226731) {\n                    // read operands\n                    {\n                        x_226711 = ((volatile __local\n                                     float *) red_arr_mem_226695)[sext_i32_i64(local_tid_226678) -\n                                                                  sext_i32_i64(skip_threads_226730)];\n                        x_226712 = ((volatile __local\n                                     float *) red_arr_mem_226697)[sext_i32_i64(local_tid_226678) -\n                                                                  sext_i32_i64(skip_threads_226730)];\n                        x_226713 = ((volatile __local\n                                     float *) red_arr_mem_226699)[sext_i32_i64(local_tid_226678) -\n                                                                  sext_i32_i64(skip_threads_226730)];\n                        x_226714 = ((volatile __local\n                                     float *) red_arr_mem_226701)[sext_i32_i64(local_tid_226678) -\n                                                                  sext_i32_i64(skip_threads_226730)];\n                        x_226715 = ((volatile __local\n                                     float *) red_arr_mem_226703)[sext_i32_i64(local_tid_226678) -\n                                                                  sext_i32_i64(skip_threads_226730)];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_226732 =\n                         slt64(srem64(sext_i32_i64(local_tid_226678 * 32 + 32 -\n                                      1), q_s_196695),\n                               sext_i32_i64(local_tid_226678 * 32 + 32 - 1) -\n                               sext_i32_i64((local_tid_226678 -\n                                             skip_threads_226730) * 32 + 32 ",
            "-\n                               1));\n                    \n                    if (thread_active_226731 && inactive_226732) {\n                        x_226711 = x_226716;\n                        x_226712 = x_226717;\n                        x_226713 = x_226718;\n                        x_226714 = x_226719;\n                        x_226715 = x_226720;\n                    }\n                    if (thread_active_226731) {\n                        if (!inactive_226732) {\n                            float defunc_1_op_res_226721 = x_226711 + x_226716;\n                            float defunc_1_op_res_226722 = x_226712 + x_226717;\n                            float defunc_1_op_res_226723 = x_226713 + x_226718;\n                            float defunc_1_op_res_226724 = x_226714 + x_226719;\n                            float defunc_1_op_res_226725 = x_226715 + x_226720;\n                            \n                            x_226711 = defunc_1_op_res_226721;\n                            x_226712 = defunc_1_op_res_226722;\n                            x_226713 = defunc_1_op_res_226723;\n                            x_226714 = defunc_1_op_res_226724;\n                            x_226715 = defunc_1_op_res_226725;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_226680, skip_threads_226730)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_226731) {\n                    // write result\n                    {\n                        ((volatile __local\n                          float *) red_arr_mem_226695)[sext_i32_i64(local_tid_226678)] =\n                            x_226711;\n                        x_226716 = x_226711;\n                        ((volatile __local\n                          float *) red_arr_mem_226697)[sext_i32_i64(local_tid_226678)] =\n                            x_226712;\n                        x_226717 = x_226712;\n                        ((volatile __local\n         ",
            "                 float *) red_arr_mem_226699)[sext_i32_i64(local_tid_226678)] =\n                            x_226713;\n                        x_226718 = x_226713;\n                        ((volatile __local\n                          float *) red_arr_mem_226701)[sext_i32_i64(local_tid_226678)] =\n                            x_226714;\n                        x_226719 = x_226714;\n                        ((volatile __local\n                          float *) red_arr_mem_226703)[sext_i32_i64(local_tid_226678)] =\n                            x_226715;\n                        x_226720 = x_226715;\n                    }\n                }\n                if (sle32(wave_sizze_226680, skip_threads_226730)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_226730 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_226733 = squot32(local_tid_226678, 32) == 0 ||\n         !ltid_in_bounds_226726;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_226733) {\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_226695)[sext_i32_i64(squot32(local_tid_226678,\n                                                                               32)) -\n                                                          (int64_t) 1];\n                x_209530 = ((__local\n                             float *) red_arr_mem_226697)[sext_i32_i64(squot32(local_tid_226678,\n                                                                               32)) -\n                                                          (int64_t) 1];\n                x_209531 = ((__local\n                             float *) red_arr_mem_226699)[sext_i32_i64(squot32",
            "(local_tid_226678,\n                                                                               32)) -\n                                                          (int64_t) 1];\n                x_209532 = ((__local\n                             float *) red_arr_mem_226701)[sext_i32_i64(squot32(local_tid_226678,\n                                                                               32)) -\n                                                          (int64_t) 1];\n                x_209533 = ((__local\n                             float *) red_arr_mem_226703)[sext_i32_i64(squot32(local_tid_226678,\n                                                                               32)) -\n                                                          (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_226734 = slt64(srem64(sext_i32_i64(local_tid_226678),\n                                                q_s_196695),\n                                         sext_i32_i64(local_tid_226678) -\n                                         sext_i32_i64(squot32(local_tid_226678,\n                                                              32) * 32 - 1));\n            \n            if (!no_carry_in_226733) {\n                if (inactive_226734) {\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_in_226733) {\n                if (!inactive_226734) {\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_226733) {\n                ((__local\n                  float *) red_arr_mem_226695)[sext_i32_i64(local_tid_226678)] =\n                    x_209529;\n                ((__local\n                  float *) red_arr_mem_226697)[sext_i32_i64(local_tid_226678)] =\n                    x_209530;\n                ((__local\n                  float *) red_arr_mem_226699)[sext_i32_i64(local_tid_226678)] =\n                    x_209531;\n                ((__local\n                  float *) red_arr_mem_226701)[sext_i32_i64(local_tid_226678)] =\n                    x_209532;\n                ((__local\n                  float *) red_arr_mem_226703)[sext_i32_i64(local_tid_226678)] =\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_226678, 32) == 0 && ltid_in_bounds_226726) {\n            ((__local\n              float *) red_arr_mem_226695)[sext_i32_i64(local_tid_226678)] =\n                x_209534;\n            ((__local\n              float *) red_arr_mem_226697)[sext_i32_i64(local_tid_226678)] =\n                x_209535;\n            ((__local\n              float *) red_arr_mem_226699)[sext_i32_i64(local_tid_226678)] =\n                x_209536;\n            ((__local\n              float *) red_arr_mem_226701)[sext_i32_i64(local_tid_226678)] =\n                x_209537;\n            ((__local\n              float *) red_arr_mem_226703)[sext_i32_i64(local_tid_226678)] =\n                x_209538;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226735 = 0; i_2",
            "26735 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226678),\n                                                    computed_group_sizze_209331);\n         i_226735++) {\n        float tmp_226736;\n        \n        tmp_226736 = ((__local float *) red_arr_mem_226695)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226735 *\n                                                             computed_group_sizze_209331 +\n                                                             sext_i32_i64(local_tid_226678)) *\n                                                            q_s_196695];\n        ((__local float *) color_225065)[i_226735 *\n                                         computed_group_sizze_209331 +\n                                         sext_i32_i64(local_tid_226678)] =\n            tmp_226736;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226737 = 0; i_226737 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226678),\n                                                    computed_group_sizze_209331);\n         i_226737++) {\n        float tmp_226738;\n        \n        tmp_226738 = ((__local float *) red_arr_mem_226697)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226737 *\n                                                             computed_group_sizze_209331 +\n                                                             sext_i32_i64(local_tid_226678)) *\n                                                            q_s_196695];\n        ((__local float *) color_225064)[i_226737 *\n                                         computed_group_sizze_209331 +\n                                         sext_i32_i64(local_tid_226678)] =\n            tmp_226738;\n    }\n    ba",
            "rrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226739 = 0; i_226739 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226678),\n                                                    computed_group_sizze_209331);\n         i_226739++) {\n        float tmp_226740;\n        \n        tmp_226740 = ((__local float *) red_arr_mem_226699)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226739 *\n                                                             computed_group_sizze_209331 +\n                                                             sext_i32_i64(local_tid_226678)) *\n                                                            q_s_196695];\n        ((__local float *) color_225063)[i_226739 *\n                                         computed_group_sizze_209331 +\n                                         sext_i32_i64(local_tid_226678)] =\n            tmp_226740;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226741 = 0; i_226741 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226678),\n                                                    computed_group_sizze_209331);\n         i_226741++) {\n        float tmp_226742;\n        \n        tmp_226742 = ((__local float *) red_arr_mem_226701)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226741 *\n                                                             computed_group_sizze_209331 +\n                                                             sext_i32_i64(local_tid_226678)) *\n                                                            q_s_196695];\n        ((__local float *) color_225056)[i_226741 *\n                                         computed_group_sizze_209331 +\n                                         sext_i32",
            "_i64(local_tid_226678)] =\n            tmp_226742;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226743 = 0; i_226743 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226678),\n                                                    computed_group_sizze_209331);\n         i_226743++) {\n        float tmp_226744;\n        \n        tmp_226744 = ((__local float *) red_arr_mem_226703)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226743 *\n                                                             computed_group_sizze_209331 +\n                                                             sext_i32_i64(local_tid_226678)) *\n                                                            q_s_196695];\n        ((__local float *) color_225055)[i_226743 *\n                                         computed_group_sizze_209331 +\n                                         sext_i32_i64(local_tid_226678)] =\n            tmp_226744;\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_226682));\n    int32_t phys_tid_209577 = local_tid_226678;\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        float 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_226685));\n    int64_t gtid_209622 = sext_i32_i64(sext_i64_i32(ltid_pre_226686));\n    int32_t phys_tid_209623 = local_tid_226678;\n    __local unsigned char *red_arr_mem_226745;\n    \n    red_arr_mem_226745 = (__local\n                          unsigned char *) red_arr_mem_226745_backing_17",
            ";\n    \n    __local unsigned char *red_arr_mem_226747;\n    \n    red_arr_mem_226747 = (__local\n                          unsigned char *) red_arr_mem_226747_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_fu",
            "n_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_226745)[gtid_209621 * q_s_196695 +\n                                               gtid_209622] =\n            defunc_9_fit_fun_res_209667;\n        ((__local float *) red_arr_mem_226747)[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_226749 = 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_226752;\n    float x_226753;\n    float x_226754;\n    float x_226755;\n    bool ltid_in_bounds_226758 = slt64(sext_i32_i64(local_tid_226678),\n                                       s_n_m_196745 * q_s_196695);\n    int32_t skip_threads_226759;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_226758) {\n            x_209626 = ((volatile __local\n                         float *) red_arr_mem_226745)[sext_i32_i64(local_tid_226678)];\n            x_209627 = ((volatile __local\n                         float *) red_arr_mem_226747)[sext_i32_i64(local_tid_226678)];\n            if ((local_tid_226678 - squot32(local_tid_226678, 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_226759 = 1;\n        while (slt32(skip_threads_226759, 32)) {\n            bool thread_active_226760 = sle32(skip_threads_226759,\n                                              local_tid_226678 -\n                                              squot32(local_tid_226678, 32) *\n                                              32) && ltid_in_bounds_226758;\n            \n      ",
            "      if (thread_active_226760) {\n                // read operands\n                {\n                    x_209624 = ((volatile __local\n                                 float *) red_arr_mem_226745)[sext_i32_i64(local_tid_226678) -\n                                                              sext_i32_i64(skip_threads_226759)];\n                    x_209625 = ((volatile __local\n                                 float *) red_arr_mem_226747)[sext_i32_i64(local_tid_226678) -\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_226678), q_s_196695),\n                           sext_i32_i64(local_tid_226678) -\n                           sext_i32_i64(local_tid_226678 -\n                           skip_threads_226759));\n                \n                if (thread_active_226760 && inactive_226761) {\n                    x_209624 = x_209626;\n                    x_209625 = x_209627;\n                }\n                if (thread_active_226760) {\n                    if (!inactive_226761) {\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_226680, 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_226745)[sext_i32_i64(local_tid_226678)] =\n                        x_209624;\n                    x_209626 = x_209624;\n                    ((volatile _",
            "_local\n                      float *) red_arr_mem_226747)[sext_i32_i64(local_tid_226678)] =\n                        x_209625;\n                    x_209627 = x_209625;\n                }\n            }\n            if (sle32(wave_sizze_226680, skip_threads_226759)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_226759 *= 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_226678 - squot32(local_tid_226678, 32) * 32) == 31 &&\n            ltid_in_bounds_226758) {\n            ((volatile __local\n              float *) red_arr_mem_226745)[sext_i32_i64(squot32(local_tid_226678,\n                                                                32))] =\n                x_209624;\n            ((volatile __local\n              float *) red_arr_mem_226747)[sext_i32_i64(squot32(local_tid_226678,\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_226762;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_226678, 32) == 0 && ltid_in_bounds_226758) {\n                x_226754 = ((volatile __local\n                             float *) red_arr_mem_226745)[sext_i32_i64(local_tid_226678)];\n                x_226755 = ((volatile __local\n                             float *) red_arr_mem_226747)[sext_i32_i64(local_tid_226678)];\n                if ((local_tid_226678 - squot32(local_tid_226678, 32) * 32) ==\n                    0) {\n                    x_226752 = x_226754;\n                    x_226753 = x_226755;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_226762 = 1;\n            while (slt32(skip_threads_226762, 32)) {\n       ",
            "         bool thread_active_226763 = sle32(skip_threads_226762,\n                                                  local_tid_226678 -\n                                                  squot32(local_tid_226678,\n                                                          32) * 32) &&\n                     (squot32(local_tid_226678, 32) == 0 &&\n                      ltid_in_bounds_226758);\n                \n                if (thread_active_226763) {\n                    // read operands\n                    {\n                        x_226752 = ((volatile __local\n                                     float *) red_arr_mem_226745)[sext_i32_i64(local_tid_226678) -\n                                                                  sext_i32_i64(skip_threads_226762)];\n                        x_226753 = ((volatile __local\n                                     float *) red_arr_mem_226747)[sext_i32_i64(local_tid_226678) -\n                                                                  sext_i32_i64(skip_threads_226762)];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_226764 =\n                         slt64(srem64(sext_i32_i64(local_tid_226678 * 32 + 32 -\n                                      1), q_s_196695),\n                               sext_i32_i64(local_tid_226678 * 32 + 32 - 1) -\n                               sext_i32_i64((local_tid_226678 -\n                                             skip_threads_226762) * 32 + 32 -\n                               1));\n                    \n                    if (thread_active_226763 && inactive_226764) {\n                        x_226752 = x_226754;\n                        x_226753 = x_226755;\n                    }\n                    if (thread_active_226763) {\n                        if (!inactive_226764) {\n                            float defunc_1_op_res_226756 = x_226752 + x_226754;\n                            float defunc_1_op_res_226757 = x_226753 + x_226755;",
            "\n                            \n                            x_226752 = defunc_1_op_res_226756;\n                            x_226753 = defunc_1_op_res_226757;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_226680, skip_threads_226762)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_226763) {\n                    // write result\n                    {\n                        ((volatile __local\n                          float *) red_arr_mem_226745)[sext_i32_i64(local_tid_226678)] =\n                            x_226752;\n                        x_226754 = x_226752;\n                        ((volatile __local\n                          float *) red_arr_mem_226747)[sext_i32_i64(local_tid_226678)] =\n                            x_226753;\n                        x_226755 = x_226753;\n                    }\n                }\n                if (sle32(wave_sizze_226680, skip_threads_226762)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_226762 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_226765 = squot32(local_tid_226678, 32) == 0 ||\n         !ltid_in_bounds_226758;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_226765) {\n                x_209626 = x_209624;\n                x_209627 = x_209625;\n                x_209624 = ((__local\n                             float *) red_arr_mem_226745)[sext_i32_i64(squot32(local_tid_226678,\n                                                                               32)) -\n                                                          (int64_t) 1];\n                x_209625 = ((__local\n                             float *) red_arr_mem_226747)[sext_i32_i64(squot32(local_tid_226678,\n                                                                               32)) -\n",
            "                                                          (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_226766 = slt64(srem64(sext_i32_i64(local_tid_226678),\n                                                q_s_196695),\n                                         sext_i32_i64(local_tid_226678) -\n                                         sext_i32_i64(squot32(local_tid_226678,\n                                                              32) * 32 - 1));\n            \n            if (!no_carry_in_226765) {\n                if (inactive_226766) {\n                    x_209624 = x_209626;\n                    x_209625 = x_209627;\n                }\n            }\n            if (!no_carry_in_226765) {\n                if (!inactive_226766) {\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_226765) {\n                ((__local\n                  float *) red_arr_mem_226745)[sext_i32_i64(local_tid_226678)] =\n                    x_209624;\n                ((__local\n                  float *) red_arr_mem_226747)[sext_i32_i64(local_tid_226678)] =\n                    x_209625;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // restore correct values for first block\n    {\n        if (squot32(local_tid_226678, 32) == 0 && ltid_in_bounds_226758) {\n            ((__local\n              float *) red_arr_mem_226745)[sext_i32_i64(local_tid_226678)] =\n                x_209626;\n            ((__local\n              float *) red_arr_mem_226747)[sext_i32_i64(local_tid_226678)] =\n                x_209627;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int6",
            "4_t i_226767 = 0; i_226767 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226678),\n                                                    computed_group_sizze_209331);\n         i_226767++) {\n        float tmp_226768;\n        \n        tmp_226768 = ((__local float *) red_arr_mem_226745)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226767 *\n                                                             computed_group_sizze_209331 +\n                                                             sext_i32_i64(local_tid_226678)) *\n                                                            q_s_196695];\n        ((__local float *) color_225056)[i_226767 *\n                                         computed_group_sizze_209331 +\n                                         sext_i32_i64(local_tid_226678)] =\n            tmp_226768;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226769 = 0; i_226769 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226678),\n                                                    computed_group_sizze_209331);\n         i_226769++) {\n        float tmp_226770;\n        \n        tmp_226770 = ((__local float *) red_arr_mem_226747)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226769 *\n                                                             computed_group_sizze_209331 +\n                                                             sext_i32_i64(local_tid_226678)) *\n                                                            q_s_196695];\n        ((__local float *) color_225055)[i_226769 *\n                                         computed_group_sizze_209331 +\n                                         sext_i32_i64(local_tid_226678)] =\n            tmp",
            "_226770;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226771 = 0; i_226771 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226678),\n                                                    computed_group_sizze_209331);\n         i_226771++) {\n        float tmp_226772;\n        \n        tmp_226772 = ((__local float *) color_225056)[i_226771 *\n                                                      computed_group_sizze_209331 +\n                                                      sext_i32_i64(local_tid_226678)];\n        ((__global float *) mem_223347)[gtid_209492 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_209493 * s_n_m_196745 + (i_226771 *\n                                                                      computed_group_sizze_209331 +\n                                                                      sext_i32_i64(local_tid_226678))] =\n            tmp_226772;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226773 = 0; i_226773 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226678),\n                                                    computed_group_sizze_209331);\n         i_226773++) {\n        float tmp_226774;\n        \n        tmp_226774 = ((__local float *) color_225055)[i_226773 *\n                                                      computed_group_sizze_209331 +\n                                                      sext_i32_i64(local_tid_226678)];\n        ((__global float *) mem_223352)[gtid_209492 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_209493 * s_n_m_196745 + (i_226773 *\n                                                                      computed_group_sizze_209331 +\n                                                      ",
            "                sext_i32_i64(local_tid_226678))] =\n            tmp_226774;\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                                             uint red_arr_mem_227062_backing_offset_0,\n                                             uint red_arr_mem_227058_backing_offset_1,\n                                             uint color_225067_backing_offset_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    volatile unsigned char *red_arr_mem_227062_backing_2 =\n                           &shared_mem[red_arr_mem_227062_backing_offset_0];\n    volatile unsigned char *red_arr_mem_227058_backing_1 =\n                           &shared_mem[red_",
            "arr_mem_227058_backing_offset_1];\n    volatile unsigned char *color_225067_backing_0 =\n                           &shared_mem[color_225067_backing_offset_2];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227044;\n    int32_t local_tid_227045;\n    int64_t group_sizze_227048;\n    int32_t wave_sizze_227047;\n    int32_t group_tid_227046;\n    \n    global_tid_227044 = get_global_id(0);\n    local_tid_227045 = get_local_id(0);\n    group_sizze_227048 = get_local_size(0);\n    wave_sizze_227047 = LOCKSTEP_WIDTH;\n    group_tid_227046 = get_group_id(0);\n    \n    int32_t phys_tid_210266 = group_tid_227046;\n    int64_t slice_227050 = q_s_196695;\n    int64_t ltid_pre_227049 = sext_i32_i64(local_tid_227045);\n    int64_t remnant_227051 = sext_i32_i64(local_tid_227045) - ltid_pre_227049;\n    int64_t slice_227052 = s_n_m_196745;\n    int64_t slice_227053 = n_p_196694 * slice_227052;\n    int64_t slice_227054 = m_196691 * slice_227053;\n    int64_t gtid_210263 = squot64(sext_i32_i64(group_tid_227046), slice_227053);\n    int64_t remnant_227055 = sext_i32_i64(group_tid_227046) - gtid_210263 *\n            slice_227053;\n    int64_t gtid_210264 = squot64(remnant_227055, slice_227052);\n    int64_t remnant_227056 = remnant_227055 - gtid_210264 * slice_227052;\n    int64_t gtid_210265 = remnant_227056;\n    int64_t remnant_227057 = remnant_227056 - 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            int64_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_227049));\n    int32_t phys_tid_210290 = local_tid_227045;\n    __local unsigned char *red_arr_mem_227058;\n    \n    red_arr_mem_227058 = (__local unsigned char *) red_arr_mem_227058_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_210302;\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_227058)[gtid_210289] = tmp4_210312;\n    ((__local float *) color_225067)[gtid_210289] = tmp4_210312;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_227060;\n    int32_t skip_waves_227061 = 1;\n    float x_210291;\n    float x_210292;\n    \n    offset_227060 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_227045, sext_i64_i32(q_s_196695))) {\n            x_210291 = ((__local\n                         float *) red_arr_mem_227058)[sext_i32_i64(local_tid_227045 +\n                                                      offset_227060)];\n        }\n    }\n    offset_227060 = 1;\n    while (slt32(offset_227060, wave_sizze_227047)) {\n        if (slt32(local_tid_227045 + offset_227060, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_227045 - squot32(local_tid_227045, wave_sizze_227047) *\n              wave_sizze_227047) & (2 * offset_227060 - 1)) == 0) {\n            // read array element\n            {\n                x_210292 = ((volatile __local\n                             float *) red_arr_mem_227058)[sext_i32_i64(local_tid_227045 +\n                                                          offset_227060)];\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_227058)[sext_i32_i64(local_tid_227045)] =\n                    x_210291;\n            }\n        }\n        offset_227060 *= 2;\n    }\n    while (slt32(skip_waves_227061, squot32(s",
            "ext_i64_i32(q_s_196695) +\n                                            wave_sizze_227047 - 1,\n                                            wave_sizze_227047))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_227060 = skip_waves_227061 * wave_sizze_227047;\n        if (slt32(local_tid_227045 + offset_227060, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_227045 - squot32(local_tid_227045, wave_sizze_227047) *\n              wave_sizze_227047) == 0 && (squot32(local_tid_227045,\n                                                  wave_sizze_227047) & (2 *\n                                                                        skip_waves_227061 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_210292 = ((__local\n                             float *) red_arr_mem_227058)[sext_i32_i64(local_tid_227045 +\n                                                          offset_227060)];\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                ((__local\n                  float *) red_arr_mem_227058)[sext_i32_i64(local_tid_227045)] =\n                    x_210291;\n            }\n        }\n        skip_waves_227061 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_210287 = ((__local\n                                   float *) red_arr_mem_227058)[(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_227049));\n    int32_t phys_tid_210316 = local_tid_227045;\n    __local unsigned char *red_arr_mem_227062;\n    \n    red_arr_mem_227062 = (__local unsigned char *) red_arr_mem_227062_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_227062)[gtid_210315] =\n        defunc_9_fit_fun_res_210327;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_227064;\n    int32_t skip_waves_227065 = 1;\n    float x_210317;\n    float x_210318;\n    \n    offset_227064 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_227045, sext_i64_i32(q_s_196695))) {\n            x_210317 = ((__local\n                         float *) red_arr_mem_227062)[sext_i32_i64(local_tid_227045 +\n                                                      offset_227064)];\n        }\n    }\n    offset_227064 = 1;\n    while (slt32(offset_227064, wave_sizze_227047)) {\n        if (slt32(local_tid_227045 + offset_227064, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_227045 - squot32(local_tid_227045, wave_sizze_227047) *\n              wave_sizze_227047) & (2 * offset_227064 - 1)) == 0) {\n            // read array element\n            {\n         ",
            "       x_210318 = ((volatile __local\n                             float *) red_arr_mem_227062)[sext_i32_i64(local_tid_227045 +\n                                                          offset_227064)];\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_227062)[sext_i32_i64(local_tid_227045)] =\n                    x_210317;\n            }\n        }\n        offset_227064 *= 2;\n    }\n    while (slt32(skip_waves_227065, squot32(sext_i64_i32(q_s_196695) +\n                                            wave_sizze_227047 - 1,\n                                            wave_sizze_227047))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_227064 = skip_waves_227065 * wave_sizze_227047;\n        if (slt32(local_tid_227045 + offset_227064, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_227045 - squot32(local_tid_227045, wave_sizze_227047) *\n              wave_sizze_227047) == 0 && (squot32(local_tid_227045,\n                                                  wave_sizze_227047) & (2 *\n                                                                        skip_waves_227065 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_210318 = ((__local\n                             float *) red_arr_mem_227062)[sext_i32_i64(local_tid_227045 +\n                                                          offset_227064)];\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_227062)[sext_i32_i64(local_tid_227045)] =\n                    x_210317;\n            }\n        }\n        skip_waves_227065 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_210314 = ((__local\n                                   float *) red_arr_mem_227062)[(int64_t) 0];\n    if (local_tid_227045 == 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                                             uint red_arr_mem_227090_backing_offset_0,\n                                             uint red_arr_mem_227088_backing_offset_1,\n                                             uint red_arr_mem_227084_backing_offset_2,\n                                             uint red_arr_mem_227082_backing_offset_3,\n                                             uint red_arr_mem_227080_backing_offset_4,\n                                             uint color_225069_backing_offset_5,\n                                             uint color_225068_backing_offset_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    volatile unsigned char *red_arr_mem_227090_backing_6 =\n                           &shared_mem[red_arr_mem_227090_backing_offset_0];\n    volatile unsigned char *red_arr_mem_227088_backing_5 =\n                           &shared_mem[red_arr_mem_227088_backing_offset_1];\n    volatile unsigned char *red_arr_mem_227084_backing_4 =\n                           &shared_mem[red_arr_mem_227084_backing_offset_2];\n    volatile unsigned char *red_arr_mem_227082_backing_3 =\n                           &shared_mem[red_arr_mem_227082_backing_offset_3];\n    volatile unsigned char *red_arr_mem_227080_backing_2 =\n                           &shared_mem[red_arr_mem_227080_backing_offset_4];\n    volatile unsigned char *color_225069_backing_1 =\n                           &shared_mem[color_225069_backing_offset_5];\n    volatile unsigned char *color_225068_backing_0 =\n                           &shared_mem[color_225068_backing_offset_6];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227066;\n    int32_t local_tid_227067;\n    int64_t group_sizze_227070;\n    int32_t wave_sizze_227069;\n    int32_t group_tid_227068;\n    \n    global_tid_227066 = get_global_id(0);\n    local_tid_227067 = get_local_id(0);\n    ",
            "group_sizze_227070 = get_local_size(0);\n    wave_sizze_227069 = LOCKSTEP_WIDTH;\n    group_tid_227068 = get_group_id(0);\n    \n    int32_t phys_tid_210587 = group_tid_227068;\n    int64_t slice_227072 = q_s_196695;\n    int64_t ltid_pre_227071 = sext_i32_i64(local_tid_227067);\n    int64_t remnant_227073 = sext_i32_i64(local_tid_227067) - ltid_pre_227071;\n    int64_t slice_227074 = s_n_m_196745;\n    int64_t slice_227075 = n_p_196694 * slice_227074;\n    int64_t slice_227076 = m_196691 * slice_227075;\n    int64_t gtid_210584 = squot64(sext_i32_i64(group_tid_227068), slice_227075);\n    int64_t remnant_227077 = sext_i32_i64(group_tid_227068) - gtid_210584 *\n            slice_227075;\n    int64_t gtid_210585 = squot64(remnant_227077, slice_227074);\n    int64_t remnant_227078 = remnant_227077 - gtid_210585 * slice_227074;\n    int64_t gtid_210586 = remnant_227078;\n    int64_t remnant_227079 = remnant_227078 - 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_196745 +\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_227071));\n    int32_t phys_tid_210614 = local_tid_227067;\n    __local unsigned char *red_arr_mem_227080;\n    \n    red_arr_mem_227080 = (__local unsigned char *) red_arr_mem_227080_backing_2;\n    \n    __local unsigned char *red_arr_mem_227082;\n    \n    red_arr_mem_227082 = (__local unsigned char *) red_arr_mem_227082_backing_3;\n    \n    __local unsigned char *red_arr_mem_227084;\n    \n    red_arr_mem_227084 = (__local unsigned char *) red_arr_mem_227084_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    flo",
            "at 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_227080)[gtid_210613] = tmp4_210642;\n    ((__local float *) red_arr_mem_227082)[gtid_210613] = defunc_1_f_res_210643;\n    ((__local float *) red_arr_mem_227084)[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_227086;\n    int32_t skip_waves_227087 = 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_227086 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_227067, sext_i64_i32(q_s_196695))) {\n            x_210615 = ((__local\n                         float *) red_arr_mem_227080)[sext_i32_i64(local_tid_227067 +\n                                                      offset_227086)];\n            x_210616 = ((__local\n                         float *) red_arr_mem_227082)[sext_i32_i64(local_tid_227067 +\n                                                      offset_227086)];\n            x_210617 = ((__local\n                         float *) red_arr_mem_227084)[sext_i32_i64(local_tid_227067 +\n                                                      offset_227086)];\n        }\n    }\n    offset_227086 = 1;\n    while (slt32(offset_227086, wave_sizze_227069)) {\n        if (slt32(local_tid_227067 + offset_227086, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_227067 - squot32(local_tid_227067, wave_sizz",
            "e_227069) *\n              wave_sizze_227069) & (2 * offset_227086 - 1)) == 0) {\n            // read array element\n            {\n                x_210618 = ((volatile __local\n                             float *) red_arr_mem_227080)[sext_i32_i64(local_tid_227067 +\n                                                          offset_227086)];\n                x_210619 = ((volatile __local\n                             float *) red_arr_mem_227082)[sext_i32_i64(local_tid_227067 +\n                                                          offset_227086)];\n                x_210620 = ((volatile __local\n                             float *) red_arr_mem_227084)[sext_i32_i64(local_tid_227067 +\n                                                          offset_227086)];\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_227080)[sext_i32_i64(local_tid_227067)] =\n                    x_210615;\n                ((volatile __local\n                  float *) red_arr_mem_227082)[sext_i32_i64(local_tid_227067)] =\n                    x_210616;\n                ((volatile __local\n                  float *) red_arr_mem_227084)[sext_i32_i64(local_tid_227067)] =\n                    x_210617;\n            }\n        }\n        offset_227086 *= 2;\n    }\n    while (slt32(skip_waves_227087, squot32(sext_i64_i32(q_s_196695) +\n                                            wave_sizze_227069 - 1,\n                                            wave_sizze_227069))) {\n        barrier(CLK_LOCAL_",
            "MEM_FENCE);\n        offset_227086 = skip_waves_227087 * wave_sizze_227069;\n        if (slt32(local_tid_227067 + offset_227086, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_227067 - squot32(local_tid_227067, wave_sizze_227069) *\n              wave_sizze_227069) == 0 && (squot32(local_tid_227067,\n                                                  wave_sizze_227069) & (2 *\n                                                                        skip_waves_227087 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_210618 = ((__local\n                             float *) red_arr_mem_227080)[sext_i32_i64(local_tid_227067 +\n                                                          offset_227086)];\n                x_210619 = ((__local\n                             float *) red_arr_mem_227082)[sext_i32_i64(local_tid_227067 +\n                                                          offset_227086)];\n                x_210620 = ((__local\n                             float *) red_arr_mem_227084)[sext_i32_i64(local_tid_227067 +\n                                                          offset_227086)];\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_227080)[sext_i32_i64(local_tid_227067)] =\n                    x_210615;\n                ((__local\n                  float *) red_arr_mem_227082)[sext_i32_i64(local_tid_227067)] =\n                    ",
            "x_210616;\n                ((__local\n                  float *) red_arr_mem_227084)[sext_i32_i64(local_tid_227067)] =\n                    x_210617;\n            }\n        }\n        skip_waves_227087 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_210608 = ((__local\n                                   float *) red_arr_mem_227080)[(int64_t) 0];\n    defunc_2_reduce_res_210609 = ((__local\n                                   float *) red_arr_mem_227082)[(int64_t) 0];\n    defunc_2_reduce_res_210610 = ((__local\n                                   float *) red_arr_mem_227084)[(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_227071));\n    int32_t phys_tid_210656 = local_tid_227067;\n    __local unsigned char *red_arr_mem_227088;\n    \n    red_arr_mem_227088 = (__local unsigned char *) red_arr_mem_227088_backing_5;\n    \n    __local unsigned char *red_arr_mem_227090;\n    \n    red_arr_mem_227090 = (__local unsigned char *) red_arr_mem_227090_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_227088)[gtid_210655] =\n        defunc_9_fit_fun_res_210673;\n    ((__local float *) red_arr_mem_227090)[gtid_210655] =\n        defunc_9_slope_fun_res_210677;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_227092;\n    int32_t skip_waves_227093 = 1;\n    float x_210657;\n    float x_210658;\n    float x_210659;\n    float x_210660;\n    \n    offset_227092 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_227067, sext_i64_i32(q_s_196695))) {\n            x_210657 = ((__local\n                         float *) red_arr_mem_227088)[sext_i32_i64(local_tid_227067 +\n                                                      offset_227092)];\n            x_210658 = ((__local\n                         float *) red_arr_mem_227090)[sext_i32_i64(local_tid_227067 +\n                                                      offset_227092)];\n        }\n    }\n    offset_227092 = 1;\n    while (slt32(offset_227092, wave_sizze_227069)) {\n        if ",
            "(slt32(local_tid_227067 + offset_227092, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_227067 - squot32(local_tid_227067, wave_sizze_227069) *\n              wave_sizze_227069) & (2 * offset_227092 - 1)) == 0) {\n            // read array element\n            {\n                x_210659 = ((volatile __local\n                             float *) red_arr_mem_227088)[sext_i32_i64(local_tid_227067 +\n                                                          offset_227092)];\n                x_210660 = ((volatile __local\n                             float *) red_arr_mem_227090)[sext_i32_i64(local_tid_227067 +\n                                                          offset_227092)];\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_227088)[sext_i32_i64(local_tid_227067)] =\n                    x_210657;\n                ((volatile __local\n                  float *) red_arr_mem_227090)[sext_i32_i64(local_tid_227067)] =\n                    x_210658;\n            }\n        }\n        offset_227092 *= 2;\n    }\n    while (slt32(skip_waves_227093, squot32(sext_i64_i32(q_s_196695) +\n                                            wave_sizze_227069 - 1,\n                                            wave_sizze_227069))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_227092 = skip_waves_227093 * wave_sizze_227069;\n        if (slt32(local_tid_227067 + offset_227092, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_227067 - squot32(local_tid_227067, wave_sizze_227069) *\n              wave_sizze_227069) == 0 && (squot32(local_tid_227067,\n                                  ",
            "                wave_sizze_227069) & (2 *\n                                                                        skip_waves_227093 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_210659 = ((__local\n                             float *) red_arr_mem_227088)[sext_i32_i64(local_tid_227067 +\n                                                          offset_227092)];\n                x_210660 = ((__local\n                             float *) red_arr_mem_227090)[sext_i32_i64(local_tid_227067 +\n                                                          offset_227092)];\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_227088)[sext_i32_i64(local_tid_227067)] =\n                    x_210657;\n                ((__local\n                  float *) red_arr_mem_227090)[sext_i32_i64(local_tid_227067)] =\n                    x_210658;\n            }\n        }\n        skip_waves_227093 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_210653 = ((__local\n                                   float *) red_arr_mem_227088)[(int64_t) 0];\n    defunc_2_reduce_res_210654 = ((__local\n                                   float *) red_arr_mem_227090)[(int64_t) 0];\n    if (local_tid_227067 == 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            def",
            "unc_2_reduce_res_210653;\n    }\n    if (local_tid_227067 == 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                                             uint red_arr_mem_227122_backing_offset_0,\n                                             uint red_arr_mem_227120_backing_offset_1,\n                                             uint red_arr_mem_227116_backing_offset_2,\n                                             uint red_arr_mem_227114_backing_offset_3,\n                                             uint red_arr_mem_227112_backing_offset_4,\n                                             uint red_arr_mem_227110_backing_offset_5,\n                                             uint red_arr_mem_227108_backing_offset_6,\n                                             uint color_225073_backing_offset_7,\n                                             uint color_225072_backing_offset_8,\n                                             uint color_225071_backing_offset_9,\n                                             uint color_225070_backing_offset_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    volatile unsigned char *red_arr_mem_227122_backing_10 =\n                           &shared_mem[red_arr_mem_227122_backing_offset_0];\n    volatile unsigned char *red_arr_mem_227120_backing_9 =\n                           &shared_mem[red_arr_mem_227120_backing_offset_1];\n    volatile unsigned char *red_arr_mem_227116_backing_8 =\n                           &shared_mem[red_arr_mem_227116_backing_offset_2];\n    volatile unsigned char *red_arr_mem_227114_backing_7 =\n                           &shared_mem[red_arr_mem_227114_backing_offset_3];\n    volatile unsigned char *red_arr_mem_227112_backing_6 =\n                           &shared_mem[red_arr_mem_227112_backing_offset_4];\n    volatile unsigned char *red_arr_mem_227110_backing_5 =\n                           &shared_mem[red_arr_mem_227110_backing_offset_5];\n    volatile unsigned char *red_arr_mem_227108_backing_4 =\n                           &shared_mem[red_arr_mem_227108_backing_offset_6];\n    volatile unsigned char *color_225073_backing_3 =\n                           &shared_mem[color_225073_backing_offset_7];\n    volatile unsigned char *color_225072_backing_2 =\n                           &shared_mem[color_225072_backing_offset_8];\n    volatile unsign",
            "ed char *color_225071_backing_1 =\n                           &shared_mem[color_225071_backing_offset_9];\n    volatile unsigned char *color_225070_backing_0 =\n                           &shared_mem[color_225070_backing_offset_10];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227094;\n    int32_t local_tid_227095;\n    int64_t group_sizze_227098;\n    int32_t wave_sizze_227097;\n    int32_t group_tid_227096;\n    \n    global_tid_227094 = get_global_id(0);\n    local_tid_227095 = get_local_id(0);\n    group_sizze_227098 = get_local_size(0);\n    wave_sizze_227097 = LOCKSTEP_WIDTH;\n    group_tid_227096 = get_group_id(0);\n    \n    int32_t phys_tid_211038 = group_tid_227096;\n    int64_t slice_227100 = q_s_196695;\n    int64_t ltid_pre_227099 = sext_i32_i64(local_tid_227095);\n    int64_t remnant_227101 = sext_i32_i64(local_tid_227095) - ltid_pre_227099;\n    int64_t slice_227102 = s_n_m_196745;\n    int64_t slice_227103 = n_p_196694 * slice_227102;\n    int64_t slice_227104 = m_196691 * slice_227103;\n    int64_t gtid_211035 = squot64(sext_i32_i64(group_tid_227096), slice_227103);\n    int64_t remnant_227105 = sext_i32_i64(group_tid_227096) - gtid_211035 *\n            slice_227103;\n    int64_t gtid_211036 = squot64(remnant_227105, slice_227102);\n    int64_t remnant_227106 = remnant_227105 - gtid_211036 * slice_227102;\n    int64_t gtid_211037 = remnant_227106;\n    int64_t remnant_227107 = remnant_227106 - 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 *) ex",
            "t_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_227099));\n    int32_t phys_tid_211062 = local_tid_227095;\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_227099));\n    int32_t phys_tid_211090 = local_tid_227095;\n    __local unsigned char *red_arr_mem_227108;\n    \n    red_arr_mem_227108 = (__local unsigned char *) red_arr_mem_227108_backing_4;\n    \n    __local unsigned char *red_arr_mem_227110;\n    \n    red_arr_mem_227110 = (__local unsigned char *) red_arr_mem_227110_backing_5;\n    \n    __local unsigned char *red_arr_mem_227112;\n    \n    red_arr_mem_227112 = (__local unsigned char *) red_arr_mem_227112_backing_6;\n    \n    __local unsigned char *red_arr_mem_227114;\n    \n    red_arr_mem_227114 = (__local unsigned char *) red_arr_mem_227114_backing_7;\n    \n    __local unsigned char *red_arr_mem_227116;\n    \n    red_arr_mem_227116 = (__local unsigned char *) red_arr_mem_227116_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_227108)[gtid_211089] = x_211107;\n    ((__local float *) red_arr_mem_227110)[gtid_211089] = defunc_1_f_res_211108;\n    ((__local float *) red_arr_mem_227112)[gtid_211089] = defunc_1_f_res_211109;\n    ((__local float *) red_arr_mem_227114)[gtid_211089] = defunc_1_f_res_211110;\n    ((__local float *) red_arr_mem_227116)[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_227118;\n    int32_t skip_waves_227119 = 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_227118 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_227095, sext_i64_i32(q_s_196695))) {\n            x_211091 = ((__local\n                         float *) red_arr_mem_227108)[sext_i32_i64(local_tid_227095 +\n                                                      offset_227118)];\n            x_211092 = ((__local\n                         float *) red_arr_mem_227110)[sext_i32_i64(local_tid_227095 +\n                                                      offset_227118)];\n            x_211093 = ((__local\n                         float *) red_arr_mem_227112)[sext_i32_i64(local_tid_227095 +\n                                                      offset_227118)];\n            x_211094 = ((__local\n                         float *) red_arr_mem_227114)[sext_i32_i64(local_tid_227095 +\n                                                      offset_227118)];\n            x_211095 = ((__local\n                         float *) red_arr_mem_227116)",
            "[sext_i32_i64(local_tid_227095 +\n                                                      offset_227118)];\n        }\n    }\n    offset_227118 = 1;\n    while (slt32(offset_227118, wave_sizze_227097)) {\n        if (slt32(local_tid_227095 + offset_227118, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_227095 - squot32(local_tid_227095, wave_sizze_227097) *\n              wave_sizze_227097) & (2 * offset_227118 - 1)) == 0) {\n            // read array element\n            {\n                x_211096 = ((volatile __local\n                             float *) red_arr_mem_227108)[sext_i32_i64(local_tid_227095 +\n                                                          offset_227118)];\n                x_211097 = ((volatile __local\n                             float *) red_arr_mem_227110)[sext_i32_i64(local_tid_227095 +\n                                                          offset_227118)];\n                x_211098 = ((volatile __local\n                             float *) red_arr_mem_227112)[sext_i32_i64(local_tid_227095 +\n                                                          offset_227118)];\n                x_211099 = ((volatile __local\n                             float *) red_arr_mem_227114)[sext_i32_i64(local_tid_227095 +\n                                                          offset_227118)];\n                x_211100 = ((volatile __local\n                             float *) red_arr_mem_227116)[sext_i32_i64(local_tid_227095 +\n                                                          offset_227118)];\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_21",
            "1101;\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_227108)[sext_i32_i64(local_tid_227095)] =\n                    x_211091;\n                ((volatile __local\n                  float *) red_arr_mem_227110)[sext_i32_i64(local_tid_227095)] =\n                    x_211092;\n                ((volatile __local\n                  float *) red_arr_mem_227112)[sext_i32_i64(local_tid_227095)] =\n                    x_211093;\n                ((volatile __local\n                  float *) red_arr_mem_227114)[sext_i32_i64(local_tid_227095)] =\n                    x_211094;\n                ((volatile __local\n                  float *) red_arr_mem_227116)[sext_i32_i64(local_tid_227095)] =\n                    x_211095;\n            }\n        }\n        offset_227118 *= 2;\n    }\n    while (slt32(skip_waves_227119, squot32(sext_i64_i32(q_s_196695) +\n                                            wave_sizze_227097 - 1,\n                                            wave_sizze_227097))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_227118 = skip_waves_227119 * wave_sizze_227097;\n        if (slt32(local_tid_227095 + offset_227118, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_227095 - squot32(local_tid_227095, wave_sizze_227097) *\n              wave_sizze_227097) == 0 && (squot32(local_tid_227095,\n                                                  wave_sizze_227097) & (2 *\n                                                                        skip_waves_227119 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_211096 = ((__local\n                             float *) red_arr_m",
            "em_227108)[sext_i32_i64(local_tid_227095 +\n                                                          offset_227118)];\n                x_211097 = ((__local\n                             float *) red_arr_mem_227110)[sext_i32_i64(local_tid_227095 +\n                                                          offset_227118)];\n                x_211098 = ((__local\n                             float *) red_arr_mem_227112)[sext_i32_i64(local_tid_227095 +\n                                                          offset_227118)];\n                x_211099 = ((__local\n                             float *) red_arr_mem_227114)[sext_i32_i64(local_tid_227095 +\n                                                          offset_227118)];\n                x_211100 = ((__local\n                             float *) red_arr_mem_227116)[sext_i32_i64(local_tid_227095 +\n                                                          offset_227118)];\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_227108)[sext_i32_i64(local_tid_227095)] =\n                    x_211091;\n                ((__local\n                  float *) red_arr_mem_227110)[sext_i32_i64(local_tid_227095)] =\n                    x_211092;\n                ((__local\n                  float ",
            "*) red_arr_mem_227112)[sext_i32_i64(local_tid_227095)] =\n                    x_211093;\n                ((__local\n                  float *) red_arr_mem_227114)[sext_i32_i64(local_tid_227095)] =\n                    x_211094;\n                ((__local\n                  float *) red_arr_mem_227116)[sext_i32_i64(local_tid_227095)] =\n                    x_211095;\n            }\n        }\n        skip_waves_227119 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_211082 = ((__local\n                                   float *) red_arr_mem_227108)[(int64_t) 0];\n    defunc_2_reduce_res_211083 = ((__local\n                                   float *) red_arr_mem_227110)[(int64_t) 0];\n    defunc_2_reduce_res_211084 = ((__local\n                                   float *) red_arr_mem_227112)[(int64_t) 0];\n    defunc_2_reduce_res_211085 = ((__local\n                                   float *) red_arr_mem_227114)[(int64_t) 0];\n    defunc_2_reduce_res_211086 = ((__local\n                                   float *) red_arr_mem_227116)[(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_2",
            "11126 = 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_227099));\n    int32_t phys_tid_211140 = local_tid_227095;\n    __local unsigned char *red_arr_mem_227120;\n    \n    red_arr_mem_227120 = (__local unsigned char *) red_arr_mem_227120_backing_9;\n    \n    __local unsigned char *red_arr_mem_227122;\n    \n    red_arr_mem_227122 = (__local\n                          unsigned char *) red_arr_mem_227122_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_fit_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_227120)[gtid_211139] =\n        defunc_9_fit_fun_res_211160;\n    ((__local float *) red_arr_mem_227122)[gtid_211139] =\n        defunc_9_slope_fun_res_211166;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_227124;\n    int32_t skip_waves_227125 = 1;\n    float x_211141;\n    float x_211142;\n    float x_211143;\n    float x_211144;\n    \n    offset_227124 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_227095, sext_i64_i32(q_s_196695))) {\n            x_211141 = ((__local\n                         float *) red_arr_mem_227120)[sext_i32_i64(local_tid_227095 +\n                                                      offset_227124)];\n            x_211142 = ((__local\n                         float *) red_arr_mem_227122)[sext_i32_i64(local_tid_227095 +\n                                                      offset_227124)];\n        }\n    }\n    offset_227124 = 1;\n    while (slt32(offset_227124, wave_sizze_227097)) {\n        if (slt32(local_tid_227095 + offset_227124, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_227095 - squot32(local_tid_227095, wave_sizze_227097) *\n              wave_sizze_227097) & (2 * offset_227124 - 1)) == 0) {\n            // read array element\n         ",
            "   {\n                x_211143 = ((volatile __local\n                             float *) red_arr_mem_227120)[sext_i32_i64(local_tid_227095 +\n                                                          offset_227124)];\n                x_211144 = ((volatile __local\n                             float *) red_arr_mem_227122)[sext_i32_i64(local_tid_227095 +\n                                                          offset_227124)];\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_227120)[sext_i32_i64(local_tid_227095)] =\n                    x_211141;\n                ((volatile __local\n                  float *) red_arr_mem_227122)[sext_i32_i64(local_tid_227095)] =\n                    x_211142;\n            }\n        }\n        offset_227124 *= 2;\n    }\n    while (slt32(skip_waves_227125, squot32(sext_i64_i32(q_s_196695) +\n                                            wave_sizze_227097 - 1,\n                                            wave_sizze_227097))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_227124 = skip_waves_227125 * wave_sizze_227097;\n        if (slt32(local_tid_227095 + offset_227124, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_227095 - squot32(local_tid_227095, wave_sizze_227097) *\n              wave_sizze_227097) == 0 && (squot32(local_tid_227095,\n                                                  wave_sizze_227097) & (2 *\n                                                                        skip_waves_227125 -\n                                                                        1)) ==\n             0)) {\n            // read array ele",
            "ment\n            {\n                x_211143 = ((__local\n                             float *) red_arr_mem_227120)[sext_i32_i64(local_tid_227095 +\n                                                          offset_227124)];\n                x_211144 = ((__local\n                             float *) red_arr_mem_227122)[sext_i32_i64(local_tid_227095 +\n                                                          offset_227124)];\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_227120)[sext_i32_i64(local_tid_227095)] =\n                    x_211141;\n                ((__local\n                  float *) red_arr_mem_227122)[sext_i32_i64(local_tid_227095)] =\n                    x_211142;\n            }\n        }\n        skip_waves_227125 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_211137 = ((__local\n                                   float *) red_arr_mem_227120)[(int64_t) 0];\n    defunc_2_reduce_res_211138 = ((__local\n                                   float *) red_arr_mem_227122)[(int64_t) 0];\n    if (local_tid_227095 == 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_227095 == 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                                             uint red_arr_mem_228438_backing_offset_0,\n                                             uint red_arr_mem_228434_backing_offset_1,\n                                             uint color_225079_backing_offset_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    volatile unsigned char *red_arr_mem_228438_backing_2 =\n                           &shared_mem[red_arr_mem_228438_backing_offset_0];\n    volatile unsigned char *red_arr_mem_228434_backing_1 =\n                           &shared_mem[red_arr_mem_228434_backing_offset_1];\n    volatile unsigned char *color_225079_",
            "backing_0 =\n                           &shared_mem[color_225079_backing_offset_2];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228422;\n    int32_t local_tid_228423;\n    int64_t group_sizze_228426;\n    int32_t wave_sizze_228425;\n    int32_t group_tid_228424;\n    \n    global_tid_228422 = get_global_id(0);\n    local_tid_228423 = get_local_id(0);\n    group_sizze_228426 = get_local_size(0);\n    wave_sizze_228425 = LOCKSTEP_WIDTH;\n    group_tid_228424 = get_group_id(0);\n    \n    int32_t phys_tid_214752 = group_tid_228424;\n    int64_t slice_228428 = q_l_196697;\n    int64_t ltid_pre_228427 = sext_i32_i64(local_tid_228423);\n    int64_t remnant_228429 = sext_i32_i64(local_tid_228423) - ltid_pre_228427;\n    int64_t slice_228430 = l_n_m_196752;\n    int64_t slice_228431 = m_196691 * slice_228430;\n    int64_t gtid_214750 = squot64(sext_i32_i64(group_tid_228424), slice_228430);\n    int64_t remnant_228432 = sext_i32_i64(group_tid_228424) - gtid_214750 *\n            slice_228430;\n    int64_t gtid_214751 = remnant_228432;\n    int64_t remnant_228433 = remnant_228432 - 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_228427));\n    int32_t phys_tid_214766 = local_tid_228423;\n ",
            "   __local unsigned char *red_arr_mem_228434;\n    \n    red_arr_mem_228434 = (__local unsigned char *) red_arr_mem_228434_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_228434)[gtid_214765] = tmp4_214787;\n    ((__local float *) color_225079)[gtid_214765] = tmp4_214787;\n    barri",
            "er(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_228436;\n    int32_t skip_waves_228437 = 1;\n    float x_214767;\n    float x_214768;\n    \n    offset_228436 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_228423, sext_i64_i32(q_l_196697))) {\n            x_214767 = ((__local\n                         float *) red_arr_mem_228434)[sext_i32_i64(local_tid_228423 +\n                                                      offset_228436)];\n        }\n    }\n    offset_228436 = 1;\n    while (slt32(offset_228436, wave_sizze_228425)) {\n        if (slt32(local_tid_228423 + offset_228436, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228423 - squot32(local_tid_228423, wave_sizze_228425) *\n              wave_sizze_228425) & (2 * offset_228436 - 1)) == 0) {\n            // read array element\n            {\n                x_214768 = ((volatile __local\n                             float *) red_arr_mem_228434)[sext_i32_i64(local_tid_228423 +\n                                                          offset_228436)];\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_228434)[sext_i32_i64(local_tid_228423)] =\n                    x_214767;\n            }\n        }\n        offset_228436 *= 2;\n    }\n    while (slt32(skip_waves_228437, squot32(sext_i64_i32(q_l_196697) +\n                                            wave_sizze_228425 - 1,\n                                            wave_sizze_228425))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_228436 = skip_waves_228437 * wave_sizze_228425;\n        if (slt32(local_tid_228423 + offset_228436, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228423 - squot32(local_tid_228423, wave_sizze_228425) *",
            "\n              wave_sizze_228425) == 0 && (squot32(local_tid_228423,\n                                                  wave_sizze_228425) & (2 *\n                                                                        skip_waves_228437 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_214768 = ((__local\n                             float *) red_arr_mem_228434)[sext_i32_i64(local_tid_228423 +\n                                                          offset_228436)];\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_228434)[sext_i32_i64(local_tid_228423)] =\n                    x_214767;\n            }\n        }\n        skip_waves_228437 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_214763 = ((__local\n                                   float *) red_arr_mem_228434)[(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_228427));\n    int32_t phys_tid_214791 = local_tid_228423;\n    __local unsigned char *red_arr_mem_228438;\n    \n    red_arr_mem_228438 = (__local unsigned char *) red_arr_mem_228438_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)[gt",
            "id_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_228438)[gtid_214790] =\n        defunc_9_fit_fun_res_214802;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_228440;\n    int32_t skip_waves_228441 = 1;\n    float x_214792;\n    float x_214793;\n    \n    offset_228440 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_228423, sext_i64_i32(q_l_196697))) {\n            x_214792 = ((__local\n                         float *) red_arr_mem_228438)[sext_i32_i64(local_tid_228423 +\n                                                      offset_228440)];\n        }\n    }\n    offset_228440 = 1;\n    while (slt32(offset_228440, wave_sizze_228425)) {\n        if (slt32(local_tid_228423 + offset_228440, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228423 - squot32(local_tid_228423, wave_sizze_228425) *\n              wave_sizze_228425) & (2 * offset_228440 - 1)) == 0) {\n            // read array element\n            {\n                x_214793 = ((volatile __local\n                             float *) red_arr_mem_228438)[sext_i32_i64(local_tid_228423 +\n                                                          offset_228440)];\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_228438)[sext_i32_i64(local_tid_228423)] =\n                    x_214792;\n            }\n        }\n        offset_228440 *= 2;\n    }\n    wh",
            "ile (slt32(skip_waves_228441, squot32(sext_i64_i32(q_l_196697) +\n                                            wave_sizze_228425 - 1,\n                                            wave_sizze_228425))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_228440 = skip_waves_228441 * wave_sizze_228425;\n        if (slt32(local_tid_228423 + offset_228440, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228423 - squot32(local_tid_228423, wave_sizze_228425) *\n              wave_sizze_228425) == 0 && (squot32(local_tid_228423,\n                                                  wave_sizze_228425) & (2 *\n                                                                        skip_waves_228441 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_214793 = ((__local\n                             float *) red_arr_mem_228438)[sext_i32_i64(local_tid_228423 +\n                                                          offset_228440)];\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_228438)[sext_i32_i64(local_tid_228423)] =\n                    x_214792;\n            }\n        }\n        skip_waves_228441 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_214789 = ((__local\n                                   float *) red_arr_mem_228438)[(int64_t) 0];\n    if (local_tid_228423 == 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 mainzisegmap_intragroup_214919(__global int *global_failure,\n                   ",
            "                          uint red_arr_mem_228464_backing_offset_0,\n                                             uint red_arr_mem_228462_backing_offset_1,\n                                             uint red_arr_mem_228458_backing_offset_2,\n                                             uint red_arr_mem_228456_backing_offset_3,\n                                             uint red_arr_mem_228454_backing_offset_4,\n                                             uint color_225081_backing_offset_5,\n                                             uint color_225080_backing_offset_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                                             __global\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    volatile unsigned char *red_arr_mem_228464_backing_6 =\n                           &shared_mem[red_arr_mem_228464_backing_o",
            "ffset_0];\n    volatile unsigned char *red_arr_mem_228462_backing_5 =\n                           &shared_mem[red_arr_mem_228462_backing_offset_1];\n    volatile unsigned char *red_arr_mem_228458_backing_4 =\n                           &shared_mem[red_arr_mem_228458_backing_offset_2];\n    volatile unsigned char *red_arr_mem_228456_backing_3 =\n                           &shared_mem[red_arr_mem_228456_backing_offset_3];\n    volatile unsigned char *red_arr_mem_228454_backing_2 =\n                           &shared_mem[red_arr_mem_228454_backing_offset_4];\n    volatile unsigned char *color_225081_backing_1 =\n                           &shared_mem[color_225081_backing_offset_5];\n    volatile unsigned char *color_225080_backing_0 =\n                           &shared_mem[color_225080_backing_offset_6];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228442;\n    int32_t local_tid_228443;\n    int64_t group_sizze_228446;\n    int32_t wave_sizze_228445;\n    int32_t group_tid_228444;\n    \n    global_tid_228442 = get_global_id(0);\n    local_tid_228443 = get_local_id(0);\n    group_sizze_228446 = get_local_size(0);\n    wave_sizze_228445 = LOCKSTEP_WIDTH;\n    group_tid_228444 = get_group_id(0);\n    \n    int32_t phys_tid_214919 = group_tid_228444;\n    int64_t slice_228448 = q_l_196697;\n    int64_t ltid_pre_228447 = sext_i32_i64(local_tid_228443);\n    int64_t remnant_228449 = sext_i32_i64(local_tid_228443) - ltid_pre_228447;\n    int64_t slice_228450 = l_n_m_196752;\n    int64_t slice_228451 = m_196691 * slice_228450;\n    int64_t gtid_214917 = squot64(sext_i32_i64(group_tid_228444), slice_228450);\n    int64_t remnant_228452 = sext_i32_i64(group_tid_228444) - gtid_214917 *\n            slice_228450;\n    int64_t gtid_214918 = remnant_228452;\n    int64_t remnant_228453 = remnant_228452 - 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_228447));\n    int32_t phys_tid_214936 = local_tid_228443;\n    __local unsigned char *red_arr_mem_228454;\n    \n    red_arr_mem_228454 = (__local unsigned char *) red_arr_mem_228454_backing_2;\n    \n    __local unsigned char *red_arr_mem_228456;\n    \n    red_arr_mem_228456 = (__local unsigned char *) red_arr_mem_228456_backing_3;\n    \n    __local unsigned char *red_arr_mem_228458;\n    \n    red_arr_mem_228458 = (__local unsigned char *) red_arr_mem_228458_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_228454)[gtid_214935] = tmp4_214963;\n    ((__local float *) red_arr_mem_228456)[gtid_214935] = defunc_1_f_res_214964;\n    ((__local float *) red_arr_mem_228458)[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_228460;\n    int32_t skip_waves_228461 = 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_228460 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_228443, sext_i64_i32(q_l_196697))) {\n            x_214937 = ((__local\n                      ",
            "   float *) red_arr_mem_228454)[sext_i32_i64(local_tid_228443 +\n                                                      offset_228460)];\n            x_214938 = ((__local\n                         float *) red_arr_mem_228456)[sext_i32_i64(local_tid_228443 +\n                                                      offset_228460)];\n            x_214939 = ((__local\n                         float *) red_arr_mem_228458)[sext_i32_i64(local_tid_228443 +\n                                                      offset_228460)];\n        }\n    }\n    offset_228460 = 1;\n    while (slt32(offset_228460, wave_sizze_228445)) {\n        if (slt32(local_tid_228443 + offset_228460, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228443 - squot32(local_tid_228443, wave_sizze_228445) *\n              wave_sizze_228445) & (2 * offset_228460 - 1)) == 0) {\n            // read array element\n            {\n                x_214940 = ((volatile __local\n                             float *) red_arr_mem_228454)[sext_i32_i64(local_tid_228443 +\n                                                          offset_228460)];\n                x_214941 = ((volatile __local\n                             float *) red_arr_mem_228456)[sext_i32_i64(local_tid_228443 +\n                                                          offset_228460)];\n                x_214942 = ((volatile __local\n                             float *) red_arr_mem_228458)[sext_i32_i64(local_tid_228443 +\n                                                          offset_228460)];\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 resu",
            "lt of operation\n            {\n                ((volatile __local\n                  float *) red_arr_mem_228454)[sext_i32_i64(local_tid_228443)] =\n                    x_214937;\n                ((volatile __local\n                  float *) red_arr_mem_228456)[sext_i32_i64(local_tid_228443)] =\n                    x_214938;\n                ((volatile __local\n                  float *) red_arr_mem_228458)[sext_i32_i64(local_tid_228443)] =\n                    x_214939;\n            }\n        }\n        offset_228460 *= 2;\n    }\n    while (slt32(skip_waves_228461, squot32(sext_i64_i32(q_l_196697) +\n                                            wave_sizze_228445 - 1,\n                                            wave_sizze_228445))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_228460 = skip_waves_228461 * wave_sizze_228445;\n        if (slt32(local_tid_228443 + offset_228460, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228443 - squot32(local_tid_228443, wave_sizze_228445) *\n              wave_sizze_228445) == 0 && (squot32(local_tid_228443,\n                                                  wave_sizze_228445) & (2 *\n                                                                        skip_waves_228461 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_214940 = ((__local\n                             float *) red_arr_mem_228454)[sext_i32_i64(local_tid_228443 +\n                                                          offset_228460)];\n                x_214941 = ((__local\n                             float *) red_arr_mem_228456)[sext_i32_i64(local_tid_228443 +\n                                                          offset_228460)];\n                x_214942 = ((__local\n                             float *) red_arr_mem_228458)[sext_i32_i64(local_tid_228443 +\n                                                          offset_228460)];\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_228454)[sext_i32_i64(local_tid_228443)] =\n                    x_214937;\n                ((__local\n                  float *) red_arr_mem_228456)[sext_i32_i64(local_tid_228443)] =\n                    x_214938;\n                ((__local\n                  float *) red_arr_mem_228458)[sext_i32_i64(local_tid_228443)] =\n                    x_214939;\n            }\n        }\n        skip_waves_228461 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_214930 = ((__local\n                                   float *) red_arr_mem_228454)[(int64_t) 0];\n    defunc_2_reduce_res_214931 = ((__local\n                                   float *) red_arr_mem_228456)[(int64_t) 0];\n    defunc_2_reduce_res_214932 = ((__local\n                                   float *) red_arr_mem_228458)[(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_228447));\n    int32_t p",
            "hys_tid_214977 = local_tid_228443;\n    __local unsigned char *red_arr_mem_228462;\n    \n    red_arr_mem_228462 = (__local unsigned char *) red_arr_mem_228462_backing_5;\n    \n    __local unsigned char *red_arr_mem_228464;\n    \n    red_arr_mem_228464 = (__local unsigned char *) red_arr_mem_228464_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_228462)[gtid_214976] =\n        defunc_9_fit_fun_res_214994;\n    ((__local float *) red_arr_mem_228464)[gtid_214976] =\n        defunc_9_slope_fun_res_214998;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_228466;\n    int32_t skip_waves_228467 = 1;\n    float x_214978;\n    float x_214979;\n    float x_214980;\n    float x_214981;\n    \n    offset_228466 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_228443, sext_i64_i32(q_l_1966",
            "97))) {\n            x_214978 = ((__local\n                         float *) red_arr_mem_228462)[sext_i32_i64(local_tid_228443 +\n                                                      offset_228466)];\n            x_214979 = ((__local\n                         float *) red_arr_mem_228464)[sext_i32_i64(local_tid_228443 +\n                                                      offset_228466)];\n        }\n    }\n    offset_228466 = 1;\n    while (slt32(offset_228466, wave_sizze_228445)) {\n        if (slt32(local_tid_228443 + offset_228466, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228443 - squot32(local_tid_228443, wave_sizze_228445) *\n              wave_sizze_228445) & (2 * offset_228466 - 1)) == 0) {\n            // read array element\n            {\n                x_214980 = ((volatile __local\n                             float *) red_arr_mem_228462)[sext_i32_i64(local_tid_228443 +\n                                                          offset_228466)];\n                x_214981 = ((volatile __local\n                             float *) red_arr_mem_228464)[sext_i32_i64(local_tid_228443 +\n                                                          offset_228466)];\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_228462)[sext_i32_i64(local_tid_228443)] =\n                    x_214978;\n                ((volatile __local\n                  float *) red_arr_mem_228464)[sext_i32_i64(local_tid_228443)] =\n                    x_214979;\n            }\n        }\n        offset_228466 *= 2;\n    }\n    while (slt32(skip_waves_228467, squot32(sext_i64_i32(q_l_196697) +\n      ",
            "                                      wave_sizze_228445 - 1,\n                                            wave_sizze_228445))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_228466 = skip_waves_228467 * wave_sizze_228445;\n        if (slt32(local_tid_228443 + offset_228466, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228443 - squot32(local_tid_228443, wave_sizze_228445) *\n              wave_sizze_228445) == 0 && (squot32(local_tid_228443,\n                                                  wave_sizze_228445) & (2 *\n                                                                        skip_waves_228467 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_214980 = ((__local\n                             float *) red_arr_mem_228462)[sext_i32_i64(local_tid_228443 +\n                                                          offset_228466)];\n                x_214981 = ((__local\n                             float *) red_arr_mem_228464)[sext_i32_i64(local_tid_228443 +\n                                                          offset_228466)];\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_228462)[sext_i32_i64(local_tid_228443)] =\n                    x_214978;\n                ((__local\n                  float *) red_arr_mem_228464)[sext_i32_i64(local_tid_228443)] =\n                    x_214979;\n            }\n        }\n        skip_waves_228467 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_214974 = ((__local\n                  ",
            "                 float *) red_arr_mem_228462)[(int64_t) 0];\n    defunc_2_reduce_res_214975 = ((__local\n                                   float *) red_arr_mem_228464)[(int64_t) 0];\n    if (local_tid_228443 == 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_228443 == 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                                             uint red_arr_mem_228494_backing_offset_0,\n                                             uint red_arr_mem_228492_backing_offset_1,\n                                             uint red_arr_mem_228488_backing_offset_2,\n                                             uint red_arr_mem_228486_backing_offset_3,\n                                             uint red_arr_mem_228484_backing_offset_4,\n                                             uint red_arr_mem_228482_backing_offset_5,\n                                             uint red_arr_mem_228480_backing_offset_6,\n                                             uint color_225085_backing_offset_7,\n                                             uint color_225084_backing_offset_8,\n                                             uint color_225083_backing_offset_9,\n                                             uint color_225082_backing_offset_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    volatile unsigned char *red_arr_mem_228494_backing_10 =\n                           &shared_mem[red_arr_mem_228494_backing_offset_0];\n    volatile unsigned char *red_arr_mem_228492_backing_9 =\n                           &shared_mem[red_arr_mem_228492_backing_offset_1];\n    volatile unsigned char *red_arr_mem_228488_backing_8 =\n                           &shared_mem[red_arr_mem_228488_backing_offset_2];\n    volatile unsigned char *red_arr_mem_228486_backing_7 =\n                           &shared_mem[red_arr_mem_228486_backing_offset_3];\n    volatile unsigned char *red_arr_mem_228484_backing_6 =\n                           &shared_mem[red_arr_mem_228484_backing_offset_4];\n    volatile unsigned char *red_arr_mem_228482_backing_5 =\n                           &shared_mem[red_arr_mem_228482_backing_offset_5];\n    volatile unsigned char *red_arr_mem_228480_backing_4 =\n                           &shared_mem[red_arr_mem_228480_backing_offset_6];\n    volatile unsigned char *color_225085_backing_3 =\n                           &shared_mem[color_225085_backing_offset_7];\n ",
            "   volatile unsigned char *color_225084_backing_2 =\n                           &shared_mem[color_225084_backing_offset_8];\n    volatile unsigned char *color_225083_backing_1 =\n                           &shared_mem[color_225083_backing_offset_9];\n    volatile unsigned char *color_225082_backing_0 =\n                           &shared_mem[color_225082_backing_offset_10];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228468;\n    int32_t local_tid_228469;\n    int64_t group_sizze_228472;\n    int32_t wave_sizze_228471;\n    int32_t group_tid_228470;\n    \n    global_tid_228468 = get_global_id(0);\n    local_tid_228469 = get_local_id(0);\n    group_sizze_228472 = get_local_size(0);\n    wave_sizze_228471 = LOCKSTEP_WIDTH;\n    group_tid_228470 = get_group_id(0);\n    \n    int32_t phys_tid_215176 = group_tid_228470;\n    int64_t slice_228474 = q_l_196697;\n    int64_t ltid_pre_228473 = sext_i32_i64(local_tid_228469);\n    int64_t remnant_228475 = sext_i32_i64(local_tid_228469) - ltid_pre_228473;\n    int64_t slice_228476 = l_n_m_196752;\n    int64_t slice_228477 = m_196691 * slice_228476;\n    int64_t gtid_215174 = squot64(sext_i32_i64(group_tid_228470), slice_228476);\n    int64_t remnant_228478 = sext_i32_i64(group_tid_228470) - gtid_215174 *\n            slice_228476;\n    int64_t gtid_215175 = remnant_228478;\n    int64_t remnant_228479 = remnant_228478 - 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_228473));\n    int32_t phys_tid_215190 = local_tid_228469;\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_2152",
            "02 = 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_228473));\n    int32_t phys_tid_215217 = local_tid_228469;\n    __local unsigned char *red_arr_mem_228480;\n    \n    red_arr_mem_228480 = (__local unsigned char *) red_arr_mem_228480_backing_4;\n    \n    __local unsigned char *red_arr_mem_228482;\n    \n    red_arr_mem_228482 = (__local unsigned char *) red_arr_mem_228482_backing_5;\n    \n    __local unsigned char *red_arr_mem_228484;\n    \n    red_arr_mem_228484 = (__local unsigned char *) red_arr_mem_228484_backing_6;\n    \n    __local unsigned char *red_arr_mem_228486;\n    \n    red_arr_mem_228486 = (__local unsigned char *) red_arr_mem_228486_backing_7;\n    \n    __local unsigned char *red_arr_mem_228488;\n    \n    red_arr_mem_228488 = (__local unsigned char *) red_arr_mem_228488_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_228480)[gti",
            "d_215216] = x_215234;\n    ((__local float *) red_arr_mem_228482)[gtid_215216] = defunc_1_f_res_215235;\n    ((__local float *) red_arr_mem_228484)[gtid_215216] = defunc_1_f_res_215236;\n    ((__local float *) red_arr_mem_228486)[gtid_215216] = defunc_1_f_res_215237;\n    ((__local float *) red_arr_mem_228488)[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_228490;\n    int32_t skip_waves_228491 = 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_228490 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_228469, sext_i64_i32(q_l_196697))) {\n            x_215218 = ((__local\n                         float *) red_arr_mem_228480)[sext_i32_i64(local_tid_228469 +\n                                                      offset_228490)];\n            x_215219 = ((__local\n                         float *) red_arr_mem_228482)[sext_i32_i64(local_tid_228469 +\n                                                      offset_228490)];\n            x_215220 = ((__local\n                         float *) red_arr_mem_228484)[sext_i32_i64(local_tid_228469 +\n                                                      offset_228490)];\n            x_215221 = ((__local\n                         float *) red_arr_mem_228486)[sext_i32_i64(local_tid_228469 +\n                                                      offset_228490)];\n            x_215222 = ((__local\n                         float *) red_arr_mem_228488)[sext_i32_i64(local_tid_228469 +\n                                                      offset_228490)];\n        }\n    }\n    offset_228490 = 1;\n    while (slt32(offset_228490, wave_sizze_228471)) {\n       ",
            " if (slt32(local_tid_228469 + offset_228490, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228469 - squot32(local_tid_228469, wave_sizze_228471) *\n              wave_sizze_228471) & (2 * offset_228490 - 1)) == 0) {\n            // read array element\n            {\n                x_215223 = ((volatile __local\n                             float *) red_arr_mem_228480)[sext_i32_i64(local_tid_228469 +\n                                                          offset_228490)];\n                x_215224 = ((volatile __local\n                             float *) red_arr_mem_228482)[sext_i32_i64(local_tid_228469 +\n                                                          offset_228490)];\n                x_215225 = ((volatile __local\n                             float *) red_arr_mem_228484)[sext_i32_i64(local_tid_228469 +\n                                                          offset_228490)];\n                x_215226 = ((volatile __local\n                             float *) red_arr_mem_228486)[sext_i32_i64(local_tid_228469 +\n                                                          offset_228490)];\n                x_215227 = ((volatile __local\n                             float *) red_arr_mem_228488)[sext_i32_i64(local_tid_228469 +\n                                                          offset_228490)];\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_21",
            "5232;\n            }\n            // write result of operation\n            {\n                ((volatile __local\n                  float *) red_arr_mem_228480)[sext_i32_i64(local_tid_228469)] =\n                    x_215218;\n                ((volatile __local\n                  float *) red_arr_mem_228482)[sext_i32_i64(local_tid_228469)] =\n                    x_215219;\n                ((volatile __local\n                  float *) red_arr_mem_228484)[sext_i32_i64(local_tid_228469)] =\n                    x_215220;\n                ((volatile __local\n                  float *) red_arr_mem_228486)[sext_i32_i64(local_tid_228469)] =\n                    x_215221;\n                ((volatile __local\n                  float *) red_arr_mem_228488)[sext_i32_i64(local_tid_228469)] =\n                    x_215222;\n            }\n        }\n        offset_228490 *= 2;\n    }\n    while (slt32(skip_waves_228491, squot32(sext_i64_i32(q_l_196697) +\n                                            wave_sizze_228471 - 1,\n                                            wave_sizze_228471))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_228490 = skip_waves_228491 * wave_sizze_228471;\n        if (slt32(local_tid_228469 + offset_228490, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228469 - squot32(local_tid_228469, wave_sizze_228471) *\n              wave_sizze_228471) == 0 && (squot32(local_tid_228469,\n                                                  wave_sizze_228471) & (2 *\n                                                                        skip_waves_228491 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_215223 = ((__local\n                             float *) red_arr_mem_228480)[sext_i32_i64(local_tid_228469 +\n                                                          offset_228490)];\n                x_215224 = ((__local\n                             float *) red_arr_mem",
            "_228482)[sext_i32_i64(local_tid_228469 +\n                                                          offset_228490)];\n                x_215225 = ((__local\n                             float *) red_arr_mem_228484)[sext_i32_i64(local_tid_228469 +\n                                                          offset_228490)];\n                x_215226 = ((__local\n                             float *) red_arr_mem_228486)[sext_i32_i64(local_tid_228469 +\n                                                          offset_228490)];\n                x_215227 = ((__local\n                             float *) red_arr_mem_228488)[sext_i32_i64(local_tid_228469 +\n                                                          offset_228490)];\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_228480)[sext_i32_i64(local_tid_228469)] =\n                    x_215218;\n                ((__local\n                  float *) red_arr_mem_228482)[sext_i32_i64(local_tid_228469)] =\n                    x_215219;\n                ((__local\n                  float *) red_arr_mem_228484)[sext_i32_i64(local_tid_228469)] =\n                    x_215220;\n                ((__local\n                  float *) red_arr_mem_228486)[sext_i32_i64(local_tid_228469)] =\n          ",
            "          x_215221;\n                ((__local\n                  float *) red_arr_mem_228488)[sext_i32_i64(local_tid_228469)] =\n                    x_215222;\n            }\n        }\n        skip_waves_228491 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_215209 = ((__local\n                                   float *) red_arr_mem_228480)[(int64_t) 0];\n    defunc_2_reduce_res_215210 = ((__local\n                                   float *) red_arr_mem_228482)[(int64_t) 0];\n    defunc_2_reduce_res_215211 = ((__local\n                                   float *) red_arr_mem_228484)[(int64_t) 0];\n    defunc_2_reduce_res_215212 = ((__local\n                                   float *) red_arr_mem_228486)[(int64_t) 0];\n    defunc_2_reduce_res_215213 = ((__local\n                                   float *) red_arr_mem_228488)[(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 * c",
            "12_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_228473));\n    int32_t phys_tid_215267 = local_tid_228469;\n    __local unsigned char *red_arr_mem_228492;\n    \n    red_arr_mem_228492 = (__local unsigned char *) red_arr_mem_228492_backing_9;\n    \n    __local unsigned char *red_arr_mem_228494;\n    \n    red_arr_mem_228494 = (__local\n                          unsigned char *) red_arr_mem_228494_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_215278) {\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_228492)[gtid_215266] =\n        defunc_9_fit_fun_res_215287;\n    ((__local float *) red_arr_mem_228494)[gtid_215266] =\n        defunc_9_slope_fun_res_215293;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_228496;\n    int32_t skip_waves_228497 = 1;\n    float x_215268;\n    float x_215269;\n    float x_215270;\n    float x_215271;\n    \n    offset_228496 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_228469, sext_i64_i32(q_l_196697))) {\n            x_215268 = ((__local\n                         float *) red_arr_mem_228492)[sext_i32_i64(local_tid_228469 +\n                                                      offset_228496)];\n            x_215269 = ((__local\n                         float *) red_arr_mem_228494)[sext_i32_i64(local_tid_228469 +\n                                                      offset_228496)];\n        }\n    }\n    offset_228496 = 1;\n    while (slt32(offset_228496, wave_sizze_228471)) {\n        if (slt32(local_tid_228469 + offset_228496, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228469 - squot32(local_tid_228469, wave_sizze_228471) *\n              wave_sizze_228471) & (2 * offset_228496 - 1)) == 0) {\n            // read array element\n            {\n                x_215270 = ((volatile __local\n                             float *) red_arr_mem_228492)[sext_i32_i64(local_tid_228469 +\n                                                          offset_228496)];\n                x_215271 = ((volatile __local\n                             float *) red_arr_mem_228494)[sext_i32_i64(local_tid_228469 +\n                                                          offset_228496)];\n            }\n            // apply reducti",
            "on 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_228492)[sext_i32_i64(local_tid_228469)] =\n                    x_215268;\n                ((volatile __local\n                  float *) red_arr_mem_228494)[sext_i32_i64(local_tid_228469)] =\n                    x_215269;\n            }\n        }\n        offset_228496 *= 2;\n    }\n    while (slt32(skip_waves_228497, squot32(sext_i64_i32(q_l_196697) +\n                                            wave_sizze_228471 - 1,\n                                            wave_sizze_228471))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_228496 = skip_waves_228497 * wave_sizze_228471;\n        if (slt32(local_tid_228469 + offset_228496, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228469 - squot32(local_tid_228469, wave_sizze_228471) *\n              wave_sizze_228471) == 0 && (squot32(local_tid_228469,\n                                                  wave_sizze_228471) & (2 *\n                                                                        skip_waves_228497 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_215270 = ((__local\n                             float *) red_arr_mem_228492)[sext_i32_i64(local_tid_228469 +\n                                                          offset_228496)];\n                x_215271 = ((__local\n                             float *) red_arr_mem_228494)[sext_i32_i64(local_tid_228469 +\n                                                          offset_228496)];\n            }\n            // apply reduction o",
            "peration\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_228492)[sext_i32_i64(local_tid_228469)] =\n                    x_215268;\n                ((__local\n                  float *) red_arr_mem_228494)[sext_i32_i64(local_tid_228469)] =\n                    x_215269;\n            }\n        }\n        skip_waves_228497 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_215264 = ((__local\n                                   float *) red_arr_mem_228492)[(int64_t) 0];\n    defunc_2_reduce_res_215265 = ((__local\n                                   float *) red_arr_mem_228494)[(int64_t) 0];\n    if (local_tid_228469 == 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_228469 == 0) {\n        ((__global 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                                             uint red_arr_mem_229354_backing_offset_0,\n                                             uint red_arr_mem_229350_backing_offset_1,\n                                             uint color_225100_backing_offset_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_19",
            "6759,\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    volatile unsigned char *red_arr_mem_229354_backing_2 =\n                           &shared_mem[red_arr_mem_229354_backing_offset_0];\n    volatile unsigned char *red_arr_mem_229350_backing_1 =\n                           &shared_mem[red_arr_mem_229350_backing_offset_1];\n    volatile unsigned char *color_225100_backing_0 =\n                           &shared_mem[color_225100_backing_offset_2];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229338;\n    int32_t local_tid_229339;\n    int64_t group_sizze_229342;\n    int32_t wave_sizze_229341;\n    int32_t group_tid_229340;\n    \n    global_tid_229338 = get_global_id(0);\n    local_tid_229339 = get_local_id(0);\n    group_sizze_229342 = get_local_size(0);\n    wave_sizze_229341 = LOCKSTEP_WIDTH;\n    group_tid_229340 = get_group_id(0);\n    \n    int32_t phys_tid_219000 = group_tid_229340;\n    int64_t slice_229344 = q_t_196696;\n    int64_t ltid_pre_229343 = sext_i32_i64(local_tid_229339);\n    int64_t remnant_229345 = sext_i32_i64(local_tid_229339) - ltid_pre_229343;\n    int64_t slice_229346 = t_n_m_196759;\n    int64_t slice_229347 = m_1",
            "96691 * slice_229346;\n    int64_t gtid_218998 = squot64(sext_i32_i64(group_tid_229340), slice_229346);\n    int64_t remnant_229348 = sext_i32_i64(group_tid_229340) - gtid_218998 *\n            slice_229346;\n    int64_t gtid_218999 = remnant_229348;\n    int64_t remnant_229349 = remnant_229348 - 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_229343));\n    int32_t phys_tid_219017 = local_tid_229339;\n    __local unsigned char *red_arr_mem_229350;\n    \n    red_arr_mem_229350 = (__local unsigned char *) red_arr_mem_229350_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        int6",
            "4_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(defunc_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_229350)[gtid_219016] = tmp4_219039;\n    ((__local float *) color_225100)[gtid_219016] = tmp4_219039;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_229352;\n    int32_t skip_waves_229353 = 1;\n    float x_219018;\n    float x_219019;\n    \n    offset_229352 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_229339, sext_i64_i32(q_t_196696))) {\n            x_219018 = ((__local\n                         float *) red_arr_mem_229350)[sext_i32_i64(local_tid_229339 +\n                                                      offset_229352)];\n        }\n    }\n    offset_229352 = 1;\n    while (slt32(offset_2293",
            "52, wave_sizze_229341)) {\n        if (slt32(local_tid_229339 + offset_229352, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229339 - squot32(local_tid_229339, wave_sizze_229341) *\n              wave_sizze_229341) & (2 * offset_229352 - 1)) == 0) {\n            // read array element\n            {\n                x_219019 = ((volatile __local\n                             float *) red_arr_mem_229350)[sext_i32_i64(local_tid_229339 +\n                                                          offset_229352)];\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                ((volatile __local\n                  float *) red_arr_mem_229350)[sext_i32_i64(local_tid_229339)] =\n                    x_219018;\n            }\n        }\n        offset_229352 *= 2;\n    }\n    while (slt32(skip_waves_229353, squot32(sext_i64_i32(q_t_196696) +\n                                            wave_sizze_229341 - 1,\n                                            wave_sizze_229341))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_229352 = skip_waves_229353 * wave_sizze_229341;\n        if (slt32(local_tid_229339 + offset_229352, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229339 - squot32(local_tid_229339, wave_sizze_229341) *\n              wave_sizze_229341) == 0 && (squot32(local_tid_229339,\n                                                  wave_sizze_229341) & (2 *\n                                                                        skip_waves_229353 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_219019 = ((__local\n                             float *) red_arr_mem_229350)[sext_i32_i64(local_tid_229339 +\n                                ",
            "                          offset_229352)];\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_229350)[sext_i32_i64(local_tid_229339)] =\n                    x_219018;\n            }\n        }\n        skip_waves_229353 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_219014 = ((__local\n                                   float *) red_arr_mem_229350)[(int64_t) 0];\n    \n    float a0_219040 = 1.0F / defunc_2_reduce_res_219014;\n    float defunc_2_reduce_res_219041;\n    int64_t gtid_219042 = sext_i32_i64(sext_i64_i32(ltid_pre_229343));\n    int32_t phys_tid_219043 = local_tid_229339;\n    __local unsigned char *red_arr_mem_229354;\n    \n    red_arr_mem_229354 = (__local unsigned char *) red_arr_mem_229354_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_229354)[gtid_219042] =\n        defunc_9_fit_fun_res_219054;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_229356;\n    int32_t skip_waves_22",
            "9357 = 1;\n    float x_219044;\n    float x_219045;\n    \n    offset_229356 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_229339, sext_i64_i32(q_t_196696))) {\n            x_219044 = ((__local\n                         float *) red_arr_mem_229354)[sext_i32_i64(local_tid_229339 +\n                                                      offset_229356)];\n        }\n    }\n    offset_229356 = 1;\n    while (slt32(offset_229356, wave_sizze_229341)) {\n        if (slt32(local_tid_229339 + offset_229356, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229339 - squot32(local_tid_229339, wave_sizze_229341) *\n              wave_sizze_229341) & (2 * offset_229356 - 1)) == 0) {\n            // read array element\n            {\n                x_219045 = ((volatile __local\n                             float *) red_arr_mem_229354)[sext_i32_i64(local_tid_229339 +\n                                                          offset_229356)];\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_229354)[sext_i32_i64(local_tid_229339)] =\n                    x_219044;\n            }\n        }\n        offset_229356 *= 2;\n    }\n    while (slt32(skip_waves_229357, squot32(sext_i64_i32(q_t_196696) +\n                                            wave_sizze_229341 - 1,\n                                            wave_sizze_229341))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_229356 = skip_waves_229357 * wave_sizze_229341;\n        if (slt32(local_tid_229339 + offset_229356, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229339 - squot32(local_tid_229339, wave_sizze_229341) *\n              wave_sizze_229341) == 0 && (squot32(local_tid_229339,\n             ",
            "                                     wave_sizze_229341) & (2 *\n                                                                        skip_waves_229357 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_219045 = ((__local\n                             float *) red_arr_mem_229354)[sext_i32_i64(local_tid_229339 +\n                                                          offset_229356)];\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                ((__local\n                  float *) red_arr_mem_229354)[sext_i32_i64(local_tid_229339)] =\n                    x_219044;\n            }\n        }\n        skip_waves_229357 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_219041 = ((__local\n                                   float *) red_arr_mem_229354)[(int64_t) 0];\n    if (local_tid_229339 == 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                                             uint red_arr_mem_229400_backing_offset_0,\n                                             uint red_arr_mem_229398_backing_offset_1,\n                                             uint red_arr_mem_229394_backing_offset_2,\n                                             uint red_arr_mem_229392_backing_offset_3,\n                                             uint red_arr_mem_229390_backing_offset_4,\n                                             uint color_225102_backing_offset_5,\n                                             ",
            "uint color_225101_backing_offset_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    volatile unsigned char *red_arr_mem_229400_backing_6 =\n                           &shared_mem[red_arr_mem_229400_backing_offset_0];\n    volatile unsigned char *red_arr_mem_229398_backing_5 =\n                           &shared_mem[red_arr_mem_229398_backing_offset_1];\n    volatile unsigned char *red_arr_mem_229394_backing_4 =\n                           &shared_mem[red_arr_mem_229394_backing_offset_2];\n    volatile unsigned char *red_arr_mem_229392_backing_3 =\n                           &shared_mem[red_arr_mem_229392_backing_offset_3];\n    volatile unsigned char *red_arr_mem_229390_backing_2 =\n                           &shared_mem[red_arr_mem_229390_backing_offset_4];\n    volatile unsigned char *color_225102_backing_",
            "1 =\n                           &shared_mem[color_225102_backing_offset_5];\n    volatile unsigned char *color_225101_backing_0 =\n                           &shared_mem[color_225101_backing_offset_6];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229378;\n    int32_t local_tid_229379;\n    int64_t group_sizze_229382;\n    int32_t wave_sizze_229381;\n    int32_t group_tid_229380;\n    \n    global_tid_229378 = get_global_id(0);\n    local_tid_229379 = get_local_id(0);\n    group_sizze_229382 = get_local_size(0);\n    wave_sizze_229381 = LOCKSTEP_WIDTH;\n    group_tid_229380 = get_group_id(0);\n    \n    int32_t phys_tid_219313 = group_tid_229380;\n    int64_t slice_229384 = q_t_196696;\n    int64_t ltid_pre_229383 = sext_i32_i64(local_tid_229379);\n    int64_t remnant_229385 = sext_i32_i64(local_tid_229379) - ltid_pre_229383;\n    int64_t slice_229386 = t_n_m_196759;\n    int64_t slice_229387 = m_196691 * slice_229386;\n    int64_t gtid_219311 = squot64(sext_i32_i64(group_tid_229380), slice_229386);\n    int64_t remnant_229388 = sext_i32_i64(group_tid_229380) - gtid_219311 *\n            slice_229386;\n    int64_t gtid_219312 = remnant_229388;\n    int64_t remnant_229389 = remnant_229388 - 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_21",
            "9324 = 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_229383));\n    int32_t phys_tid_219333 = local_tid_229379;\n    __local unsigned char *red_arr_mem_229390;\n    \n    red_arr_mem_229390 = (__local unsigned char *) red_arr_mem_229390_backing_2;\n    \n    __local unsigned char *red_arr_mem_229392;\n    \n    red_arr_mem_229392 = (__local unsigned char *) red_arr_mem_229392_backing_3;\n    \n    __local unsigned char *red_arr_mem_229394;\n    \n    red_arr_mem_229394 = (__local unsigned char *) red_arr_mem_229394_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_229390)[gtid_219332] = tmp4_219361;\n    ((__local float *) red_arr_mem_229392)[gtid_219332] = defunc_1_f_res_219362;\n    ((__local float *) red_arr_mem_229394)[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_229396;\n    int32_t skip_waves_229397 = 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_229396 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_229379, sext_i64_i32(q_t_196696))) {\n            x_219334 = ((__local\n                         float *) red_arr_mem_229390)[sext_i32_i64(local_tid_229379 +\n                                                      offset_229396)];\n            x_219335 = ((__local\n                         float *) red_arr_mem_229392)[sext_i32_i64(local_tid_229379 +\n                                                      offset_229396)];\n            ",
            "x_219336 = ((__local\n                         float *) red_arr_mem_229394)[sext_i32_i64(local_tid_229379 +\n                                                      offset_229396)];\n        }\n    }\n    offset_229396 = 1;\n    while (slt32(offset_229396, wave_sizze_229381)) {\n        if (slt32(local_tid_229379 + offset_229396, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229379 - squot32(local_tid_229379, wave_sizze_229381) *\n              wave_sizze_229381) & (2 * offset_229396 - 1)) == 0) {\n            // read array element\n            {\n                x_219337 = ((volatile __local\n                             float *) red_arr_mem_229390)[sext_i32_i64(local_tid_229379 +\n                                                          offset_229396)];\n                x_219338 = ((volatile __local\n                             float *) red_arr_mem_229392)[sext_i32_i64(local_tid_229379 +\n                                                          offset_229396)];\n                x_219339 = ((volatile __local\n                             float *) red_arr_mem_229394)[sext_i32_i64(local_tid_229379 +\n                                                          offset_229396)];\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_229390)[sext_i32_i64(local_tid_229379)] =\n                    x_219334;\n                ((volatile __local\n                  float *) red_arr_mem_229392)[sext_i32_i64(local_tid_229379)] =\n                    x_219335;\n               ",
            " ((volatile __local\n                  float *) red_arr_mem_229394)[sext_i32_i64(local_tid_229379)] =\n                    x_219336;\n            }\n        }\n        offset_229396 *= 2;\n    }\n    while (slt32(skip_waves_229397, squot32(sext_i64_i32(q_t_196696) +\n                                            wave_sizze_229381 - 1,\n                                            wave_sizze_229381))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_229396 = skip_waves_229397 * wave_sizze_229381;\n        if (slt32(local_tid_229379 + offset_229396, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229379 - squot32(local_tid_229379, wave_sizze_229381) *\n              wave_sizze_229381) == 0 && (squot32(local_tid_229379,\n                                                  wave_sizze_229381) & (2 *\n                                                                        skip_waves_229397 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_219337 = ((__local\n                             float *) red_arr_mem_229390)[sext_i32_i64(local_tid_229379 +\n                                                          offset_229396)];\n                x_219338 = ((__local\n                             float *) red_arr_mem_229392)[sext_i32_i64(local_tid_229379 +\n                                                          offset_229396)];\n                x_219339 = ((__local\n                             float *) red_arr_mem_229394)[sext_i32_i64(local_tid_229379 +\n                                                          offset_229396)];\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_229390)[sext_i32_i64(local_tid_229379)] =\n                    x_219334;\n                ((__local\n                  float *) red_arr_mem_229392)[sext_i32_i64(local_tid_229379)] =\n                    x_219335;\n                ((__local\n                  float *) red_arr_mem_229394)[sext_i32_i64(local_tid_229379)] =\n                    x_219336;\n            }\n        }\n        skip_waves_229397 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_219327 = ((__local\n                                   float *) red_arr_mem_229390)[(int64_t) 0];\n    defunc_2_reduce_res_219328 = ((__local\n                                   float *) red_arr_mem_229392)[(int64_t) 0];\n    defunc_2_reduce_res_219329 = ((__local\n                                   float *) red_arr_mem_229394)[(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_229383));\n    int32_t phys_tid_219375 = local_tid_229379;\n    __local unsigned char *red_arr_mem_229398;\n    \n    red_arr_mem_229398 = (__local unsigned char *) red_arr_mem_229398_backing_5;\n    \n    __local unsigned char *red_arr_mem_229400;\n    \n    red_arr_mem_229400 = (__local unsigned char *) red_arr_mem_229400_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_229398)[gtid_219374] =\n        defunc_9_fit_fun_res_219392;\n    ((__local float *) red_arr_mem_229400)[gtid_219374] =\n        defunc_9_slope_fun_res_219396;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_229402;\n    int32_t skip_waves_229403 = 1;\n    float x_219376;\n    float x_219377;\n    float x_219378;\n    float x_219379;\n    \n    offset_229402 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_229379, sext_i64_i32(q_t_196696))) {\n            x_219376 = ((__local\n                         float *) red_arr_mem_229398)[sext_i32_i64(local_tid_229379 +\n                                                      offset_229402)];\n            x_219377 = ((__local\n                         float *) red_arr_mem_229400)[sext_i32_i64(local_tid_229379 +\n                    ",
            "                                  offset_229402)];\n        }\n    }\n    offset_229402 = 1;\n    while (slt32(offset_229402, wave_sizze_229381)) {\n        if (slt32(local_tid_229379 + offset_229402, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229379 - squot32(local_tid_229379, wave_sizze_229381) *\n              wave_sizze_229381) & (2 * offset_229402 - 1)) == 0) {\n            // read array element\n            {\n                x_219378 = ((volatile __local\n                             float *) red_arr_mem_229398)[sext_i32_i64(local_tid_229379 +\n                                                          offset_229402)];\n                x_219379 = ((volatile __local\n                             float *) red_arr_mem_229400)[sext_i32_i64(local_tid_229379 +\n                                                          offset_229402)];\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_229398)[sext_i32_i64(local_tid_229379)] =\n                    x_219376;\n                ((volatile __local\n                  float *) red_arr_mem_229400)[sext_i32_i64(local_tid_229379)] =\n                    x_219377;\n            }\n        }\n        offset_229402 *= 2;\n    }\n    while (slt32(skip_waves_229403, squot32(sext_i64_i32(q_t_196696) +\n                                            wave_sizze_229381 - 1,\n                                            wave_sizze_229381))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_229402 = skip_waves_229403 * wave_sizze_229381;\n        if (slt32(local_tid_229379 + offset_229402, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229",
            "379 - squot32(local_tid_229379, wave_sizze_229381) *\n              wave_sizze_229381) == 0 && (squot32(local_tid_229379,\n                                                  wave_sizze_229381) & (2 *\n                                                                        skip_waves_229403 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_219378 = ((__local\n                             float *) red_arr_mem_229398)[sext_i32_i64(local_tid_229379 +\n                                                          offset_229402)];\n                x_219379 = ((__local\n                             float *) red_arr_mem_229400)[sext_i32_i64(local_tid_229379 +\n                                                          offset_229402)];\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_229398)[sext_i32_i64(local_tid_229379)] =\n                    x_219376;\n                ((__local\n                  float *) red_arr_mem_229400)[sext_i32_i64(local_tid_229379)] =\n                    x_219377;\n            }\n        }\n        skip_waves_229403 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_219372 = ((__local\n                                   float *) red_arr_mem_229398)[(int64_t) 0];\n    defunc_2_reduce_res_219373 = ((__local\n                                   float *) red_arr_mem_229400)[(int64_t) 0];\n    if (local_tid_229379 == 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_229379 == 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                                             uint red_arr_mem_229450_backing_offset_0,\n                                             uint red_arr_mem_229448_backing_offset_1,\n                                             uint red_arr_mem_229444_backing_offset_2,\n                                             uint red_arr_mem_229442_backing_offset_3,\n                                             uint red_arr_mem_229440_backing_offset_4,\n                                             uint red_arr_mem_229438_backing_offset_5,\n                                             uint red_arr_mem_229436_backing_offset_6,\n                                             uint color_225106_backing_offset_7,\n                                             uint color_225105_backing_offset_8,\n                                             uint color_225104_backing_offset_9,\n                                             uint color_225103_backing_offset_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    volatile unsigned char *red_arr_mem_229450_backing_10 =\n                           &shared_mem[red_arr_mem_229450_backing_offset_0];\n    volatile unsigned char *red_arr_mem_229448_backing_9 =\n                           &shared_mem[red_arr_mem_229448_backing_offset_1];\n    volatile unsigned char *red_arr_mem_229444_backing_8 =\n                           &shared_mem[red_arr_mem_229444_backing_offset_2];\n    volatile unsigned char *red_arr_mem_229442_backing_7 =\n                           &shared_mem[red_arr_mem_229442_backing_offset_3];\n    volatile unsigned char *red_arr_mem_229440_backing_6 =\n                           &shared_mem[red_arr_mem_229440_backing_offset_4];\n    volatile unsigned char *red_arr_mem_229438_backing_5 =\n                           &shared_mem[red_arr_mem_229438_backing_offset_5];\n    volatile unsigned char *red_arr_mem_229436_backing_4 =\n                           &shared_mem[red_arr_mem_229436_backing_offset_6];\n    volatile unsigned char *color_225106_backing_3 =\n                           &shared_mem[color_225106_backing_offset_7];\n    volatile unsigned char *color_225105_backing_2 =\n                           &shared_mem[color_225105_backing_offset_8];\n    volatile unsigned char *color_225104_backing_1 =\n                           &shared_mem[color_225104_backing_offset_9];\n    volatile unsigned char *color_225103_backing_0 =\n                           &shared_mem[color_225103_backing_offset_10];\n    \n    if (*global_failu",
            "re >= 0)\n        return;\n    \n    int32_t global_tid_229424;\n    int32_t local_tid_229425;\n    int64_t group_sizze_229428;\n    int32_t wave_sizze_229427;\n    int32_t group_tid_229426;\n    \n    global_tid_229424 = get_global_id(0);\n    local_tid_229425 = get_local_id(0);\n    group_sizze_229428 = get_local_size(0);\n    wave_sizze_229427 = LOCKSTEP_WIDTH;\n    group_tid_229426 = get_group_id(0);\n    \n    int32_t phys_tid_219717 = group_tid_229426;\n    int64_t slice_229430 = q_t_196696;\n    int64_t ltid_pre_229429 = sext_i32_i64(local_tid_229425);\n    int64_t remnant_229431 = sext_i32_i64(local_tid_229425) - ltid_pre_229429;\n    int64_t slice_229432 = t_n_m_196759;\n    int64_t slice_229433 = m_196691 * slice_229432;\n    int64_t gtid_219715 = squot64(sext_i32_i64(group_tid_229426), slice_229432);\n    int64_t remnant_229434 = sext_i32_i64(group_tid_229426) - gtid_219715 *\n            slice_229432;\n    int64_t gtid_219716 = remnant_229434;\n    int64_t remnant_229435 = remnant_229434 - 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    int",
            "64_t min_arg_219728 = mul64(jump_t_196702, 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_229429));\n    int32_t phys_tid_219734 = local_tid_229425;\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    flo",
            "at tmp2_219750 = 1.0F - y_219749;\n    float 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_229429));\n    int32_t phys_tid_219762 = local_tid_229425;\n    __local unsigned char *red_arr_mem_229436;\n    \n    red_arr_mem_229436 = (__local unsigned char *) red_arr_mem_229436_backing_4;\n    \n    __local unsigned char *red_arr_mem_229438;\n    \n    red_arr_mem_229438 = (__local unsigned char *) red_arr_mem_229438_backing_5;\n    \n    __local unsigned char *red_arr_mem_229440;\n    \n    red_arr_mem_229440 = (__local unsigned char *) red_arr_mem_229440_backing_6;\n    \n    __local unsigned char *red_arr_mem_229442;\n    \n    red_arr_mem_229442 = (__local unsigned char *) red_arr_mem_229442_backing_7;\n    \n    __local unsigned char *red_arr_mem_229444;\n    \n    red_arr_mem_229444 = (__local unsigned char *) red_arr_mem_229444_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_229436)[gtid_219761] = x_219779;\n    ((__local float *) red_arr_mem_229438)[gtid_219761] = defunc_1_f_res_219780;\n    ((__local float *) red_ar",
            "r_mem_229440)[gtid_219761] = defunc_1_f_res_219781;\n    ((__local float *) red_arr_mem_229442)[gtid_219761] = defunc_1_f_res_219782;\n    ((__local float *) red_arr_mem_229444)[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_229446;\n    int32_t skip_waves_229447 = 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_229446 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_229425, sext_i64_i32(q_t_196696))) {\n            x_219763 = ((__local\n                         float *) red_arr_mem_229436)[sext_i32_i64(local_tid_229425 +\n                                                      offset_229446)];\n            x_219764 = ((__local\n                         float *) red_arr_mem_229438)[sext_i32_i64(local_tid_229425 +\n                                                      offset_229446)];\n            x_219765 = ((__local\n                         float *) red_arr_mem_229440)[sext_i32_i64(local_tid_229425 +\n                                                      offset_229446)];\n            x_219766 = ((__local\n                         float *) red_arr_mem_229442)[sext_i32_i64(local_tid_229425 +\n                                                      offset_229446)];\n            x_219767 = ((__local\n                         float *) red_arr_mem_229444)[sext_i32_i64(local_tid_229425 +\n                                                      offset_229446)];\n        }\n    }\n    offset_229446 = 1;\n    while (slt32(offset_229446, wave_sizze_229427)) {\n        if (slt32(local_tid_229425 + offset_229446, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229425 - squot32(local_tid_229425,",
            " wave_sizze_229427) *\n              wave_sizze_229427) & (2 * offset_229446 - 1)) == 0) {\n            // read array element\n            {\n                x_219768 = ((volatile __local\n                             float *) red_arr_mem_229436)[sext_i32_i64(local_tid_229425 +\n                                                          offset_229446)];\n                x_219769 = ((volatile __local\n                             float *) red_arr_mem_229438)[sext_i32_i64(local_tid_229425 +\n                                                          offset_229446)];\n                x_219770 = ((volatile __local\n                             float *) red_arr_mem_229440)[sext_i32_i64(local_tid_229425 +\n                                                          offset_229446)];\n                x_219771 = ((volatile __local\n                             float *) red_arr_mem_229442)[sext_i32_i64(local_tid_229425 +\n                                                          offset_229446)];\n                x_219772 = ((volatile __local\n                             float *) red_arr_mem_229444)[sext_i32_i64(local_tid_229425 +\n                                                          offset_229446)];\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                  floa",
            "t *) red_arr_mem_229436)[sext_i32_i64(local_tid_229425)] =\n                    x_219763;\n                ((volatile __local\n                  float *) red_arr_mem_229438)[sext_i32_i64(local_tid_229425)] =\n                    x_219764;\n                ((volatile __local\n                  float *) red_arr_mem_229440)[sext_i32_i64(local_tid_229425)] =\n                    x_219765;\n                ((volatile __local\n                  float *) red_arr_mem_229442)[sext_i32_i64(local_tid_229425)] =\n                    x_219766;\n                ((volatile __local\n                  float *) red_arr_mem_229444)[sext_i32_i64(local_tid_229425)] =\n                    x_219767;\n            }\n        }\n        offset_229446 *= 2;\n    }\n    while (slt32(skip_waves_229447, squot32(sext_i64_i32(q_t_196696) +\n                                            wave_sizze_229427 - 1,\n                                            wave_sizze_229427))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_229446 = skip_waves_229447 * wave_sizze_229427;\n        if (slt32(local_tid_229425 + offset_229446, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229425 - squot32(local_tid_229425, wave_sizze_229427) *\n              wave_sizze_229427) == 0 && (squot32(local_tid_229425,\n                                                  wave_sizze_229427) & (2 *\n                                                                        skip_waves_229447 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_219768 = ((__local\n                             float *) red_arr_mem_229436)[sext_i32_i64(local_tid_229425 +\n                                                          offset_229446)];\n                x_219769 = ((__local\n                             float *) red_arr_mem_229438)[sext_i32_i64(local_tid_229425 +\n                                                          offset_229446)];\n                ",
            "x_219770 = ((__local\n                             float *) red_arr_mem_229440)[sext_i32_i64(local_tid_229425 +\n                                                          offset_229446)];\n                x_219771 = ((__local\n                             float *) red_arr_mem_229442)[sext_i32_i64(local_tid_229425 +\n                                                          offset_229446)];\n                x_219772 = ((__local\n                             float *) red_arr_mem_229444)[sext_i32_i64(local_tid_229425 +\n                                                          offset_229446)];\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_229436)[sext_i32_i64(local_tid_229425)] =\n                    x_219763;\n                ((__local\n                  float *) red_arr_mem_229438)[sext_i32_i64(local_tid_229425)] =\n                    x_219764;\n                ((__local\n                  float *) red_arr_mem_229440)[sext_i32_i64(local_tid_229425)] =\n                    x_219765;\n                ((__local\n                  float *) red_arr_mem_229442)[sext_i32_i64(local_tid_229425)] =\n                    x_219766;\n                ((__local\n                  float *) red_arr_mem_229444)[sext_i32_i64(local_tid_229425)] =\n     ",
            "               x_219767;\n            }\n        }\n        skip_waves_229447 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_219754 = ((__local\n                                   float *) red_arr_mem_229436)[(int64_t) 0];\n    defunc_2_reduce_res_219755 = ((__local\n                                   float *) red_arr_mem_229438)[(int64_t) 0];\n    defunc_2_reduce_res_219756 = ((__local\n                                   float *) red_arr_mem_229440)[(int64_t) 0];\n    defunc_2_reduce_res_219757 = ((__local\n                                   float *) red_arr_mem_229442)[(int64_t) 0];\n    defunc_2_reduce_res_219758 = ((__local\n                                   float *) red_arr_mem_229444)[(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_219789 * 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_229429));\n    int32_t phys_tid_219812 = local_tid_229425;\n    __local unsigned char *red_arr_mem_229448;\n    \n    red_arr_mem_229448 = (__local unsigned char *) red_arr_mem_229448_backing_9;\n    \n    __local unsigned char *red_arr_mem_229450;\n    \n    red_arr_mem_229450 = (__local\n                          unsigned char *) red_arr_mem_229450_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_219",
            "822;\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_229448)[gtid_219811] =\n        defunc_9_fit_fun_res_219832;\n    ((__local float *) red_arr_mem_229450)[gtid_219811] =\n        defunc_9_slope_fun_res_219838;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_229452;\n    int32_t skip_waves_229453 = 1;\n    float x_219813;\n    float x_219814;\n    float x_219815;\n    float x_219816;\n    \n    offset_229452 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_229425, sext_i64_i32(q_t_196696))) {\n            x_219813 = ((__local\n                         float *) red_arr_mem_229448)[sext_i32_i64(local_tid_229425 +\n                                                      offset_229452)];\n            x_219814 = ((__local\n                         float *) red_arr_mem_229450)[sext_i32_i64(local_tid_229425 +\n                                                      offset_229452)];\n        }\n    }\n    offset_229452 = 1;\n    while (slt32(offset_229452, wave_sizze_229427)) {\n        if (slt32(local_tid_229425 + offset_229452, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229425 - squot32(local_tid_229425, wave_sizze_229427) *\n              wave_sizze_229427) & (2 * offset_229452 - 1)) == 0) {\n            // read array element\n            {\n                x_219815 = ((volatile __local\n                             float *) red_arr_mem_229448)[sext_i32_i64(local_tid_229425 +\n                                                          offset_229452)];\n                x_219816 = ((volatile __local\n                             float *) red_arr_mem_229450)[sext_i32_i64(local_tid_229425 +\n                                                          offset_229452)];\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_229448)[sext_i32_i64(local_tid_229425)] =\n                    x_219813;\n                ((volatile __local\n                  float *) red_arr_mem_229450)[sext_i32_i64(local_tid_229425)] =\n                    x_219814;\n            }\n        }\n        offset_229452 *= 2;\n    }\n    while (slt32(skip_waves_229453, squot32(sext_i64_i32(q_t_196696) +\n                                            wave_sizze_229427 - 1,\n                                            wave_sizze_229427))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_229452 = skip_waves_229453 * wave_sizze_229427;\n        if (slt32(local_tid_229425 + offset_229452, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229425 - squot32(local_tid_229425, wave_sizze_229427) *\n              wave_sizze_229427) == 0 && (squot32(local_tid_229425,\n                                                  wave_sizze_229427) & (2 *\n                                                                        skip_waves_229453 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_219815 = ((__local\n                             float *) red_arr_mem_229448)[sext_i32_i64(local_tid_229425 +\n                                                          offset_229452)];\n                x_219816 = ((__local\n                             float *) red_arr_mem_229450)[sext_i32_i64(local_tid_229425 +\n                                                          offset_229452)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_219817 = x_219813 + x_219815;\n                float defunc_1_op_res_219",
            "818 = 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_229448)[sext_i32_i64(local_tid_229425)] =\n                    x_219813;\n                ((__local\n                  float *) red_arr_mem_229450)[sext_i32_i64(local_tid_229425)] =\n                    x_219814;\n            }\n        }\n        skip_waves_229453 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_219809 = ((__local\n                                   float *) red_arr_mem_229448)[(int64_t) 0];\n    defunc_2_reduce_res_219810 = ((__local\n                                   float *) red_arr_mem_229450)[(int64_t) 0];\n    if (local_tid_229425 == 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_229425 == 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                                             uint color_225108_backing_offset_0,\n                                             uint color_225107_backing_offset_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 *ex",
            "t_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    volatile unsigned char *color_225108_backing_1 =\n                           &shared_mem[color_225108_backing_offset_0];\n    volatile unsigned char *color_225107_backing_0 =\n                           &shared_mem[color_225107_backing_offset_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_229464;\n    int32_t local_tid_229465;\n    int64_t group_sizze_229468;\n    int32_t wave_sizze_229467;\n    int32_t group_tid_229466;\n    \n    global_tid_229464 = get_global_id(0);\n    local_tid_229465 = get_local_id(0);\n    group_sizze_229468 = get_local_size(0);\n    wave_sizze_229467 = LOCKSTEP_WIDTH;\n    group_tid_229466 = get_group_id(0);\n    \n    int32_t phys_tid_220067 = group_tid_229466;\n    int64_t slice_229470 = n_196692;\n    int64_t ltid_pre_229469 = sext_i32_i64(local_tid_229465);\n    int64_t remnant_229471 = sext_i32_i64(local_tid_229465) - ltid_pre_229469;\n    int64_t slice_229472 = m_196691;\n    int64_t gtid_220066 = sext_i32_i64(group_tid_229466);\n    int64_t remnant_229473 = sext_i32_i64(group_tid_229466) - 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_229469));\n    int32_t phys_tid_220078 = local_tid_229465;\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_229469));\n    int32_t phys_tid_220089 = local_tid_229465;\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_229474;\n    \n    tmp_229474 = ((__local\n                   float *) color_225107)[sext_i32_i64(local_tid_229465)];\n    ((__global float *) mem_224611)[gtid_220066 * n_196692 +\n                                    sext_i32_i64(local_tid_229465)] =\n        tmp_229474;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    float tmp_229475;\n    \n    tmp_229475 = ((__local\n                   float *) color_225108)[sext_i32_i64(local_tid_229465)];\n    ((__global float *) mem_224615)[gtid_220066 * n_196692 +\n                                    sext_i32_i64(local_tid_229465)] =\n        tmp_229475;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n  error_2:\n    return;\n}\n__kernel void mainzisegmap_intragroup_220432(__global int *global_failure,\n                                             uint color_225123_backing_offset_0,\n                                             uint color_225122_backing_offset_1,\n                                             uint color_225121_backing_offset_2,\n                                             uint color_225120_backing_offset_3,\n                                             uint color_225119_backing_offset_4,\n                                             uint color_225118_backing_offset_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    volatile unsigned char *color_225123_backing_5 =\n                           &shared_mem[color_225123_backing_offset_0];\n    volatile unsigned char *color_225122_backing_4 =\n                           &shared_mem[color_225122_backing_offset_1];\n    volatile unsigned char *color_225121_backing_3 =\n                           &shared_mem[color_225121_backing_offset_2];\n    volatile unsigned char *color_225120_backing_2 =\n                           &shared_mem[color_225120_backing_offset_3];\n    volatile unsigned char *color_225119_backing_1 =\n                           &shared_mem[color_225119_backing_offset_4];\n    volatile unsigned char *color_225118_backing_0 =\n                           &shared_mem[color_225118_backing_offset_5];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229531;\n    int32_t local_tid_229532;\n    int64_t group_sizze_229535;\n    int32_t wave_sizze_229534;\n    int32_t group_tid_229533;\n    \n    global_tid_229531 = get_global_id(0);\n    local_tid_229532 = get_local_id(0);\n    group_sizze_229535 = get_local_size(0);\n    wave_sizze_229534 = LOCKSTEP_WIDTH;\n    group_tid_229533 = get_group_id(0);\n    \n    int32_t phys_tid_220432 = group_tid_229533;\n    int64_t slice_229537 = n_196692;\n    int64_t ltid_pre_229536 = sext_i32_i64(local_tid_229532);\n    int64_t remnant_229538 = sext_i32_i64(l",
            "ocal_tid_229532) - ltid_pre_229536;\n    int64_t slice_229539 = m_196691;\n    int64_t gtid_220431 = sext_i32_i64(group_tid_229533);\n    int64_t remnant_229540 = sext_i32_i64(group_tid_229533) - 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_229541;\n    \n    tmp_229541 = ((__global float *) ext_mem_224627)[gtid_220431 * n_196692 +\n                                                     sext_i32_i64(local_tid_229532)];\n    ((__global float *) color_225116)[phys_tid_220432 * n_196692 +\n                                      sext_i32_i64(local_tid_229532)] =\n        tmp_229541;\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_s",
            "tep_arg_220438 == 31;\n        int64_t gtid_220447 = sext_i32_i64(sext_i64_i32(ltid_pre_229536));\n        int32_t phys_tid_220448 = local_tid_229532;\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        bool 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        } els",
            "e {\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_res_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 int6",
            "4_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_229545 = 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_229550;\n        int64_t x_229551;\n        int64_t x_229552;\n        int64_t x_229553;\n        int64_t x_229554;\n        int64_t x_229555;\n        int64_t x_229556;\n        int64_t x_229557;\n        bool ltid_in_bounds_229562 = slt64(sext_i32_i64(local_tid_229532),\n                                           n_196692);\n        int32_t skip_threads_229563;\n        \n        // read input for in-block scan\n        {\n            if (ltid_in_bounds_229562) {\n                x_220453 = ((volatile __local\n                             int64_t *) color_225123)[sext_i32_i64(local_tid_229532)];\n                x_220454 = ((volatile __local\n                             int64_t *) color_225122)[sext_i32_i64(local_tid_229532)];\n                x_220455 = ((volatile __local\n                             int64_t *) color_225121)[sext_i32_i64(local_tid_229532)];\n                x_220456 = ((volatile __local\n                             int64_t *) color_225120)[sext_i32_i64(local_tid_229532)];\n                if ((local_tid_229532 - squot32(local_tid_229532, 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_229563 = 1;\n            while (slt32(skip_threads_229563, 32)) {\n       ",
            "         bool thread_active_229564 = sle32(skip_threads_229563,\n                                                  local_tid_229532 -\n                                                  squot32(local_tid_229532,\n                                                          32) * 32) &&\n                     ltid_in_bounds_229562;\n                \n                if (thread_active_229564) {\n                    // read operands\n                    {\n                        x_220449 = ((volatile __local\n                                     int64_t *) color_225123)[sext_i32_i64(local_tid_229532) -\n                                                              sext_i32_i64(skip_threads_229563)];\n                        x_220450 = ((volatile __local\n                                     int64_t *) color_225122)[sext_i32_i64(local_tid_229532) -\n                                                              sext_i32_i64(skip_threads_229563)];\n                        x_220451 = ((volatile __local\n                                     int64_t *) color_225121)[sext_i32_i64(local_tid_229532) -\n                                                              sext_i32_i64(skip_threads_229563)];\n                        x_220452 = ((volatile __local\n                                     int64_t *) color_225120)[sext_i32_i64(local_tid_229532) -\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_229532), n_196692),\n                               sext_i32_i64(local_tid_229532) -\n                               sext_i32_i64(local_tid_229532 -\n                               skip_threads_229563));\n                    \n                    if (thread_active_229564 && inactive_229565) {\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_229564) {\n                        if (!inactive_229565) {\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                if (sle32(wave_sizze_229534, skip_threads_229563)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_229564) {\n                    // write result\n                    {\n                        ((volatile __local\n                          int64_t *) color_225123)[sext_i32_i64(local_tid_229532)] =\n                            x_220449;\n                        x_220453 = x_220449;\n                        ((volatile __local\n                          int64_t *) color_225122)[sext_i32_i64(local_tid_229532)] =\n                            x_220450;\n                        x_220454 = x_220450;\n                        ((volatile __local\n                          int64_t *) color_225121)[sext_i32_i64(local_tid_229532)] =\n                          ",
            "  x_220451;\n                        x_220455 = x_220451;\n                        ((volatile __local\n                          int64_t *) color_225120)[sext_i32_i64(local_tid_229532)] =\n                            x_220452;\n                        x_220456 = x_220452;\n                    }\n                }\n                if (sle32(wave_sizze_229534, 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_229532 - squot32(local_tid_229532, 32) * 32) == 31 &&\n                ltid_in_bounds_229562) {\n                ((volatile __local\n                  int64_t *) color_225123)[sext_i32_i64(squot32(local_tid_229532,\n                                                                32))] =\n                    x_220449;\n                ((volatile __local\n                  int64_t *) color_225122)[sext_i32_i64(squot32(local_tid_229532,\n                                                                32))] =\n                    x_220450;\n                ((volatile __local\n                  int64_t *) color_225121)[sext_i32_i64(squot32(local_tid_229532,\n                                                                32))] =\n                    x_220451;\n                ((volatile __local\n                  int64_t *) color_225120)[sext_i32_i64(squot32(local_tid_229532,\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_229566;\n            \n            // read input for in-block scan\n            {\n                if (squot32(local_tid_229532, 32) == 0 &&\n                    ltid_in_bounds_229562) ",
            "{\n                    x_229554 = ((volatile __local\n                                 int64_t *) color_225123)[sext_i32_i64(local_tid_229532)];\n                    x_229555 = ((volatile __local\n                                 int64_t *) color_225122)[sext_i32_i64(local_tid_229532)];\n                    x_229556 = ((volatile __local\n                                 int64_t *) color_225121)[sext_i32_i64(local_tid_229532)];\n                    x_229557 = ((volatile __local\n                                 int64_t *) color_225120)[sext_i32_i64(local_tid_229532)];\n                    if ((local_tid_229532 - squot32(local_tid_229532, 32) *\n                         32) == 0) {\n                        x_229550 = x_229554;\n                        x_229551 = x_229555;\n                        x_229552 = x_229556;\n                        x_229553 = x_229557;\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 = sle32(skip_threads_229566,\n                                                      local_tid_229532 -\n                                                      squot32(local_tid_229532,\n                                                              32) * 32) &&\n                         (squot32(local_tid_229532, 32) == 0 &&\n                          ltid_in_bounds_229562);\n                    \n                    if (thread_active_229567) {\n                        // read operands\n                        {\n                            x_229550 = ((volatile __local\n                                         int64_t *) color_225123)[sext_i32_i64(local_tid_229532) -\n                                                                  sext_i32_i64(skip_threads_229566)];\n                            x_229551 = ((volatile __local\n                                         int6",
            "4_t *) color_225122)[sext_i32_i64(local_tid_229532) -\n                                                                  sext_i32_i64(skip_threads_229566)];\n                            x_229552 = ((volatile __local\n                                         int64_t *) color_225121)[sext_i32_i64(local_tid_229532) -\n                                                                  sext_i32_i64(skip_threads_229566)];\n                            x_229553 = ((volatile __local\n                                         int64_t *) color_225120)[sext_i32_i64(local_tid_229532) -\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_229532 * 32 +\n                                          32 - 1), n_196692),\n                                   sext_i32_i64(local_tid_229532 * 32 + 32 -\n                                   1) - sext_i32_i64((local_tid_229532 -\n                                                      skip_threads_229566) *\n                                   32 + 32 - 1));\n                        \n                        if (thread_active_229567 && inactive_229568) {\n                            x_229550 = x_229554;\n                            x_229551 = x_229555;\n                            x_229552 = x_229556;\n                            x_229553 = x_229557;\n                        }\n                        if (thread_active_229567) {\n                            if (!inactive_229568) {\n                                int64_t defunc_1_op_res_229558 = add64(x_229550,\n                                                                       x_229554);\n                                int64_t defunc_1_op_res_229559 = add64(x_229551,\n                                                                       x_229555);\n  ",
            "                              int64_t defunc_1_op_res_229560 = add64(x_229552,\n                                                                       x_229556);\n                                int64_t defunc_1_op_res_229561 = add64(x_229553,\n                                                                       x_229557);\n                                \n                                x_229550 = defunc_1_op_res_229558;\n                                x_229551 = defunc_1_op_res_229559;\n                                x_229552 = defunc_1_op_res_229560;\n                                x_229553 = defunc_1_op_res_229561;\n                            }\n                        }\n                    }\n                    if (sle32(wave_sizze_229534, skip_threads_229566)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    if (thread_active_229567) {\n                        // write result\n                        {\n                            ((volatile __local\n                              int64_t *) color_225123)[sext_i32_i64(local_tid_229532)] =\n                                x_229550;\n                            x_229554 = x_229550;\n                            ((volatile __local\n                              int64_t *) color_225122)[sext_i32_i64(local_tid_229532)] =\n                                x_229551;\n                            x_229555 = x_229551;\n                            ((volatile __local\n                              int64_t *) color_225121)[sext_i32_i64(local_tid_229532)] =\n                                x_229552;\n                            x_229556 = x_229552;\n                            ((volatile __local\n                              int64_t *) color_225120)[sext_i32_i64(local_tid_229532)] =\n                                x_229553;\n                            x_229557 = x_229553;\n                        }\n                    }\n                    if (sle32(wave_sizze_229534, 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_229532, 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_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_229532,\n                                                                               32)) -\n                                                          (int64_t) 1];\n                    x_220450 = ((__local\n                                 int64_t *) color_225122)[sext_i32_i64(squot32(local_tid_229532,\n                                                                               32)) -\n                                                          (int64_t) 1];\n                    x_220451 = ((__local\n                                 int64_t *) color_225121)[sext_i32_i64(squot32(local_tid_229532,\n                                                                               32)) -\n                                                          (int64_t) 1];\n                    x_220452 = ((__local\n                                 int64_t *) color_225120)[sext_i32_i64(squot32(local_tid_229532,\n                                                                               32)) -\n                                                          (int64_t) 1];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_229570 =\n                     slt64(srem64(sext_i32_i64(local_tid_2295",
            "32), n_196692),\n                           sext_i32_i64(local_tid_229532) -\n                           sext_i32_i64(squot32(local_tid_229532, 32) * 32 -\n                           1));\n                \n                if (!no_carry_in_229569) {\n                    if (inactive_229570) {\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_229569) {\n                    if (!inactive_229570) {\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_229569) {\n                    ((__local\n                      int64_t *) color_225123)[sext_i32_i64(local_tid_229532)] =\n                        x_220449;\n                    ((__local\n                      int64_t *) color_225122)[sext_i32_i64(local_tid_229532)] =\n                        x_220450;\n                    ((__local\n                      int64_t *) color_225121)[sext_i32_i64(local_tid_229532)] =\n          ",
            "              x_220451;\n                    ((__local\n                      int64_t *) color_225120)[sext_i32_i64(local_tid_229532)] =\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_229532, 32) == 0 && ltid_in_bounds_229562) {\n                ((__local\n                  int64_t *) color_225123)[sext_i32_i64(local_tid_229532)] =\n                    x_220453;\n                ((__local\n                  int64_t *) color_225122)[sext_i32_i64(local_tid_229532)] =\n                    x_220454;\n                ((__local\n                  int64_t *) color_225121)[sext_i32_i64(local_tid_229532)] =\n                    x_220455;\n                ((__local\n                  int64_t *) color_225120)[sext_i32_i64(local_tid_229532)] =\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_229571;\n        \n        tmp_229571 = ((__global float *) mem_param_224750)[phys_tid_220432 *\n                                                           n_196692 +\n                                                           sext_i32_i64(local_tid_229532)];\n        ((__local float *) color_225118)[sext_i32_i64(local_tid_229532)] =\n            tmp_229571;\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int64_t write_i_220499 = sext_i32_i64(sext_i64_i32(ltid_pre_229536));\n        int32_t phys_tid_220500 = local_tid_229532;\n        int32_t x_220501;\n        \n        x_220501 = ((__local int32_t *) color_225119)[w",
            "rite_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 = ((__lo",
            "cal\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)[defunc_1_f_res_220508] =\n                write_value_220506;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        float tmp_229572;\n        \n        tmp_229572 = ((__local\n                       float *) color_225118)[sext_i32_i64(local_tid_229532)];\n        ((__global float *) mem_param_out_225009)[phys_tid_220432 * n_196692 +\n                                                  sext_i32_i64(local_tid_229532)] =\n            tmp_229572;\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        __global unsigned char *mem_param_tmp_229542;\n        \n        mem_param_tmp_229542 = mem_param_out_225009;\n        \n        __global unsigned char *mem_param_out_tmp_229543;\n        \n        mem_param_out_tmp_229543 = mem_param_224750;\n        mem_param_224750 = mem_param_tmp_229542;\n        mem_param_out_225009 = mem_param_out_tmp_229543;\n    }\n    ext_mem_224779 = mem_param_224750;\n    ext_mem_unused_225008 = mem_param_out_225009;\n    if (local_tid_229532 == 0) {\n        for (int64_t i_229573 = 0; i_229573 < n_196692; i_229573++) {\n            float tmp_229574;\n            \n            tmp_229574 = ((__global float *) ext_mem_224779)[phys_tid_220432 *\n     ",
            "                                                        n_196692 +\n                                                             i_229573];\n            ((__global float *) mem_224787)[gtid_220431 * n_196692 + i_229573] =\n                tmp_229574;\n        }\n    }\n    \n  error_2:\n    return;\n}\n__kernel void mainzisegmap_intragroup_220872(__global int *global_failure,\n                                             uint color_225129_backing_offset_0,\n                                             uint color_225128_backing_offset_1,\n                                             uint color_225127_backing_offset_2,\n                                             uint color_225126_backing_offset_3,\n                                             uint color_225125_backing_offset_4,\n                                             uint color_225124_backing_offset_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    volatile unsigned char *color_225129_backing_5 =\n                           &shared_mem[color_225129_backing_offset_0];\n    volatile unsigned char *color_225128_backing_4 =\n                           &shared_mem[color_225128_backing_offset_1];\n    ",
            "volatile unsigned char *color_225127_backing_3 =\n                           &shared_mem[color_225127_backing_offset_2];\n    volatile unsigned char *color_225126_backing_2 =\n                           &shared_mem[color_225126_backing_offset_3];\n    volatile unsigned char *color_225125_backing_1 =\n                           &shared_mem[color_225125_backing_offset_4];\n    volatile unsigned char *color_225124_backing_0 =\n                           &shared_mem[color_225124_backing_offset_5];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229577;\n    int32_t local_tid_229578;\n    int64_t group_sizze_229581;\n    int32_t wave_sizze_229580;\n    int32_t group_tid_229579;\n    \n    global_tid_229577 = get_global_id(0);\n    local_tid_229578 = get_local_id(0);\n    group_sizze_229581 = get_local_size(0);\n    wave_sizze_229580 = LOCKSTEP_WIDTH;\n    group_tid_229579 = get_group_id(0);\n    \n    int32_t phys_tid_220872 = group_tid_229579;\n    int64_t slice_229583 = n_196692;\n    int64_t ltid_pre_229582 = sext_i32_i64(local_tid_229578);\n    int64_t remnant_229584 = sext_i32_i64(local_tid_229578) - ltid_pre_229582;\n    int64_t slice_229585 = m_196691;\n    int64_t gtid_220871 = sext_i32_i64(group_tid_229579);\n    int64_t remnant_229586 = sext_i32_i64(group_tid_229579) - 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 cha",
            "r *) color_225129_backing_5;\n    \n    float tmp_229587;\n    \n    tmp_229587 = ((__global float *) mem_param_224799)[gtid_220871 * n_196692 +\n                                                       sext_i32_i64(local_tid_229578)];\n    ((__local float *) color_225129)[sext_i32_i64(local_tid_229578)] =\n        tmp_229587;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t gtid_220882 = sext_i32_i64(sext_i64_i32(ltid_pre_229582));\n    int32_t phys_tid_220883 = local_tid_229578;\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 (cond_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_229588 = 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_229593;\n    int64_t x_229594;\n    int64_t x_229595;\n    int64_t x_229596;\n    int64_t x_229597;\n    int64_t x_229598;\n    int64_t x_229599;\n    int64_t x_229600;\n    bool ltid_in_bounds_229605 = slt64(sext_i32_i64(local_tid_229578),\n                                       n_196692);\n    int32_t skip_threads_229606;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_229605) {\n            x_220888 = ((volatile __local\n                         int64_t *) color_225128)[sext_i32_i64(local_tid_229578)];\n            x_220889 = ((volatile __local\n                         int64_t *) color_225127)[sext_i32_i64(local_tid_229578)];\n            x_220890 = ((volatile __local\n                         int64_t *) color_225126)[sext_i32_i64(local_tid_229578)];\n            x_220891 = ((volatile __local\n                         int64_t *) color_225125)[sext_i32_i64(local_tid_229578)];\n            if ((local_tid_229578 - squot32(local_tid_229578, 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_229606 = 1;\n        while (slt32(skip_threads_229606, 32)) {\n            bool thread_active_229607 = sle32(skip_threads_229606,\n                                              local_tid_229578 -\n                                              squot32(local_tid_229578, 32) *\n                                              32) && ltid_in_bounds_22960",
            "5;\n            \n            if (thread_active_229607) {\n                // read operands\n                {\n                    x_220884 = ((volatile __local\n                                 int64_t *) color_225128)[sext_i32_i64(local_tid_229578) -\n                                                          sext_i32_i64(skip_threads_229606)];\n                    x_220885 = ((volatile __local\n                                 int64_t *) color_225127)[sext_i32_i64(local_tid_229578) -\n                                                          sext_i32_i64(skip_threads_229606)];\n                    x_220886 = ((volatile __local\n                                 int64_t *) color_225126)[sext_i32_i64(local_tid_229578) -\n                                                          sext_i32_i64(skip_threads_229606)];\n                    x_220887 = ((volatile __local\n                                 int64_t *) color_225125)[sext_i32_i64(local_tid_229578) -\n                                                          sext_i32_i64(skip_threads_229606)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_229608 =\n                     slt64(srem64(sext_i32_i64(local_tid_229578), n_196692),\n                           sext_i32_i64(local_tid_229578) -\n                           sext_i32_i64(local_tid_229578 -\n                           skip_threads_229606));\n                \n                if (thread_active_229607 && inactive_229608) {\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_229607) {\n                    if (!inactive_229608) {\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_229580, skip_threads_229606)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_229607) {\n                // write result\n                {\n                    ((volatile __local\n                      int64_t *) color_225128)[sext_i32_i64(local_tid_229578)] =\n                        x_220884;\n                    x_220888 = x_220884;\n                    ((volatile __local\n                      int64_t *) color_225127)[sext_i32_i64(local_tid_229578)] =\n                        x_220885;\n                    x_220889 = x_220885;\n                    ((volatile __local\n                      int64_t *) color_225126)[sext_i32_i64(local_tid_229578)] =\n                        x_220886;\n                    x_220890 = x_220886;\n                    ((volatile __local\n                      int64_t *) color_225125)[sext_i32_i64(local_tid_229578)] =\n                        x_220887;\n                    x_220891 = x_220887;\n                }\n            }\n            if (sle32(wave_sizze_229580, skip_threads_229606)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_229606 *= 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_229",
            "578 - squot32(local_tid_229578, 32) * 32) == 31 &&\n            ltid_in_bounds_229605) {\n            ((volatile __local\n              int64_t *) color_225128)[sext_i32_i64(squot32(local_tid_229578,\n                                                            32))] = x_220884;\n            ((volatile __local\n              int64_t *) color_225127)[sext_i32_i64(squot32(local_tid_229578,\n                                                            32))] = x_220885;\n            ((volatile __local\n              int64_t *) color_225126)[sext_i32_i64(squot32(local_tid_229578,\n                                                            32))] = x_220886;\n            ((volatile __local\n              int64_t *) color_225125)[sext_i32_i64(squot32(local_tid_229578,\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_229609;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_229578, 32) == 0 && ltid_in_bounds_229605) {\n                x_229597 = ((volatile __local\n                             int64_t *) color_225128)[sext_i32_i64(local_tid_229578)];\n                x_229598 = ((volatile __local\n                             int64_t *) color_225127)[sext_i32_i64(local_tid_229578)];\n                x_229599 = ((volatile __local\n                             int64_t *) color_225126)[sext_i32_i64(local_tid_229578)];\n                x_229600 = ((volatile __local\n                             int64_t *) color_225125)[sext_i32_i64(local_tid_229578)];\n                if ((local_tid_229578 - squot32(local_tid_229578, 32) * 32) ==\n                    0) {\n                    x_229593 = x_229597;\n                    x_229594 = x_229598;\n                    x_229595 = x_229599;\n                    x_229596 = x_229600;\n                }\n            }\n        }\n     ",
            "   // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_229609 = 1;\n            while (slt32(skip_threads_229609, 32)) {\n                bool thread_active_229610 = sle32(skip_threads_229609,\n                                                  local_tid_229578 -\n                                                  squot32(local_tid_229578,\n                                                          32) * 32) &&\n                     (squot32(local_tid_229578, 32) == 0 &&\n                      ltid_in_bounds_229605);\n                \n                if (thread_active_229610) {\n                    // read operands\n                    {\n                        x_229593 = ((volatile __local\n                                     int64_t *) color_225128)[sext_i32_i64(local_tid_229578) -\n                                                              sext_i32_i64(skip_threads_229609)];\n                        x_229594 = ((volatile __local\n                                     int64_t *) color_225127)[sext_i32_i64(local_tid_229578) -\n                                                              sext_i32_i64(skip_threads_229609)];\n                        x_229595 = ((volatile __local\n                                     int64_t *) color_225126)[sext_i32_i64(local_tid_229578) -\n                                                              sext_i32_i64(skip_threads_229609)];\n                        x_229596 = ((volatile __local\n                                     int64_t *) color_225125)[sext_i32_i64(local_tid_229578) -\n                                                              sext_i32_i64(skip_threads_229609)];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_229611 =\n                         slt64(srem64(sext_i32_i64(local_tid_229578 * 32 + 32 -\n                                      1), n_196692),\n                               sext_i32_i64(local_tid_229578 * 32 + 32 - 1) -",
            "\n                               sext_i32_i64((local_tid_229578 -\n                                             skip_threads_229609) * 32 + 32 -\n                               1));\n                    \n                    if (thread_active_229610 && inactive_229611) {\n                        x_229593 = x_229597;\n                        x_229594 = x_229598;\n                        x_229595 = x_229599;\n                        x_229596 = x_229600;\n                    }\n                    if (thread_active_229610) {\n                        if (!inactive_229611) {\n                            int64_t defunc_1_op_res_229601 = add64(x_229593,\n                                                                   x_229597);\n                            int64_t defunc_1_op_res_229602 = add64(x_229594,\n                                                                   x_229598);\n                            int64_t defunc_1_op_res_229603 = add64(x_229595,\n                                                                   x_229599);\n                            int64_t defunc_1_op_res_229604 = add64(x_229596,\n                                                                   x_229600);\n                            \n                            x_229593 = defunc_1_op_res_229601;\n                            x_229594 = defunc_1_op_res_229602;\n                            x_229595 = defunc_1_op_res_229603;\n                            x_229596 = defunc_1_op_res_229604;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_229580, skip_threads_229609)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_229610) {\n                    // write result\n                    {\n                        ((volatile __local\n                          int64_t *) color_225128)[sext_i32_i64(local_tid_229578)] =\n                            x_229593;\n                        x_229597 = x_229593;\n                  ",
            "      ((volatile __local\n                          int64_t *) color_225127)[sext_i32_i64(local_tid_229578)] =\n                            x_229594;\n                        x_229598 = x_229594;\n                        ((volatile __local\n                          int64_t *) color_225126)[sext_i32_i64(local_tid_229578)] =\n                            x_229595;\n                        x_229599 = x_229595;\n                        ((volatile __local\n                          int64_t *) color_225125)[sext_i32_i64(local_tid_229578)] =\n                            x_229596;\n                        x_229600 = x_229596;\n                    }\n                }\n                if (sle32(wave_sizze_229580, skip_threads_229609)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_229609 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_229612 = squot32(local_tid_229578, 32) == 0 ||\n         !ltid_in_bounds_229605;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_229612) {\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_229578,\n                                                                           32)) -\n                                                      (int64_t) 1];\n                x_220885 = ((__local\n                             int64_t *) color_225127)[sext_i32_i64(squot32(local_tid_229578,\n                                                                           32)) -\n                                                      (int64_t) 1];\n                x_220886 = ((__local\n                             int64_t *) color_225126)[sext_i32_i64(squot32(local_tid_229578,\n                        ",
            "                                                   32)) -\n                                                      (int64_t) 1];\n                x_220887 = ((__local\n                             int64_t *) color_225125)[sext_i32_i64(squot32(local_tid_229578,\n                                                                           32)) -\n                                                      (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_229613 = slt64(srem64(sext_i32_i64(local_tid_229578),\n                                                n_196692),\n                                         sext_i32_i64(local_tid_229578) -\n                                         sext_i32_i64(squot32(local_tid_229578,\n                                                              32) * 32 - 1));\n            \n            if (!no_carry_in_229612) {\n                if (inactive_229613) {\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_229612) {\n                if (!inactive_229613) {\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_229612) {\n                ((__local\n                  int64_t *) color_225128)[sext_i32_i64(local_tid_229578)] =\n         ",
            "           x_220884;\n                ((__local\n                  int64_t *) color_225127)[sext_i32_i64(local_tid_229578)] =\n                    x_220885;\n                ((__local\n                  int64_t *) color_225126)[sext_i32_i64(local_tid_229578)] =\n                    x_220886;\n                ((__local\n                  int64_t *) color_225125)[sext_i32_i64(local_tid_229578)] =\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_229578, 32) == 0 && ltid_in_bounds_229605) {\n            ((__local int64_t *) color_225128)[sext_i32_i64(local_tid_229578)] =\n                x_220888;\n            ((__local int64_t *) color_225127)[sext_i32_i64(local_tid_229578)] =\n                x_220889;\n            ((__local int64_t *) color_225126)[sext_i32_i64(local_tid_229578)] =\n                x_220890;\n            ((__local int64_t *) color_225125)[sext_i32_i64(local_tid_229578)] =\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_229582));\n    int32_t phys_tid_220934 = local_tid_229578;\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 (ma",
            "tch_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_220",
            "942) &&\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_229614;\n    \n    tmp_229614 = ((__local\n                   float *) color_225129)[sext_i32_i64(local_tid_229578)];\n    ((__global float *) mem_224830)[gtid_220871 * n_196692 +\n                                    sext_i32_i64(local_tid_229578)] =\n        tmp_229614;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n  error_2:\n    return;\n}\n__kernel void mainzisegred_large_205086(__global int *global_failure,\n                                        uint sync_arr_mem_226123_backing_offset_0,\n                                        uint red_arr_mem_226121_backing_offset_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_226107,\n                                        int64_t elements_per_thread_226108,\n                                        int64_t virt_num_groups_226109,\n                                        int64_t threads_per_segment_226111,\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_226112,\n                                        __global\n                                        unsigned char *mainzicounter_mem_226114)\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    volatile unsigned char *sync_arr_mem_226123_backing_1 =\n                           &shared_mem[sync_arr_mem_226123_backing_offset_0];\n    volatile unsigned char *red_arr_mem_226121_backing_0 =\n                           &shared_mem[red_arr_mem_226121_backing_offset_1];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226116;\n    int32_t local_tid_226117;\n    int64_t group_sizze_226120;\n    int32_t wave_sizze_226119;\n    int32_t group_tid_226118;\n    \n    global_tid_226116 = get_global_id(0);\n    local_tid_226117 = get_local_id(0);\n    group_sizze_226120 = get_local_size(0);\n    wave_sizze_226119 = LOCKSTEP_WIDTH;\n    group_tid_226118 = get_group_id(0);\n    \n    int32_t phys_tid_205086 = global_tid_226116;\n    __local unsigned char *red_arr_mem_226121;\n    \n    red_arr_mem_226121 = (__local unsigned char *) red_arr_mem_226121_backing_0;\n    \n    __local unsigned char *sync_arr_mem_226123;\n    \n    sync_arr_mem_226123 = (__local\n                           unsigned char *) sync_arr_mem_226123_backing_1;\n    \n    int32_t phys_group_id_226125;\n    \n    phys_group_id_226125 = get_group_id(0);\n    for (int32_t i_226126 = 0; i_226126 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_226109) - phys_group_id_226125,\n                   sext_i64_i32(num_groups_205079)); i_226126++) {\n        int32_t virt_group_id_226127 = phys_group_id_226125 + i_226126 *\n                sext_i64_i32(num_groups_205079);\n        int32_t flat_segment_id_226128 = squot32(virt_group_id_226127,\n                                                 sext_i64_i32(groups_per_segment_226107))",
            ";\n        int64_t global_tid_226129 = srem64(sext_i32_i64(virt_group_id_226127) *\n                                           segred_group_sizze_205078 +\n                                           sext_i32_i64(local_tid_226117),\n                                           segred_group_sizze_205078 *\n                                           groups_per_segment_226107);\n        int64_t slice_226130 = s_n_m_196745;\n        int64_t slice_226131 = n_p_196694 * slice_226130;\n        int64_t slice_226132 = m_196691 * slice_226131;\n        int64_t gtid_205082 = squot64(sext_i32_i64(flat_segment_id_226128),\n                                      slice_226131);\n        int64_t remnant_226133 = sext_i32_i64(flat_segment_id_226128) -\n                gtid_205082 * slice_226131;\n        int64_t gtid_205083 = squot64(remnant_226133, slice_226130);\n        int64_t remnant_226134 = remnant_226133 - gtid_205083 * slice_226130;\n        int64_t gtid_205084 = remnant_226134;\n        int64_t remnant_226135 = remnant_226134 - gtid_205084;\n        int64_t gtid_205085;\n        float x_acc_226136;\n        int64_t chunk_sizze_226137 = smin64(elements_per_thread_226108,\n                                            sdiv_up64(q_s_196695 -\n                                                      global_tid_226129,\n                                                      threads_per_segment_226111));\n        float x_205087;\n        float x_205088;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_226136 = 0.0F;\n        }\n        for (int64_t i_226141 = 0; i_226141 < chunk_sizze_226137; i_226141++) {\n            gtid_205085 = global_tid_226129 + threads_per_segment_226111 *\n                i_226141;\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_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_205111 * tmp3_205122;\n                \n                // save map-out results\n                { }\n                // load accumulator\n                {\n                    x_205087 = x_acc_226136;\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_226136 = 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_226136;\n            ((__local\n              float *) red_arr_mem_226121)[sext_i32_i64(local_tid_226117)] =\n                x_205087;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_226142;\n        int32_t skip_waves_226143 = 1;\n        float x_226138;\n        float x_226139;\n        \n        offset_226142 = 0;\n        // participating threads read initial accumulator\n        {\n            ",
            "if (slt32(local_tid_226117,\n                      sext_i64_i32(segred_group_sizze_205078))) {\n                x_226138 = ((__local\n                             float *) red_arr_mem_226121)[sext_i32_i64(local_tid_226117 +\n                                                          offset_226142)];\n            }\n        }\n        offset_226142 = 1;\n        while (slt32(offset_226142, wave_sizze_226119)) {\n            if (slt32(local_tid_226117 + offset_226142,\n                      sext_i64_i32(segred_group_sizze_205078)) &&\n                ((local_tid_226117 - squot32(local_tid_226117,\n                                             wave_sizze_226119) *\n                  wave_sizze_226119) & (2 * offset_226142 - 1)) == 0) {\n                // read array element\n                {\n                    x_226139 = ((volatile __local\n                                 float *) red_arr_mem_226121)[sext_i32_i64(local_tid_226117 +\n                                                              offset_226142)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_226140 = x_226138 + x_226139;\n                    \n                    x_226138 = defunc_1_op_res_226140;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_226121)[sext_i32_i64(local_tid_226117)] =\n                        x_226138;\n                }\n            }\n            offset_226142 *= 2;\n        }\n        while (slt32(skip_waves_226143,\n                     squot32(sext_i64_i32(segred_group_sizze_205078) +\n                             wave_sizze_226119 - 1, wave_sizze_226119))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_226142 = skip_waves_226143 * wave_sizze_226119;\n            if (slt32(local_tid_226117 + offset_226142,\n                      sext_i64_i32(segred_group_sizze_205078)) &&\n                ((local_tid_226117",
            " - squot32(local_tid_226117,\n                                             wave_sizze_226119) *\n                  wave_sizze_226119) == 0 && (squot32(local_tid_226117,\n                                                      wave_sizze_226119) & (2 *\n                                                                            skip_waves_226143 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_226139 = ((__local\n                                 float *) red_arr_mem_226121)[sext_i32_i64(local_tid_226117 +\n                                                              offset_226142)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_226140 = x_226138 + x_226139;\n                    \n                    x_226138 = defunc_1_op_res_226140;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_226121)[sext_i32_i64(local_tid_226117)] =\n                        x_226138;\n                }\n            }\n            skip_waves_226143 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_226117) == (int64_t) 0) {\n                x_acc_226136 = x_226138;\n            }\n        }\n        if (groups_per_segment_226107 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_226117 == 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_226136;\n                }\n            }\n        } else {\n            int32_t old_counter_226144;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_226117 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_226112)[sext_i32_i64(virt_group_id_226127)] =\n                        x_acc_226136;\n                    mem_fence_global();\n                    old_counter_226144 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226114)[sext_i32_i64(srem32(flat_segment_id_226128,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_226123)[(int64_t) 0] =\n                        old_counter_226144 == groups_per_segment_226107 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_226145;\n            \n            is_last_group_226145 = ((__local\n                                     bool *) sync_arr_mem_226123)[(int64_t) 0];\n            if (is_last_group_226145) {\n                if (local_tid_226117 == 0) {\n                    old_counter_226144 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226114)[sext_i32_i64(srem32(flat_segment_id_226128,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_226107));\n                }\n                // read in the per-group-results\n          ",
            "      {\n                    int64_t read_per_thread_226146 =\n                            sdiv_up64(groups_per_segment_226107,\n                                      segred_group_sizze_205078);\n                    \n                    x_205087 = 0.0F;\n                    for (int64_t i_226147 = 0; i_226147 <\n                         read_per_thread_226146; i_226147++) {\n                        int64_t group_res_id_226148 =\n                                sext_i32_i64(local_tid_226117) *\n                                read_per_thread_226146 + i_226147;\n                        int64_t index_of_group_res_226149 =\n                                sext_i32_i64(flat_segment_id_226128) *\n                                groups_per_segment_226107 + group_res_id_226148;\n                        \n                        if (slt64(group_res_id_226148,\n                                  groups_per_segment_226107)) {\n                            x_205088 = ((__global\n                                         float *) segred_tmp_mem_226112)[index_of_group_res_226149];\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_226121)[sext_i32_i64(local_tid_226117)] =\n                    x_205087;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_226150;\n                    int32_t skip_waves_226151 = 1;\n                    float x_226138;\n                    float x_226139;\n                    \n                    offset_226150 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_226117,\n                                  sext_i64_i32(seg",
            "red_group_sizze_205078))) {\n                            x_226138 = ((__local\n                                         float *) red_arr_mem_226121)[sext_i32_i64(local_tid_226117 +\n                                                                      offset_226150)];\n                        }\n                    }\n                    offset_226150 = 1;\n                    while (slt32(offset_226150, wave_sizze_226119)) {\n                        if (slt32(local_tid_226117 + offset_226150,\n                                  sext_i64_i32(segred_group_sizze_205078)) &&\n                            ((local_tid_226117 - squot32(local_tid_226117,\n                                                         wave_sizze_226119) *\n                              wave_sizze_226119) & (2 * offset_226150 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_226139 = ((volatile __local\n                                             float *) red_arr_mem_226121)[sext_i32_i64(local_tid_226117 +\n                                                                          offset_226150)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_226140 = x_226138 +\n                                      x_226139;\n                                \n                                x_226138 = defunc_1_op_res_226140;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_226121)[sext_i32_i64(local_tid_226117)] =\n                                    x_226138;\n                            }\n                        }\n                        offset_226150 *= 2;\n                    }\n                    while (slt32(skip_waves_226151,\n   ",
            "                              squot32(sext_i64_i32(segred_group_sizze_205078) +\n                                         wave_sizze_226119 - 1,\n                                         wave_sizze_226119))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_226150 = skip_waves_226151 * wave_sizze_226119;\n                        if (slt32(local_tid_226117 + offset_226150,\n                                  sext_i64_i32(segred_group_sizze_205078)) &&\n                            ((local_tid_226117 - squot32(local_tid_226117,\n                                                         wave_sizze_226119) *\n                              wave_sizze_226119) == 0 &&\n                             (squot32(local_tid_226117, wave_sizze_226119) &\n                              (2 * skip_waves_226151 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_226139 = ((__local\n                                             float *) red_arr_mem_226121)[sext_i32_i64(local_tid_226117 +\n                                                                          offset_226150)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_226140 = x_226138 +\n                                      x_226139;\n                                \n                                x_226138 = defunc_1_op_res_226140;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_226121)[sext_i32_i64(local_tid_226117)] =\n                                    x_226138;\n                            }\n                        }\n                        skip_waves_226151 *= 2;\n                    }\n                    // and back to memory with the final resu",
            "lt\n                    {\n                        if (local_tid_226117 == 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_226138;\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                                        uint sync_arr_mem_226211_backing_offset_0,\n                                        uint red_arr_mem_226209_backing_offset_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_226195,\n                                        int64_t elements_per_thread_226196,\n                                        int64_t virt_num_groups_226197,\n                                        int64_t threads_per_segment_226199,\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_226200,\n                                        __global\n                                        unsigned char *mainzicounter_mem_226202)\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    volatile unsigned char *sync_arr_mem_226211_backing_1 =\n                           &shared_mem[sync_arr_mem_226211_backing_offset_0];\n    volatile unsigned char *red_arr_mem_226209_backing_0 =\n                           &shared_mem[red_arr_mem_226209_backing_offset_1];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226204;\n    int32_t local_tid_226205;\n    int64_t group_sizze_226208;\n    int32_t wave_sizze_226207;\n    int32_t group_tid_226206;\n    \n    global_tid_226204 = get_global_id(0);\n    local_tid_226205 = get_local_id(0);\n    group_sizze_226208 = get_local_size(0);\n    wave_sizze_226207 = LOCKSTEP_WIDTH;\n    group_tid_226206 = get_group_id(0);\n    \n    int32_t phys_tid_205160 = global_tid_226204;\n    __local unsigned char *red_arr_mem_226209;\n    \n    red_arr_mem_226209 = (__local unsigned char *) red_arr_mem_226209_backing_0;\n    \n    __local unsigned char *sync_arr_mem_226211;\n    \n    sync_arr_mem_226211 = (__local\n                           unsigned char *) sync_arr_mem_226211_backing_1;\n    \n    int32_t phys_group_id_226213;\n    \n    phys_group_id_226213 = get_group_id(0);\n    for (int32_t i_226214 = 0; i_226214 <\n         sdiv_up32(sext_i64_i",
            "32(virt_num_groups_226197) - phys_group_id_226213,\n                   sext_i64_i32(num_groups_205153)); i_226214++) {\n        int32_t virt_group_id_226215 = phys_group_id_226213 + i_226214 *\n                sext_i64_i32(num_groups_205153);\n        int32_t flat_segment_id_226216 = squot32(virt_group_id_226215,\n                                                 sext_i64_i32(groups_per_segment_226195));\n        int64_t global_tid_226217 = srem64(sext_i32_i64(virt_group_id_226215) *\n                                           segred_group_sizze_205152 +\n                                           sext_i32_i64(local_tid_226205),\n                                           segred_group_sizze_205152 *\n                                           groups_per_segment_226195);\n        int64_t slice_226218 = s_n_m_196745;\n        int64_t slice_226219 = n_p_196694 * slice_226218;\n        int64_t slice_226220 = m_196691 * slice_226219;\n        int64_t gtid_205156 = squot64(sext_i32_i64(flat_segment_id_226216),\n                                      slice_226219);\n        int64_t remnant_226221 = sext_i32_i64(flat_segment_id_226216) -\n                gtid_205156 * slice_226219;\n        int64_t gtid_205157 = squot64(remnant_226221, slice_226218);\n        int64_t remnant_226222 = remnant_226221 - gtid_205157 * slice_226218;\n        int64_t gtid_205158 = remnant_226222;\n        int64_t remnant_226223 = remnant_226222 - gtid_205158;\n        int64_t gtid_205159;\n        float x_acc_226224;\n        int64_t chunk_sizze_226225 = smin64(elements_per_thread_226196,\n                                            sdiv_up64(q_s_196695 -\n                                                      global_tid_226217,\n                                                      threads_per_segment_226199));\n        float x_205161;\n        float x_205162;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_226224 = 0.0F;\n        }\n        for (int64_t i_226229 = 0; i_226229 < chunk_sizze_22",
            "6225; i_226229++) {\n            gtid_205159 = global_tid_226217 + threads_per_segment_226199 *\n                i_226229;\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 defun",
            "c_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_226224;\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_205162;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_226224 = 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_226224;\n            ((__local\n              float *) red_arr_mem_226209)[sext_i32_i64(local_tid_226205)] =\n                x_205161;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_226230;\n        int32_t skip_waves_226231 = 1;\n        float x_226226;\n        float x_226227;\n        \n        offset_22",
            "6230 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_226205,\n                      sext_i64_i32(segred_group_sizze_205152))) {\n                x_226226 = ((__local\n                             float *) red_arr_mem_226209)[sext_i32_i64(local_tid_226205 +\n                                                          offset_226230)];\n            }\n        }\n        offset_226230 = 1;\n        while (slt32(offset_226230, wave_sizze_226207)) {\n            if (slt32(local_tid_226205 + offset_226230,\n                      sext_i64_i32(segred_group_sizze_205152)) &&\n                ((local_tid_226205 - squot32(local_tid_226205,\n                                             wave_sizze_226207) *\n                  wave_sizze_226207) & (2 * offset_226230 - 1)) == 0) {\n                // read array element\n                {\n                    x_226227 = ((volatile __local\n                                 float *) red_arr_mem_226209)[sext_i32_i64(local_tid_226205 +\n                                                              offset_226230)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_226228 = x_226226 + x_226227;\n                    \n                    x_226226 = defunc_1_op_res_226228;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_226209)[sext_i32_i64(local_tid_226205)] =\n                        x_226226;\n                }\n            }\n            offset_226230 *= 2;\n        }\n        while (slt32(skip_waves_226231,\n                     squot32(sext_i64_i32(segred_group_sizze_205152) +\n                             wave_sizze_226207 - 1, wave_sizze_226207))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_226230 = skip_waves_226231 * wave_sizze_226207;\n            if (slt32(local_tid_226205 + offset_226230,\n          ",
            "            sext_i64_i32(segred_group_sizze_205152)) &&\n                ((local_tid_226205 - squot32(local_tid_226205,\n                                             wave_sizze_226207) *\n                  wave_sizze_226207) == 0 && (squot32(local_tid_226205,\n                                                      wave_sizze_226207) & (2 *\n                                                                            skip_waves_226231 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_226227 = ((__local\n                                 float *) red_arr_mem_226209)[sext_i32_i64(local_tid_226205 +\n                                                              offset_226230)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_226228 = x_226226 + x_226227;\n                    \n                    x_226226 = defunc_1_op_res_226228;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_226209)[sext_i32_i64(local_tid_226205)] =\n                        x_226226;\n                }\n            }\n            skip_waves_226231 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_226205) == (int64_t) 0) {\n                x_acc_226224 = x_226226;\n            }\n        }\n        if (groups_per_segment_226195 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_226205 == 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_226224;\n                }\n            }\n        } else {\n            int32_t old_counter_226232;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_226205 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_226200)[sext_i32_i64(virt_group_id_226215)] =\n                        x_acc_226224;\n                    mem_fence_global();\n                    old_counter_226232 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226202)[sext_i32_i64(srem32(flat_segment_id_226216,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_226211)[(int64_t) 0] =\n                        old_counter_226232 == groups_per_segment_226195 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_226233;\n            \n            is_last_group_226233 = ((__local\n                                     bool *) sync_arr_mem_226211)[(int64_t) 0];\n            if (is_last_group_226233) {\n                if (local_tid_226205 == 0) {\n                    old_counter_226232 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226202)[sext_i32_i64(srem32(flat_segment_id_226216,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segme",
            "nt_226195));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_226234 =\n                            sdiv_up64(groups_per_segment_226195,\n                                      segred_group_sizze_205152);\n                    \n                    x_205161 = 0.0F;\n                    for (int64_t i_226235 = 0; i_226235 <\n                         read_per_thread_226234; i_226235++) {\n                        int64_t group_res_id_226236 =\n                                sext_i32_i64(local_tid_226205) *\n                                read_per_thread_226234 + i_226235;\n                        int64_t index_of_group_res_226237 =\n                                sext_i32_i64(flat_segment_id_226216) *\n                                groups_per_segment_226195 + group_res_id_226236;\n                        \n                        if (slt64(group_res_id_226236,\n                                  groups_per_segment_226195)) {\n                            x_205162 = ((__global\n                                         float *) segred_tmp_mem_226200)[index_of_group_res_226237];\n                            \n                            float defunc_1_op_res_205163 = x_205161 + x_205162;\n                            \n                            x_205161 = defunc_1_op_res_205163;\n                        }\n                    }\n                }\n                ((__local\n                  float *) red_arr_mem_226209)[sext_i32_i64(local_tid_226205)] =\n                    x_205161;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_226238;\n                    int32_t skip_waves_226239 = 1;\n                    float x_226226;\n                    float x_226227;\n                    \n                    offset_226238 = 0;\n                    // participating threads read initial accumulator\n                    {\n            ",
            "            if (slt32(local_tid_226205,\n                                  sext_i64_i32(segred_group_sizze_205152))) {\n                            x_226226 = ((__local\n                                         float *) red_arr_mem_226209)[sext_i32_i64(local_tid_226205 +\n                                                                      offset_226238)];\n                        }\n                    }\n                    offset_226238 = 1;\n                    while (slt32(offset_226238, wave_sizze_226207)) {\n                        if (slt32(local_tid_226205 + offset_226238,\n                                  sext_i64_i32(segred_group_sizze_205152)) &&\n                            ((local_tid_226205 - squot32(local_tid_226205,\n                                                         wave_sizze_226207) *\n                              wave_sizze_226207) & (2 * offset_226238 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_226227 = ((volatile __local\n                                             float *) red_arr_mem_226209)[sext_i32_i64(local_tid_226205 +\n                                                                          offset_226238)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_226228 = x_226226 +\n                                      x_226227;\n                                \n                                x_226226 = defunc_1_op_res_226228;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_226209)[sext_i32_i64(local_tid_226205)] =\n                                    x_226226;\n                            }\n                        }\n                        offset_",
            "226238 *= 2;\n                    }\n                    while (slt32(skip_waves_226239,\n                                 squot32(sext_i64_i32(segred_group_sizze_205152) +\n                                         wave_sizze_226207 - 1,\n                                         wave_sizze_226207))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_226238 = skip_waves_226239 * wave_sizze_226207;\n                        if (slt32(local_tid_226205 + offset_226238,\n                                  sext_i64_i32(segred_group_sizze_205152)) &&\n                            ((local_tid_226205 - squot32(local_tid_226205,\n                                                         wave_sizze_226207) *\n                              wave_sizze_226207) == 0 &&\n                             (squot32(local_tid_226205, wave_sizze_226207) &\n                              (2 * skip_waves_226239 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_226227 = ((__local\n                                             float *) red_arr_mem_226209)[sext_i32_i64(local_tid_226205 +\n                                                                          offset_226238)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_226228 = x_226226 +\n                                      x_226227;\n                                \n                                x_226226 = defunc_1_op_res_226228;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_226209)[sext_i32_i64(local_tid_226205)] =\n                                    x_226226;\n                            }\n                        }\n                        skip_waves_226239",
            " *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_226205 == 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_226226;\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                                        uint sync_arr_mem_226476_backing_offset_0,\n                                        uint red_arr_mem_226474_backing_offset_1,\n                                        uint red_arr_mem_226472_backing_offset_2,\n                                        uint red_arr_mem_226470_backing_offset_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_226452,\n                                        int64_t elements_per_thread_226453,\n                                        int64_t virt_num_groups_226454,\n                                        int64_t threads_per_segment_226456,\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_226457,\n                                        __global\n                                        unsigned char *segred_tmp_mem_226459,\n                                        __global\n                                        unsigned char *segred_tmp_mem_226461,\n                                        __global\n                                        unsigned char *mainzicounter_mem_226463)\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    volatile unsigned char *sync_arr_mem_226476_backing_3 =\n                           &shared_mem[sync_arr_mem_226476_backing_offset_0];\n    volatile unsigned char *red_arr_mem_226474_backing_2 =\n                           &shared_mem[red_arr_mem_226474_backing_offset_1];\n    volatile unsigned char *red_arr_mem_226472_backing_1 =\n                           &shared_mem[red_arr_mem_226472_backing_offset_2];\n    volatile unsigned char *red_arr_mem_226470_backing_0 =\n                           &shared_mem[red_arr_mem_226470_backing_offset_3];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226465;\n    int32_t local_tid_226466;\n    int64_t group_sizze_226469;\n    in",
            "t32_t wave_sizze_226468;\n    int32_t group_tid_226467;\n    \n    global_tid_226465 = get_global_id(0);\n    local_tid_226466 = get_local_id(0);\n    group_sizze_226469 = get_local_size(0);\n    wave_sizze_226468 = LOCKSTEP_WIDTH;\n    group_tid_226467 = get_group_id(0);\n    \n    int32_t phys_tid_207220 = global_tid_226465;\n    __local unsigned char *red_arr_mem_226470;\n    \n    red_arr_mem_226470 = (__local unsigned char *) red_arr_mem_226470_backing_0;\n    \n    __local unsigned char *red_arr_mem_226472;\n    \n    red_arr_mem_226472 = (__local unsigned char *) red_arr_mem_226472_backing_1;\n    \n    __local unsigned char *red_arr_mem_226474;\n    \n    red_arr_mem_226474 = (__local unsigned char *) red_arr_mem_226474_backing_2;\n    \n    __local unsigned char *sync_arr_mem_226476;\n    \n    sync_arr_mem_226476 = (__local\n                           unsigned char *) sync_arr_mem_226476_backing_3;\n    \n    int32_t phys_group_id_226478;\n    \n    phys_group_id_226478 = get_group_id(0);\n    for (int32_t i_226479 = 0; i_226479 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_226454) - phys_group_id_226478,\n                   sext_i64_i32(num_groups_207211)); i_226479++) {\n        int32_t virt_group_id_226480 = phys_group_id_226478 + i_226479 *\n                sext_i64_i32(num_groups_207211);\n        int32_t flat_segment_id_226481 = squot32(virt_group_id_226480,\n                                                 sext_i64_i32(groups_per_segment_226452));\n        int64_t global_tid_226482 = srem64(sext_i32_i64(virt_group_id_226480) *\n                                           segred_group_sizze_207210 +\n                                           sext_i32_i64(local_tid_226466),\n                                           segred_group_sizze_207210 *\n                                           groups_per_segment_226452);\n        int64_t slice_226483 = s_n_m_196745;\n        int64_t slice_226484 = n_p_196694 * slice_226483;\n        int64_t slice_226485 = m_196691 * slice_226484;\n        int64_t",
            " gtid_207216 = squot64(sext_i32_i64(flat_segment_id_226481),\n                                      slice_226484);\n        int64_t remnant_226486 = sext_i32_i64(flat_segment_id_226481) -\n                gtid_207216 * slice_226484;\n        int64_t gtid_207217 = squot64(remnant_226486, slice_226483);\n        int64_t remnant_226487 = remnant_226486 - gtid_207217 * slice_226483;\n        int64_t gtid_207218 = remnant_226487;\n        int64_t remnant_226488 = remnant_226487 - gtid_207218;\n        int64_t gtid_207219;\n        float x_acc_226489;\n        float x_acc_226490;\n        float x_acc_226491;\n        int64_t chunk_sizze_226492 = smin64(elements_per_thread_226453,\n                                            sdiv_up64(q_s_196695 -\n                                                      global_tid_226482,\n                                                      threads_per_segment_226456));\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_226489 = 0.0F;\n            x_acc_226490 = 0.0F;\n            x_acc_226491 = 0.0F;\n        }\n        for (int64_t i_226502 = 0; i_226502 < chunk_sizze_226492; i_226502++) {\n            gtid_207219 = global_tid_226482 + threads_per_segment_226456 *\n                i_226502;\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_226489;\n                    x_207222 = x_acc_226490;\n                    x_207223 = x_acc_226491;\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_226489 = defunc_1_op_res_207227;\n                        x_acc_226490 = defunc_1_op_res_207228;\n                        x_acc_226491 = 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_226489;\n            x_207222 = x_acc_226490;\n            x_207223 = x_acc_226491;\n            ((__local\n              float *) red_arr_mem_226470)[sext_i32",
            "_i64(local_tid_226466)] =\n                x_207221;\n            ((__local\n              float *) red_arr_mem_226472)[sext_i32_i64(local_tid_226466)] =\n                x_207222;\n            ((__local\n              float *) red_arr_mem_226474)[sext_i32_i64(local_tid_226466)] =\n                x_207223;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_226503;\n        int32_t skip_waves_226504 = 1;\n        float x_226493;\n        float x_226494;\n        float x_226495;\n        float x_226496;\n        float x_226497;\n        float x_226498;\n        \n        offset_226503 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_226466,\n                      sext_i64_i32(segred_group_sizze_207210))) {\n                x_226493 = ((__local\n                             float *) red_arr_mem_226470)[sext_i32_i64(local_tid_226466 +\n                                                          offset_226503)];\n                x_226494 = ((__local\n                             float *) red_arr_mem_226472)[sext_i32_i64(local_tid_226466 +\n                                                          offset_226503)];\n                x_226495 = ((__local\n                             float *) red_arr_mem_226474)[sext_i32_i64(local_tid_226466 +\n                                                          offset_226503)];\n            }\n        }\n        offset_226503 = 1;\n        while (slt32(offset_226503, wave_sizze_226468)) {\n            if (slt32(local_tid_226466 + offset_226503,\n                      sext_i64_i32(segred_group_sizze_207210)) &&\n                ((local_tid_226466 - squot32(local_tid_226466,\n                                             wave_sizze_226468) *\n                  wave_sizze_226468) & (2 * offset_226503 - 1)) == 0) {\n                // read array element\n                {\n                    x_226496 = ((volatile __local\n                                 float *) red_arr_mem_226470)[sext_i32_i6",
            "4(local_tid_226466 +\n                                                              offset_226503)];\n                    x_226497 = ((volatile __local\n                                 float *) red_arr_mem_226472)[sext_i32_i64(local_tid_226466 +\n                                                              offset_226503)];\n                    x_226498 = ((volatile __local\n                                 float *) red_arr_mem_226474)[sext_i32_i64(local_tid_226466 +\n                                                              offset_226503)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_226499 = x_226493 + x_226496;\n                    float defunc_1_op_res_226500 = x_226494 + x_226497;\n                    float defunc_1_op_res_226501 = x_226495 + x_226498;\n                    \n                    x_226493 = defunc_1_op_res_226499;\n                    x_226494 = defunc_1_op_res_226500;\n                    x_226495 = defunc_1_op_res_226501;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_226470)[sext_i32_i64(local_tid_226466)] =\n                        x_226493;\n                    ((volatile __local\n                      float *) red_arr_mem_226472)[sext_i32_i64(local_tid_226466)] =\n                        x_226494;\n                    ((volatile __local\n                      float *) red_arr_mem_226474)[sext_i32_i64(local_tid_226466)] =\n                        x_226495;\n                }\n            }\n            offset_226503 *= 2;\n        }\n        while (slt32(skip_waves_226504,\n                     squot32(sext_i64_i32(segred_group_sizze_207210) +\n                             wave_sizze_226468 - 1, wave_sizze_226468))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_226503 = skip_waves_226504 * wave_sizze_226468;\n            if (slt32(local_tid_226466 + offset",
            "_226503,\n                      sext_i64_i32(segred_group_sizze_207210)) &&\n                ((local_tid_226466 - squot32(local_tid_226466,\n                                             wave_sizze_226468) *\n                  wave_sizze_226468) == 0 && (squot32(local_tid_226466,\n                                                      wave_sizze_226468) & (2 *\n                                                                            skip_waves_226504 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_226496 = ((__local\n                                 float *) red_arr_mem_226470)[sext_i32_i64(local_tid_226466 +\n                                                              offset_226503)];\n                    x_226497 = ((__local\n                                 float *) red_arr_mem_226472)[sext_i32_i64(local_tid_226466 +\n                                                              offset_226503)];\n                    x_226498 = ((__local\n                                 float *) red_arr_mem_226474)[sext_i32_i64(local_tid_226466 +\n                                                              offset_226503)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_226499 = x_226493 + x_226496;\n                    float defunc_1_op_res_226500 = x_226494 + x_226497;\n                    float defunc_1_op_res_226501 = x_226495 + x_226498;\n                    \n                    x_226493 = defunc_1_op_res_226499;\n                    x_226494 = defunc_1_op_res_226500;\n                    x_226495 = defunc_1_op_res_226501;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_226470)[sext_i32_i64(local_tid_226466)] =\n                        x_226493;\n                    ((__local\n ",
            "                     float *) red_arr_mem_226472)[sext_i32_i64(local_tid_226466)] =\n                        x_226494;\n                    ((__local\n                      float *) red_arr_mem_226474)[sext_i32_i64(local_tid_226466)] =\n                        x_226495;\n                }\n            }\n            skip_waves_226504 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_226466) == (int64_t) 0) {\n                x_acc_226489 = x_226493;\n                x_acc_226490 = x_226494;\n                x_acc_226491 = x_226495;\n            }\n        }\n        if (groups_per_segment_226452 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_226466 == 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_226489;\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_226490;\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_226491;\n                }\n            }\n        } else {\n            int32_t ",
            "old_counter_226505;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_226466 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_226457)[sext_i32_i64(virt_group_id_226480)] =\n                        x_acc_226489;\n                    ((__global\n                      float *) segred_tmp_mem_226459)[sext_i32_i64(virt_group_id_226480)] =\n                        x_acc_226490;\n                    ((__global\n                      float *) segred_tmp_mem_226461)[sext_i32_i64(virt_group_id_226480)] =\n                        x_acc_226491;\n                    mem_fence_global();\n                    old_counter_226505 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226463)[sext_i32_i64(srem32(flat_segment_id_226481,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_226476)[(int64_t) 0] =\n                        old_counter_226505 == groups_per_segment_226452 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_226506;\n            \n            is_last_group_226506 = ((__local\n                                     bool *) sync_arr_mem_226476)[(int64_t) 0];\n            if (is_last_group_226506) {\n                if (local_tid_226466 == 0) {\n                    old_counter_226505 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226463)[sext_i32_i64(srem32(flat_segment_id_226481,\n                                                                                                      10240))],\n       ",
            "                                       (int) ((int64_t) 0 -\n                                                     groups_per_segment_226452));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_226507 =\n                            sdiv_up64(groups_per_segment_226452,\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_226508 = 0; i_226508 <\n                         read_per_thread_226507; i_226508++) {\n                        int64_t group_res_id_226509 =\n                                sext_i32_i64(local_tid_226466) *\n                                read_per_thread_226507 + i_226508;\n                        int64_t index_of_group_res_226510 =\n                                sext_i32_i64(flat_segment_id_226481) *\n                                groups_per_segment_226452 + group_res_id_226509;\n                        \n                        if (slt64(group_res_id_226509,\n                                  groups_per_segment_226452)) {\n                            x_207224 = ((__global\n                                         float *) segred_tmp_mem_226457)[index_of_group_res_226510];\n                            x_207225 = ((__global\n                                         float *) segred_tmp_mem_226459)[index_of_group_res_226510];\n                            x_207226 = ((__global\n                                         float *) segred_tmp_mem_226461)[index_of_group_res_226510];\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 = defu",
            "nc_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_226470)[sext_i32_i64(local_tid_226466)] =\n                    x_207221;\n                ((__local\n                  float *) red_arr_mem_226472)[sext_i32_i64(local_tid_226466)] =\n                    x_207222;\n                ((__local\n                  float *) red_arr_mem_226474)[sext_i32_i64(local_tid_226466)] =\n                    x_207223;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_226511;\n                    int32_t skip_waves_226512 = 1;\n                    float x_226493;\n                    float x_226494;\n                    float x_226495;\n                    float x_226496;\n                    float x_226497;\n                    float x_226498;\n                    \n                    offset_226511 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_226466,\n                                  sext_i64_i32(segred_group_sizze_207210))) {\n                            x_226493 = ((__local\n                                         float *) red_arr_mem_226470)[sext_i32_i64(local_tid_226466 +\n                                                                      offset_226511)];\n                            x_226494 = ((__local\n                                         float *) red_arr_mem_226472)[sext_i32_i64(local_tid_226466 +\n                                                                      offset_226511)];\n                            x_226495 = ((__local\n                                         float *) red_arr_mem_226474)[sext_i32_i64(local_tid_226466 +\n                                              ",
            "                        offset_226511)];\n                        }\n                    }\n                    offset_226511 = 1;\n                    while (slt32(offset_226511, wave_sizze_226468)) {\n                        if (slt32(local_tid_226466 + offset_226511,\n                                  sext_i64_i32(segred_group_sizze_207210)) &&\n                            ((local_tid_226466 - squot32(local_tid_226466,\n                                                         wave_sizze_226468) *\n                              wave_sizze_226468) & (2 * offset_226511 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_226496 = ((volatile __local\n                                             float *) red_arr_mem_226470)[sext_i32_i64(local_tid_226466 +\n                                                                          offset_226511)];\n                                x_226497 = ((volatile __local\n                                             float *) red_arr_mem_226472)[sext_i32_i64(local_tid_226466 +\n                                                                          offset_226511)];\n                                x_226498 = ((volatile __local\n                                             float *) red_arr_mem_226474)[sext_i32_i64(local_tid_226466 +\n                                                                          offset_226511)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_226499 = x_226493 +\n                                      x_226496;\n                                float defunc_1_op_res_226500 = x_226494 +\n                                      x_226497;\n                                float defunc_1_op_res_226501 = x_226495 +\n                                      x_226498;\n                                \n                  ",
            "              x_226493 = defunc_1_op_res_226499;\n                                x_226494 = defunc_1_op_res_226500;\n                                x_226495 = defunc_1_op_res_226501;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_226470)[sext_i32_i64(local_tid_226466)] =\n                                    x_226493;\n                                ((volatile __local\n                                  float *) red_arr_mem_226472)[sext_i32_i64(local_tid_226466)] =\n                                    x_226494;\n                                ((volatile __local\n                                  float *) red_arr_mem_226474)[sext_i32_i64(local_tid_226466)] =\n                                    x_226495;\n                            }\n                        }\n                        offset_226511 *= 2;\n                    }\n                    while (slt32(skip_waves_226512,\n                                 squot32(sext_i64_i32(segred_group_sizze_207210) +\n                                         wave_sizze_226468 - 1,\n                                         wave_sizze_226468))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_226511 = skip_waves_226512 * wave_sizze_226468;\n                        if (slt32(local_tid_226466 + offset_226511,\n                                  sext_i64_i32(segred_group_sizze_207210)) &&\n                            ((local_tid_226466 - squot32(local_tid_226466,\n                                                         wave_sizze_226468) *\n                              wave_sizze_226468) == 0 &&\n                             (squot32(local_tid_226466, wave_sizze_226468) &\n                              (2 * skip_waves_226512 - 1)) == 0)) {\n                            // read array element\n                            {\n                   ",
            "             x_226496 = ((__local\n                                             float *) red_arr_mem_226470)[sext_i32_i64(local_tid_226466 +\n                                                                          offset_226511)];\n                                x_226497 = ((__local\n                                             float *) red_arr_mem_226472)[sext_i32_i64(local_tid_226466 +\n                                                                          offset_226511)];\n                                x_226498 = ((__local\n                                             float *) red_arr_mem_226474)[sext_i32_i64(local_tid_226466 +\n                                                                          offset_226511)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_226499 = x_226493 +\n                                      x_226496;\n                                float defunc_1_op_res_226500 = x_226494 +\n                                      x_226497;\n                                float defunc_1_op_res_226501 = x_226495 +\n                                      x_226498;\n                                \n                                x_226493 = defunc_1_op_res_226499;\n                                x_226494 = defunc_1_op_res_226500;\n                                x_226495 = defunc_1_op_res_226501;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_226470)[sext_i32_i64(local_tid_226466)] =\n                                    x_226493;\n                                ((__local\n                                  float *) red_arr_mem_226472)[sext_i32_i64(local_tid_226466)] =\n                                    x_226494;\n                                ((__local\n                       ",
            "           float *) red_arr_mem_226474)[sext_i32_i64(local_tid_226466)] =\n                                    x_226495;\n                            }\n                        }\n                        skip_waves_226512 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_226466 == 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_226493;\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_226494;\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_226495;\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                                        uint sync_arr_mem_226582_backing_offset_0,\n                                        uint red_arr_mem_226580_backing_offset_1,\n                                        uint red_arr_mem_226578_backing_offset_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_226562,\n                                        int64_t elements_per_thread_226563,\n                                        int64_t virt_num_groups_226564,\n                                        int64_t threads_per_segment_226566,\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_226567,\n                                        __global\n                                        unsigned char *segred_tmp_mem_226569,\n                                        __global\n                                        unsigned char *mainzicounter_mem_226571)\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    volatile unsigned char *sync_arr_mem_226582_backing_2 =\n                           &shared_mem[sync_arr_mem_226582_backing_offset_0];\n    volatile unsigned char *red_arr_mem_226580_backing_1 =\n                           &shared_mem[red_arr_mem_226580_backing_offset_1];\n    volatile unsigned char *red_arr_mem_226578_backing_0 =\n                           &shared_mem[red_arr_mem_226578_backing_offset_2];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226573;\n    int32_t local_tid_226574;\n    int64_t group_sizze_226577;\n    int32_t wave_sizze_226576;\n    int32_t group_tid_226575;\n    \n    global_tid_226573 = get_global_id(0);\n    local_tid_226574 = get_local_id(0);\n    group_sizze_226577 = get_local_size(0);\n    wave_sizze_226576 = LOCKSTEP_WIDTH;\n    group_tid_226575 = get_group_id(0);\n    \n    int32_t phys_tid_207314 = global_tid_226573;\n    __local unsigned char *red_arr_mem_226578;\n    \n    red_arr_mem_226578 = (__local unsigned char *) red_arr_mem_226578_backing_0;\n    \n    __local unsigned char *red_arr_mem_226580;\n    \n    red_arr_mem_226580 = (__local unsigned char *) red_arr_mem_226580_backing_1;\n    \n    __local unsigned char *sync_arr_mem_226582;\n    \n    sync_arr_mem_226582 = (__local\n                           unsigned char *) sync_arr_mem_226582_backing_2;\n    \n    int32_t phys_group_id_226584;\n    \n    phys_group_id_226584 = get_group_id(0);\n    for (int32_t i_226585 = 0; i_226585 <\n         sdiv_up32(sext_i64_i",
            "32(virt_num_groups_226564) - phys_group_id_226584,\n                   sext_i64_i32(num_groups_207306)); i_226585++) {\n        int32_t virt_group_id_226586 = phys_group_id_226584 + i_226585 *\n                sext_i64_i32(num_groups_207306);\n        int32_t flat_segment_id_226587 = squot32(virt_group_id_226586,\n                                                 sext_i64_i32(groups_per_segment_226562));\n        int64_t global_tid_226588 = srem64(sext_i32_i64(virt_group_id_226586) *\n                                           segred_group_sizze_207305 +\n                                           sext_i32_i64(local_tid_226574),\n                                           segred_group_sizze_207305 *\n                                           groups_per_segment_226562);\n        int64_t slice_226589 = s_n_m_196745;\n        int64_t slice_226590 = n_p_196694 * slice_226589;\n        int64_t slice_226591 = m_196691 * slice_226590;\n        int64_t gtid_207310 = squot64(sext_i32_i64(flat_segment_id_226587),\n                                      slice_226590);\n        int64_t remnant_226592 = sext_i32_i64(flat_segment_id_226587) -\n                gtid_207310 * slice_226590;\n        int64_t gtid_207311 = squot64(remnant_226592, slice_226589);\n        int64_t remnant_226593 = remnant_226592 - gtid_207311 * slice_226589;\n        int64_t gtid_207312 = remnant_226593;\n        int64_t remnant_226594 = remnant_226593 - gtid_207312;\n        int64_t gtid_207313;\n        float x_acc_226595;\n        float x_acc_226596;\n        int64_t chunk_sizze_226597 = smin64(elements_per_thread_226563,\n                                            sdiv_up64(q_s_196695 -\n                                                      global_tid_226588,\n                                                      threads_per_segment_226566));\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_226595 = ",
            "0.0F;\n            x_acc_226596 = 0.0F;\n        }\n        for (int64_t i_226604 = 0; i_226604 < chunk_sizze_226597; i_226604++) {\n            gtid_207313 = global_tid_226588 + threads_per_segment_226566 *\n                i_226604;\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_226595;\n                    x_207316 = x_acc_226596;\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_226595 = defunc_1_op_res_207319;\n                        x_acc_226596 = 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_226595;\n            x_207316 = x_acc_226596;\n            ((__local\n              float *) red_arr_mem_226578)[sext_i32_i64(local_tid_226574)] =\n                x_207315;\n            ((__local\n              float *) red_arr_mem_226580)[sext_i32_i64(local_tid_226574)] =\n                x_207316;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_226605;\n        int32_t skip_waves_2",
            "26606 = 1;\n        float x_226598;\n        float x_226599;\n        float x_226600;\n        float x_226601;\n        \n        offset_226605 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_226574,\n                      sext_i64_i32(segred_group_sizze_207305))) {\n                x_226598 = ((__local\n                             float *) red_arr_mem_226578)[sext_i32_i64(local_tid_226574 +\n                                                          offset_226605)];\n                x_226599 = ((__local\n                             float *) red_arr_mem_226580)[sext_i32_i64(local_tid_226574 +\n                                                          offset_226605)];\n            }\n        }\n        offset_226605 = 1;\n        while (slt32(offset_226605, wave_sizze_226576)) {\n            if (slt32(local_tid_226574 + offset_226605,\n                      sext_i64_i32(segred_group_sizze_207305)) &&\n                ((local_tid_226574 - squot32(local_tid_226574,\n                                             wave_sizze_226576) *\n                  wave_sizze_226576) & (2 * offset_226605 - 1)) == 0) {\n                // read array element\n                {\n                    x_226600 = ((volatile __local\n                                 float *) red_arr_mem_226578)[sext_i32_i64(local_tid_226574 +\n                                                              offset_226605)];\n                    x_226601 = ((volatile __local\n                                 float *) red_arr_mem_226580)[sext_i32_i64(local_tid_226574 +\n                                                              offset_226605)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_226602 = x_226598 + x_226600;\n                    float defunc_1_op_res_226603 = x_226599 + x_226601;\n                    \n                    x_226598 = defunc_1_op_res_226602;\n                    x_226599 = defunc_1_op_r",
            "es_226603;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_226578)[sext_i32_i64(local_tid_226574)] =\n                        x_226598;\n                    ((volatile __local\n                      float *) red_arr_mem_226580)[sext_i32_i64(local_tid_226574)] =\n                        x_226599;\n                }\n            }\n            offset_226605 *= 2;\n        }\n        while (slt32(skip_waves_226606,\n                     squot32(sext_i64_i32(segred_group_sizze_207305) +\n                             wave_sizze_226576 - 1, wave_sizze_226576))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_226605 = skip_waves_226606 * wave_sizze_226576;\n            if (slt32(local_tid_226574 + offset_226605,\n                      sext_i64_i32(segred_group_sizze_207305)) &&\n                ((local_tid_226574 - squot32(local_tid_226574,\n                                             wave_sizze_226576) *\n                  wave_sizze_226576) == 0 && (squot32(local_tid_226574,\n                                                      wave_sizze_226576) & (2 *\n                                                                            skip_waves_226606 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_226600 = ((__local\n                                 float *) red_arr_mem_226578)[sext_i32_i64(local_tid_226574 +\n                                                              offset_226605)];\n                    x_226601 = ((__local\n                                 float *) red_arr_mem_226580)[sext_i32_i64(local_tid_226574 +\n                                                              offset_226605)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_226602 = x_",
            "226598 + x_226600;\n                    float defunc_1_op_res_226603 = x_226599 + x_226601;\n                    \n                    x_226598 = defunc_1_op_res_226602;\n                    x_226599 = defunc_1_op_res_226603;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_226578)[sext_i32_i64(local_tid_226574)] =\n                        x_226598;\n                    ((__local\n                      float *) red_arr_mem_226580)[sext_i32_i64(local_tid_226574)] =\n                        x_226599;\n                }\n            }\n            skip_waves_226606 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_226574) == (int64_t) 0) {\n                x_acc_226595 = x_226598;\n                x_acc_226596 = x_226599;\n            }\n        }\n        if (groups_per_segment_226562 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_226574 == 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_226595;\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_226596;\n                }\n            }\n        } else {\n            int32_t old_counter_226607;\n            \n            // first thread in group ",
            "saves group result to global memory\n            {\n                if (local_tid_226574 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_226567)[sext_i32_i64(virt_group_id_226586)] =\n                        x_acc_226595;\n                    ((__global\n                      float *) segred_tmp_mem_226569)[sext_i32_i64(virt_group_id_226586)] =\n                        x_acc_226596;\n                    mem_fence_global();\n                    old_counter_226607 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226571)[sext_i32_i64(srem32(flat_segment_id_226587,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_226582)[(int64_t) 0] =\n                        old_counter_226607 == groups_per_segment_226562 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_226608;\n            \n            is_last_group_226608 = ((__local\n                                     bool *) sync_arr_mem_226582)[(int64_t) 0];\n            if (is_last_group_226608) {\n                if (local_tid_226574 == 0) {\n                    old_counter_226607 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226571)[sext_i32_i64(srem32(flat_segment_id_226587,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_226562));\n                }\n                // read in the per-group-results\n                {\n    ",
            "                int64_t read_per_thread_226609 =\n                            sdiv_up64(groups_per_segment_226562,\n                                      segred_group_sizze_207305);\n                    \n                    x_207315 = 0.0F;\n                    x_207316 = 0.0F;\n                    for (int64_t i_226610 = 0; i_226610 <\n                         read_per_thread_226609; i_226610++) {\n                        int64_t group_res_id_226611 =\n                                sext_i32_i64(local_tid_226574) *\n                                read_per_thread_226609 + i_226610;\n                        int64_t index_of_group_res_226612 =\n                                sext_i32_i64(flat_segment_id_226587) *\n                                groups_per_segment_226562 + group_res_id_226611;\n                        \n                        if (slt64(group_res_id_226611,\n                                  groups_per_segment_226562)) {\n                            x_207317 = ((__global\n                                         float *) segred_tmp_mem_226567)[index_of_group_res_226612];\n                            x_207318 = ((__global\n                                         float *) segred_tmp_mem_226569)[index_of_group_res_226612];\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_226578)[sext_i32_i64(local_tid_226574)] =\n                    x_207315;\n                ((__local\n                  float *) red_arr_mem_226580)[sext_i32_i64(local_tid_226574)] =\n                    x_207316;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the ",
            "per-group results\n                {\n                    int32_t offset_226613;\n                    int32_t skip_waves_226614 = 1;\n                    float x_226598;\n                    float x_226599;\n                    float x_226600;\n                    float x_226601;\n                    \n                    offset_226613 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_226574,\n                                  sext_i64_i32(segred_group_sizze_207305))) {\n                            x_226598 = ((__local\n                                         float *) red_arr_mem_226578)[sext_i32_i64(local_tid_226574 +\n                                                                      offset_226613)];\n                            x_226599 = ((__local\n                                         float *) red_arr_mem_226580)[sext_i32_i64(local_tid_226574 +\n                                                                      offset_226613)];\n                        }\n                    }\n                    offset_226613 = 1;\n                    while (slt32(offset_226613, wave_sizze_226576)) {\n                        if (slt32(local_tid_226574 + offset_226613,\n                                  sext_i64_i32(segred_group_sizze_207305)) &&\n                            ((local_tid_226574 - squot32(local_tid_226574,\n                                                         wave_sizze_226576) *\n                              wave_sizze_226576) & (2 * offset_226613 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_226600 = ((volatile __local\n                                             float *) red_arr_mem_226578)[sext_i32_i64(local_tid_226574 +\n                                                                          offset_226613)];\n                                x_226601 = ((volatile __local",
            "\n                                             float *) red_arr_mem_226580)[sext_i32_i64(local_tid_226574 +\n                                                                          offset_226613)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_226602 = x_226598 +\n                                      x_226600;\n                                float defunc_1_op_res_226603 = x_226599 +\n                                      x_226601;\n                                \n                                x_226598 = defunc_1_op_res_226602;\n                                x_226599 = defunc_1_op_res_226603;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_226578)[sext_i32_i64(local_tid_226574)] =\n                                    x_226598;\n                                ((volatile __local\n                                  float *) red_arr_mem_226580)[sext_i32_i64(local_tid_226574)] =\n                                    x_226599;\n                            }\n                        }\n                        offset_226613 *= 2;\n                    }\n                    while (slt32(skip_waves_226614,\n                                 squot32(sext_i64_i32(segred_group_sizze_207305) +\n                                         wave_sizze_226576 - 1,\n                                         wave_sizze_226576))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_226613 = skip_waves_226614 * wave_sizze_226576;\n                        if (slt32(local_tid_226574 + offset_226613,\n                                  sext_i64_i32(segred_group_sizze_207305)) &&\n                            ((local_tid_226574 - squot32(local_tid_226574,\n                              ",
            "                           wave_sizze_226576) *\n                              wave_sizze_226576) == 0 &&\n                             (squot32(local_tid_226574, wave_sizze_226576) &\n                              (2 * skip_waves_226614 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_226600 = ((__local\n                                             float *) red_arr_mem_226578)[sext_i32_i64(local_tid_226574 +\n                                                                          offset_226613)];\n                                x_226601 = ((__local\n                                             float *) red_arr_mem_226580)[sext_i32_i64(local_tid_226574 +\n                                                                          offset_226613)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_226602 = x_226598 +\n                                      x_226600;\n                                float defunc_1_op_res_226603 = x_226599 +\n                                      x_226601;\n                                \n                                x_226598 = defunc_1_op_res_226602;\n                                x_226599 = defunc_1_op_res_226603;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_226578)[sext_i32_i64(local_tid_226574)] =\n                                    x_226598;\n                                ((__local\n                                  float *) red_arr_mem_226580)[sext_i32_i64(local_tid_226574)] =\n                                    x_226599;\n                            }\n                        }\n                        skip_waves_226614 *= 2;\n                    }\n                    // and ba",
            "ck to memory with the final result\n                    {\n                        if (local_tid_226574 == 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_226598;\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_226599;\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                                        uint sync_arr_mem_226893_backing_offset_0,\n                                        uint red_arr_mem_226891_backing_offset_1,\n                                        uint red_arr_mem_226889_backing_offset_2,\n                                        uint red_arr_mem_226887_backing_offset_3,\n                                        uint red_arr_mem_226885_backing_offset_4,\n                                        uint red_arr_mem_226883_backing_offset_5,\n                                        int64_t m_196691, int64_t n_p_196694,\n                                        int",
            "64_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_226861,\n                                        int64_t elements_per_thread_226862,\n                                        int64_t virt_num_groups_226863,\n                                        int64_t threads_per_segment_226865,\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_226866,\n                                        __global\n                                        unsigned char *segred_tmp_mem_226868,\n                                        __global\n                                        unsigned char *segred_tmp_mem_226870,\n                                        __global\n                                        unsigned char *segred_tmp_mem_226872,\n                                        __global\n                                        unsigned char *segred_tmp_mem_22687",
            "4,\n                                        __global\n                                        unsigned char *mainzicounter_mem_226876)\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    volatile unsigned char *sync_arr_mem_226893_backing_5 =\n                           &shared_mem[sync_arr_mem_226893_backing_offset_0];\n    volatile unsigned char *red_arr_mem_226891_backing_4 =\n                           &shared_mem[red_arr_mem_226891_backing_offset_1];\n    volatile unsigned char *red_arr_mem_226889_backing_3 =\n                           &shared_mem[red_arr_mem_226889_backing_offset_2];\n    volatile unsigned char *red_arr_mem_226887_backing_2 =\n                           &shared_mem[red_arr_mem_226887_backing_offset_3];\n    volatile unsigned char *red_arr_mem_226885_backing_1 =\n                           &shared_mem[red_arr_mem_226885_backing_offset_4];\n    volatile unsigned char *red_arr_mem_226883_backing_0 =\n                           &shared_mem[red_arr_mem_226883_backing_offset_5];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226878;\n    int32_t local_tid_226879;\n    int64_t group_sizze_226882;\n    int32_t wave_sizze_226881;\n    int32_t group_tid_226880;\n    \n    global_tid_226878 = get_global_id(0);\n    local_tid_226879 = get_local_id(0);\n    group_sizze_226882 = get_local_size(0);\n    wave_sizze_226881 = LOCKSTEP_WIDTH;\n    group_tid_226880 = get_group_id(0);\n    \n    int32_t phys_tid_209867 = global_tid_226878;\n    __local unsigned char *red_arr_mem_226883;\n    \n    red_arr_mem_226883 = (__local unsigned char *) red_arr_mem_226883_backing_0;\n    \n    __local unsigned char *red_arr_mem_226885;\n    \n    red_arr_mem_226885 = (__local unsigned char *) red_arr_mem_226885_backing_1;\n    \n    __local unsigned char *red_arr_mem_226887;\n    \n    red_arr_mem_226887 = (__local unsigned char *) red_arr_mem_226887_backing",
            "_2;\n    \n    __local unsigned char *red_arr_mem_226889;\n    \n    red_arr_mem_226889 = (__local unsigned char *) red_arr_mem_226889_backing_3;\n    \n    __local unsigned char *red_arr_mem_226891;\n    \n    red_arr_mem_226891 = (__local unsigned char *) red_arr_mem_226891_backing_4;\n    \n    __local unsigned char *sync_arr_mem_226893;\n    \n    sync_arr_mem_226893 = (__local\n                           unsigned char *) sync_arr_mem_226893_backing_5;\n    \n    int32_t phys_group_id_226895;\n    \n    phys_group_id_226895 = get_group_id(0);\n    for (int32_t i_226896 = 0; i_226896 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_226863) - phys_group_id_226895,\n                   sext_i64_i32(num_groups_209856)); i_226896++) {\n        int32_t virt_group_id_226897 = phys_group_id_226895 + i_226896 *\n                sext_i64_i32(num_groups_209856);\n        int32_t flat_segment_id_226898 = squot32(virt_group_id_226897,\n                                                 sext_i64_i32(groups_per_segment_226861));\n        int64_t global_tid_226899 = srem64(sext_i32_i64(virt_group_id_226897) *\n                                           segred_group_sizze_209855 +\n                                           sext_i32_i64(local_tid_226879),\n                                           segred_group_sizze_209855 *\n                                           groups_per_segment_226861);\n        int64_t slice_226900 = s_n_m_196745;\n        int64_t slice_226901 = n_p_196694 * slice_226900;\n        int64_t slice_226902 = m_196691 * slice_226901;\n        int64_t gtid_209863 = squot64(sext_i32_i64(flat_segment_id_226898),\n                                      slice_226901);\n        int64_t remnant_226903 = sext_i32_i64(flat_segment_id_226898) -\n                gtid_209863 * slice_226901;\n        int64_t gtid_209864 = squot64(remnant_226903, slice_226900);\n        int64_t remnant_226904 = remnant_226903 - gtid_209864 * slice_226900;\n        int64_t gtid_209865 = remnant_226904;\n        int64_t remnant_22",
            "6905 = remnant_226904 - gtid_209865;\n        int64_t gtid_209866;\n        float x_acc_226906;\n        float x_acc_226907;\n        float x_acc_226908;\n        float x_acc_226909;\n        float x_acc_226910;\n        int64_t chunk_sizze_226911 = smin64(elements_per_thread_226862,\n                                            sdiv_up64(q_s_196695 -\n                                                      global_tid_226899,\n                                                      threads_per_segment_226865));\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_226906 = 0.0F;\n            x_acc_226907 = 0.0F;\n            x_acc_226908 = 0.0F;\n            x_acc_226909 = 0.0F;\n            x_acc_226910 = 0.0F;\n        }\n        for (int64_t i_226927 = 0; i_226927 < chunk_sizze_226911; i_226927++) {\n            gtid_209866 = global_tid_226899 + threads_per_segment_226865 *\n                i_226927;\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_226906;\n                    x_209869 = x_acc_226907;\n                    x_209870 = x_acc_226908;\n                    x_209871 = x_acc_226909;\n                    x_209872 = x_acc_226910;\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_226906 = defunc_1_op_res_209878;\n                        x_acc_226907 = defunc_1_op_res_209879;\n                        x_acc_226908 = defunc_1_op_res_209880;\n                        x_acc_226909 = defunc_1_op_res_209881;\n                     ",
            "   x_acc_226910 = 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_226906;\n            x_209869 = x_acc_226907;\n            x_209870 = x_acc_226908;\n            x_209871 = x_acc_226909;\n            x_209872 = x_acc_226910;\n            ((__local\n              float *) red_arr_mem_226883)[sext_i32_i64(local_tid_226879)] =\n                x_209868;\n            ((__local\n              float *) red_arr_mem_226885)[sext_i32_i64(local_tid_226879)] =\n                x_209869;\n            ((__local\n              float *) red_arr_mem_226887)[sext_i32_i64(local_tid_226879)] =\n                x_209870;\n            ((__local\n              float *) red_arr_mem_226889)[sext_i32_i64(local_tid_226879)] =\n                x_209871;\n            ((__local\n              float *) red_arr_mem_226891)[sext_i32_i64(local_tid_226879)] =\n                x_209872;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_226928;\n        int32_t skip_waves_226929 = 1;\n        float x_226912;\n        float x_226913;\n        float x_226914;\n        float x_226915;\n        float x_226916;\n        float x_226917;\n        float x_226918;\n        float x_226919;\n        float x_226920;\n        float x_226921;\n        \n        offset_226928 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_226879,\n                      sext_i64_i32(segred_group_sizze_209855))) {\n                x_226912 = ((__local\n                             float *) red_arr_mem_226883)[sext_i32_i64(local_tid_226879 +\n                                                          offset_226928)];\n                x_226913 = ((__local\n                             float *) red_arr_mem_226885)[sext_i32_i64(local_tid_226879 +\n                                                          offset_226928)];\n                x_226914",
            " = ((__local\n                             float *) red_arr_mem_226887)[sext_i32_i64(local_tid_226879 +\n                                                          offset_226928)];\n                x_226915 = ((__local\n                             float *) red_arr_mem_226889)[sext_i32_i64(local_tid_226879 +\n                                                          offset_226928)];\n                x_226916 = ((__local\n                             float *) red_arr_mem_226891)[sext_i32_i64(local_tid_226879 +\n                                                          offset_226928)];\n            }\n        }\n        offset_226928 = 1;\n        while (slt32(offset_226928, wave_sizze_226881)) {\n            if (slt32(local_tid_226879 + offset_226928,\n                      sext_i64_i32(segred_group_sizze_209855)) &&\n                ((local_tid_226879 - squot32(local_tid_226879,\n                                             wave_sizze_226881) *\n                  wave_sizze_226881) & (2 * offset_226928 - 1)) == 0) {\n                // read array element\n                {\n                    x_226917 = ((volatile __local\n                                 float *) red_arr_mem_226883)[sext_i32_i64(local_tid_226879 +\n                                                              offset_226928)];\n                    x_226918 = ((volatile __local\n                                 float *) red_arr_mem_226885)[sext_i32_i64(local_tid_226879 +\n                                                              offset_226928)];\n                    x_226919 = ((volatile __local\n                                 float *) red_arr_mem_226887)[sext_i32_i64(local_tid_226879 +\n                                                              offset_226928)];\n                    x_226920 = ((volatile __local\n                                 float *) red_arr_mem_226889)[sext_i32_i64(local_tid_226879 +\n                                                              offset_226928)];\n                    x_226921 = ((volat",
            "ile __local\n                                 float *) red_arr_mem_226891)[sext_i32_i64(local_tid_226879 +\n                                                              offset_226928)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_226922 = x_226912 + x_226917;\n                    float defunc_1_op_res_226923 = x_226913 + x_226918;\n                    float defunc_1_op_res_226924 = x_226914 + x_226919;\n                    float defunc_1_op_res_226925 = x_226915 + x_226920;\n                    float defunc_1_op_res_226926 = x_226916 + x_226921;\n                    \n                    x_226912 = defunc_1_op_res_226922;\n                    x_226913 = defunc_1_op_res_226923;\n                    x_226914 = defunc_1_op_res_226924;\n                    x_226915 = defunc_1_op_res_226925;\n                    x_226916 = defunc_1_op_res_226926;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_226883)[sext_i32_i64(local_tid_226879)] =\n                        x_226912;\n                    ((volatile __local\n                      float *) red_arr_mem_226885)[sext_i32_i64(local_tid_226879)] =\n                        x_226913;\n                    ((volatile __local\n                      float *) red_arr_mem_226887)[sext_i32_i64(local_tid_226879)] =\n                        x_226914;\n                    ((volatile __local\n                      float *) red_arr_mem_226889)[sext_i32_i64(local_tid_226879)] =\n                        x_226915;\n                    ((volatile __local\n                      float *) red_arr_mem_226891)[sext_i32_i64(local_tid_226879)] =\n                        x_226916;\n                }\n            }\n            offset_226928 *= 2;\n        }\n        while (slt32(skip_waves_226929,\n                     squot32(sext_i64_i32(segred_group_sizze_209855) +\n                      ",
            "       wave_sizze_226881 - 1, wave_sizze_226881))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_226928 = skip_waves_226929 * wave_sizze_226881;\n            if (slt32(local_tid_226879 + offset_226928,\n                      sext_i64_i32(segred_group_sizze_209855)) &&\n                ((local_tid_226879 - squot32(local_tid_226879,\n                                             wave_sizze_226881) *\n                  wave_sizze_226881) == 0 && (squot32(local_tid_226879,\n                                                      wave_sizze_226881) & (2 *\n                                                                            skip_waves_226929 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_226917 = ((__local\n                                 float *) red_arr_mem_226883)[sext_i32_i64(local_tid_226879 +\n                                                              offset_226928)];\n                    x_226918 = ((__local\n                                 float *) red_arr_mem_226885)[sext_i32_i64(local_tid_226879 +\n                                                              offset_226928)];\n                    x_226919 = ((__local\n                                 float *) red_arr_mem_226887)[sext_i32_i64(local_tid_226879 +\n                                                              offset_226928)];\n                    x_226920 = ((__local\n                                 float *) red_arr_mem_226889)[sext_i32_i64(local_tid_226879 +\n                                                              offset_226928)];\n                    x_226921 = ((__local\n                                 float *) red_arr_mem_226891)[sext_i32_i64(local_tid_226879 +\n                                                              offset_226928)];\n                }\n                // apply reduction operation\n                {\n                    float ",
            "defunc_1_op_res_226922 = x_226912 + x_226917;\n                    float defunc_1_op_res_226923 = x_226913 + x_226918;\n                    float defunc_1_op_res_226924 = x_226914 + x_226919;\n                    float defunc_1_op_res_226925 = x_226915 + x_226920;\n                    float defunc_1_op_res_226926 = x_226916 + x_226921;\n                    \n                    x_226912 = defunc_1_op_res_226922;\n                    x_226913 = defunc_1_op_res_226923;\n                    x_226914 = defunc_1_op_res_226924;\n                    x_226915 = defunc_1_op_res_226925;\n                    x_226916 = defunc_1_op_res_226926;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_226883)[sext_i32_i64(local_tid_226879)] =\n                        x_226912;\n                    ((__local\n                      float *) red_arr_mem_226885)[sext_i32_i64(local_tid_226879)] =\n                        x_226913;\n                    ((__local\n                      float *) red_arr_mem_226887)[sext_i32_i64(local_tid_226879)] =\n                        x_226914;\n                    ((__local\n                      float *) red_arr_mem_226889)[sext_i32_i64(local_tid_226879)] =\n                        x_226915;\n                    ((__local\n                      float *) red_arr_mem_226891)[sext_i32_i64(local_tid_226879)] =\n                        x_226916;\n                }\n            }\n            skip_waves_226929 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_226879) == (int64_t) 0) {\n                x_acc_226906 = x_226912;\n                x_acc_226907 = x_226913;\n                x_acc_226908 = x_226914;\n                x_acc_226909 = x_226915;\n                x_acc_226910 = x_226916;\n            }\n        }\n        if (groups_per_segment_226861 == (int64_t) 1) {\n            ",
            "// first thread in group saves final result to memory\n            {\n                if (local_tid_226879 == 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_226906;\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_226907;\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_226908;\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_226909;\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_226910;\n                }\n            }\n        } else {\n            int32_t old",
            "_counter_226930;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_226879 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_226866)[sext_i32_i64(virt_group_id_226897)] =\n                        x_acc_226906;\n                    ((__global\n                      float *) segred_tmp_mem_226868)[sext_i32_i64(virt_group_id_226897)] =\n                        x_acc_226907;\n                    ((__global\n                      float *) segred_tmp_mem_226870)[sext_i32_i64(virt_group_id_226897)] =\n                        x_acc_226908;\n                    ((__global\n                      float *) segred_tmp_mem_226872)[sext_i32_i64(virt_group_id_226897)] =\n                        x_acc_226909;\n                    ((__global\n                      float *) segred_tmp_mem_226874)[sext_i32_i64(virt_group_id_226897)] =\n                        x_acc_226910;\n                    mem_fence_global();\n                    old_counter_226930 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226876)[sext_i32_i64(srem32(flat_segment_id_226898,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_226893)[(int64_t) 0] =\n                        old_counter_226930 == groups_per_segment_226861 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_226931;\n            \n            is_last_group_226931 = ((__local\n                                     bool *) sync_arr_mem_226893)[(int64_t) 0];\n            if (is_last_group_226931) {\n                if (local_tid_226879 == 0) {\n                    old_counter_22",
            "6930 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226876)[sext_i32_i64(srem32(flat_segment_id_226898,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_226861));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_226932 =\n                            sdiv_up64(groups_per_segment_226861,\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_226933 = 0; i_226933 <\n                         read_per_thread_226932; i_226933++) {\n                        int64_t group_res_id_226934 =\n                                sext_i32_i64(local_tid_226879) *\n                                read_per_thread_226932 + i_226933;\n                        int64_t index_of_group_res_226935 =\n                                sext_i32_i64(flat_segment_id_226898) *\n                                groups_per_segment_226861 + group_res_id_226934;\n                        \n                        if (slt64(group_res_id_226934,\n                                  groups_per_segment_226861)) {\n                            x_209873 = ((__global\n                                         float *) segred_tmp_mem_226866)[index_of_group_res_226935];\n                            x_209874 = ((__global\n                                         float *) segred_tmp_mem_226868)[index_of_group_res_226935];\n                            x_209875 = ((__global\n                                         float *)",
            " segred_tmp_mem_226870)[index_of_group_res_226935];\n                            x_209876 = ((__global\n                                         float *) segred_tmp_mem_226872)[index_of_group_res_226935];\n                            x_209877 = ((__global\n                                         float *) segred_tmp_mem_226874)[index_of_group_res_226935];\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_226883)[sext_i32_i64(local_tid_226879)] =\n                    x_209868;\n                ((__local\n                  float *) red_arr_mem_226885)[sext_i32_i64(local_tid_226879)] =\n                    x_209869;\n                ((__local\n                  float *) red_arr_mem_226887)[sext_i32_i64(local_tid_226879)] =\n                    x_209870;\n                ((__local\n                  float *) red_arr_mem_226889)[sext_i32_i64(local_tid_226879)] =\n                    x_209871;\n                ((__local\n                  float *) red_arr_mem_226891)[sext_i32_i64(local_tid_226879)] =\n                    x_209872;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n          ",
            "          int32_t offset_226936;\n                    int32_t skip_waves_226937 = 1;\n                    float x_226912;\n                    float x_226913;\n                    float x_226914;\n                    float x_226915;\n                    float x_226916;\n                    float x_226917;\n                    float x_226918;\n                    float x_226919;\n                    float x_226920;\n                    float x_226921;\n                    \n                    offset_226936 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_226879,\n                                  sext_i64_i32(segred_group_sizze_209855))) {\n                            x_226912 = ((__local\n                                         float *) red_arr_mem_226883)[sext_i32_i64(local_tid_226879 +\n                                                                      offset_226936)];\n                            x_226913 = ((__local\n                                         float *) red_arr_mem_226885)[sext_i32_i64(local_tid_226879 +\n                                                                      offset_226936)];\n                            x_226914 = ((__local\n                                         float *) red_arr_mem_226887)[sext_i32_i64(local_tid_226879 +\n                                                                      offset_226936)];\n                            x_226915 = ((__local\n                                         float *) red_arr_mem_226889)[sext_i32_i64(local_tid_226879 +\n                                                                      offset_226936)];\n                            x_226916 = ((__local\n                                         float *) red_arr_mem_226891)[sext_i32_i64(local_tid_226879 +\n                                                                      offset_226936)];\n                        }\n                    }\n                    offset_226936 = ",
            "1;\n                    while (slt32(offset_226936, wave_sizze_226881)) {\n                        if (slt32(local_tid_226879 + offset_226936,\n                                  sext_i64_i32(segred_group_sizze_209855)) &&\n                            ((local_tid_226879 - squot32(local_tid_226879,\n                                                         wave_sizze_226881) *\n                              wave_sizze_226881) & (2 * offset_226936 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_226917 = ((volatile __local\n                                             float *) red_arr_mem_226883)[sext_i32_i64(local_tid_226879 +\n                                                                          offset_226936)];\n                                x_226918 = ((volatile __local\n                                             float *) red_arr_mem_226885)[sext_i32_i64(local_tid_226879 +\n                                                                          offset_226936)];\n                                x_226919 = ((volatile __local\n                                             float *) red_arr_mem_226887)[sext_i32_i64(local_tid_226879 +\n                                                                          offset_226936)];\n                                x_226920 = ((volatile __local\n                                             float *) red_arr_mem_226889)[sext_i32_i64(local_tid_226879 +\n                                                                          offset_226936)];\n                                x_226921 = ((volatile __local\n                                             float *) red_arr_mem_226891)[sext_i32_i64(local_tid_226879 +\n                                                                          offset_226936)];\n                            }\n                            // apply reduction operation\n                            {\n                        ",
            "        float defunc_1_op_res_226922 = x_226912 +\n                                      x_226917;\n                                float defunc_1_op_res_226923 = x_226913 +\n                                      x_226918;\n                                float defunc_1_op_res_226924 = x_226914 +\n                                      x_226919;\n                                float defunc_1_op_res_226925 = x_226915 +\n                                      x_226920;\n                                float defunc_1_op_res_226926 = x_226916 +\n                                      x_226921;\n                                \n                                x_226912 = defunc_1_op_res_226922;\n                                x_226913 = defunc_1_op_res_226923;\n                                x_226914 = defunc_1_op_res_226924;\n                                x_226915 = defunc_1_op_res_226925;\n                                x_226916 = defunc_1_op_res_226926;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_226883)[sext_i32_i64(local_tid_226879)] =\n                                    x_226912;\n                                ((volatile __local\n                                  float *) red_arr_mem_226885)[sext_i32_i64(local_tid_226879)] =\n                                    x_226913;\n                                ((volatile __local\n                                  float *) red_arr_mem_226887)[sext_i32_i64(local_tid_226879)] =\n                                    x_226914;\n                                ((volatile __local\n                                  float *) red_arr_mem_226889)[sext_i32_i64(local_tid_226879)] =\n                                    x_226915;\n                                ((volatile __local\n                                  float *) red_arr_mem_226891)[sext_i32_i64(local_tid_226879)] =\n     ",
            "                               x_226916;\n                            }\n                        }\n                        offset_226936 *= 2;\n                    }\n                    while (slt32(skip_waves_226937,\n                                 squot32(sext_i64_i32(segred_group_sizze_209855) +\n                                         wave_sizze_226881 - 1,\n                                         wave_sizze_226881))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_226936 = skip_waves_226937 * wave_sizze_226881;\n                        if (slt32(local_tid_226879 + offset_226936,\n                                  sext_i64_i32(segred_group_sizze_209855)) &&\n                            ((local_tid_226879 - squot32(local_tid_226879,\n                                                         wave_sizze_226881) *\n                              wave_sizze_226881) == 0 &&\n                             (squot32(local_tid_226879, wave_sizze_226881) &\n                              (2 * skip_waves_226937 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_226917 = ((__local\n                                             float *) red_arr_mem_226883)[sext_i32_i64(local_tid_226879 +\n                                                                          offset_226936)];\n                                x_226918 = ((__local\n                                             float *) red_arr_mem_226885)[sext_i32_i64(local_tid_226879 +\n                                                                          offset_226936)];\n                                x_226919 = ((__local\n                                             float *) red_arr_mem_226887)[sext_i32_i64(local_tid_226879 +\n                                                                          offset_226936)];\n                                x_226920 = ((__local\n                                             float *) red",
            "_arr_mem_226889)[sext_i32_i64(local_tid_226879 +\n                                                                          offset_226936)];\n                                x_226921 = ((__local\n                                             float *) red_arr_mem_226891)[sext_i32_i64(local_tid_226879 +\n                                                                          offset_226936)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_226922 = x_226912 +\n                                      x_226917;\n                                float defunc_1_op_res_226923 = x_226913 +\n                                      x_226918;\n                                float defunc_1_op_res_226924 = x_226914 +\n                                      x_226919;\n                                float defunc_1_op_res_226925 = x_226915 +\n                                      x_226920;\n                                float defunc_1_op_res_226926 = x_226916 +\n                                      x_226921;\n                                \n                                x_226912 = defunc_1_op_res_226922;\n                                x_226913 = defunc_1_op_res_226923;\n                                x_226914 = defunc_1_op_res_226924;\n                                x_226915 = defunc_1_op_res_226925;\n                                x_226916 = defunc_1_op_res_226926;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_226883)[sext_i32_i64(local_tid_226879)] =\n                                    x_226912;\n                                ((__local\n                                  float *) red_arr_mem_226885)[sext_i32_i64(local_tid_226879)] =\n                                    x_226913;\n                            ",
            "    ((__local\n                                  float *) red_arr_mem_226887)[sext_i32_i64(local_tid_226879)] =\n                                    x_226914;\n                                ((__local\n                                  float *) red_arr_mem_226889)[sext_i32_i64(local_tid_226879)] =\n                                    x_226915;\n                                ((__local\n                                  float *) red_arr_mem_226891)[sext_i32_i64(local_tid_226879)] =\n                                    x_226916;\n                            }\n                        }\n                        skip_waves_226937 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_226879 == 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_226912;\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_226913;\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_226914;\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_226915;\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_226916;\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                                        uint sync_arr_mem_227007_backing_offset_0,\n                                        uint red_arr_mem_227005_backing_offset_1,\n                                        uint red_arr_mem_227003_backing_offset_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_226987,\n                                        int64_t elements_per_thread_226988,\n                                        int64_t virt_num_groups_226989,\n                                        int64_t threads_per_segment_226991,\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 unsigned 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_226992,\n                                        __global\n                                        unsigned char *segred_tmp_mem_226994,\n                                        __global\n                                        unsigned char *mainzicounter_mem_226996)\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    volatile unsigned char *sync_arr_mem_227007_backing_2 =\n                           &shared_mem[sync_arr_mem_227007_backing_offset_0];\n    volatile unsigned char *red_arr_mem_227005_backing_1 =\n                           &shared_mem[red_arr_mem_227005_backing_offset_1];\n    volatile unsigned char *red_arr_mem_227003_backing_0 =\n                           &shared_mem[red_arr_mem_227003_backing_offset_2];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226998;\n    int32_t local_tid_226999;\n    int64_t group_sizze_227002;\n    int32_t wave_sizze_227001;\n    int32_t group_tid_227000;\n    \n    global_tid_226998 = get_global_id(0);\n    local_tid_226999 = get_local_id(0);\n    group_sizze_227002 = get_local_size(0);\n    wave_sizze_227001 = LOCKSTEP_WIDTH;\n    group_tid_227000 = get_group_id(0);\n    \n    int32_t phys_tid_209990 = global_tid_226998;\n    __local unsigned char *red_arr_mem_227003;\n    \n    red_arr_mem_227003 = (__local unsigned char *) red_arr_mem_227003_backing_0;\n    \n    __local unsigned char *red_arr_mem_227005;\n    \n    red_arr_mem_227005 = (__local unsigned char *) red_arr_mem_227005_backing_1;\n    \n    __local unsigned char *sync_arr_mem_227007;\n    \n    sync_arr_mem_227007 = (__local\n                           unsigned char *) sync_arr_mem_227007_backing_2;\n    \n    int32_t phys_group_id_227009;\n    \n    phys_group_id_227009 = get_group_id(0);\n    for (int32_t i_227010 = 0; i_227010 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_226989) - phys_group_id_227009,\n                   sext_i64_i32(num_groups_209982)); i_227010++) {\n        int32_t virt_group_id_227011 = phys_group_id_227009 + i_227010 *\n                sext_i64_i32(num_groups_209982);\n        int32_t flat_segment_id_227012 = squot32(virt_group_id_227011,\n                                                 sext_i64_i32(groups_per_segment_226987));\n        int64_t global_tid_227013 = srem64(sext_i32_i64(v",
            "irt_group_id_227011) *\n                                           segred_group_sizze_209981 +\n                                           sext_i32_i64(local_tid_226999),\n                                           segred_group_sizze_209981 *\n                                           groups_per_segment_226987);\n        int64_t slice_227014 = s_n_m_196745;\n        int64_t slice_227015 = n_p_196694 * slice_227014;\n        int64_t slice_227016 = m_196691 * slice_227015;\n        int64_t gtid_209986 = squot64(sext_i32_i64(flat_segment_id_227012),\n                                      slice_227015);\n        int64_t remnant_227017 = sext_i32_i64(flat_segment_id_227012) -\n                gtid_209986 * slice_227015;\n        int64_t gtid_209987 = squot64(remnant_227017, slice_227014);\n        int64_t remnant_227018 = remnant_227017 - gtid_209987 * slice_227014;\n        int64_t gtid_209988 = remnant_227018;\n        int64_t remnant_227019 = remnant_227018 - gtid_209988;\n        int64_t gtid_209989;\n        float x_acc_227020;\n        float x_acc_227021;\n        int64_t chunk_sizze_227022 = smin64(elements_per_thread_226988,\n                                            sdiv_up64(q_s_196695 -\n                                                      global_tid_227013,\n                                                      threads_per_segment_226991));\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_227020 = 0.0F;\n            x_acc_227021 = 0.0F;\n        }\n        for (int64_t i_227029 = 0; i_227029 < chunk_sizze_227022; i_227029++) {\n            gtid_209989 = global_tid_227013 + threads_per_segment_226991 *\n                i_227029;\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) 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_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_227020;\n                    x_209992 = x_acc_227021;\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_227020 = defunc_1_op_res_209995;\n                        x_acc_227021 = 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_227020;\n            x_209992 = x_acc_227021;\n            ((__local\n              float *) red_arr_mem_227003)[sext_i32_i64(local_tid_226999)] =\n                x_209991;\n            ((__local\n              float *) red_arr_mem_227005)[sext_i32_i64(local_tid_226999)] =\n                x_209992;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_227030;\n        int32_t skip_waves_227031 = 1;\n        float x_227023;\n        float x_227024;\n        float x_227025;\n        float x_227026;\n        \n        offset_227030 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_226999,\n                      sext_i64_i32(segred_group_sizze_209981))) {\n                x_227023 = ((__local\n                             float *) red_arr_mem_227003)[sext_i32_i64(local_tid_226999 +\n                                                          offset_227030)];\n                x_227024 = ((__local\n                             float *) red_arr_mem_227005)[sext_i32_i64(local_tid_226999 +\n                                                          offset_227030)];\n            }\n        }\n        offset_227030 = 1;\n        while (slt32(offset_227030, wave_sizze_227001)) {\n            if (slt32(local_tid_226999 + offset_227030,\n                      sext_i64_i32(segred_group_sizze_209981)) &&\n                ((local_tid_226999 - squot32(local_tid_226999,\n                                             wave_sizze",
            "_227001) *\n                  wave_sizze_227001) & (2 * offset_227030 - 1)) == 0) {\n                // read array element\n                {\n                    x_227025 = ((volatile __local\n                                 float *) red_arr_mem_227003)[sext_i32_i64(local_tid_226999 +\n                                                              offset_227030)];\n                    x_227026 = ((volatile __local\n                                 float *) red_arr_mem_227005)[sext_i32_i64(local_tid_226999 +\n                                                              offset_227030)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227027 = x_227023 + x_227025;\n                    float defunc_1_op_res_227028 = x_227024 + x_227026;\n                    \n                    x_227023 = defunc_1_op_res_227027;\n                    x_227024 = defunc_1_op_res_227028;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_227003)[sext_i32_i64(local_tid_226999)] =\n                        x_227023;\n                    ((volatile __local\n                      float *) red_arr_mem_227005)[sext_i32_i64(local_tid_226999)] =\n                        x_227024;\n                }\n            }\n            offset_227030 *= 2;\n        }\n        while (slt32(skip_waves_227031,\n                     squot32(sext_i64_i32(segred_group_sizze_209981) +\n                             wave_sizze_227001 - 1, wave_sizze_227001))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_227030 = skip_waves_227031 * wave_sizze_227001;\n            if (slt32(local_tid_226999 + offset_227030,\n                      sext_i64_i32(segred_group_sizze_209981)) &&\n                ((local_tid_226999 - squot32(local_tid_226999,\n                                             wave_sizze_227001) *\n                  wave_sizze_227001) == 0 ",
            "&& (squot32(local_tid_226999,\n                                                      wave_sizze_227001) & (2 *\n                                                                            skip_waves_227031 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_227025 = ((__local\n                                 float *) red_arr_mem_227003)[sext_i32_i64(local_tid_226999 +\n                                                              offset_227030)];\n                    x_227026 = ((__local\n                                 float *) red_arr_mem_227005)[sext_i32_i64(local_tid_226999 +\n                                                              offset_227030)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227027 = x_227023 + x_227025;\n                    float defunc_1_op_res_227028 = x_227024 + x_227026;\n                    \n                    x_227023 = defunc_1_op_res_227027;\n                    x_227024 = defunc_1_op_res_227028;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_227003)[sext_i32_i64(local_tid_226999)] =\n                        x_227023;\n                    ((__local\n                      float *) red_arr_mem_227005)[sext_i32_i64(local_tid_226999)] =\n                        x_227024;\n                }\n            }\n            skip_waves_227031 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_226999) == (int64_t) 0) {\n                x_acc_227020 = x_227023;\n                x_acc_227021 = x_227024;\n            }\n        }\n        if (groups_per_segment_226987 == (int64_t) 1) {\n            // first thread in group saves final result to m",
            "emory\n            {\n                if (local_tid_226999 == 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_227020;\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_227021;\n                }\n            }\n        } else {\n            int32_t old_counter_227032;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_226999 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_226992)[sext_i32_i64(virt_group_id_227011)] =\n                        x_acc_227020;\n                    ((__global\n                      float *) segred_tmp_mem_226994)[sext_i32_i64(virt_group_id_227011)] =\n                        x_acc_227021;\n                    mem_fence_global();\n                    old_counter_227032 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226996)[sext_i32_i64(srem32(flat_segment_id_227012,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_227007)[(int64_t) 0] =\n                        old_counter_227032 == groups_per_segment_226987 -\n                        (int64_t) 1;\n                }\n        ",
            "    }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_227033;\n            \n            is_last_group_227033 = ((__local\n                                     bool *) sync_arr_mem_227007)[(int64_t) 0];\n            if (is_last_group_227033) {\n                if (local_tid_226999 == 0) {\n                    old_counter_227032 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226996)[sext_i32_i64(srem32(flat_segment_id_227012,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_226987));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_227034 =\n                            sdiv_up64(groups_per_segment_226987,\n                                      segred_group_sizze_209981);\n                    \n                    x_209991 = 0.0F;\n                    x_209992 = 0.0F;\n                    for (int64_t i_227035 = 0; i_227035 <\n                         read_per_thread_227034; i_227035++) {\n                        int64_t group_res_id_227036 =\n                                sext_i32_i64(local_tid_226999) *\n                                read_per_thread_227034 + i_227035;\n                        int64_t index_of_group_res_227037 =\n                                sext_i32_i64(flat_segment_id_227012) *\n                                groups_per_segment_226987 + group_res_id_227036;\n                        \n                        if (slt64(group_res_id_227036,\n                                  groups_per_segment_226987)) {\n                            x_209993 = ((__global\n                                         float *) segred_tmp_mem_226992)[index_of_",
            "group_res_227037];\n                            x_209994 = ((__global\n                                         float *) segred_tmp_mem_226994)[index_of_group_res_227037];\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_227003)[sext_i32_i64(local_tid_226999)] =\n                    x_209991;\n                ((__local\n                  float *) red_arr_mem_227005)[sext_i32_i64(local_tid_226999)] =\n                    x_209992;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_227038;\n                    int32_t skip_waves_227039 = 1;\n                    float x_227023;\n                    float x_227024;\n                    float x_227025;\n                    float x_227026;\n                    \n                    offset_227038 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_226999,\n                                  sext_i64_i32(segred_group_sizze_209981))) {\n                            x_227023 = ((__local\n                                         float *) red_arr_mem_227003)[sext_i32_i64(local_tid_226999 +\n                                                                      offset_227038)];\n                            x_227024 = ((__local\n                                         float *) red_arr_mem_227005)[sext_i32_i64(local_tid_226999 +\n                                                                      offset_227038)];\n                        }\n            ",
            "        }\n                    offset_227038 = 1;\n                    while (slt32(offset_227038, wave_sizze_227001)) {\n                        if (slt32(local_tid_226999 + offset_227038,\n                                  sext_i64_i32(segred_group_sizze_209981)) &&\n                            ((local_tid_226999 - squot32(local_tid_226999,\n                                                         wave_sizze_227001) *\n                              wave_sizze_227001) & (2 * offset_227038 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_227025 = ((volatile __local\n                                             float *) red_arr_mem_227003)[sext_i32_i64(local_tid_226999 +\n                                                                          offset_227038)];\n                                x_227026 = ((volatile __local\n                                             float *) red_arr_mem_227005)[sext_i32_i64(local_tid_226999 +\n                                                                          offset_227038)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227027 = x_227023 +\n                                      x_227025;\n                                float defunc_1_op_res_227028 = x_227024 +\n                                      x_227026;\n                                \n                                x_227023 = defunc_1_op_res_227027;\n                                x_227024 = defunc_1_op_res_227028;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227003)[sext_i32_i64(local_tid_226999)] =\n                                    x_227023;\n                                (",
            "(volatile __local\n                                  float *) red_arr_mem_227005)[sext_i32_i64(local_tid_226999)] =\n                                    x_227024;\n                            }\n                        }\n                        offset_227038 *= 2;\n                    }\n                    while (slt32(skip_waves_227039,\n                                 squot32(sext_i64_i32(segred_group_sizze_209981) +\n                                         wave_sizze_227001 - 1,\n                                         wave_sizze_227001))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_227038 = skip_waves_227039 * wave_sizze_227001;\n                        if (slt32(local_tid_226999 + offset_227038,\n                                  sext_i64_i32(segred_group_sizze_209981)) &&\n                            ((local_tid_226999 - squot32(local_tid_226999,\n                                                         wave_sizze_227001) *\n                              wave_sizze_227001) == 0 &&\n                             (squot32(local_tid_226999, wave_sizze_227001) &\n                              (2 * skip_waves_227039 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_227025 = ((__local\n                                             float *) red_arr_mem_227003)[sext_i32_i64(local_tid_226999 +\n                                                                          offset_227038)];\n                                x_227026 = ((__local\n                                             float *) red_arr_mem_227005)[sext_i32_i64(local_tid_226999 +\n                                                                          offset_227038)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227027 = x_227023 +\n                                      x_227025;\n ",
            "                               float defunc_1_op_res_227028 = x_227024 +\n                                      x_227026;\n                                \n                                x_227023 = defunc_1_op_res_227027;\n                                x_227024 = defunc_1_op_res_227028;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_227003)[sext_i32_i64(local_tid_226999)] =\n                                    x_227023;\n                                ((__local\n                                  float *) red_arr_mem_227005)[sext_i32_i64(local_tid_226999)] =\n                                    x_227024;\n                            }\n                        }\n                        skip_waves_227039 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_226999 == 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_227023;\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_227024;\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                                        uint sync_arr_mem_227200_backing_offset_0,\n                                        uint red_arr_mem_227198_backing_offset_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_227184,\n                                        int64_t elements_per_thread_227185,\n                                        int64_t virt_num_groups_227186,\n                                        int64_t threads_per_segment_227188,\n                                        __global unsigned char *mem_223557,\n                                        __global unsigned char *mem_223568,\n                                        __global\n                                        unsigned char *segred_tmp_mem_227189,\n                                        __global\n                                        unsigned char *mainzicounter_mem_227191)\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    volatile unsigned char *sync_arr_mem_227200_backing_1 =\n                           &shared_mem[sync_arr_mem_227200_backing_offset_0];\n    volatile unsigned char *red_arr_mem_227198_backing_0 =\n                           &shared_mem[red_arr_mem_227198_backing_offset_1];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227193;\n    int32_t local_tid_227194;\n    int64_t group_sizze_227197;\n    int32_t ",
            "wave_sizze_227196;\n    int32_t group_tid_227195;\n    \n    global_tid_227193 = get_global_id(0);\n    local_tid_227194 = get_local_id(0);\n    group_sizze_227197 = get_local_size(0);\n    wave_sizze_227196 = LOCKSTEP_WIDTH;\n    group_tid_227195 = get_group_id(0);\n    \n    int32_t phys_tid_211714 = global_tid_227193;\n    __local unsigned char *red_arr_mem_227198;\n    \n    red_arr_mem_227198 = (__local unsigned char *) red_arr_mem_227198_backing_0;\n    \n    __local unsigned char *sync_arr_mem_227200;\n    \n    sync_arr_mem_227200 = (__local\n                           unsigned char *) sync_arr_mem_227200_backing_1;\n    \n    int32_t phys_group_id_227202;\n    \n    phys_group_id_227202 = get_group_id(0);\n    for (int32_t i_227203 = 0; i_227203 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_227186) - phys_group_id_227202,\n                   sext_i64_i32(num_groups_211709)); i_227203++) {\n        int32_t virt_group_id_227204 = phys_group_id_227202 + i_227203 *\n                sext_i64_i32(num_groups_211709);\n        int32_t flat_segment_id_227205 = squot32(virt_group_id_227204,\n                                                 sext_i64_i32(groups_per_segment_227184));\n        int64_t global_tid_227206 = srem64(sext_i32_i64(virt_group_id_227204) *\n                                           segred_group_sizze_211708 +\n                                           sext_i32_i64(local_tid_227194),\n                                           segred_group_sizze_211708 *\n                                           groups_per_segment_227184);\n        int64_t slice_227207 = m_196691;\n        int64_t gtid_211712 = sext_i32_i64(flat_segment_id_227205);\n        int64_t remnant_227208 = sext_i32_i64(flat_segment_id_227205) -\n                gtid_211712;\n        int64_t gtid_211713;\n        float x_acc_227209;\n        int64_t chunk_sizze_227210 = smin64(elements_per_thread_227185,\n                                            sdiv_up64(n_p_196694 -\n                                                  ",
            "    global_tid_227206,\n                                                      threads_per_segment_227188));\n        float x_211715;\n        float x_211716;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_227209 = 0.0F;\n        }\n        for (int64_t i_227214 = 0; i_227214 < chunk_sizze_227210; i_227214++) {\n            gtid_211713 = global_tid_227206 + threads_per_segment_227188 *\n                i_227214;\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_227209;\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_227209 = 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_227209;\n            ((__local\n              float *) red_arr_mem_227198)[sext_i32_i64(local_tid_227194)] =\n                x_211715;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_227215;\n        int32_t skip_waves_227216 = 1;\n        float x_227211;\n        float x_227212;\n        \n        offset_227215 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_227194,\n                      sext_i64_i32(segred",
            "_group_sizze_211708))) {\n                x_227211 = ((__local\n                             float *) red_arr_mem_227198)[sext_i32_i64(local_tid_227194 +\n                                                          offset_227215)];\n            }\n        }\n        offset_227215 = 1;\n        while (slt32(offset_227215, wave_sizze_227196)) {\n            if (slt32(local_tid_227194 + offset_227215,\n                      sext_i64_i32(segred_group_sizze_211708)) &&\n                ((local_tid_227194 - squot32(local_tid_227194,\n                                             wave_sizze_227196) *\n                  wave_sizze_227196) & (2 * offset_227215 - 1)) == 0) {\n                // read array element\n                {\n                    x_227212 = ((volatile __local\n                                 float *) red_arr_mem_227198)[sext_i32_i64(local_tid_227194 +\n                                                              offset_227215)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227213 = x_227211 + x_227212;\n                    \n                    x_227211 = defunc_1_op_res_227213;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_227198)[sext_i32_i64(local_tid_227194)] =\n                        x_227211;\n                }\n            }\n            offset_227215 *= 2;\n        }\n        while (slt32(skip_waves_227216,\n                     squot32(sext_i64_i32(segred_group_sizze_211708) +\n                             wave_sizze_227196 - 1, wave_sizze_227196))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_227215 = skip_waves_227216 * wave_sizze_227196;\n            if (slt32(local_tid_227194 + offset_227215,\n                      sext_i64_i32(segred_group_sizze_211708)) &&\n                ((local_tid_227194 - squot32(local_tid_227194,\n                                        ",
            "     wave_sizze_227196) *\n                  wave_sizze_227196) == 0 && (squot32(local_tid_227194,\n                                                      wave_sizze_227196) & (2 *\n                                                                            skip_waves_227216 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_227212 = ((__local\n                                 float *) red_arr_mem_227198)[sext_i32_i64(local_tid_227194 +\n                                                              offset_227215)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227213 = x_227211 + x_227212;\n                    \n                    x_227211 = defunc_1_op_res_227213;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_227198)[sext_i32_i64(local_tid_227194)] =\n                        x_227211;\n                }\n            }\n            skip_waves_227216 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_227194) == (int64_t) 0) {\n                x_acc_227209 = x_227211;\n            }\n        }\n        if (groups_per_segment_227184 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_227194 == 0) {\n                    ((__global float *) mem_223568)[gtid_211712] = x_acc_227209;\n                }\n            }\n        } else {\n            int32_t old_counter_227217;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_227194 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_227189",
            ")[sext_i32_i64(virt_group_id_227204)] =\n                        x_acc_227209;\n                    mem_fence_global();\n                    old_counter_227217 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227191)[sext_i32_i64(srem32(flat_segment_id_227205,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_227200)[(int64_t) 0] =\n                        old_counter_227217 == groups_per_segment_227184 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_227218;\n            \n            is_last_group_227218 = ((__local\n                                     bool *) sync_arr_mem_227200)[(int64_t) 0];\n            if (is_last_group_227218) {\n                if (local_tid_227194 == 0) {\n                    old_counter_227217 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227191)[sext_i32_i64(srem32(flat_segment_id_227205,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_227184));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_227219 =\n                            sdiv_up64(groups_per_segment_227184,\n                                      segred_group_sizze_211708);\n                    \n                    x_211715 = 0.0F;\n                    for (int64_t i_227220 = 0; i_227220 <\n                         read_per_thread_22",
            "7219; i_227220++) {\n                        int64_t group_res_id_227221 =\n                                sext_i32_i64(local_tid_227194) *\n                                read_per_thread_227219 + i_227220;\n                        int64_t index_of_group_res_227222 =\n                                sext_i32_i64(flat_segment_id_227205) *\n                                groups_per_segment_227184 + group_res_id_227221;\n                        \n                        if (slt64(group_res_id_227221,\n                                  groups_per_segment_227184)) {\n                            x_211716 = ((__global\n                                         float *) segred_tmp_mem_227189)[index_of_group_res_227222];\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_227198)[sext_i32_i64(local_tid_227194)] =\n                    x_211715;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_227223;\n                    int32_t skip_waves_227224 = 1;\n                    float x_227211;\n                    float x_227212;\n                    \n                    offset_227223 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_227194,\n                                  sext_i64_i32(segred_group_sizze_211708))) {\n                            x_227211 = ((__local\n                                         float *) red_arr_mem_227198)[sext_i32_i64(local_tid_227194 +\n                                                                      offset_227223)];\n                        }\n                    }\n                    offset_227223 = 1",
            ";\n                    while (slt32(offset_227223, wave_sizze_227196)) {\n                        if (slt32(local_tid_227194 + offset_227223,\n                                  sext_i64_i32(segred_group_sizze_211708)) &&\n                            ((local_tid_227194 - squot32(local_tid_227194,\n                                                         wave_sizze_227196) *\n                              wave_sizze_227196) & (2 * offset_227223 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_227212 = ((volatile __local\n                                             float *) red_arr_mem_227198)[sext_i32_i64(local_tid_227194 +\n                                                                          offset_227223)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227213 = x_227211 +\n                                      x_227212;\n                                \n                                x_227211 = defunc_1_op_res_227213;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227198)[sext_i32_i64(local_tid_227194)] =\n                                    x_227211;\n                            }\n                        }\n                        offset_227223 *= 2;\n                    }\n                    while (slt32(skip_waves_227224,\n                                 squot32(sext_i64_i32(segred_group_sizze_211708) +\n                                         wave_sizze_227196 - 1,\n                                         wave_sizze_227196))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_227223 = skip_waves_227224 * wave_sizze_227196;\n          ",
            "              if (slt32(local_tid_227194 + offset_227223,\n                                  sext_i64_i32(segred_group_sizze_211708)) &&\n                            ((local_tid_227194 - squot32(local_tid_227194,\n                                                         wave_sizze_227196) *\n                              wave_sizze_227196) == 0 &&\n                             (squot32(local_tid_227194, wave_sizze_227196) &\n                              (2 * skip_waves_227224 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_227212 = ((__local\n                                             float *) red_arr_mem_227198)[sext_i32_i64(local_tid_227194 +\n                                                                          offset_227223)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227213 = x_227211 +\n                                      x_227212;\n                                \n                                x_227211 = defunc_1_op_res_227213;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_227198)[sext_i32_i64(local_tid_227194)] =\n                                    x_227211;\n                            }\n                        }\n                        skip_waves_227224 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_227194 == 0) {\n                            ((__global float *) mem_223568)[gtid_211712] =\n                                x_227211;\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                                        uint sync_arr_mem_227381_backing_offset_0,\n                                        uint red_arr_mem_227379_backing_offset_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_segment_227365,\n                                        int64_t elements_per_thread_227366,\n                                        int64_t virt_num_groups_227367,\n                                        int64_t threads_per_segment_227369,\n                                        __global unsigned char *mem_223574,\n                                        __global unsigned char *mem_223585,\n                                        __global\n                                        unsigned char *segred_tmp_mem_227370,\n                                        __global\n                                        unsigned char *mainzicounter_mem_227372)\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    volatile unsigned char *sync_arr_mem_227381_backing_1 =\n                           &shared_mem[sync_arr_mem_227381_backing_offset_0];\n    volatile unsigned char *red_arr_mem_227379_backing_0 =\n                           &shared_mem[red_arr_mem_227379_backing_offset_1];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227374;\n    int32_t local_tid_227375;\n    int64_t group_sizze_227378;\n    int32_t wave_sizze_227377;\n    int32_t group_tid_227376;\n    \n    global_tid_227374 = get_global_id(0);\n    local_tid_227375 = get_local_id(0);\n    group_sizze_227378 = ",
            "get_local_size(0);\n    wave_sizze_227377 = LOCKSTEP_WIDTH;\n    group_tid_227376 = get_group_id(0);\n    \n    int32_t phys_tid_211845 = global_tid_227374;\n    __local unsigned char *red_arr_mem_227379;\n    \n    red_arr_mem_227379 = (__local unsigned char *) red_arr_mem_227379_backing_0;\n    \n    __local unsigned char *sync_arr_mem_227381;\n    \n    sync_arr_mem_227381 = (__local\n                           unsigned char *) sync_arr_mem_227381_backing_1;\n    \n    int32_t phys_group_id_227383;\n    \n    phys_group_id_227383 = get_group_id(0);\n    for (int32_t i_227384 = 0; i_227384 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_227367) - phys_group_id_227383,\n                   sext_i64_i32(num_groups_211840)); i_227384++) {\n        int32_t virt_group_id_227385 = phys_group_id_227383 + i_227384 *\n                sext_i64_i32(num_groups_211840);\n        int32_t flat_segment_id_227386 = squot32(virt_group_id_227385,\n                                                 sext_i64_i32(groups_per_segment_227365));\n        int64_t global_tid_227387 = srem64(sext_i32_i64(virt_group_id_227385) *\n                                           segred_group_sizze_211839 +\n                                           sext_i32_i64(local_tid_227375),\n                                           segred_group_sizze_211839 *\n                                           groups_per_segment_227365);\n        int64_t slice_227388 = m_196691;\n        int64_t gtid_211843 = sext_i32_i64(flat_segment_id_227386);\n        int64_t remnant_227389 = sext_i32_i64(flat_segment_id_227386) -\n                gtid_211843;\n        int64_t gtid_211844;\n        float x_acc_227390;\n        int64_t chunk_sizze_227391 = smin64(elements_per_thread_227366,\n                                            sdiv_up64(n_p_196694 -\n                                                      global_tid_227387,\n                                                      threads_per_segment_227369));\n        float x_211846;\n        float x_211847;\n      ",
            "  \n        // neutral-initialise the accumulators\n        {\n            x_acc_227390 = 0.0F;\n        }\n        for (int64_t i_227395 = 0; i_227395 < chunk_sizze_227391; i_227395++) {\n            gtid_211844 = global_tid_227387 + threads_per_segment_227369 *\n                i_227395;\n            // apply map function\n            {\n                float x_211850;\n                \n                x_211850 = ((__global float *) 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_227390;\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_227390 = 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_227390;\n            ((__local\n              float *) red_arr_mem_227379)[sext_i32_i64(local_tid_227375)] =\n                x_211846;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_227396;\n        int32_t skip_waves_227397 = 1;\n        float x_227392;\n        float x_227393;\n        \n        offset_227396 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_227375,\n                      sext_i64_i32(segred_group_sizze_211839))) {\n                x_227392 = ((__local\n                             float *) red_arr_mem_227379)[sext_i32_i64(local_tid_2",
            "27375 +\n                                                          offset_227396)];\n            }\n        }\n        offset_227396 = 1;\n        while (slt32(offset_227396, wave_sizze_227377)) {\n            if (slt32(local_tid_227375 + offset_227396,\n                      sext_i64_i32(segred_group_sizze_211839)) &&\n                ((local_tid_227375 - squot32(local_tid_227375,\n                                             wave_sizze_227377) *\n                  wave_sizze_227377) & (2 * offset_227396 - 1)) == 0) {\n                // read array element\n                {\n                    x_227393 = ((volatile __local\n                                 float *) red_arr_mem_227379)[sext_i32_i64(local_tid_227375 +\n                                                              offset_227396)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227394 = x_227392 + x_227393;\n                    \n                    x_227392 = defunc_1_op_res_227394;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_227379)[sext_i32_i64(local_tid_227375)] =\n                        x_227392;\n                }\n            }\n            offset_227396 *= 2;\n        }\n        while (slt32(skip_waves_227397,\n                     squot32(sext_i64_i32(segred_group_sizze_211839) +\n                             wave_sizze_227377 - 1, wave_sizze_227377))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_227396 = skip_waves_227397 * wave_sizze_227377;\n            if (slt32(local_tid_227375 + offset_227396,\n                      sext_i64_i32(segred_group_sizze_211839)) &&\n                ((local_tid_227375 - squot32(local_tid_227375,\n                                             wave_sizze_227377) *\n                  wave_sizze_227377) == 0 && (squot32(local_tid_227375,\n                                              ",
            "        wave_sizze_227377) & (2 *\n                                                                            skip_waves_227397 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_227393 = ((__local\n                                 float *) red_arr_mem_227379)[sext_i32_i64(local_tid_227375 +\n                                                              offset_227396)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227394 = x_227392 + x_227393;\n                    \n                    x_227392 = defunc_1_op_res_227394;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_227379)[sext_i32_i64(local_tid_227375)] =\n                        x_227392;\n                }\n            }\n            skip_waves_227397 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_227375) == (int64_t) 0) {\n                x_acc_227390 = x_227392;\n            }\n        }\n        if (groups_per_segment_227365 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_227375 == 0) {\n                    ((__global float *) mem_223585)[gtid_211843] = x_acc_227390;\n                }\n            }\n        } else {\n            int32_t old_counter_227398;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_227375 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_227370)[sext_i32_i64(virt_group_id_227385)] =\n                        x_acc_227390;\n                    mem_fence_global();\n                    old_co",
            "unter_227398 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227372)[sext_i32_i64(srem32(flat_segment_id_227386,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_227381)[(int64_t) 0] =\n                        old_counter_227398 == groups_per_segment_227365 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_227399;\n            \n            is_last_group_227399 = ((__local\n                                     bool *) sync_arr_mem_227381)[(int64_t) 0];\n            if (is_last_group_227399) {\n                if (local_tid_227375 == 0) {\n                    old_counter_227398 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227372)[sext_i32_i64(srem32(flat_segment_id_227386,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_227365));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_227400 =\n                            sdiv_up64(groups_per_segment_227365,\n                                      segred_group_sizze_211839);\n                    \n                    x_211846 = 0.0F;\n                    for (int64_t i_227401 = 0; i_227401 <\n                         read_per_thread_227400; i_227401++) {\n                        int64_t group_res_id_227402 =\n                                sext_i32_i64(local_tid_227375) *\n     ",
            "                           read_per_thread_227400 + i_227401;\n                        int64_t index_of_group_res_227403 =\n                                sext_i32_i64(flat_segment_id_227386) *\n                                groups_per_segment_227365 + group_res_id_227402;\n                        \n                        if (slt64(group_res_id_227402,\n                                  groups_per_segment_227365)) {\n                            x_211847 = ((__global\n                                         float *) segred_tmp_mem_227370)[index_of_group_res_227403];\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_227379)[sext_i32_i64(local_tid_227375)] =\n                    x_211846;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_227404;\n                    int32_t skip_waves_227405 = 1;\n                    float x_227392;\n                    float x_227393;\n                    \n                    offset_227404 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_227375,\n                                  sext_i64_i32(segred_group_sizze_211839))) {\n                            x_227392 = ((__local\n                                         float *) red_arr_mem_227379)[sext_i32_i64(local_tid_227375 +\n                                                                      offset_227404)];\n                        }\n                    }\n                    offset_227404 = 1;\n                    while (slt32(offset_227404, wave_sizze_227377)) {\n                        if (slt32(local_tid_227375 + offset_227404,\n    ",
            "                              sext_i64_i32(segred_group_sizze_211839)) &&\n                            ((local_tid_227375 - squot32(local_tid_227375,\n                                                         wave_sizze_227377) *\n                              wave_sizze_227377) & (2 * offset_227404 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_227393 = ((volatile __local\n                                             float *) red_arr_mem_227379)[sext_i32_i64(local_tid_227375 +\n                                                                          offset_227404)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227394 = x_227392 +\n                                      x_227393;\n                                \n                                x_227392 = defunc_1_op_res_227394;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227379)[sext_i32_i64(local_tid_227375)] =\n                                    x_227392;\n                            }\n                        }\n                        offset_227404 *= 2;\n                    }\n                    while (slt32(skip_waves_227405,\n                                 squot32(sext_i64_i32(segred_group_sizze_211839) +\n                                         wave_sizze_227377 - 1,\n                                         wave_sizze_227377))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_227404 = skip_waves_227405 * wave_sizze_227377;\n                        if (slt32(local_tid_227375 + offset_227404,\n                                  sext_i64_i32(segred_group_sizze_211839)) &&\n        ",
            "                    ((local_tid_227375 - squot32(local_tid_227375,\n                                                         wave_sizze_227377) *\n                              wave_sizze_227377) == 0 &&\n                             (squot32(local_tid_227375, wave_sizze_227377) &\n                              (2 * skip_waves_227405 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_227393 = ((__local\n                                             float *) red_arr_mem_227379)[sext_i32_i64(local_tid_227375 +\n                                                                          offset_227404)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227394 = x_227392 +\n                                      x_227393;\n                                \n                                x_227392 = defunc_1_op_res_227394;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_227379)[sext_i32_i64(local_tid_227375)] =\n                                    x_227392;\n                            }\n                        }\n                        skip_waves_227405 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_227375 == 0) {\n                            ((__global float *) mem_223585)[gtid_211843] =\n                                x_227392;\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      ",
            "                                  uint sync_arr_mem_227562_backing_offset_0,\n                                        uint red_arr_mem_227560_backing_offset_1,\n                                        int64_t m_196691,\n                                        int64_t dyn_lifted_single_ma_l_arg_197257,\n                                        int64_t num_groups_211971,\n                                        int64_t groups_per_segment_227546,\n                                        int64_t elements_per_thread_227547,\n                                        int64_t virt_num_groups_227548,\n                                        int64_t threads_per_segment_227550,\n                                        __global unsigned char *mem_223591,\n                                        __global unsigned char *mem_223602,\n                                        __global\n                                        unsigned char *segred_tmp_mem_227551,\n                                        __global\n                                        unsigned char *mainzicounter_mem_227553)\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    volatile unsigned char *sync_arr_mem_227562_backing_1 =\n                           &shared_mem[sync_arr_mem_227562_backing_offset_0];\n    volatile unsigned char *red_arr_mem_227560_backing_0 =\n                           &shared_mem[red_arr_mem_227560_backing_offset_1];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227555;\n    int32_t local_tid_227556;\n    int64_t group_sizze_227559;\n    int32_t wave_sizze_227558;\n    int32_t group_tid_227557;\n    \n    global_tid_227555 = get_global_id(0);\n    local_tid_227556 = get_local_id(0);\n    group_sizze_227559 = get_local_size(0);\n    wave_sizze_227558 = LOCKSTEP_WIDTH;\n    group_tid_227557 = get_group_id(0);\n    \n    int32_t phys_tid_211976 = global_tid_227555;\n    __l",
            "ocal unsigned char *red_arr_mem_227560;\n    \n    red_arr_mem_227560 = (__local unsigned char *) red_arr_mem_227560_backing_0;\n    \n    __local unsigned char *sync_arr_mem_227562;\n    \n    sync_arr_mem_227562 = (__local\n                           unsigned char *) sync_arr_mem_227562_backing_1;\n    \n    int32_t phys_group_id_227564;\n    \n    phys_group_id_227564 = get_group_id(0);\n    for (int32_t i_227565 = 0; i_227565 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_227548) - phys_group_id_227564,\n                   sext_i64_i32(num_groups_211971)); i_227565++) {\n        int32_t virt_group_id_227566 = phys_group_id_227564 + i_227565 *\n                sext_i64_i32(num_groups_211971);\n        int32_t flat_segment_id_227567 = squot32(virt_group_id_227566,\n                                                 sext_i64_i32(groups_per_segment_227546));\n        int64_t global_tid_227568 = srem64(sext_i32_i64(virt_group_id_227566) *\n                                           segred_group_sizze_211970 +\n                                           sext_i32_i64(local_tid_227556),\n                                           segred_group_sizze_211970 *\n                                           groups_per_segment_227546);\n        int64_t slice_227569 = m_196691;\n        int64_t gtid_211974 = sext_i32_i64(flat_segment_id_227567);\n        int64_t remnant_227570 = sext_i32_i64(flat_segment_id_227567) -\n                gtid_211974;\n        int64_t gtid_211975;\n        float x_acc_227571;\n        int64_t chunk_sizze_227572 = smin64(elements_per_thread_227547,\n                                            sdiv_up64((int64_t) 3 -\n                                                      global_tid_227568,\n                                                      threads_per_segment_227550));\n        float x_211977;\n        float x_211978;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_227571 = 0.0F;\n        }\n        for (int64_t i_227576 = 0; i_227576 < chunk_sizz",
            "e_227572; i_227576++) {\n            gtid_211975 = global_tid_227568 + threads_per_segment_227550 *\n                i_227576;\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_227571;\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_227571 = 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_227571;\n            ((__local\n              float *) red_arr_mem_227560)[sext_i32_i64(local_tid_227556)] =\n                x_211977;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_227577;\n        int32_t skip_waves_227578 = 1;\n        float x_227573;\n        float x_227574;\n        \n        offset_227577 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_227556,\n                      sext_i64_i32(segred_group_sizze_211970))) {\n                x_227573 = ((__local\n                             float *) red_arr_mem_227560)[sext_i32_i64(local_tid_227556 +\n                                                          offset_227577)];\n            }\n        }\n        offset_227577 = 1;\n        while (slt32(",
            "offset_227577, wave_sizze_227558)) {\n            if (slt32(local_tid_227556 + offset_227577,\n                      sext_i64_i32(segred_group_sizze_211970)) &&\n                ((local_tid_227556 - squot32(local_tid_227556,\n                                             wave_sizze_227558) *\n                  wave_sizze_227558) & (2 * offset_227577 - 1)) == 0) {\n                // read array element\n                {\n                    x_227574 = ((volatile __local\n                                 float *) red_arr_mem_227560)[sext_i32_i64(local_tid_227556 +\n                                                              offset_227577)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227575 = x_227573 + x_227574;\n                    \n                    x_227573 = defunc_1_op_res_227575;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_227560)[sext_i32_i64(local_tid_227556)] =\n                        x_227573;\n                }\n            }\n            offset_227577 *= 2;\n        }\n        while (slt32(skip_waves_227578,\n                     squot32(sext_i64_i32(segred_group_sizze_211970) +\n                             wave_sizze_227558 - 1, wave_sizze_227558))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_227577 = skip_waves_227578 * wave_sizze_227558;\n            if (slt32(local_tid_227556 + offset_227577,\n                      sext_i64_i32(segred_group_sizze_211970)) &&\n                ((local_tid_227556 - squot32(local_tid_227556,\n                                             wave_sizze_227558) *\n                  wave_sizze_227558) == 0 && (squot32(local_tid_227556,\n                                                      wave_sizze_227558) & (2 *\n                                                                            skip_waves_227578 -\n                         ",
            "                                                   1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_227574 = ((__local\n                                 float *) red_arr_mem_227560)[sext_i32_i64(local_tid_227556 +\n                                                              offset_227577)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227575 = x_227573 + x_227574;\n                    \n                    x_227573 = defunc_1_op_res_227575;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_227560)[sext_i32_i64(local_tid_227556)] =\n                        x_227573;\n                }\n            }\n            skip_waves_227578 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_227556) == (int64_t) 0) {\n                x_acc_227571 = x_227573;\n            }\n        }\n        if (groups_per_segment_227546 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_227556 == 0) {\n                    ((__global float *) mem_223602)[gtid_211974] = x_acc_227571;\n                }\n            }\n        } else {\n            int32_t old_counter_227579;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_227556 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_227551)[sext_i32_i64(virt_group_id_227566)] =\n                        x_acc_227571;\n                    mem_fence_global();\n                    old_counter_227579 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem",
            "_227553)[sext_i32_i64(srem32(flat_segment_id_227567,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_227562)[(int64_t) 0] =\n                        old_counter_227579 == groups_per_segment_227546 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_227580;\n            \n            is_last_group_227580 = ((__local\n                                     bool *) sync_arr_mem_227562)[(int64_t) 0];\n            if (is_last_group_227580) {\n                if (local_tid_227556 == 0) {\n                    old_counter_227579 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227553)[sext_i32_i64(srem32(flat_segment_id_227567,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_227546));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_227581 =\n                            sdiv_up64(groups_per_segment_227546,\n                                      segred_group_sizze_211970);\n                    \n                    x_211977 = 0.0F;\n                    for (int64_t i_227582 = 0; i_227582 <\n                         read_per_thread_227581; i_227582++) {\n                        int64_t group_res_id_227583 =\n                                sext_i32_i64(local_tid_227556) *\n                                read_per_thread_227581 + i_227582;\n                        int64_t index_of_group_res_227584 =\n                                s",
            "ext_i32_i64(flat_segment_id_227567) *\n                                groups_per_segment_227546 + group_res_id_227583;\n                        \n                        if (slt64(group_res_id_227583,\n                                  groups_per_segment_227546)) {\n                            x_211978 = ((__global\n                                         float *) segred_tmp_mem_227551)[index_of_group_res_227584];\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_227560)[sext_i32_i64(local_tid_227556)] =\n                    x_211977;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_227585;\n                    int32_t skip_waves_227586 = 1;\n                    float x_227573;\n                    float x_227574;\n                    \n                    offset_227585 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_227556,\n                                  sext_i64_i32(segred_group_sizze_211970))) {\n                            x_227573 = ((__local\n                                         float *) red_arr_mem_227560)[sext_i32_i64(local_tid_227556 +\n                                                                      offset_227585)];\n                        }\n                    }\n                    offset_227585 = 1;\n                    while (slt32(offset_227585, wave_sizze_227558)) {\n                        if (slt32(local_tid_227556 + offset_227585,\n                                  sext_i64_i32(segred_group_sizze_211970)) &&\n                            ((local_tid_227556 - squot32(local_tid_227556,\n      ",
            "                                                   wave_sizze_227558) *\n                              wave_sizze_227558) & (2 * offset_227585 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_227574 = ((volatile __local\n                                             float *) red_arr_mem_227560)[sext_i32_i64(local_tid_227556 +\n                                                                          offset_227585)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227575 = x_227573 +\n                                      x_227574;\n                                \n                                x_227573 = defunc_1_op_res_227575;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227560)[sext_i32_i64(local_tid_227556)] =\n                                    x_227573;\n                            }\n                        }\n                        offset_227585 *= 2;\n                    }\n                    while (slt32(skip_waves_227586,\n                                 squot32(sext_i64_i32(segred_group_sizze_211970) +\n                                         wave_sizze_227558 - 1,\n                                         wave_sizze_227558))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_227585 = skip_waves_227586 * wave_sizze_227558;\n                        if (slt32(local_tid_227556 + offset_227585,\n                                  sext_i64_i32(segred_group_sizze_211970)) &&\n                            ((local_tid_227556 - squot32(local_tid_227556,\n                                                         wave_sizze_227558) *\n          ",
            "                    wave_sizze_227558) == 0 &&\n                             (squot32(local_tid_227556, wave_sizze_227558) &\n                              (2 * skip_waves_227586 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_227574 = ((__local\n                                             float *) red_arr_mem_227560)[sext_i32_i64(local_tid_227556 +\n                                                                          offset_227585)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227575 = x_227573 +\n                                      x_227574;\n                                \n                                x_227573 = defunc_1_op_res_227575;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_227560)[sext_i32_i64(local_tid_227556)] =\n                                    x_227573;\n                            }\n                        }\n                        skip_waves_227586 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_227556 == 0) {\n                            ((__global float *) mem_223602)[gtid_211974] =\n                                x_227573;\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                                        uint sync_arr_mem_227779_backing_offset_0,\n                                        uint red_arr_mem_227777_backing_offset",
            "_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_227763,\n                                        int64_t elements_per_thread_227764,\n                                        int64_t virt_num_groups_227765,\n                                        int64_t threads_per_segment_227767,\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_227768,\n                                        __global\n                                        unsigned char *mainzicounter_mem_227770)\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    volatile unsigned char *sync_arr_mem_227779_backing_1 =\n                           &shared_mem[sync_arr_mem_227779_backing_offset_0];\n    volatile unsigned char *red_arr_mem_227777_backing_0 =\n                           &shared_mem[red_arr_mem_227777_backing_offset_1];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_2277",
            "72;\n    int32_t local_tid_227773;\n    int64_t group_sizze_227776;\n    int32_t wave_sizze_227775;\n    int32_t group_tid_227774;\n    \n    global_tid_227772 = get_global_id(0);\n    local_tid_227773 = get_local_id(0);\n    group_sizze_227776 = get_local_size(0);\n    wave_sizze_227775 = LOCKSTEP_WIDTH;\n    group_tid_227774 = get_group_id(0);\n    \n    int32_t phys_tid_212598 = global_tid_227772;\n    __local unsigned char *red_arr_mem_227777;\n    \n    red_arr_mem_227777 = (__local unsigned char *) red_arr_mem_227777_backing_0;\n    \n    __local unsigned char *sync_arr_mem_227779;\n    \n    sync_arr_mem_227779 = (__local\n                           unsigned char *) sync_arr_mem_227779_backing_1;\n    \n    int32_t phys_group_id_227781;\n    \n    phys_group_id_227781 = get_group_id(0);\n    for (int32_t i_227782 = 0; i_227782 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_227765) - phys_group_id_227781,\n                   sext_i64_i32(num_groups_212592)); i_227782++) {\n        int32_t virt_group_id_227783 = phys_group_id_227781 + i_227782 *\n                sext_i64_i32(num_groups_212592);\n        int32_t flat_segment_id_227784 = squot32(virt_group_id_227783,\n                                                 sext_i64_i32(groups_per_segment_227763));\n        int64_t global_tid_227785 = srem64(sext_i32_i64(virt_group_id_227783) *\n                                           segred_group_sizze_212591 +\n                                           sext_i32_i64(local_tid_227773),\n                                           segred_group_sizze_212591 *\n                                           groups_per_segment_227763);\n        int64_t slice_227786 = l_n_m_196752;\n        int64_t slice_227787 = m_196691 * slice_227786;\n        int64_t gtid_212595 = squot64(sext_i32_i64(flat_segment_id_227784),\n                                      slice_227786);\n        int64_t remnant_227788 = sext_i32_i64(flat_segment_id_227784) -\n                gtid_212595 * slice_227786;\n        int64_t gtid_212596 = re",
            "mnant_227788;\n        int64_t remnant_227789 = remnant_227788 - gtid_212596;\n        int64_t gtid_212597;\n        float x_acc_227790;\n        int64_t chunk_sizze_227791 = smin64(elements_per_thread_227764,\n                                            sdiv_up64(q_l_196697 -\n                                                      global_tid_227785,\n                                                      threads_per_segment_227767));\n        float x_212599;\n        float x_212600;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_227790 = 0.0F;\n        }\n        for (int64_t i_227795 = 0; i_227795 < chunk_sizze_227791; i_227795++) {\n            gtid_212597 = global_tid_227785 + threads_per_segment_227767 *\n                i_227795;\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(gt",
            "id_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 m",
            "ap-out results\n                { }\n                // load accumulator\n                {\n                    x_212599 = x_acc_227790;\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_227790 = 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_227790;\n            ((__local\n              float *) red_arr_mem_227777)[sext_i32_i64(local_tid_227773)] =\n                x_212599;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_227796;\n        int32_t skip_waves_227797 = 1;\n        float x_227792;\n        float x_227793;\n        \n        offset_227796 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_227773,\n                      sext_i64_i32(segred_group_sizze_212591))) {\n                x_227792 = ((__local\n                             float *) red_arr_mem_227777)[sext_i32_i64(local_tid_227773 +\n                                                          offset_227796)];\n            }\n        }\n        offset_227796 = 1;\n        while (slt32(offset_227796, wave_sizze_227775)) {\n            if (slt32(local_tid_227773 + offset_227796,\n                      sext_i64_i32(segred_group_sizze_212591)) &&\n                ((local_tid_227773 - squot32(local_tid_227773,\n                                             wave_sizze_227775) *\n                  wave_sizze_227775) & (2 * offset_227796 - 1)) == 0) {\n                // read array element\n                {\n                    x_227793 = ((volatile __local\n                    ",
            "             float *) red_arr_mem_227777)[sext_i32_i64(local_tid_227773 +\n                                                              offset_227796)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227794 = x_227792 + x_227793;\n                    \n                    x_227792 = defunc_1_op_res_227794;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_227777)[sext_i32_i64(local_tid_227773)] =\n                        x_227792;\n                }\n            }\n            offset_227796 *= 2;\n        }\n        while (slt32(skip_waves_227797,\n                     squot32(sext_i64_i32(segred_group_sizze_212591) +\n                             wave_sizze_227775 - 1, wave_sizze_227775))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_227796 = skip_waves_227797 * wave_sizze_227775;\n            if (slt32(local_tid_227773 + offset_227796,\n                      sext_i64_i32(segred_group_sizze_212591)) &&\n                ((local_tid_227773 - squot32(local_tid_227773,\n                                             wave_sizze_227775) *\n                  wave_sizze_227775) == 0 && (squot32(local_tid_227773,\n                                                      wave_sizze_227775) & (2 *\n                                                                            skip_waves_227797 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_227793 = ((__local\n                                 float *) red_arr_mem_227777)[sext_i32_i64(local_tid_227773 +\n                                                              offset_227796)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227794 = x_2",
            "27792 + x_227793;\n                    \n                    x_227792 = defunc_1_op_res_227794;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_227777)[sext_i32_i64(local_tid_227773)] =\n                        x_227792;\n                }\n            }\n            skip_waves_227797 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_227773) == (int64_t) 0) {\n                x_acc_227790 = x_227792;\n            }\n        }\n        if (groups_per_segment_227763 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_227773 == 0) {\n                    ((__global float *) mem_223653)[gtid_212595 * l_n_m_196752 +\n                                                    gtid_212596] = x_acc_227790;\n                }\n            }\n        } else {\n            int32_t old_counter_227798;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_227773 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_227768)[sext_i32_i64(virt_group_id_227783)] =\n                        x_acc_227790;\n                    mem_fence_global();\n                    old_counter_227798 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227770)[sext_i32_i64(srem32(flat_segment_id_227784,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_227779)[(int64_t) 0] =\n                        old_counter_227798 == groups_per_segment_227763 -\n                        (int64_t) 1;",
            "\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_227799;\n            \n            is_last_group_227799 = ((__local\n                                     bool *) sync_arr_mem_227779)[(int64_t) 0];\n            if (is_last_group_227799) {\n                if (local_tid_227773 == 0) {\n                    old_counter_227798 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227770)[sext_i32_i64(srem32(flat_segment_id_227784,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_227763));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_227800 =\n                            sdiv_up64(groups_per_segment_227763,\n                                      segred_group_sizze_212591);\n                    \n                    x_212599 = 0.0F;\n                    for (int64_t i_227801 = 0; i_227801 <\n                         read_per_thread_227800; i_227801++) {\n                        int64_t group_res_id_227802 =\n                                sext_i32_i64(local_tid_227773) *\n                                read_per_thread_227800 + i_227801;\n                        int64_t index_of_group_res_227803 =\n                                sext_i32_i64(flat_segment_id_227784) *\n                                groups_per_segment_227763 + group_res_id_227802;\n                        \n                        if (slt64(group_res_id_227802,\n                                  groups_per_segment_227763)) {\n                            x_212600 = ((__global\n                                         float *) segred_tmp_mem_227768)[index_of_group_res_",
            "227803];\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_227777)[sext_i32_i64(local_tid_227773)] =\n                    x_212599;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_227804;\n                    int32_t skip_waves_227805 = 1;\n                    float x_227792;\n                    float x_227793;\n                    \n                    offset_227804 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_227773,\n                                  sext_i64_i32(segred_group_sizze_212591))) {\n                            x_227792 = ((__local\n                                         float *) red_arr_mem_227777)[sext_i32_i64(local_tid_227773 +\n                                                                      offset_227804)];\n                        }\n                    }\n                    offset_227804 = 1;\n                    while (slt32(offset_227804, wave_sizze_227775)) {\n                        if (slt32(local_tid_227773 + offset_227804,\n                                  sext_i64_i32(segred_group_sizze_212591)) &&\n                            ((local_tid_227773 - squot32(local_tid_227773,\n                                                         wave_sizze_227775) *\n                              wave_sizze_227775) & (2 * offset_227804 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_227793 = ((volatile __local\n                                             float *) red_arr_mem_227777)[sext_",
            "i32_i64(local_tid_227773 +\n                                                                          offset_227804)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227794 = x_227792 +\n                                      x_227793;\n                                \n                                x_227792 = defunc_1_op_res_227794;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227777)[sext_i32_i64(local_tid_227773)] =\n                                    x_227792;\n                            }\n                        }\n                        offset_227804 *= 2;\n                    }\n                    while (slt32(skip_waves_227805,\n                                 squot32(sext_i64_i32(segred_group_sizze_212591) +\n                                         wave_sizze_227775 - 1,\n                                         wave_sizze_227775))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_227804 = skip_waves_227805 * wave_sizze_227775;\n                        if (slt32(local_tid_227773 + offset_227804,\n                                  sext_i64_i32(segred_group_sizze_212591)) &&\n                            ((local_tid_227773 - squot32(local_tid_227773,\n                                                         wave_sizze_227775) *\n                              wave_sizze_227775) == 0 &&\n                             (squot32(local_tid_227773, wave_sizze_227775) &\n                              (2 * skip_waves_227805 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_227793 = ((__local\n                                             float *) red_arr_mem_227777)[sext_i",
            "32_i64(local_tid_227773 +\n                                                                          offset_227804)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227794 = x_227792 +\n                                      x_227793;\n                                \n                                x_227792 = defunc_1_op_res_227794;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_227777)[sext_i32_i64(local_tid_227773)] =\n                                    x_227792;\n                            }\n                        }\n                        skip_waves_227805 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_227773 == 0) {\n                            ((__global float *) mem_223653)[gtid_212595 *\n                                                            l_n_m_196752 +\n                                                            gtid_212596] =\n                                x_227792;\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                                        uint sync_arr_mem_227861_backing_offset_0,\n                                        uint red_arr_mem_227859_backing_offset_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_227845,\n                                        int64_t elements_per_thread_227846,\n                                        int64_t virt_num_groups_227847,\n                                        int64_t threads_per_segment_227849,\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_227850,\n                                        __global\n                                        unsigned char *mainzicounter_mem_227852)\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    volatile unsigned char *sync_arr_mem_227861_backing_1 =\n                           &shared_mem[sync_arr_mem_227861_backing_offset_0];\n    volatile unsigned char *red_arr_mem_227859_backing_0 =\n                           &shared_mem[red_arr_mem_227859_backing_offset_1];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227854;\n    int32_t local_tid_227855;\n    int64_t group_sizze_227858;\n    int32_t wave_sizze_227857;\n    int",
            "32_t group_tid_227856;\n    \n    global_tid_227854 = get_global_id(0);\n    local_tid_227855 = get_local_id(0);\n    group_sizze_227858 = get_local_size(0);\n    wave_sizze_227857 = LOCKSTEP_WIDTH;\n    group_tid_227856 = get_group_id(0);\n    \n    int32_t phys_tid_212647 = global_tid_227854;\n    __local unsigned char *red_arr_mem_227859;\n    \n    red_arr_mem_227859 = (__local unsigned char *) red_arr_mem_227859_backing_0;\n    \n    __local unsigned char *sync_arr_mem_227861;\n    \n    sync_arr_mem_227861 = (__local\n                           unsigned char *) sync_arr_mem_227861_backing_1;\n    \n    int32_t phys_group_id_227863;\n    \n    phys_group_id_227863 = get_group_id(0);\n    for (int32_t i_227864 = 0; i_227864 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_227847) - phys_group_id_227863,\n                   sext_i64_i32(num_groups_212641)); i_227864++) {\n        int32_t virt_group_id_227865 = phys_group_id_227863 + i_227864 *\n                sext_i64_i32(num_groups_212641);\n        int32_t flat_segment_id_227866 = squot32(virt_group_id_227865,\n                                                 sext_i64_i32(groups_per_segment_227845));\n        int64_t global_tid_227867 = srem64(sext_i32_i64(virt_group_id_227865) *\n                                           segred_group_sizze_212640 +\n                                           sext_i32_i64(local_tid_227855),\n                                           segred_group_sizze_212640 *\n                                           groups_per_segment_227845);\n        int64_t slice_227868 = l_n_m_196752;\n        int64_t slice_227869 = m_196691 * slice_227868;\n        int64_t gtid_212644 = squot64(sext_i32_i64(flat_segment_id_227866),\n                                      slice_227868);\n        int64_t remnant_227870 = sext_i32_i64(flat_segment_id_227866) -\n                gtid_212644 * slice_227868;\n        int64_t gtid_212645 = remnant_227870;\n        int64_t remnant_227871 = remnant_227870 - gtid_212645;\n        int64_t gtid_212646",
            ";\n        float x_acc_227872;\n        int64_t chunk_sizze_227873 = smin64(elements_per_thread_227846,\n                                            sdiv_up64(q_l_196697 -\n                                                      global_tid_227867,\n                                                      threads_per_segment_227849));\n        float x_212648;\n        float x_212649;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_227872 = 0.0F;\n        }\n        for (int64_t i_227877 = 0; i_227877 < chunk_sizze_227873; i_227877++) {\n            gtid_212646 = global_tid_227867 + threads_per_segment_227849 *\n                i_227877;\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_212",
            "663;\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 * t",
            "mp2_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_227872;\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 accumulator\n                    {\n                        x_acc_227872 = 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_227872;\n            ((__local\n              float *) red_arr_mem_227859)[sext_i32_i64(local_tid_227855)] =\n                x_212648;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n ",
            "       int32_t offset_227878;\n        int32_t skip_waves_227879 = 1;\n        float x_227874;\n        float x_227875;\n        \n        offset_227878 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_227855,\n                      sext_i64_i32(segred_group_sizze_212640))) {\n                x_227874 = ((__local\n                             float *) red_arr_mem_227859)[sext_i32_i64(local_tid_227855 +\n                                                          offset_227878)];\n            }\n        }\n        offset_227878 = 1;\n        while (slt32(offset_227878, wave_sizze_227857)) {\n            if (slt32(local_tid_227855 + offset_227878,\n                      sext_i64_i32(segred_group_sizze_212640)) &&\n                ((local_tid_227855 - squot32(local_tid_227855,\n                                             wave_sizze_227857) *\n                  wave_sizze_227857) & (2 * offset_227878 - 1)) == 0) {\n                // read array element\n                {\n                    x_227875 = ((volatile __local\n                                 float *) red_arr_mem_227859)[sext_i32_i64(local_tid_227855 +\n                                                              offset_227878)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227876 = x_227874 + x_227875;\n                    \n                    x_227874 = defunc_1_op_res_227876;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_227859)[sext_i32_i64(local_tid_227855)] =\n                        x_227874;\n                }\n            }\n            offset_227878 *= 2;\n        }\n        while (slt32(skip_waves_227879,\n                     squot32(sext_i64_i32(segred_group_sizze_212640) +\n                             wave_sizze_227857 - 1, wave_sizze_227857))) {\n            barrier(CLK_LOCAL_ME",
            "M_FENCE);\n            offset_227878 = skip_waves_227879 * wave_sizze_227857;\n            if (slt32(local_tid_227855 + offset_227878,\n                      sext_i64_i32(segred_group_sizze_212640)) &&\n                ((local_tid_227855 - squot32(local_tid_227855,\n                                             wave_sizze_227857) *\n                  wave_sizze_227857) == 0 && (squot32(local_tid_227855,\n                                                      wave_sizze_227857) & (2 *\n                                                                            skip_waves_227879 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_227875 = ((__local\n                                 float *) red_arr_mem_227859)[sext_i32_i64(local_tid_227855 +\n                                                              offset_227878)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227876 = x_227874 + x_227875;\n                    \n                    x_227874 = defunc_1_op_res_227876;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_227859)[sext_i32_i64(local_tid_227855)] =\n                        x_227874;\n                }\n            }\n            skip_waves_227879 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_227855) == (int64_t) 0) {\n                x_acc_227872 = x_227874;\n            }\n        }\n        if (groups_per_segment_227845 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_227855 == 0) {\n                    ((__global float *) mem_223663)[gtid_212644 * l_n_m_196752 +\n               ",
            "                                     gtid_212645] = x_acc_227872;\n                }\n            }\n        } else {\n            int32_t old_counter_227880;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_227855 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_227850)[sext_i32_i64(virt_group_id_227865)] =\n                        x_acc_227872;\n                    mem_fence_global();\n                    old_counter_227880 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227852)[sext_i32_i64(srem32(flat_segment_id_227866,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_227861)[(int64_t) 0] =\n                        old_counter_227880 == groups_per_segment_227845 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_227881;\n            \n            is_last_group_227881 = ((__local\n                                     bool *) sync_arr_mem_227861)[(int64_t) 0];\n            if (is_last_group_227881) {\n                if (local_tid_227855 == 0) {\n                    old_counter_227880 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227852)[sext_i32_i64(srem32(flat_segment_id_227866,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_227845));\n                }\n                // read in ",
            "the per-group-results\n                {\n                    int64_t read_per_thread_227882 =\n                            sdiv_up64(groups_per_segment_227845,\n                                      segred_group_sizze_212640);\n                    \n                    x_212648 = 0.0F;\n                    for (int64_t i_227883 = 0; i_227883 <\n                         read_per_thread_227882; i_227883++) {\n                        int64_t group_res_id_227884 =\n                                sext_i32_i64(local_tid_227855) *\n                                read_per_thread_227882 + i_227883;\n                        int64_t index_of_group_res_227885 =\n                                sext_i32_i64(flat_segment_id_227866) *\n                                groups_per_segment_227845 + group_res_id_227884;\n                        \n                        if (slt64(group_res_id_227884,\n                                  groups_per_segment_227845)) {\n                            x_212649 = ((__global\n                                         float *) segred_tmp_mem_227850)[index_of_group_res_227885];\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_227859)[sext_i32_i64(local_tid_227855)] =\n                    x_212648;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_227886;\n                    int32_t skip_waves_227887 = 1;\n                    float x_227874;\n                    float x_227875;\n                    \n                    offset_227886 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_227855,\n                  ",
            "                sext_i64_i32(segred_group_sizze_212640))) {\n                            x_227874 = ((__local\n                                         float *) red_arr_mem_227859)[sext_i32_i64(local_tid_227855 +\n                                                                      offset_227886)];\n                        }\n                    }\n                    offset_227886 = 1;\n                    while (slt32(offset_227886, wave_sizze_227857)) {\n                        if (slt32(local_tid_227855 + offset_227886,\n                                  sext_i64_i32(segred_group_sizze_212640)) &&\n                            ((local_tid_227855 - squot32(local_tid_227855,\n                                                         wave_sizze_227857) *\n                              wave_sizze_227857) & (2 * offset_227886 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_227875 = ((volatile __local\n                                             float *) red_arr_mem_227859)[sext_i32_i64(local_tid_227855 +\n                                                                          offset_227886)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227876 = x_227874 +\n                                      x_227875;\n                                \n                                x_227874 = defunc_1_op_res_227876;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227859)[sext_i32_i64(local_tid_227855)] =\n                                    x_227874;\n                            }\n                        }\n                        offset_227886 *= 2;\n                    }\n                    whi",
            "le (slt32(skip_waves_227887,\n                                 squot32(sext_i64_i32(segred_group_sizze_212640) +\n                                         wave_sizze_227857 - 1,\n                                         wave_sizze_227857))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_227886 = skip_waves_227887 * wave_sizze_227857;\n                        if (slt32(local_tid_227855 + offset_227886,\n                                  sext_i64_i32(segred_group_sizze_212640)) &&\n                            ((local_tid_227855 - squot32(local_tid_227855,\n                                                         wave_sizze_227857) *\n                              wave_sizze_227857) == 0 &&\n                             (squot32(local_tid_227855, wave_sizze_227857) &\n                              (2 * skip_waves_227887 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_227875 = ((__local\n                                             float *) red_arr_mem_227859)[sext_i32_i64(local_tid_227855 +\n                                                                          offset_227886)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227876 = x_227874 +\n                                      x_227875;\n                                \n                                x_227874 = defunc_1_op_res_227876;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_227859)[sext_i32_i64(local_tid_227855)] =\n                                    x_227874;\n                            }\n                        }\n                        skip_waves_227887 *= 2;\n                    }\n                    // and ba",
            "ck to memory with the final result\n                    {\n                        if (local_tid_227855 == 0) {\n                            ((__global float *) mem_223663)[gtid_212644 *\n                                                            l_n_m_196752 +\n                                                            gtid_212645] =\n                                x_227874;\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                                        uint sync_arr_mem_228007_backing_offset_0,\n                                        uint red_arr_mem_228005_backing_offset_1,\n                                        uint red_arr_mem_228003_backing_offset_2,\n                                        uint red_arr_mem_228001_backing_offset_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_227983,\n                                        int64_t elements_per_thread_227984,\n                                        int64_t virt_num_groups_227985,\n                                        int64_t threads_per_segment_227987,\n                                        __global unsigned char *ext_mem_222468,\n                                        __global unsigned char *ex",
            "t_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_227988,\n                                        __global\n                                        unsigned char *segred_tmp_mem_227990,\n                                        __global\n                                        unsigned char *segred_tmp_mem_227992,\n                                        __global\n                                        unsigned char *mainzicounter_mem_227994)\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    volatile unsigned char *sync_arr_mem_228007_backing_3 =\n                           &shared_mem[sync_arr_mem_228007_backing_offset_0];\n    volatile unsigned char *red_arr_mem_228005_backing_2 =\n                           &shared_mem[red_arr_mem_228005_backing_offset_1];\n    volatile unsigned char *red_arr_mem_228003_backing_1 =\n                           &shared_mem[red_arr_mem_228003_backing_offset_2];\n    volatile unsigned char *red_arr_mem_228001_backing_0 =\n                           &shared_mem[red_arr_mem_228001_backing_offset_3];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227996;\n    int32_t local_tid_227997;\n    int64_t group_sizze_228000;\n    int32_t wave_sizze_227999;\n    int32_t group_tid_227998;\n    \n    global_tid_227996 = get_global_id(0);\n    local_tid_227997 = get_local_id(0);\n    group_sizze_228000 = get_local_size(0);\n    wave_sizze_227999 = LOCKSTEP_WIDTH;\n    group_tid_227998 = get_gr",
            "oup_id(0);\n    \n    int32_t phys_tid_213427 = global_tid_227996;\n    __local unsigned char *red_arr_mem_228001;\n    \n    red_arr_mem_228001 = (__local unsigned char *) red_arr_mem_228001_backing_0;\n    \n    __local unsigned char *red_arr_mem_228003;\n    \n    red_arr_mem_228003 = (__local unsigned char *) red_arr_mem_228003_backing_1;\n    \n    __local unsigned char *red_arr_mem_228005;\n    \n    red_arr_mem_228005 = (__local unsigned char *) red_arr_mem_228005_backing_2;\n    \n    __local unsigned char *sync_arr_mem_228007;\n    \n    sync_arr_mem_228007 = (__local\n                           unsigned char *) sync_arr_mem_228007_backing_3;\n    \n    int32_t phys_group_id_228009;\n    \n    phys_group_id_228009 = get_group_id(0);\n    for (int32_t i_228010 = 0; i_228010 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_227985) - phys_group_id_228009,\n                   sext_i64_i32(num_groups_213419)); i_228010++) {\n        int32_t virt_group_id_228011 = phys_group_id_228009 + i_228010 *\n                sext_i64_i32(num_groups_213419);\n        int32_t flat_segment_id_228012 = squot32(virt_group_id_228011,\n                                                 sext_i64_i32(groups_per_segment_227983));\n        int64_t global_tid_228013 = srem64(sext_i32_i64(virt_group_id_228011) *\n                                           segred_group_sizze_213418 +\n                                           sext_i32_i64(local_tid_227997),\n                                           segred_group_sizze_213418 *\n                                           groups_per_segment_227983);\n        int64_t slice_228014 = l_n_m_196752;\n        int64_t slice_228015 = m_196691 * slice_228014;\n        int64_t gtid_213424 = squot64(sext_i32_i64(flat_segment_id_228012),\n                                      slice_228014);\n        int64_t remnant_228016 = sext_i32_i64(flat_segment_id_228012) -\n                gtid_213424 * slice_228014;\n        int64_t gtid_213425 = remnant_228016;\n        int64_t remnant_228017 = remn",
            "ant_228016 - gtid_213425;\n        int64_t gtid_213426;\n        float x_acc_228018;\n        float x_acc_228019;\n        float x_acc_228020;\n        int64_t chunk_sizze_228021 = smin64(elements_per_thread_227984,\n                                            sdiv_up64(q_l_196697 -\n                                                      global_tid_228013,\n                                                      threads_per_segment_227987));\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_228018 = 0.0F;\n            x_acc_228019 = 0.0F;\n            x_acc_228020 = 0.0F;\n        }\n        for (int64_t i_228031 = 0; i_228031 < chunk_sizze_228021; i_228031++) {\n            gtid_213426 = global_tid_228013 + threads_per_segment_227987 *\n                i_228031;\n            // apply map function\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_228018;\n                    x_213429 = x_acc_228019;\n                    x_213430 = x_acc_228020;\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_213432;\n                    float defunc_1_op_res_213436 = x_213430 + x_213433;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_228018 = defunc_1_op_res_213434;\n                        x_acc_228019 = defunc_1_op_res_213435;\n                        x_acc_228020 = 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_228018;\n            x_213429 = x_acc_228019;\n            x_213430 = x_acc_228020;\n            ((__local\n              float *) red_arr_mem_228001)[sext_i32_i64(local_tid_227997)] =\n                x_213428;\n            ((__local\n              float *) red_arr_mem_228003)[sext_i32_i64(local_tid_227997)] =\n                x_213429;\n            ((__local\n              float *) red_arr_mem_228005)[sext_i32_i64(local_tid_227997)] =\n                x_213430;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n  ",
            "      int32_t offset_228032;\n        int32_t skip_waves_228033 = 1;\n        float x_228022;\n        float x_228023;\n        float x_228024;\n        float x_228025;\n        float x_228026;\n        float x_228027;\n        \n        offset_228032 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_227997,\n                      sext_i64_i32(segred_group_sizze_213418))) {\n                x_228022 = ((__local\n                             float *) red_arr_mem_228001)[sext_i32_i64(local_tid_227997 +\n                                                          offset_228032)];\n                x_228023 = ((__local\n                             float *) red_arr_mem_228003)[sext_i32_i64(local_tid_227997 +\n                                                          offset_228032)];\n                x_228024 = ((__local\n                             float *) red_arr_mem_228005)[sext_i32_i64(local_tid_227997 +\n                                                          offset_228032)];\n            }\n        }\n        offset_228032 = 1;\n        while (slt32(offset_228032, wave_sizze_227999)) {\n            if (slt32(local_tid_227997 + offset_228032,\n                      sext_i64_i32(segred_group_sizze_213418)) &&\n                ((local_tid_227997 - squot32(local_tid_227997,\n                                             wave_sizze_227999) *\n                  wave_sizze_227999) & (2 * offset_228032 - 1)) == 0) {\n                // read array element\n                {\n                    x_228025 = ((volatile __local\n                                 float *) red_arr_mem_228001)[sext_i32_i64(local_tid_227997 +\n                                                              offset_228032)];\n                    x_228026 = ((volatile __local\n                                 float *) red_arr_mem_228003)[sext_i32_i64(local_tid_227997 +\n                                                              offset_228032)];\n                    x_228027 = ((volat",
            "ile __local\n                                 float *) red_arr_mem_228005)[sext_i32_i64(local_tid_227997 +\n                                                              offset_228032)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228028 = x_228022 + x_228025;\n                    float defunc_1_op_res_228029 = x_228023 + x_228026;\n                    float defunc_1_op_res_228030 = x_228024 + x_228027;\n                    \n                    x_228022 = defunc_1_op_res_228028;\n                    x_228023 = defunc_1_op_res_228029;\n                    x_228024 = defunc_1_op_res_228030;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_228001)[sext_i32_i64(local_tid_227997)] =\n                        x_228022;\n                    ((volatile __local\n                      float *) red_arr_mem_228003)[sext_i32_i64(local_tid_227997)] =\n                        x_228023;\n                    ((volatile __local\n                      float *) red_arr_mem_228005)[sext_i32_i64(local_tid_227997)] =\n                        x_228024;\n                }\n            }\n            offset_228032 *= 2;\n        }\n        while (slt32(skip_waves_228033,\n                     squot32(sext_i64_i32(segred_group_sizze_213418) +\n                             wave_sizze_227999 - 1, wave_sizze_227999))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_228032 = skip_waves_228033 * wave_sizze_227999;\n            if (slt32(local_tid_227997 + offset_228032,\n                      sext_i64_i32(segred_group_sizze_213418)) &&\n                ((local_tid_227997 - squot32(local_tid_227997,\n                                             wave_sizze_227999) *\n                  wave_sizze_227999) == 0 && (squot32(local_tid_227997,\n                                                      wave_sizze_227999) & (2 *\n     ",
            "                                                                       skip_waves_228033 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_228025 = ((__local\n                                 float *) red_arr_mem_228001)[sext_i32_i64(local_tid_227997 +\n                                                              offset_228032)];\n                    x_228026 = ((__local\n                                 float *) red_arr_mem_228003)[sext_i32_i64(local_tid_227997 +\n                                                              offset_228032)];\n                    x_228027 = ((__local\n                                 float *) red_arr_mem_228005)[sext_i32_i64(local_tid_227997 +\n                                                              offset_228032)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228028 = x_228022 + x_228025;\n                    float defunc_1_op_res_228029 = x_228023 + x_228026;\n                    float defunc_1_op_res_228030 = x_228024 + x_228027;\n                    \n                    x_228022 = defunc_1_op_res_228028;\n                    x_228023 = defunc_1_op_res_228029;\n                    x_228024 = defunc_1_op_res_228030;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_228001)[sext_i32_i64(local_tid_227997)] =\n                        x_228022;\n                    ((__local\n                      float *) red_arr_mem_228003)[sext_i32_i64(local_tid_227997)] =\n                        x_228023;\n                    ((__local\n                      float *) red_arr_mem_228005)[sext_i32_i64(local_tid_227997)] =\n                        x_228024;\n                }\n            }\n            skip_waves_228033 *= 2;\n        }\n        barrier(",
            "CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_227997) == (int64_t) 0) {\n                x_acc_228018 = x_228022;\n                x_acc_228019 = x_228023;\n                x_acc_228020 = x_228024;\n            }\n        }\n        if (groups_per_segment_227983 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_227997 == 0) {\n                    ((__global float *) mem_223733)[gtid_213424 * l_n_m_196752 +\n                                                    gtid_213425] = x_acc_228018;\n                    ((__global float *) mem_223737)[gtid_213424 * l_n_m_196752 +\n                                                    gtid_213425] = x_acc_228019;\n                    ((__global float *) mem_223741)[gtid_213424 * l_n_m_196752 +\n                                                    gtid_213425] = x_acc_228020;\n                }\n            }\n        } else {\n            int32_t old_counter_228034;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_227997 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_227988)[sext_i32_i64(virt_group_id_228011)] =\n                        x_acc_228018;\n                    ((__global\n                      float *) segred_tmp_mem_227990)[sext_i32_i64(virt_group_id_228011)] =\n                        x_acc_228019;\n                    ((__global\n                      float *) segred_tmp_mem_227992)[sext_i32_i64(virt_group_id_228011)] =\n                        x_acc_228020;\n                    mem_fence_global();\n                    old_counter_228034 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227994)[sext_i32_i64(srem32(flat_segment_id_228012,\n                                          ",
            "                                                            10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_228007)[(int64_t) 0] =\n                        old_counter_228034 == groups_per_segment_227983 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_228035;\n            \n            is_last_group_228035 = ((__local\n                                     bool *) sync_arr_mem_228007)[(int64_t) 0];\n            if (is_last_group_228035) {\n                if (local_tid_227997 == 0) {\n                    old_counter_228034 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227994)[sext_i32_i64(srem32(flat_segment_id_228012,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_227983));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_228036 =\n                            sdiv_up64(groups_per_segment_227983,\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_228037 = 0; i_228037 <\n                         read_per_thread_228036; i_228037++) {\n                        int64_t group_res_id_228038 =\n                                sext_i32_i64(local_tid_227997) *\n                                read_per_thread_228036 + i_228037;\n                        int64_t index_of_group_res_228039 =\n                                sext_i32_i64(flat_segm",
            "ent_id_228012) *\n                                groups_per_segment_227983 + group_res_id_228038;\n                        \n                        if (slt64(group_res_id_228038,\n                                  groups_per_segment_227983)) {\n                            x_213431 = ((__global\n                                         float *) segred_tmp_mem_227988)[index_of_group_res_228039];\n                            x_213432 = ((__global\n                                         float *) segred_tmp_mem_227990)[index_of_group_res_228039];\n                            x_213433 = ((__global\n                                         float *) segred_tmp_mem_227992)[index_of_group_res_228039];\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_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                ((__local\n                  float *) red_arr_mem_228001)[sext_i32_i64(local_tid_227997)] =\n                    x_213428;\n                ((__local\n                  float *) red_arr_mem_228003)[sext_i32_i64(local_tid_227997)] =\n                    x_213429;\n                ((__local\n                  float *) red_arr_mem_228005)[sext_i32_i64(local_tid_227997)] =\n                    x_213430;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_228040;\n                    int32_t skip_waves_228041 = 1;\n                    float x_228022;\n                    float x_228023;\n                    float x_228024;\n                    float x",
            "_228025;\n                    float x_228026;\n                    float x_228027;\n                    \n                    offset_228040 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_227997,\n                                  sext_i64_i32(segred_group_sizze_213418))) {\n                            x_228022 = ((__local\n                                         float *) red_arr_mem_228001)[sext_i32_i64(local_tid_227997 +\n                                                                      offset_228040)];\n                            x_228023 = ((__local\n                                         float *) red_arr_mem_228003)[sext_i32_i64(local_tid_227997 +\n                                                                      offset_228040)];\n                            x_228024 = ((__local\n                                         float *) red_arr_mem_228005)[sext_i32_i64(local_tid_227997 +\n                                                                      offset_228040)];\n                        }\n                    }\n                    offset_228040 = 1;\n                    while (slt32(offset_228040, wave_sizze_227999)) {\n                        if (slt32(local_tid_227997 + offset_228040,\n                                  sext_i64_i32(segred_group_sizze_213418)) &&\n                            ((local_tid_227997 - squot32(local_tid_227997,\n                                                         wave_sizze_227999) *\n                              wave_sizze_227999) & (2 * offset_228040 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_228025 = ((volatile __local\n                                             float *) red_arr_mem_228001)[sext_i32_i64(local_tid_227997 +\n                                                                          offset_228040)];\n                ",
            "                x_228026 = ((volatile __local\n                                             float *) red_arr_mem_228003)[sext_i32_i64(local_tid_227997 +\n                                                                          offset_228040)];\n                                x_228027 = ((volatile __local\n                                             float *) red_arr_mem_228005)[sext_i32_i64(local_tid_227997 +\n                                                                          offset_228040)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228028 = x_228022 +\n                                      x_228025;\n                                float defunc_1_op_res_228029 = x_228023 +\n                                      x_228026;\n                                float defunc_1_op_res_228030 = x_228024 +\n                                      x_228027;\n                                \n                                x_228022 = defunc_1_op_res_228028;\n                                x_228023 = defunc_1_op_res_228029;\n                                x_228024 = defunc_1_op_res_228030;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228001)[sext_i32_i64(local_tid_227997)] =\n                                    x_228022;\n                                ((volatile __local\n                                  float *) red_arr_mem_228003)[sext_i32_i64(local_tid_227997)] =\n                                    x_228023;\n                                ((volatile __local\n                                  float *) red_arr_mem_228005)[sext_i32_i64(local_tid_227997)] =\n                                    x_228024;\n                            }\n                        }\n                        of",
            "fset_228040 *= 2;\n                    }\n                    while (slt32(skip_waves_228041,\n                                 squot32(sext_i64_i32(segred_group_sizze_213418) +\n                                         wave_sizze_227999 - 1,\n                                         wave_sizze_227999))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_228040 = skip_waves_228041 * wave_sizze_227999;\n                        if (slt32(local_tid_227997 + offset_228040,\n                                  sext_i64_i32(segred_group_sizze_213418)) &&\n                            ((local_tid_227997 - squot32(local_tid_227997,\n                                                         wave_sizze_227999) *\n                              wave_sizze_227999) == 0 &&\n                             (squot32(local_tid_227997, wave_sizze_227999) &\n                              (2 * skip_waves_228041 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_228025 = ((__local\n                                             float *) red_arr_mem_228001)[sext_i32_i64(local_tid_227997 +\n                                                                          offset_228040)];\n                                x_228026 = ((__local\n                                             float *) red_arr_mem_228003)[sext_i32_i64(local_tid_227997 +\n                                                                          offset_228040)];\n                                x_228027 = ((__local\n                                             float *) red_arr_mem_228005)[sext_i32_i64(local_tid_227997 +\n                                                                          offset_228040)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228028 = x_228022 +\n                                      x_22",
            "8025;\n                                float defunc_1_op_res_228029 = x_228023 +\n                                      x_228026;\n                                float defunc_1_op_res_228030 = x_228024 +\n                                      x_228027;\n                                \n                                x_228022 = defunc_1_op_res_228028;\n                                x_228023 = defunc_1_op_res_228029;\n                                x_228024 = defunc_1_op_res_228030;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_228001)[sext_i32_i64(local_tid_227997)] =\n                                    x_228022;\n                                ((__local\n                                  float *) red_arr_mem_228003)[sext_i32_i64(local_tid_227997)] =\n                                    x_228023;\n                                ((__local\n                                  float *) red_arr_mem_228005)[sext_i32_i64(local_tid_227997)] =\n                                    x_228024;\n                            }\n                        }\n                        skip_waves_228041 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_227997 == 0) {\n                            ((__global float *) mem_223733)[gtid_213424 *\n                                                            l_n_m_196752 +\n                                                            gtid_213425] =\n                                x_228022;\n                            ((__global float *) mem_223737)[gtid_213424 *\n                                                            l_n_m_196752 +\n                                                            gtid_213425] =\n                                x_228023;\n                            ((__global float *)",
            " mem_223741)[gtid_213424 *\n                                                            l_n_m_196752 +\n                                                            gtid_213425] =\n                                x_228024;\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                                        uint sync_arr_mem_228107_backing_offset_0,\n                                        uint red_arr_mem_228105_backing_offset_1,\n                                        uint red_arr_mem_228103_backing_offset_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_228087,\n                                        int64_t elements_per_thread_228088,\n                                        int64_t virt_num_groups_228089,\n                                        int64_t threads_per_segment_228091,\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_228092,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228094,\n                                        __global\n                                        unsigned char *mainzicounter_mem_228096)\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    volatile unsigned char *sync_arr_mem_228107_backing_2 =\n                           &shared_mem[sync_arr_mem_228107_backing_offset_0];\n    volatile unsigned char *red_arr_mem_228105_backing_1 =\n                           &shared_mem[red_arr_mem_228105_backing_offset_1];\n    volatile unsigned char *red_arr_mem_228103_backing_0 =\n                           &shared_mem[red_arr_mem_228103_backing_offset_2];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228098;\n    int32_t local_tid_228099;\n    int64_t group_sizze_228102;\n    int32_t wave_sizze_228101;\n    int32_t group_tid_228100;\n    \n    global_tid_228098 = get_global_id(0);\n    local_tid_228099 = get_local_id(0);\n    group_sizze_228102 = get_local_size(0);\n    wave_sizze_228101 = LOCKSTEP_WIDTH;\n    group_tid_228100 = get_group_id(0);\n    \n    int32_t phys_tid_213496 = global_tid_228098;\n    __local unsigned char *red_arr_mem_228103;\n    \n    red_arr_mem_228103 = (__local unsigned char *) red_arr_mem_228103_backing_0;\n    \n    __local unsigned char *red_arr_mem_228105;\n    \n    red_arr_mem_228",
            "105 = (__local unsigned char *) red_arr_mem_228105_backing_1;\n    \n    __local unsigned char *sync_arr_mem_228107;\n    \n    sync_arr_mem_228107 = (__local\n                           unsigned char *) sync_arr_mem_228107_backing_2;\n    \n    int32_t phys_group_id_228109;\n    \n    phys_group_id_228109 = get_group_id(0);\n    for (int32_t i_228110 = 0; i_228110 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_228089) - phys_group_id_228109,\n                   sext_i64_i32(num_groups_213489)); i_228110++) {\n        int32_t virt_group_id_228111 = phys_group_id_228109 + i_228110 *\n                sext_i64_i32(num_groups_213489);\n        int32_t flat_segment_id_228112 = squot32(virt_group_id_228111,\n                                                 sext_i64_i32(groups_per_segment_228087));\n        int64_t global_tid_228113 = srem64(sext_i32_i64(virt_group_id_228111) *\n                                           segred_group_sizze_213488 +\n                                           sext_i32_i64(local_tid_228099),\n                                           segred_group_sizze_213488 *\n                                           groups_per_segment_228087);\n        int64_t slice_228114 = l_n_m_196752;\n        int64_t slice_228115 = m_196691 * slice_228114;\n        int64_t gtid_213493 = squot64(sext_i32_i64(flat_segment_id_228112),\n                                      slice_228114);\n        int64_t remnant_228116 = sext_i32_i64(flat_segment_id_228112) -\n                gtid_213493 * slice_228114;\n        int64_t gtid_213494 = remnant_228116;\n        int64_t remnant_228117 = remnant_228116 - gtid_213494;\n        int64_t gtid_213495;\n        float x_acc_228118;\n        float x_acc_228119;\n        int64_t chunk_sizze_228120 = smin64(elements_per_thread_228088,\n                                            sdiv_up64(q_l_196697 -\n                                                      global_tid_228113,\n                                                      threads_per_segment_228091));\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_228118 = 0.0F;\n            x_acc_228119 = 0.0F;\n        }\n        for (int64_t i_228127 = 0; i_228127 < chunk_sizze_228120; i_228127++) {\n            gtid_213495 = global_tid_228113 + threads_per_segment_228091 *\n                i_228127;\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 = 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(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 accumula",
            "tor\n                {\n                    x_213497 = x_acc_228118;\n                    x_213498 = x_acc_228119;\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_213500;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_228118 = defunc_1_op_res_213501;\n                        x_acc_228119 = 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_228118;\n            x_213498 = x_acc_228119;\n            ((__local\n              float *) red_arr_mem_228103)[sext_i32_i64(local_tid_228099)] =\n                x_213497;\n            ((__local\n              float *) red_arr_mem_228105)[sext_i32_i64(local_tid_228099)] =\n                x_213498;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_228128;\n        int32_t skip_waves_228129 = 1;\n        float x_228121;\n        float x_228122;\n        float x_228123;\n        float x_228124;\n        \n        offset_228128 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_228099,\n                      sext_i64_i32(segred_group_sizze_213488))) {\n                x_228121 = ((__local\n                             float *) red_arr_mem_228103)[sext_i32_i64(local_tid_228099 +\n                                                          offset_228128)];\n                x_228122 = ((__local\n                             float *) red_arr_mem_228105)[sext_i32_i64(local_tid_228099 +\n                             ",
            "                             offset_228128)];\n            }\n        }\n        offset_228128 = 1;\n        while (slt32(offset_228128, wave_sizze_228101)) {\n            if (slt32(local_tid_228099 + offset_228128,\n                      sext_i64_i32(segred_group_sizze_213488)) &&\n                ((local_tid_228099 - squot32(local_tid_228099,\n                                             wave_sizze_228101) *\n                  wave_sizze_228101) & (2 * offset_228128 - 1)) == 0) {\n                // read array element\n                {\n                    x_228123 = ((volatile __local\n                                 float *) red_arr_mem_228103)[sext_i32_i64(local_tid_228099 +\n                                                              offset_228128)];\n                    x_228124 = ((volatile __local\n                                 float *) red_arr_mem_228105)[sext_i32_i64(local_tid_228099 +\n                                                              offset_228128)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228125 = x_228121 + x_228123;\n                    float defunc_1_op_res_228126 = x_228122 + x_228124;\n                    \n                    x_228121 = defunc_1_op_res_228125;\n                    x_228122 = defunc_1_op_res_228126;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_228103)[sext_i32_i64(local_tid_228099)] =\n                        x_228121;\n                    ((volatile __local\n                      float *) red_arr_mem_228105)[sext_i32_i64(local_tid_228099)] =\n                        x_228122;\n                }\n            }\n            offset_228128 *= 2;\n        }\n        while (slt32(skip_waves_228129,\n                     squot32(sext_i64_i32(segred_group_sizze_213488) +\n                             wave_sizze_228101 - 1, wave_sizze_228101))) {\n       ",
            "     barrier(CLK_LOCAL_MEM_FENCE);\n            offset_228128 = skip_waves_228129 * wave_sizze_228101;\n            if (slt32(local_tid_228099 + offset_228128,\n                      sext_i64_i32(segred_group_sizze_213488)) &&\n                ((local_tid_228099 - squot32(local_tid_228099,\n                                             wave_sizze_228101) *\n                  wave_sizze_228101) == 0 && (squot32(local_tid_228099,\n                                                      wave_sizze_228101) & (2 *\n                                                                            skip_waves_228129 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_228123 = ((__local\n                                 float *) red_arr_mem_228103)[sext_i32_i64(local_tid_228099 +\n                                                              offset_228128)];\n                    x_228124 = ((__local\n                                 float *) red_arr_mem_228105)[sext_i32_i64(local_tid_228099 +\n                                                              offset_228128)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228125 = x_228121 + x_228123;\n                    float defunc_1_op_res_228126 = x_228122 + x_228124;\n                    \n                    x_228121 = defunc_1_op_res_228125;\n                    x_228122 = defunc_1_op_res_228126;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_228103)[sext_i32_i64(local_tid_228099)] =\n                        x_228121;\n                    ((__local\n                      float *) red_arr_mem_228105)[sext_i32_i64(local_tid_228099)] =\n                        x_228122;\n                }\n            }\n            skip_waves_228129 *= 2;\n      ",
            "  }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_228099) == (int64_t) 0) {\n                x_acc_228118 = x_228121;\n                x_acc_228119 = x_228122;\n            }\n        }\n        if (groups_per_segment_228087 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_228099 == 0) {\n                    ((__global float *) mem_223759)[gtid_213493 * l_n_m_196752 +\n                                                    gtid_213494] = x_acc_228118;\n                    ((__global float *) mem_223763)[gtid_213493 * l_n_m_196752 +\n                                                    gtid_213494] = x_acc_228119;\n                }\n            }\n        } else {\n            int32_t old_counter_228130;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_228099 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_228092)[sext_i32_i64(virt_group_id_228111)] =\n                        x_acc_228118;\n                    ((__global\n                      float *) segred_tmp_mem_228094)[sext_i32_i64(virt_group_id_228111)] =\n                        x_acc_228119;\n                    mem_fence_global();\n                    old_counter_228130 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228096)[sext_i32_i64(srem32(flat_segment_id_228112,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_228107)[(int64_t) 0] =\n                        old_counter_228130 == groups_per_segment_228087 -\n                        (int64_t) 1;\n                }\n            }\n ",
            "           barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_228131;\n            \n            is_last_group_228131 = ((__local\n                                     bool *) sync_arr_mem_228107)[(int64_t) 0];\n            if (is_last_group_228131) {\n                if (local_tid_228099 == 0) {\n                    old_counter_228130 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228096)[sext_i32_i64(srem32(flat_segment_id_228112,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_228087));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_228132 =\n                            sdiv_up64(groups_per_segment_228087,\n                                      segred_group_sizze_213488);\n                    \n                    x_213497 = 0.0F;\n                    x_213498 = 0.0F;\n                    for (int64_t i_228133 = 0; i_228133 <\n                         read_per_thread_228132; i_228133++) {\n                        int64_t group_res_id_228134 =\n                                sext_i32_i64(local_tid_228099) *\n                                read_per_thread_228132 + i_228133;\n                        int64_t index_of_group_res_228135 =\n                                sext_i32_i64(flat_segment_id_228112) *\n                                groups_per_segment_228087 + group_res_id_228134;\n                        \n                        if (slt64(group_res_id_228134,\n                                  groups_per_segment_228087)) {\n                            x_213499 = ((__global\n                                         float *) segred_tmp_mem_228092)[index_of_group_r",
            "es_228135];\n                            x_213500 = ((__global\n                                         float *) segred_tmp_mem_228094)[index_of_group_res_228135];\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_228103)[sext_i32_i64(local_tid_228099)] =\n                    x_213497;\n                ((__local\n                  float *) red_arr_mem_228105)[sext_i32_i64(local_tid_228099)] =\n                    x_213498;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_228136;\n                    int32_t skip_waves_228137 = 1;\n                    float x_228121;\n                    float x_228122;\n                    float x_228123;\n                    float x_228124;\n                    \n                    offset_228136 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_228099,\n                                  sext_i64_i32(segred_group_sizze_213488))) {\n                            x_228121 = ((__local\n                                         float *) red_arr_mem_228103)[sext_i32_i64(local_tid_228099 +\n                                                                      offset_228136)];\n                            x_228122 = ((__local\n                                         float *) red_arr_mem_228105)[sext_i32_i64(local_tid_228099 +\n                                                                      offset_228136)];\n                        }\n                   ",
            " }\n                    offset_228136 = 1;\n                    while (slt32(offset_228136, wave_sizze_228101)) {\n                        if (slt32(local_tid_228099 + offset_228136,\n                                  sext_i64_i32(segred_group_sizze_213488)) &&\n                            ((local_tid_228099 - squot32(local_tid_228099,\n                                                         wave_sizze_228101) *\n                              wave_sizze_228101) & (2 * offset_228136 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_228123 = ((volatile __local\n                                             float *) red_arr_mem_228103)[sext_i32_i64(local_tid_228099 +\n                                                                          offset_228136)];\n                                x_228124 = ((volatile __local\n                                             float *) red_arr_mem_228105)[sext_i32_i64(local_tid_228099 +\n                                                                          offset_228136)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228125 = x_228121 +\n                                      x_228123;\n                                float defunc_1_op_res_228126 = x_228122 +\n                                      x_228124;\n                                \n                                x_228121 = defunc_1_op_res_228125;\n                                x_228122 = defunc_1_op_res_228126;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228103)[sext_i32_i64(local_tid_228099)] =\n                                    x_228121;\n                                ((volati",
            "le __local\n                                  float *) red_arr_mem_228105)[sext_i32_i64(local_tid_228099)] =\n                                    x_228122;\n                            }\n                        }\n                        offset_228136 *= 2;\n                    }\n                    while (slt32(skip_waves_228137,\n                                 squot32(sext_i64_i32(segred_group_sizze_213488) +\n                                         wave_sizze_228101 - 1,\n                                         wave_sizze_228101))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_228136 = skip_waves_228137 * wave_sizze_228101;\n                        if (slt32(local_tid_228099 + offset_228136,\n                                  sext_i64_i32(segred_group_sizze_213488)) &&\n                            ((local_tid_228099 - squot32(local_tid_228099,\n                                                         wave_sizze_228101) *\n                              wave_sizze_228101) == 0 &&\n                             (squot32(local_tid_228099, wave_sizze_228101) &\n                              (2 * skip_waves_228137 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_228123 = ((__local\n                                             float *) red_arr_mem_228103)[sext_i32_i64(local_tid_228099 +\n                                                                          offset_228136)];\n                                x_228124 = ((__local\n                                             float *) red_arr_mem_228105)[sext_i32_i64(local_tid_228099 +\n                                                                          offset_228136)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228125 = x_228121 +\n                                      x_228123;\n        ",
            "                        float defunc_1_op_res_228126 = x_228122 +\n                                      x_228124;\n                                \n                                x_228121 = defunc_1_op_res_228125;\n                                x_228122 = defunc_1_op_res_228126;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_228103)[sext_i32_i64(local_tid_228099)] =\n                                    x_228121;\n                                ((__local\n                                  float *) red_arr_mem_228105)[sext_i32_i64(local_tid_228099)] =\n                                    x_228122;\n                            }\n                        }\n                        skip_waves_228137 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_228099 == 0) {\n                            ((__global float *) mem_223759)[gtid_213493 *\n                                                            l_n_m_196752 +\n                                                            gtid_213494] =\n                                x_228121;\n                            ((__global float *) mem_223763)[gtid_213493 *\n                                                            l_n_m_196752 +\n                                                            gtid_213494] =\n                                x_228122;\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                                        uint sync_arr_mem_228281_backing_offset_0,\n                                        uint red_arr_mem_2",
            "28279_backing_offset_1,\n                                        uint red_arr_mem_228277_backing_offset_2,\n                                        uint red_arr_mem_228275_backing_offset_3,\n                                        uint red_arr_mem_228273_backing_offset_4,\n                                        uint red_arr_mem_228271_backing_offset_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_228249,\n                                        int64_t elements_per_thread_228250,\n                                        int64_t virt_num_groups_228251,\n                                        int64_t threads_per_segment_228253,\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_228254,\n    ",
            "                                    __global\n                                        unsigned char *segred_tmp_mem_228256,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228258,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228260,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228262,\n                                        __global\n                                        unsigned char *mainzicounter_mem_228264)\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    volatile unsigned char *sync_arr_mem_228281_backing_5 =\n                           &shared_mem[sync_arr_mem_228281_backing_offset_0];\n    volatile unsigned char *red_arr_mem_228279_backing_4 =\n                           &shared_mem[red_arr_mem_228279_backing_offset_1];\n    volatile unsigned char *red_arr_mem_228277_backing_3 =\n                           &shared_mem[red_arr_mem_228277_backing_offset_2];\n    volatile unsigned char *red_arr_mem_228275_backing_2 =\n                           &shared_mem[red_arr_mem_228275_backing_offset_3];\n    volatile unsigned char *red_arr_mem_228273_backing_1 =\n                           &shared_mem[red_arr_mem_228273_backing_offset_4];\n    volatile unsigned char *red_arr_mem_228271_backing_0 =\n                           &shared_mem[red_arr_mem_228271_backing_offset_5];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228266;\n    int32_t local_tid_228267;\n    int64_t group_sizze_228270;\n    int32_t wave_sizze_228269;\n    int32_t group_tid_228268;\n    \n    global_tid_228266 = get_global_id(0);\n    local_tid_228267 = get_local_id(0);\n    group_sizze_228270 = get_local_size(0);\n    wave_sizze_228269 = LOCKSTEP_WIDTH",
            ";\n    group_tid_228268 = get_group_id(0);\n    \n    int32_t phys_tid_214506 = global_tid_228266;\n    __local unsigned char *red_arr_mem_228271;\n    \n    red_arr_mem_228271 = (__local unsigned char *) red_arr_mem_228271_backing_0;\n    \n    __local unsigned char *red_arr_mem_228273;\n    \n    red_arr_mem_228273 = (__local unsigned char *) red_arr_mem_228273_backing_1;\n    \n    __local unsigned char *red_arr_mem_228275;\n    \n    red_arr_mem_228275 = (__local unsigned char *) red_arr_mem_228275_backing_2;\n    \n    __local unsigned char *red_arr_mem_228277;\n    \n    red_arr_mem_228277 = (__local unsigned char *) red_arr_mem_228277_backing_3;\n    \n    __local unsigned char *red_arr_mem_228279;\n    \n    red_arr_mem_228279 = (__local unsigned char *) red_arr_mem_228279_backing_4;\n    \n    __local unsigned char *sync_arr_mem_228281;\n    \n    sync_arr_mem_228281 = (__local\n                           unsigned char *) sync_arr_mem_228281_backing_5;\n    \n    int32_t phys_group_id_228283;\n    \n    phys_group_id_228283 = get_group_id(0);\n    for (int32_t i_228284 = 0; i_228284 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_228251) - phys_group_id_228283,\n                   sext_i64_i32(num_groups_214496)); i_228284++) {\n        int32_t virt_group_id_228285 = phys_group_id_228283 + i_228284 *\n                sext_i64_i32(num_groups_214496);\n        int32_t flat_segment_id_228286 = squot32(virt_group_id_228285,\n                                                 sext_i64_i32(groups_per_segment_228249));\n        int64_t global_tid_228287 = srem64(sext_i32_i64(virt_group_id_228285) *\n                                           segred_group_sizze_214495 +\n                                           sext_i32_i64(local_tid_228267),\n                                           segred_group_sizze_214495 *\n                                           groups_per_segment_228249);\n        int64_t slice_228288 = l_n_m_196752;\n        int64_t slice_228289 = m_196691 * slice_228288;\n        int64_t gtid_",
            "214503 = squot64(sext_i32_i64(flat_segment_id_228286),\n                                      slice_228288);\n        int64_t remnant_228290 = sext_i32_i64(flat_segment_id_228286) -\n                gtid_214503 * slice_228288;\n        int64_t gtid_214504 = remnant_228290;\n        int64_t remnant_228291 = remnant_228290 - gtid_214504;\n        int64_t gtid_214505;\n        float x_acc_228292;\n        float x_acc_228293;\n        float x_acc_228294;\n        float x_acc_228295;\n        float x_acc_228296;\n        int64_t chunk_sizze_228297 = smin64(elements_per_thread_228250,\n                                            sdiv_up64(q_l_196697 -\n                                                      global_tid_228287,\n                                                      threads_per_segment_228253));\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_228292 = 0.0F;\n            x_acc_228293 = 0.0F;\n            x_acc_228294 = 0.0F;\n            x_acc_228295 = 0.0F;\n            x_acc_228296 = 0.0F;\n        }\n        for (int64_t i_228313 = 0; i_228313 < chunk_sizze_228297; i_228313++) {\n            gtid_214505 = global_tid_228287 + threads_per_segment_228253 *\n                i_228313;\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_228292;\n                    x_214508 = x_acc_228293;\n                    x_214509 = x_acc_228294;\n                    x_214510 = x_acc_228295;\n                    x_214511 = x_acc_228296;\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_228292 = defunc_1_op_res_214517;\n                        x_acc_228293 = defunc_1_op_res_214518;\n                        x_acc_228294 = defunc_1_op_res_214519;\n                        x_acc_228295 = defunc_1_op_res_214520;\n                        x_acc_228296 = 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_228292;\n            x_214508 = x_acc_228293;\n            x_214509 = x_acc_228294;\n            x_214510 = x_acc_228295;\n            x_214511 = x_acc_228296;\n            ((__local\n              float *) red_arr_mem_228271)[sext_i32_i64(local_tid_228267)] =\n                x_214507;\n            ((__local\n              float *) red_arr_mem_228273)[sext_i32_i64(local_tid_228267)] =\n                x_214508;\n            ((__local\n              float *) red_arr_mem_228275)[sext_i32_i64(local_tid_228267)] =\n                x_214509;\n            ((__local\n              float *) red_arr_mem_228277)[sext_i32_i64(local_tid_228267)] =\n                x_214510;\n            ((__local\n              float *) red_arr_mem_228279)[sext_i32_i64(local_tid_228267)] =\n                x_214511;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_228314;\n        int32_t skip_waves_228315 = 1;\n        float x_228298;\n        float x_228299;\n        float x_228300;\n        float x_228301;\n        float x_228302;\n        float x_228303;\n        float x_228304;\n        float x_228305;\n        float x_228306;\n        float x_228307;\n        \n        offset_228314 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_228267,\n                      sext_i64_i32(segred_group_sizze_214495))) {\n                x_228298 = ((__lo",
            "cal\n                             float *) red_arr_mem_228271)[sext_i32_i64(local_tid_228267 +\n                                                          offset_228314)];\n                x_228299 = ((__local\n                             float *) red_arr_mem_228273)[sext_i32_i64(local_tid_228267 +\n                                                          offset_228314)];\n                x_228300 = ((__local\n                             float *) red_arr_mem_228275)[sext_i32_i64(local_tid_228267 +\n                                                          offset_228314)];\n                x_228301 = ((__local\n                             float *) red_arr_mem_228277)[sext_i32_i64(local_tid_228267 +\n                                                          offset_228314)];\n                x_228302 = ((__local\n                             float *) red_arr_mem_228279)[sext_i32_i64(local_tid_228267 +\n                                                          offset_228314)];\n            }\n        }\n        offset_228314 = 1;\n        while (slt32(offset_228314, wave_sizze_228269)) {\n            if (slt32(local_tid_228267 + offset_228314,\n                      sext_i64_i32(segred_group_sizze_214495)) &&\n                ((local_tid_228267 - squot32(local_tid_228267,\n                                             wave_sizze_228269) *\n                  wave_sizze_228269) & (2 * offset_228314 - 1)) == 0) {\n                // read array element\n                {\n                    x_228303 = ((volatile __local\n                                 float *) red_arr_mem_228271)[sext_i32_i64(local_tid_228267 +\n                                                              offset_228314)];\n                    x_228304 = ((volatile __local\n                                 float *) red_arr_mem_228273)[sext_i32_i64(local_tid_228267 +\n                                                              offset_228314)];\n                    x_228305 = ((volatile __local\n                                 float ",
            "*) red_arr_mem_228275)[sext_i32_i64(local_tid_228267 +\n                                                              offset_228314)];\n                    x_228306 = ((volatile __local\n                                 float *) red_arr_mem_228277)[sext_i32_i64(local_tid_228267 +\n                                                              offset_228314)];\n                    x_228307 = ((volatile __local\n                                 float *) red_arr_mem_228279)[sext_i32_i64(local_tid_228267 +\n                                                              offset_228314)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228308 = x_228298 + x_228303;\n                    float defunc_1_op_res_228309 = x_228299 + x_228304;\n                    float defunc_1_op_res_228310 = x_228300 + x_228305;\n                    float defunc_1_op_res_228311 = x_228301 + x_228306;\n                    float defunc_1_op_res_228312 = x_228302 + x_228307;\n                    \n                    x_228298 = defunc_1_op_res_228308;\n                    x_228299 = defunc_1_op_res_228309;\n                    x_228300 = defunc_1_op_res_228310;\n                    x_228301 = defunc_1_op_res_228311;\n                    x_228302 = defunc_1_op_res_228312;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_228271)[sext_i32_i64(local_tid_228267)] =\n                        x_228298;\n                    ((volatile __local\n                      float *) red_arr_mem_228273)[sext_i32_i64(local_tid_228267)] =\n                        x_228299;\n                    ((volatile __local\n                      float *) red_arr_mem_228275)[sext_i32_i64(local_tid_228267)] =\n                        x_228300;\n                    ((volatile __local\n                      float *) red_arr_mem_228277)[sext_i32_i64(local_tid_228267)] =\n    ",
            "                    x_228301;\n                    ((volatile __local\n                      float *) red_arr_mem_228279)[sext_i32_i64(local_tid_228267)] =\n                        x_228302;\n                }\n            }\n            offset_228314 *= 2;\n        }\n        while (slt32(skip_waves_228315,\n                     squot32(sext_i64_i32(segred_group_sizze_214495) +\n                             wave_sizze_228269 - 1, wave_sizze_228269))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_228314 = skip_waves_228315 * wave_sizze_228269;\n            if (slt32(local_tid_228267 + offset_228314,\n                      sext_i64_i32(segred_group_sizze_214495)) &&\n                ((local_tid_228267 - squot32(local_tid_228267,\n                                             wave_sizze_228269) *\n                  wave_sizze_228269) == 0 && (squot32(local_tid_228267,\n                                                      wave_sizze_228269) & (2 *\n                                                                            skip_waves_228315 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_228303 = ((__local\n                                 float *) red_arr_mem_228271)[sext_i32_i64(local_tid_228267 +\n                                                              offset_228314)];\n                    x_228304 = ((__local\n                                 float *) red_arr_mem_228273)[sext_i32_i64(local_tid_228267 +\n                                                              offset_228314)];\n                    x_228305 = ((__local\n                                 float *) red_arr_mem_228275)[sext_i32_i64(local_tid_228267 +\n                                                              offset_228314)];\n                    x_228306 = ((__local\n                                 float *) red_arr_mem_228277)[sext_i32_i64(local_tid_228267 +\n     ",
            "                                                         offset_228314)];\n                    x_228307 = ((__local\n                                 float *) red_arr_mem_228279)[sext_i32_i64(local_tid_228267 +\n                                                              offset_228314)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228308 = x_228298 + x_228303;\n                    float defunc_1_op_res_228309 = x_228299 + x_228304;\n                    float defunc_1_op_res_228310 = x_228300 + x_228305;\n                    float defunc_1_op_res_228311 = x_228301 + x_228306;\n                    float defunc_1_op_res_228312 = x_228302 + x_228307;\n                    \n                    x_228298 = defunc_1_op_res_228308;\n                    x_228299 = defunc_1_op_res_228309;\n                    x_228300 = defunc_1_op_res_228310;\n                    x_228301 = defunc_1_op_res_228311;\n                    x_228302 = defunc_1_op_res_228312;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_228271)[sext_i32_i64(local_tid_228267)] =\n                        x_228298;\n                    ((__local\n                      float *) red_arr_mem_228273)[sext_i32_i64(local_tid_228267)] =\n                        x_228299;\n                    ((__local\n                      float *) red_arr_mem_228275)[sext_i32_i64(local_tid_228267)] =\n                        x_228300;\n                    ((__local\n                      float *) red_arr_mem_228277)[sext_i32_i64(local_tid_228267)] =\n                        x_228301;\n                    ((__local\n                      float *) red_arr_mem_228279)[sext_i32_i64(local_tid_228267)] =\n                        x_228302;\n                }\n            }\n            skip_waves_228315 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the",
            " result in accumulator\n        {\n            if (sext_i32_i64(local_tid_228267) == (int64_t) 0) {\n                x_acc_228292 = x_228298;\n                x_acc_228293 = x_228299;\n                x_acc_228294 = x_228300;\n                x_acc_228295 = x_228301;\n                x_acc_228296 = x_228302;\n            }\n        }\n        if (groups_per_segment_228249 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_228267 == 0) {\n                    ((__global float *) mem_223840)[gtid_214503 * l_n_m_196752 +\n                                                    gtid_214504] = x_acc_228292;\n                    ((__global float *) mem_223844)[gtid_214503 * l_n_m_196752 +\n                                                    gtid_214504] = x_acc_228293;\n                    ((__global float *) mem_223848)[gtid_214503 * l_n_m_196752 +\n                                                    gtid_214504] = x_acc_228294;\n                    ((__global float *) mem_223852)[gtid_214503 * l_n_m_196752 +\n                                                    gtid_214504] = x_acc_228295;\n                    ((__global float *) mem_223856)[gtid_214503 * l_n_m_196752 +\n                                                    gtid_214504] = x_acc_228296;\n                }\n            }\n        } else {\n            int32_t old_counter_228316;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_228267 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_228254)[sext_i32_i64(virt_group_id_228285)] =\n                        x_acc_228292;\n                    ((__global\n                      float *) segred_tmp_mem_228256)[sext_i32_i64(virt_group_id_228285)] =\n                        x_acc_228293;\n                    ((__global\n                      float *) segred_tmp_mem_228258)[sext_i32_i64(virt_group_id_228285)] =\n   ",
            "                     x_acc_228294;\n                    ((__global\n                      float *) segred_tmp_mem_228260)[sext_i32_i64(virt_group_id_228285)] =\n                        x_acc_228295;\n                    ((__global\n                      float *) segred_tmp_mem_228262)[sext_i32_i64(virt_group_id_228285)] =\n                        x_acc_228296;\n                    mem_fence_global();\n                    old_counter_228316 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228264)[sext_i32_i64(srem32(flat_segment_id_228286,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_228281)[(int64_t) 0] =\n                        old_counter_228316 == groups_per_segment_228249 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_228317;\n            \n            is_last_group_228317 = ((__local\n                                     bool *) sync_arr_mem_228281)[(int64_t) 0];\n            if (is_last_group_228317) {\n                if (local_tid_228267 == 0) {\n                    old_counter_228316 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228264)[sext_i32_i64(srem32(flat_segment_id_228286,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_228249));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_228318 =\n           ",
            "                 sdiv_up64(groups_per_segment_228249,\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_228319 = 0; i_228319 <\n                         read_per_thread_228318; i_228319++) {\n                        int64_t group_res_id_228320 =\n                                sext_i32_i64(local_tid_228267) *\n                                read_per_thread_228318 + i_228319;\n                        int64_t index_of_group_res_228321 =\n                                sext_i32_i64(flat_segment_id_228286) *\n                                groups_per_segment_228249 + group_res_id_228320;\n                        \n                        if (slt64(group_res_id_228320,\n                                  groups_per_segment_228249)) {\n                            x_214512 = ((__global\n                                         float *) segred_tmp_mem_228254)[index_of_group_res_228321];\n                            x_214513 = ((__global\n                                         float *) segred_tmp_mem_228256)[index_of_group_res_228321];\n                            x_214514 = ((__global\n                                         float *) segred_tmp_mem_228258)[index_of_group_res_228321];\n                            x_214515 = ((__global\n                                         float *) segred_tmp_mem_228260)[index_of_group_res_228321];\n                            x_214516 = ((__global\n                                         float *) segred_tmp_mem_228262)[index_of_group_res_228321];\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_228271)[sext_i32_i64(local_tid_228267)] =\n                    x_214507;\n                ((__local\n                  float *) red_arr_mem_228273)[sext_i32_i64(local_tid_228267)] =\n                    x_214508;\n                ((__local\n                  float *) red_arr_mem_228275)[sext_i32_i64(local_tid_228267)] =\n                    x_214509;\n                ((__local\n                  float *) red_arr_mem_228277)[sext_i32_i64(local_tid_228267)] =\n                    x_214510;\n                ((__local\n                  float *) red_arr_mem_228279)[sext_i32_i64(local_tid_228267)] =\n                    x_214511;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_228322;\n                    int32_t skip_waves_228323 = 1;\n                    float x_228298;\n                    float x_228299;\n                    float x_228300;\n                    float x_228301;\n                    float x_228302;\n                    float x_228303;\n                    float x_228304;\n                    float x_228305;\n                    float x_228306;\n                    float x_228307;\n                    \n                    offset_228322 = 0;\n                    // participating threads read initial accumulator\n                    {\n              ",
            "          if (slt32(local_tid_228267,\n                                  sext_i64_i32(segred_group_sizze_214495))) {\n                            x_228298 = ((__local\n                                         float *) red_arr_mem_228271)[sext_i32_i64(local_tid_228267 +\n                                                                      offset_228322)];\n                            x_228299 = ((__local\n                                         float *) red_arr_mem_228273)[sext_i32_i64(local_tid_228267 +\n                                                                      offset_228322)];\n                            x_228300 = ((__local\n                                         float *) red_arr_mem_228275)[sext_i32_i64(local_tid_228267 +\n                                                                      offset_228322)];\n                            x_228301 = ((__local\n                                         float *) red_arr_mem_228277)[sext_i32_i64(local_tid_228267 +\n                                                                      offset_228322)];\n                            x_228302 = ((__local\n                                         float *) red_arr_mem_228279)[sext_i32_i64(local_tid_228267 +\n                                                                      offset_228322)];\n                        }\n                    }\n                    offset_228322 = 1;\n                    while (slt32(offset_228322, wave_sizze_228269)) {\n                        if (slt32(local_tid_228267 + offset_228322,\n                                  sext_i64_i32(segred_group_sizze_214495)) &&\n                            ((local_tid_228267 - squot32(local_tid_228267,\n                                                         wave_sizze_228269) *\n                              wave_sizze_228269) & (2 * offset_228322 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_228303 = ((v",
            "olatile __local\n                                             float *) red_arr_mem_228271)[sext_i32_i64(local_tid_228267 +\n                                                                          offset_228322)];\n                                x_228304 = ((volatile __local\n                                             float *) red_arr_mem_228273)[sext_i32_i64(local_tid_228267 +\n                                                                          offset_228322)];\n                                x_228305 = ((volatile __local\n                                             float *) red_arr_mem_228275)[sext_i32_i64(local_tid_228267 +\n                                                                          offset_228322)];\n                                x_228306 = ((volatile __local\n                                             float *) red_arr_mem_228277)[sext_i32_i64(local_tid_228267 +\n                                                                          offset_228322)];\n                                x_228307 = ((volatile __local\n                                             float *) red_arr_mem_228279)[sext_i32_i64(local_tid_228267 +\n                                                                          offset_228322)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228308 = x_228298 +\n                                      x_228303;\n                                float defunc_1_op_res_228309 = x_228299 +\n                                      x_228304;\n                                float defunc_1_op_res_228310 = x_228300 +\n                                      x_228305;\n                                float defunc_1_op_res_228311 = x_228301 +\n                                      x_228306;\n                                float defunc_1_op_res_228312 = x_228302 +\n                                      x_228307;\n                        ",
            "        \n                                x_228298 = defunc_1_op_res_228308;\n                                x_228299 = defunc_1_op_res_228309;\n                                x_228300 = defunc_1_op_res_228310;\n                                x_228301 = defunc_1_op_res_228311;\n                                x_228302 = defunc_1_op_res_228312;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228271)[sext_i32_i64(local_tid_228267)] =\n                                    x_228298;\n                                ((volatile __local\n                                  float *) red_arr_mem_228273)[sext_i32_i64(local_tid_228267)] =\n                                    x_228299;\n                                ((volatile __local\n                                  float *) red_arr_mem_228275)[sext_i32_i64(local_tid_228267)] =\n                                    x_228300;\n                                ((volatile __local\n                                  float *) red_arr_mem_228277)[sext_i32_i64(local_tid_228267)] =\n                                    x_228301;\n                                ((volatile __local\n                                  float *) red_arr_mem_228279)[sext_i32_i64(local_tid_228267)] =\n                                    x_228302;\n                            }\n                        }\n                        offset_228322 *= 2;\n                    }\n                    while (slt32(skip_waves_228323,\n                                 squot32(sext_i64_i32(segred_group_sizze_214495) +\n                                         wave_sizze_228269 - 1,\n                                         wave_sizze_228269))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_228322 = skip_waves_228323 * wave_sizze_228269;\n                        if (slt32(local_tid_228267 ",
            "+ offset_228322,\n                                  sext_i64_i32(segred_group_sizze_214495)) &&\n                            ((local_tid_228267 - squot32(local_tid_228267,\n                                                         wave_sizze_228269) *\n                              wave_sizze_228269) == 0 &&\n                             (squot32(local_tid_228267, wave_sizze_228269) &\n                              (2 * skip_waves_228323 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_228303 = ((__local\n                                             float *) red_arr_mem_228271)[sext_i32_i64(local_tid_228267 +\n                                                                          offset_228322)];\n                                x_228304 = ((__local\n                                             float *) red_arr_mem_228273)[sext_i32_i64(local_tid_228267 +\n                                                                          offset_228322)];\n                                x_228305 = ((__local\n                                             float *) red_arr_mem_228275)[sext_i32_i64(local_tid_228267 +\n                                                                          offset_228322)];\n                                x_228306 = ((__local\n                                             float *) red_arr_mem_228277)[sext_i32_i64(local_tid_228267 +\n                                                                          offset_228322)];\n                                x_228307 = ((__local\n                                             float *) red_arr_mem_228279)[sext_i32_i64(local_tid_228267 +\n                                                                          offset_228322)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228308 = x_228298 +\n                             ",
            "         x_228303;\n                                float defunc_1_op_res_228309 = x_228299 +\n                                      x_228304;\n                                float defunc_1_op_res_228310 = x_228300 +\n                                      x_228305;\n                                float defunc_1_op_res_228311 = x_228301 +\n                                      x_228306;\n                                float defunc_1_op_res_228312 = x_228302 +\n                                      x_228307;\n                                \n                                x_228298 = defunc_1_op_res_228308;\n                                x_228299 = defunc_1_op_res_228309;\n                                x_228300 = defunc_1_op_res_228310;\n                                x_228301 = defunc_1_op_res_228311;\n                                x_228302 = defunc_1_op_res_228312;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_228271)[sext_i32_i64(local_tid_228267)] =\n                                    x_228298;\n                                ((__local\n                                  float *) red_arr_mem_228273)[sext_i32_i64(local_tid_228267)] =\n                                    x_228299;\n                                ((__local\n                                  float *) red_arr_mem_228275)[sext_i32_i64(local_tid_228267)] =\n                                    x_228300;\n                                ((__local\n                                  float *) red_arr_mem_228277)[sext_i32_i64(local_tid_228267)] =\n                                    x_228301;\n                                ((__local\n                                  float *) red_arr_mem_228279)[sext_i32_i64(local_tid_228267)] =\n                                    x_228302;\n                            }\n                        }\n                        ski",
            "p_waves_228323 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_228267 == 0) {\n                            ((__global float *) mem_223840)[gtid_214503 *\n                                                            l_n_m_196752 +\n                                                            gtid_214504] =\n                                x_228298;\n                            ((__global float *) mem_223844)[gtid_214503 *\n                                                            l_n_m_196752 +\n                                                            gtid_214504] =\n                                x_228299;\n                            ((__global float *) mem_223848)[gtid_214503 *\n                                                            l_n_m_196752 +\n                                                            gtid_214504] =\n                                x_228300;\n                            ((__global float *) mem_223852)[gtid_214503 *\n                                                            l_n_m_196752 +\n                                                            gtid_214504] =\n                                x_228301;\n                            ((__global float *) mem_223856)[gtid_214503 *\n                                                            l_n_m_196752 +\n                                                            gtid_214504] =\n                                x_228302;\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_214495\n}\n__kernel void mainzisegred_large_214604(__global int *global_failure,\n                                        uint sync_arr_mem_228389_backing_offset_0,\n                                        uint red_arr_mem_228387_backing_offset_1,\n                             ",
            "           uint red_arr_mem_228385_backing_offset_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_228369,\n                                        int64_t elements_per_thread_228370,\n                                        int64_t virt_num_groups_228371,\n                                        int64_t threads_per_segment_228373,\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                                        __global\n                                        unsigned char *segred_tmp_mem_228374,\n                                        __global\n                          ",
            "              unsigned char *segred_tmp_mem_228376,\n                                        __global\n                                        unsigned char *mainzicounter_mem_228378)\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    volatile unsigned char *sync_arr_mem_228389_backing_2 =\n                           &shared_mem[sync_arr_mem_228389_backing_offset_0];\n    volatile unsigned char *red_arr_mem_228387_backing_1 =\n                           &shared_mem[red_arr_mem_228387_backing_offset_1];\n    volatile unsigned char *red_arr_mem_228385_backing_0 =\n                           &shared_mem[red_arr_mem_228385_backing_offset_2];\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_214604 = 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    __local unsigned char *red_arr_mem_228387;\n    \n    red_arr_mem_228387 = (__local unsigned char *) red_arr_mem_228387_backing_1;\n    \n    __local unsigned char *sync_arr_mem_228389;\n    \n    sync_arr_mem_228389 = (__local\n                           unsigned char *) sync_arr_mem_228389_backing_2;\n    \n    int32_t phys_group_id_228391;\n    \n    phys_group_id_228391 = get_group_id(0);\n    for (int32_t i_228392 = 0; i_228392 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_228371) - phys_group_id_228391,\n                   sext_i64_i32(num_groups_214597)); i_228392++) {\n        int32_t virt_group_id_228393 = phys_grou",
            "p_id_228391 + i_228392 *\n                sext_i64_i32(num_groups_214597);\n        int32_t flat_segment_id_228394 = squot32(virt_group_id_228393,\n                                                 sext_i64_i32(groups_per_segment_228369));\n        int64_t global_tid_228395 = srem64(sext_i32_i64(virt_group_id_228393) *\n                                           segred_group_sizze_214596 +\n                                           sext_i32_i64(local_tid_228381),\n                                           segred_group_sizze_214596 *\n                                           groups_per_segment_228369);\n        int64_t slice_228396 = l_n_m_196752;\n        int64_t slice_228397 = m_196691 * slice_228396;\n        int64_t gtid_214601 = squot64(sext_i32_i64(flat_segment_id_228394),\n                                      slice_228396);\n        int64_t remnant_228398 = sext_i32_i64(flat_segment_id_228394) -\n                gtid_214601 * slice_228396;\n        int64_t gtid_214602 = remnant_228398;\n        int64_t remnant_228399 = remnant_228398 - gtid_214602;\n        int64_t gtid_214603;\n        float x_acc_228400;\n        float x_acc_228401;\n        int64_t chunk_sizze_228402 = smin64(elements_per_thread_228370,\n                                            sdiv_up64(q_l_196697 -\n                                                      global_tid_228395,\n                                                      threads_per_segment_228373));\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_228400 = 0.0F;\n            x_acc_228401 = 0.0F;\n        }\n        for (int64_t i_228409 = 0; i_228409 < chunk_sizze_228402; i_228409++) {\n            gtid_214603 = global_tid_228395 + threads_per_segment_228373 *\n                i_228409;\n            // apply map function\n            {\n                int64_t x_214621;\n                \n                x_214621 = ((__global int6",
            "4_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_21462",
            "8;\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                // load accumulator\n                {\n                    x_214605 = x_acc_228400;\n                    x_214606 = x_acc_228401;\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_228400 = defunc_1_op_res_214609;\n                        x_acc_228401 = defunc_1_op_res_214610;\n                    }\n                }\n            }\n        }\n        // to reduce current chunk, first store our result in memory\n        {\n            x_214605 = x_acc_228400;\n            x_214606 = x_acc_228401;\n            ((__local\n              float *) red_arr_mem_228385)[sext_i32_i64(local_tid_228381)] =\n                x_214605;\n            ((__local\n              float *) red_arr_mem_228387)[sext_i32_i64(local_tid_228381)] =\n                x_214606;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_228410;\n        int32_t skip_waves_228411 = 1;\n        float x_228403;\n        float x_228404;\n        float x_228405;\n        float x_228406;\n        \n        offset_228410 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_228381,\n                      sext_i64_i32(segre",
            "d_group_sizze_214596))) {\n                x_228403 = ((__local\n                             float *) red_arr_mem_228385)[sext_i32_i64(local_tid_228381 +\n                                                          offset_228410)];\n                x_228404 = ((__local\n                             float *) red_arr_mem_228387)[sext_i32_i64(local_tid_228381 +\n                                                          offset_228410)];\n            }\n        }\n        offset_228410 = 1;\n        while (slt32(offset_228410, wave_sizze_228383)) {\n            if (slt32(local_tid_228381 + offset_228410,\n                      sext_i64_i32(segred_group_sizze_214596)) &&\n                ((local_tid_228381 - squot32(local_tid_228381,\n                                             wave_sizze_228383) *\n                  wave_sizze_228383) & (2 * offset_228410 - 1)) == 0) {\n                // read array element\n                {\n                    x_228405 = ((volatile __local\n                                 float *) red_arr_mem_228385)[sext_i32_i64(local_tid_228381 +\n                                                              offset_228410)];\n                    x_228406 = ((volatile __local\n                                 float *) red_arr_mem_228387)[sext_i32_i64(local_tid_228381 +\n                                                              offset_228410)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228407 = x_228403 + x_228405;\n                    float defunc_1_op_res_228408 = x_228404 + x_228406;\n                    \n                    x_228403 = defunc_1_op_res_228407;\n                    x_228404 = defunc_1_op_res_228408;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_228385)[sext_i32_i64(local_tid_228381)] =\n                        x_228403;\n                    ((volatile __local\n  ",
            "                    float *) red_arr_mem_228387)[sext_i32_i64(local_tid_228381)] =\n                        x_228404;\n                }\n            }\n            offset_228410 *= 2;\n        }\n        while (slt32(skip_waves_228411,\n                     squot32(sext_i64_i32(segred_group_sizze_214596) +\n                             wave_sizze_228383 - 1, wave_sizze_228383))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_228410 = skip_waves_228411 * wave_sizze_228383;\n            if (slt32(local_tid_228381 + offset_228410,\n                      sext_i64_i32(segred_group_sizze_214596)) &&\n                ((local_tid_228381 - squot32(local_tid_228381,\n                                             wave_sizze_228383) *\n                  wave_sizze_228383) == 0 && (squot32(local_tid_228381,\n                                                      wave_sizze_228383) & (2 *\n                                                                            skip_waves_228411 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_228405 = ((__local\n                                 float *) red_arr_mem_228385)[sext_i32_i64(local_tid_228381 +\n                                                              offset_228410)];\n                    x_228406 = ((__local\n                                 float *) red_arr_mem_228387)[sext_i32_i64(local_tid_228381 +\n                                                              offset_228410)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228407 = x_228403 + x_228405;\n                    float defunc_1_op_res_228408 = x_228404 + x_228406;\n                    \n                    x_228403 = defunc_1_op_res_228407;\n                    x_228404 = defunc_1_op_res_228408;\n                }\n                // write result of operation\n      ",
            "          {\n                    ((__local\n                      float *) red_arr_mem_228385)[sext_i32_i64(local_tid_228381)] =\n                        x_228403;\n                    ((__local\n                      float *) red_arr_mem_228387)[sext_i32_i64(local_tid_228381)] =\n                        x_228404;\n                }\n            }\n            skip_waves_228411 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_228381) == (int64_t) 0) {\n                x_acc_228400 = x_228403;\n                x_acc_228401 = x_228404;\n            }\n        }\n        if (groups_per_segment_228369 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_228381 == 0) {\n                    ((__global float *) mem_223882)[gtid_214601 * l_n_m_196752 +\n                                                    gtid_214602] = x_acc_228400;\n                    ((__global float *) mem_223886)[gtid_214601 * l_n_m_196752 +\n                                                    gtid_214602] = x_acc_228401;\n                }\n            }\n        } else {\n            int32_t old_counter_228412;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_228381 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_228374)[sext_i32_i64(virt_group_id_228393)] =\n                        x_acc_228400;\n                    ((__global\n                      float *) segred_tmp_mem_228376)[sext_i32_i64(virt_group_id_228393)] =\n                        x_acc_228401;\n                    mem_fence_global();\n                    old_counter_228412 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228378)[sext_i32_i64(srem32(flat_segment_id_228394,\n  ",
            "                                                                                                    10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_228389)[(int64_t) 0] =\n                        old_counter_228412 == groups_per_segment_228369 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_228413;\n            \n            is_last_group_228413 = ((__local\n                                     bool *) sync_arr_mem_228389)[(int64_t) 0];\n            if (is_last_group_228413) {\n                if (local_tid_228381 == 0) {\n                    old_counter_228412 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228378)[sext_i32_i64(srem32(flat_segment_id_228394,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_228369));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_228414 =\n                            sdiv_up64(groups_per_segment_228369,\n                                      segred_group_sizze_214596);\n                    \n                    x_214605 = 0.0F;\n                    x_214606 = 0.0F;\n                    for (int64_t i_228415 = 0; i_228415 <\n                         read_per_thread_228414; i_228415++) {\n                        int64_t group_res_id_228416 =\n                                sext_i32_i64(local_tid_228381) *\n                                read_per_thread_228414 + i_228415;\n                        int64_t index_of_group_res_228417 =\n                                sext_i32_i64(flat_s",
            "egment_id_228394) *\n                                groups_per_segment_228369 + group_res_id_228416;\n                        \n                        if (slt64(group_res_id_228416,\n                                  groups_per_segment_228369)) {\n                            x_214607 = ((__global\n                                         float *) segred_tmp_mem_228374)[index_of_group_res_228417];\n                            x_214608 = ((__global\n                                         float *) segred_tmp_mem_228376)[index_of_group_res_228417];\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_228385)[sext_i32_i64(local_tid_228381)] =\n                    x_214605;\n                ((__local\n                  float *) red_arr_mem_228387)[sext_i32_i64(local_tid_228381)] =\n                    x_214606;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_228418;\n                    int32_t skip_waves_228419 = 1;\n                    float x_228403;\n                    float x_228404;\n                    float x_228405;\n                    float x_228406;\n                    \n                    offset_228418 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_228381,\n                                  sext_i64_i32(segred_group_sizze_214596))) {\n                            x_228403 = ((__local\n                                         float *) red_arr_mem_228385)[sext_i32_i64(local",
            "_tid_228381 +\n                                                                      offset_228418)];\n                            x_228404 = ((__local\n                                         float *) red_arr_mem_228387)[sext_i32_i64(local_tid_228381 +\n                                                                      offset_228418)];\n                        }\n                    }\n                    offset_228418 = 1;\n                    while (slt32(offset_228418, wave_sizze_228383)) {\n                        if (slt32(local_tid_228381 + offset_228418,\n                                  sext_i64_i32(segred_group_sizze_214596)) &&\n                            ((local_tid_228381 - squot32(local_tid_228381,\n                                                         wave_sizze_228383) *\n                              wave_sizze_228383) & (2 * offset_228418 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_228405 = ((volatile __local\n                                             float *) red_arr_mem_228385)[sext_i32_i64(local_tid_228381 +\n                                                                          offset_228418)];\n                                x_228406 = ((volatile __local\n                                             float *) red_arr_mem_228387)[sext_i32_i64(local_tid_228381 +\n                                                                          offset_228418)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228407 = x_228403 +\n                                      x_228405;\n                                float defunc_1_op_res_228408 = x_228404 +\n                                      x_228406;\n                                \n                                x_228403 = defunc_1_op_res_228407;\n                                x_",
            "228404 = defunc_1_op_res_228408;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228385)[sext_i32_i64(local_tid_228381)] =\n                                    x_228403;\n                                ((volatile __local\n                                  float *) red_arr_mem_228387)[sext_i32_i64(local_tid_228381)] =\n                                    x_228404;\n                            }\n                        }\n                        offset_228418 *= 2;\n                    }\n                    while (slt32(skip_waves_228419,\n                                 squot32(sext_i64_i32(segred_group_sizze_214596) +\n                                         wave_sizze_228383 - 1,\n                                         wave_sizze_228383))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_228418 = skip_waves_228419 * wave_sizze_228383;\n                        if (slt32(local_tid_228381 + offset_228418,\n                                  sext_i64_i32(segred_group_sizze_214596)) &&\n                            ((local_tid_228381 - squot32(local_tid_228381,\n                                                         wave_sizze_228383) *\n                              wave_sizze_228383) == 0 &&\n                             (squot32(local_tid_228381, wave_sizze_228383) &\n                              (2 * skip_waves_228419 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_228405 = ((__local\n                                             float *) red_arr_mem_228385)[sext_i32_i64(local_tid_228381 +\n                                                                          offset_228418)];\n                                x_228406 = ((__local\n                                             float *) red_ar",
            "r_mem_228387)[sext_i32_i64(local_tid_228381 +\n                                                                          offset_228418)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228407 = x_228403 +\n                                      x_228405;\n                                float defunc_1_op_res_228408 = x_228404 +\n                                      x_228406;\n                                \n                                x_228403 = defunc_1_op_res_228407;\n                                x_228404 = defunc_1_op_res_228408;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_228385)[sext_i32_i64(local_tid_228381)] =\n                                    x_228403;\n                                ((__local\n                                  float *) red_arr_mem_228387)[sext_i32_i64(local_tid_228381)] =\n                                    x_228404;\n                            }\n                        }\n                        skip_waves_228419 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_228381 == 0) {\n                            ((__global float *) mem_223882)[gtid_214601 *\n                                                            l_n_m_196752 +\n                                                            gtid_214602] =\n                                x_228403;\n                            ((__global float *) mem_223886)[gtid_214601 *\n                                                            l_n_m_196752 +\n                                                            gtid_214602] =\n                                x_228404;\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                                        uint sync_arr_mem_228629_backing_offset_0,\n                                        uint red_arr_mem_228627_backing_offset_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_228613,\n                                        int64_t elements_per_thread_228614,\n                                        int64_t virt_num_groups_228615,\n                                        int64_t threads_per_segment_228617,\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_228618,\n                                        __global\n                                        unsigned char *mainzicounter_mem_228620)\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    volatile unsigned char *sync_arr_mem_228629_b",
            "acking_1 =\n                           &shared_mem[sync_arr_mem_228629_backing_offset_0];\n    volatile unsigned char *red_arr_mem_228627_backing_0 =\n                           &shared_mem[red_arr_mem_228627_backing_offset_1];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228622;\n    int32_t local_tid_228623;\n    int64_t group_sizze_228626;\n    int32_t wave_sizze_228625;\n    int32_t group_tid_228624;\n    \n    global_tid_228622 = get_global_id(0);\n    local_tid_228623 = get_local_id(0);\n    group_sizze_228626 = get_local_size(0);\n    wave_sizze_228625 = LOCKSTEP_WIDTH;\n    group_tid_228624 = get_group_id(0);\n    \n    int32_t phys_tid_216280 = global_tid_228622;\n    __local unsigned char *red_arr_mem_228627;\n    \n    red_arr_mem_228627 = (__local unsigned char *) red_arr_mem_228627_backing_0;\n    \n    __local unsigned char *sync_arr_mem_228629;\n    \n    sync_arr_mem_228629 = (__local\n                           unsigned char *) sync_arr_mem_228629_backing_1;\n    \n    int32_t phys_group_id_228631;\n    \n    phys_group_id_228631 = get_group_id(0);\n    for (int32_t i_228632 = 0; i_228632 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_228615) - phys_group_id_228631,\n                   sext_i64_i32(num_groups_216274)); i_228632++) {\n        int32_t virt_group_id_228633 = phys_group_id_228631 + i_228632 *\n                sext_i64_i32(num_groups_216274);\n        int32_t flat_segment_id_228634 = squot32(virt_group_id_228633,\n                                                 sext_i64_i32(groups_per_segment_228613));\n        int64_t global_tid_228635 = srem64(sext_i32_i64(virt_group_id_228633) *\n                                           segred_group_sizze_216273 +\n                                           sext_i32_i64(local_tid_228623),\n                                           segred_group_sizze_216273 *\n                                           groups_per_segment_228613);\n        int64_t slice_228636 = t_n_m_196759;\n        int64_t slice_228",
            "637 = m_196691 * slice_228636;\n        int64_t gtid_216277 = squot64(sext_i32_i64(flat_segment_id_228634),\n                                      slice_228636);\n        int64_t remnant_228638 = sext_i32_i64(flat_segment_id_228634) -\n                gtid_216277 * slice_228636;\n        int64_t gtid_216278 = remnant_228638;\n        int64_t remnant_228639 = remnant_228638 - gtid_216278;\n        int64_t gtid_216279;\n        float x_acc_228640;\n        int64_t chunk_sizze_228641 = smin64(elements_per_thread_228614,\n                                            sdiv_up64(q_t_196696 -\n                                                      global_tid_228635,\n                                                      threads_per_segment_228617));\n        float x_216281;\n        float x_216282;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_228640 = 0.0F;\n        }\n        for (int64_t i_228645 = 0; i_228645 < chunk_sizze_228641; i_228645++) {\n            gtid_216279 = global_tid_228635 + threads_per_segment_228617 *\n                i_228645;\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_228640;\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_228640 = 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_228640;\n            ((__local\n              float *) red_arr_mem_228627)[sext_i32_i64(local_tid_228623)] =\n                x_216281;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_228646;\n        int32_t skip_waves_228647 = 1;\n        float x_228642;\n        float x_228643;\n        \n        offset_228646 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_228623,\n                      sext_i64_i32(segred_group_sizze_216273))) {\n                x_228642 = ((__local\n                             float *) red_arr_mem_228627)[sext_i32_i64(",
            "local_tid_228623 +\n                                                          offset_228646)];\n            }\n        }\n        offset_228646 = 1;\n        while (slt32(offset_228646, wave_sizze_228625)) {\n            if (slt32(local_tid_228623 + offset_228646,\n                      sext_i64_i32(segred_group_sizze_216273)) &&\n                ((local_tid_228623 - squot32(local_tid_228623,\n                                             wave_sizze_228625) *\n                  wave_sizze_228625) & (2 * offset_228646 - 1)) == 0) {\n                // read array element\n                {\n                    x_228643 = ((volatile __local\n                                 float *) red_arr_mem_228627)[sext_i32_i64(local_tid_228623 +\n                                                              offset_228646)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228644 = x_228642 + x_228643;\n                    \n                    x_228642 = defunc_1_op_res_228644;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_228627)[sext_i32_i64(local_tid_228623)] =\n                        x_228642;\n                }\n            }\n            offset_228646 *= 2;\n        }\n        while (slt32(skip_waves_228647,\n                     squot32(sext_i64_i32(segred_group_sizze_216273) +\n                             wave_sizze_228625 - 1, wave_sizze_228625))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_228646 = skip_waves_228647 * wave_sizze_228625;\n            if (slt32(local_tid_228623 + offset_228646,\n                      sext_i64_i32(segred_group_sizze_216273)) &&\n                ((local_tid_228623 - squot32(local_tid_228623,\n                                             wave_sizze_228625) *\n                  wave_sizze_228625) == 0 && (squot32(local_tid_228623,\n                                   ",
            "                   wave_sizze_228625) & (2 *\n                                                                            skip_waves_228647 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_228643 = ((__local\n                                 float *) red_arr_mem_228627)[sext_i32_i64(local_tid_228623 +\n                                                              offset_228646)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228644 = x_228642 + x_228643;\n                    \n                    x_228642 = defunc_1_op_res_228644;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_228627)[sext_i32_i64(local_tid_228623)] =\n                        x_228642;\n                }\n            }\n            skip_waves_228647 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_228623) == (int64_t) 0) {\n                x_acc_228640 = x_228642;\n            }\n        }\n        if (groups_per_segment_228613 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_228623 == 0) {\n                    ((__global float *) mem_224087)[gtid_216277 * t_n_m_196759 +\n                                                    gtid_216278] = x_acc_228640;\n                }\n            }\n        } else {\n            int32_t old_counter_228648;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_228623 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_228618)[sext_i32_i64(virt_group_id_228633)] =\n            ",
            "            x_acc_228640;\n                    mem_fence_global();\n                    old_counter_228648 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228620)[sext_i32_i64(srem32(flat_segment_id_228634,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_228629)[(int64_t) 0] =\n                        old_counter_228648 == groups_per_segment_228613 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_228649;\n            \n            is_last_group_228649 = ((__local\n                                     bool *) sync_arr_mem_228629)[(int64_t) 0];\n            if (is_last_group_228649) {\n                if (local_tid_228623 == 0) {\n                    old_counter_228648 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228620)[sext_i32_i64(srem32(flat_segment_id_228634,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_228613));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_228650 =\n                            sdiv_up64(groups_per_segment_228613,\n                                      segred_group_sizze_216273);\n                    \n                    x_216281 = 0.0F;\n                    for (int64_t i_228651 = 0; i_228651 <\n                         read_per_thread_228650; i_228651++) {\n                        int64_t ",
            "group_res_id_228652 =\n                                sext_i32_i64(local_tid_228623) *\n                                read_per_thread_228650 + i_228651;\n                        int64_t index_of_group_res_228653 =\n                                sext_i32_i64(flat_segment_id_228634) *\n                                groups_per_segment_228613 + group_res_id_228652;\n                        \n                        if (slt64(group_res_id_228652,\n                                  groups_per_segment_228613)) {\n                            x_216282 = ((__global\n                                         float *) segred_tmp_mem_228618)[index_of_group_res_228653];\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_228627)[sext_i32_i64(local_tid_228623)] =\n                    x_216281;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_228654;\n                    int32_t skip_waves_228655 = 1;\n                    float x_228642;\n                    float x_228643;\n                    \n                    offset_228654 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_228623,\n                                  sext_i64_i32(segred_group_sizze_216273))) {\n                            x_228642 = ((__local\n                                         float *) red_arr_mem_228627)[sext_i32_i64(local_tid_228623 +\n                                                                      offset_228654)];\n                        }\n                    }\n                    offset_228654 = 1;\n                    while (slt32(offset_228654, wa",
            "ve_sizze_228625)) {\n                        if (slt32(local_tid_228623 + offset_228654,\n                                  sext_i64_i32(segred_group_sizze_216273)) &&\n                            ((local_tid_228623 - squot32(local_tid_228623,\n                                                         wave_sizze_228625) *\n                              wave_sizze_228625) & (2 * offset_228654 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_228643 = ((volatile __local\n                                             float *) red_arr_mem_228627)[sext_i32_i64(local_tid_228623 +\n                                                                          offset_228654)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228644 = x_228642 +\n                                      x_228643;\n                                \n                                x_228642 = defunc_1_op_res_228644;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228627)[sext_i32_i64(local_tid_228623)] =\n                                    x_228642;\n                            }\n                        }\n                        offset_228654 *= 2;\n                    }\n                    while (slt32(skip_waves_228655,\n                                 squot32(sext_i64_i32(segred_group_sizze_216273) +\n                                         wave_sizze_228625 - 1,\n                                         wave_sizze_228625))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_228654 = skip_waves_228655 * wave_sizze_228625;\n                        if (slt32(local_tid_228623 + offset_22",
            "8654,\n                                  sext_i64_i32(segred_group_sizze_216273)) &&\n                            ((local_tid_228623 - squot32(local_tid_228623,\n                                                         wave_sizze_228625) *\n                              wave_sizze_228625) == 0 &&\n                             (squot32(local_tid_228623, wave_sizze_228625) &\n                              (2 * skip_waves_228655 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_228643 = ((__local\n                                             float *) red_arr_mem_228627)[sext_i32_i64(local_tid_228623 +\n                                                                          offset_228654)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228644 = x_228642 +\n                                      x_228643;\n                                \n                                x_228642 = defunc_1_op_res_228644;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_228627)[sext_i32_i64(local_tid_228623)] =\n                                    x_228642;\n                            }\n                        }\n                        skip_waves_228655 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_228623 == 0) {\n                            ((__global float *) mem_224087)[gtid_216277 *\n                                                            t_n_m_196759 +\n                                                            gtid_216278] =\n                                x_228642;\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                                        uint sync_arr_mem_228711_backing_offset_0,\n                                        uint red_arr_mem_228709_backing_offset_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_228695,\n                                        int64_t elements_per_thread_228696,\n                                        int64_t virt_num_groups_228697,\n                                        int64_t threads_per_segment_228699,\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_228700,\n                                        __global\n                                        unsigned char *mainzicounter_mem_228702)\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    volatile unsigned char *sync_arr_mem_228711_backing_1 =\n                           &shared_mem[sync_arr_mem_228711_backing_offset_0];\n    volatile unsigned char *red_arr_mem_228709_backing_0 =\n                           &shared_mem[red_arr_mem_228709_backing_offset_1];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228704;\n    int32_t local_tid_228705;\n    int64_t group_sizze_228708;\n    int32_t wave_sizze_228707;\n    int32_t group_tid_228706;\n    \n    global_tid_228704 = get_global_id(0);\n    local_tid_228705 = get_local_id(0);\n    group_sizze_228708 = get_local_size(0);\n    wave_sizze_228707 = LOCKSTEP_WIDTH;\n    group_tid_228706 = get_group_id(0);\n    \n    int32_t phys_tid_216332 = global_tid_228704;\n    __local unsigned char *red_arr_mem_228709;\n    \n    red_arr_mem_228709 = (__local unsigned char *) red_arr_mem_228709_backing_0;\n    \n    __local unsigned char *sync_arr_mem_228711;\n    \n    sync_arr_mem_228711 = (__local\n                           unsigned char *) sync_arr_mem_228711_backing_1;\n    \n    int32_t phys_group_id_228713;\n    \n    phys_group_id_228713 = get_group_id(0);\n    for (int32_t i_228714 = 0; i_228714 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_228697) - phys_group_id_228713,\n                   sext_i64_i32(num_groups_216326)); i_228714++) {\n        int32_t virt_group_id_228715 = phys_group_id_228713 + i_228714 *\n                sext_i64_i32(num_groups_216326);\n        int32_t flat_segment_id_228716 = squot32(virt_group_id_228715,\n                                                 sext_i64_i32(groups_per_segment_228695));\n        int64_t global_tid_228717 = srem64(sext_i32_i64(virt_group_id_228715) *\n                                           segred_group_sizze_216325 +\n                                           sext_i32_i64(local_tid_228705),\n                                           segred_group_sizze_216325",
            " *\n                                           groups_per_segment_228695);\n        int64_t slice_228718 = t_n_m_196759;\n        int64_t slice_228719 = m_196691 * slice_228718;\n        int64_t gtid_216329 = squot64(sext_i32_i64(flat_segment_id_228716),\n                                      slice_228718);\n        int64_t remnant_228720 = sext_i32_i64(flat_segment_id_228716) -\n                gtid_216329 * slice_228718;\n        int64_t gtid_216330 = remnant_228720;\n        int64_t remnant_228721 = remnant_228720 - gtid_216330;\n        int64_t gtid_216331;\n        float x_acc_228722;\n        int64_t chunk_sizze_228723 = smin64(elements_per_thread_228696,\n                                            sdiv_up64(q_t_196696 -\n                                                      global_tid_228717,\n                                                      threads_per_segment_228699));\n        float x_216333;\n        float x_216334;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_228722 = 0.0F;\n        }\n        for (int64_t i_228727 = 0; i_228727 < chunk_sizze_228723; i_228727++) {\n            gtid_216331 = global_tid_228717 + threads_per_segment_228699 *\n                i_228727;\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_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_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_228722;\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_228722 = defunc_1_op_res_216335;\n                    }\n                }\n            }\n        }\n        // to reduce current chunk, first store our result in memory\n        {\n            x_216333 = x_acc_228722;\n            ((__local\n              float *) red_arr_mem_228709)[sext_i32_i64(local_tid_228705)] =\n                x_216333;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_228728;\n        int32_t skip_waves_228729 = 1;\n        float x_228724;\n        float x_228725;\n        \n        offset_228728 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_228705,\n                      sext_i64_i32(segred_group_sizze_216325))) {\n                x_228724 = ((__local\n                             float *) red_arr_mem_228709)[sext_i32_i64(local_tid_228705 +\n                                                          offset_228728)];\n            }\n        }\n        offset_228728 = 1;\n        while (slt32(offset_228728, wave_sizze_228707)) {\n            if (slt32(local_tid_228705 + offset_228728,\n                      sext_i64_i32(segred_group_sizze_216325)) &&\n                ((local_tid_228705 - squot32(local_tid_228705,\n                                             wave_sizze_228707) *\n                  wave_sizze_228707) & (2 * offset_228728 - 1)) == 0) {\n                // read array element\n                {\n                    x_228725 = ((volatile __local\n                                 ",
            "float *) red_arr_mem_228709)[sext_i32_i64(local_tid_228705 +\n                                                              offset_228728)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228726 = x_228724 + x_228725;\n                    \n                    x_228724 = defunc_1_op_res_228726;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_228709)[sext_i32_i64(local_tid_228705)] =\n                        x_228724;\n                }\n            }\n            offset_228728 *= 2;\n        }\n        while (slt32(skip_waves_228729,\n                     squot32(sext_i64_i32(segred_group_sizze_216325) +\n                             wave_sizze_228707 - 1, wave_sizze_228707))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_228728 = skip_waves_228729 * wave_sizze_228707;\n            if (slt32(local_tid_228705 + offset_228728,\n                      sext_i64_i32(segred_group_sizze_216325)) &&\n                ((local_tid_228705 - squot32(local_tid_228705,\n                                             wave_sizze_228707) *\n                  wave_sizze_228707) == 0 && (squot32(local_tid_228705,\n                                                      wave_sizze_228707) & (2 *\n                                                                            skip_waves_228729 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_228725 = ((__local\n                                 float *) red_arr_mem_228709)[sext_i32_i64(local_tid_228705 +\n                                                              offset_228728)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228726 = x_228724 + x_228",
            "725;\n                    \n                    x_228724 = defunc_1_op_res_228726;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_228709)[sext_i32_i64(local_tid_228705)] =\n                        x_228724;\n                }\n            }\n            skip_waves_228729 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_228705) == (int64_t) 0) {\n                x_acc_228722 = x_228724;\n            }\n        }\n        if (groups_per_segment_228695 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_228705 == 0) {\n                    ((__global float *) mem_224097)[gtid_216329 * t_n_m_196759 +\n                                                    gtid_216330] = x_acc_228722;\n                }\n            }\n        } else {\n            int32_t old_counter_228730;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_228705 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_228700)[sext_i32_i64(virt_group_id_228715)] =\n                        x_acc_228722;\n                    mem_fence_global();\n                    old_counter_228730 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228702)[sext_i32_i64(srem32(flat_segment_id_228716,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_228711)[(int64_t) 0] =\n                        old_counter_228730 == groups_per_segment_228695 -\n                        (int64_t) 1;\n            ",
            "    }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_228731;\n            \n            is_last_group_228731 = ((__local\n                                     bool *) sync_arr_mem_228711)[(int64_t) 0];\n            if (is_last_group_228731) {\n                if (local_tid_228705 == 0) {\n                    old_counter_228730 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228702)[sext_i32_i64(srem32(flat_segment_id_228716,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_228695));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_228732 =\n                            sdiv_up64(groups_per_segment_228695,\n                                      segred_group_sizze_216325);\n                    \n                    x_216333 = 0.0F;\n                    for (int64_t i_228733 = 0; i_228733 <\n                         read_per_thread_228732; i_228733++) {\n                        int64_t group_res_id_228734 =\n                                sext_i32_i64(local_tid_228705) *\n                                read_per_thread_228732 + i_228733;\n                        int64_t index_of_group_res_228735 =\n                                sext_i32_i64(flat_segment_id_228716) *\n                                groups_per_segment_228695 + group_res_id_228734;\n                        \n                        if (slt64(group_res_id_228734,\n                                  groups_per_segment_228695)) {\n                            x_216334 = ((__global\n                                         float *) segred_tmp_mem_228700)[index_of_group_res_228735];\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_228709)[sext_i32_i64(local_tid_228705)] =\n                    x_216333;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_228736;\n                    int32_t skip_waves_228737 = 1;\n                    float x_228724;\n                    float x_228725;\n                    \n                    offset_228736 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_228705,\n                                  sext_i64_i32(segred_group_sizze_216325))) {\n                            x_228724 = ((__local\n                                         float *) red_arr_mem_228709)[sext_i32_i64(local_tid_228705 +\n                                                                      offset_228736)];\n                        }\n                    }\n                    offset_228736 = 1;\n                    while (slt32(offset_228736, wave_sizze_228707)) {\n                        if (slt32(local_tid_228705 + offset_228736,\n                                  sext_i64_i32(segred_group_sizze_216325)) &&\n                            ((local_tid_228705 - squot32(local_tid_228705,\n                                                         wave_sizze_228707) *\n                              wave_sizze_228707) & (2 * offset_228736 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_228725 = ((volatile __local\n                                             float *) red_arr_mem_228709)[sext_i32_i64(local",
            "_tid_228705 +\n                                                                          offset_228736)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228726 = x_228724 +\n                                      x_228725;\n                                \n                                x_228724 = defunc_1_op_res_228726;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228709)[sext_i32_i64(local_tid_228705)] =\n                                    x_228724;\n                            }\n                        }\n                        offset_228736 *= 2;\n                    }\n                    while (slt32(skip_waves_228737,\n                                 squot32(sext_i64_i32(segred_group_sizze_216325) +\n                                         wave_sizze_228707 - 1,\n                                         wave_sizze_228707))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_228736 = skip_waves_228737 * wave_sizze_228707;\n                        if (slt32(local_tid_228705 + offset_228736,\n                                  sext_i64_i32(segred_group_sizze_216325)) &&\n                            ((local_tid_228705 - squot32(local_tid_228705,\n                                                         wave_sizze_228707) *\n                              wave_sizze_228707) == 0 &&\n                             (squot32(local_tid_228705, wave_sizze_228707) &\n                              (2 * skip_waves_228737 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_228725 = ((__local\n                                             float *) red_arr_mem_228709)[sext_i32_i64(local_",
            "tid_228705 +\n                                                                          offset_228736)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228726 = x_228724 +\n                                      x_228725;\n                                \n                                x_228724 = defunc_1_op_res_228726;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_228709)[sext_i32_i64(local_tid_228705)] =\n                                    x_228724;\n                            }\n                        }\n                        skip_waves_228737 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_228705 == 0) {\n                            ((__global float *) mem_224097)[gtid_216329 *\n                                                            t_n_m_196759 +\n                                                            gtid_216330] =\n                                x_228724;\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                                        uint sync_arr_mem_228880_backing_offset_0,\n                                        uint red_arr_mem_228878_backing_offset_1,\n                                        uint red_arr_mem_228876_backing_offset_2,\n                                        uint red_arr_mem_228874_backing_offset_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_228856,\n                                        int64_t elements_per_thread_228857,\n                                        int64_t virt_num_groups_228858,\n                                        int64_t threads_per_segment_228860,\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_228861,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228863,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228865,\n                                        __global\n                                        unsigned char *mainzicounter_mem_228867)\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    volatile unsigned char *sync_arr_mem_228880_backing_3 =\n                           &shared_mem[sync_arr_mem_228880_backing_offset_0];\n    volatile u",
            "nsigned char *red_arr_mem_228878_backing_2 =\n                           &shared_mem[red_arr_mem_228878_backing_offset_1];\n    volatile unsigned char *red_arr_mem_228876_backing_1 =\n                           &shared_mem[red_arr_mem_228876_backing_offset_2];\n    volatile unsigned char *red_arr_mem_228874_backing_0 =\n                           &shared_mem[red_arr_mem_228874_backing_offset_3];\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_217318 = global_tid_228869;\n    __local unsigned char *red_arr_mem_228874;\n    \n    red_arr_mem_228874 = (__local unsigned char *) red_arr_mem_228874_backing_0;\n    \n    __local unsigned char *red_arr_mem_228876;\n    \n    red_arr_mem_228876 = (__local unsigned char *) red_arr_mem_228876_backing_1;\n    \n    __local unsigned char *red_arr_mem_228878;\n    \n    red_arr_mem_228878 = (__local unsigned char *) red_arr_mem_228878_backing_2;\n    \n    __local unsigned char *sync_arr_mem_228880;\n    \n    sync_arr_mem_228880 = (__local\n                           unsigned char *) sync_arr_mem_228880_backing_3;\n    \n    int32_t phys_group_id_228882;\n    \n    phys_group_id_228882 = get_group_id(0);\n    for (int32_t i_228883 = 0; i_228883 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_228858) - phys_group_id_228882,\n                   sext_i64_i32(num_groups_217310)); i_228883++) {\n        int32_t virt_group_id_228884 = phys_group_id_228882 + i_228883 *\n                sext_i64_i32(num_groups_217310);\n        int32_t flat_segment_id_228885 = squot32(virt_group_id_228884,\n                                                 sext_i64_i32(groups_per_segment_228",
            "856));\n        int64_t global_tid_228886 = srem64(sext_i32_i64(virt_group_id_228884) *\n                                           segred_group_sizze_217309 +\n                                           sext_i32_i64(local_tid_228870),\n                                           segred_group_sizze_217309 *\n                                           groups_per_segment_228856);\n        int64_t slice_228887 = t_n_m_196759;\n        int64_t slice_228888 = m_196691 * slice_228887;\n        int64_t gtid_217315 = squot64(sext_i32_i64(flat_segment_id_228885),\n                                      slice_228887);\n        int64_t remnant_228889 = sext_i32_i64(flat_segment_id_228885) -\n                gtid_217315 * slice_228887;\n        int64_t gtid_217316 = remnant_228889;\n        int64_t remnant_228890 = remnant_228889 - gtid_217316;\n        int64_t gtid_217317;\n        float x_acc_228891;\n        float x_acc_228892;\n        float x_acc_228893;\n        int64_t chunk_sizze_228894 = smin64(elements_per_thread_228857,\n                                            sdiv_up64(q_t_196696 -\n                                                      global_tid_228886,\n                                                      threads_per_segment_228860));\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_228891 = 0.0F;\n            x_acc_228892 = 0.0F;\n            x_acc_228893 = 0.0F;\n        }\n        for (int64_t i_228904 = 0; i_228904 < chunk_sizze_228894; i_228904++) {\n            gtid_217317 = global_tid_228886 + threads_per_segment_228860 *\n                i_228904;\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_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                // load accumulator\n                {\n                    x_217319 = x_acc_228891;\n                    x_217320 = x_acc_228892;\n                    x_217321 = x_acc_228893;\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_228891 = defunc_1_op_res_217325;\n                        x_acc_228892 = defunc_1_op_res_217326;\n                        x_acc_228893 = 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_228891;\n            x_217320 = x_acc_228892;\n            x_217321 = x_acc_228893;\n            ((__local\n              float *) red_arr_mem_228874)[sext_i32_i64(local_tid_228870)] =\n                x_217319;\n            ((__local\n              float *) red_arr_mem_228876)[sext_i32_i64(local_tid_228870)] =\n                x_217320;\n            ((__local\n              float *) red_arr_mem_228878)[sext_i32_i64(local_tid_228870)] =\n                x_217321;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_228905;\n        int32_t skip_waves_228906 = 1;\n        float x_228895;\n        float x_228896;\n        float x_228897;\n        float x_228898;\n        float x_228899;\n        float x_228900;\n        \n        offset_228905 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_228870,\n                      sext_i64_i32(segred_group_sizze_217309))) {\n                x_228895 = ((__local\n                             float *) red_arr_mem_228874)[sext_i32_i64(local_tid_228870 +\n                                                          offset_228905)];\n                x_228896 = ((__local\n                             float *) red_arr_mem_228876)[sext_i32_i64(local_tid_228870 +\n                                                          offset_228905)];\n                x_228897 =",
            " ((__local\n                             float *) red_arr_mem_228878)[sext_i32_i64(local_tid_228870 +\n                                                          offset_228905)];\n            }\n        }\n        offset_228905 = 1;\n        while (slt32(offset_228905, wave_sizze_228872)) {\n            if (slt32(local_tid_228870 + offset_228905,\n                      sext_i64_i32(segred_group_sizze_217309)) &&\n                ((local_tid_228870 - squot32(local_tid_228870,\n                                             wave_sizze_228872) *\n                  wave_sizze_228872) & (2 * offset_228905 - 1)) == 0) {\n                // read array element\n                {\n                    x_228898 = ((volatile __local\n                                 float *) red_arr_mem_228874)[sext_i32_i64(local_tid_228870 +\n                                                              offset_228905)];\n                    x_228899 = ((volatile __local\n                                 float *) red_arr_mem_228876)[sext_i32_i64(local_tid_228870 +\n                                                              offset_228905)];\n                    x_228900 = ((volatile __local\n                                 float *) red_arr_mem_228878)[sext_i32_i64(local_tid_228870 +\n                                                              offset_228905)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228901 = x_228895 + x_228898;\n                    float defunc_1_op_res_228902 = x_228896 + x_228899;\n                    float defunc_1_op_res_228903 = x_228897 + x_228900;\n                    \n                    x_228895 = defunc_1_op_res_228901;\n                    x_228896 = defunc_1_op_res_228902;\n                    x_228897 = defunc_1_op_res_228903;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_228874)[sext_i32_i64(",
            "local_tid_228870)] =\n                        x_228895;\n                    ((volatile __local\n                      float *) red_arr_mem_228876)[sext_i32_i64(local_tid_228870)] =\n                        x_228896;\n                    ((volatile __local\n                      float *) red_arr_mem_228878)[sext_i32_i64(local_tid_228870)] =\n                        x_228897;\n                }\n            }\n            offset_228905 *= 2;\n        }\n        while (slt32(skip_waves_228906,\n                     squot32(sext_i64_i32(segred_group_sizze_217309) +\n                             wave_sizze_228872 - 1, wave_sizze_228872))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_228905 = skip_waves_228906 * wave_sizze_228872;\n            if (slt32(local_tid_228870 + offset_228905,\n                      sext_i64_i32(segred_group_sizze_217309)) &&\n                ((local_tid_228870 - squot32(local_tid_228870,\n                                             wave_sizze_228872) *\n                  wave_sizze_228872) == 0 && (squot32(local_tid_228870,\n                                                      wave_sizze_228872) & (2 *\n                                                                            skip_waves_228906 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_228898 = ((__local\n                                 float *) red_arr_mem_228874)[sext_i32_i64(local_tid_228870 +\n                                                              offset_228905)];\n                    x_228899 = ((__local\n                                 float *) red_arr_mem_228876)[sext_i32_i64(local_tid_228870 +\n                                                              offset_228905)];\n                    x_228900 = ((__local\n                                 float *) red_arr_mem_228878)[sext_i32_i64(local_tid_228870 +\n                                    ",
            "                          offset_228905)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228901 = x_228895 + x_228898;\n                    float defunc_1_op_res_228902 = x_228896 + x_228899;\n                    float defunc_1_op_res_228903 = x_228897 + x_228900;\n                    \n                    x_228895 = defunc_1_op_res_228901;\n                    x_228896 = defunc_1_op_res_228902;\n                    x_228897 = defunc_1_op_res_228903;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_228874)[sext_i32_i64(local_tid_228870)] =\n                        x_228895;\n                    ((__local\n                      float *) red_arr_mem_228876)[sext_i32_i64(local_tid_228870)] =\n                        x_228896;\n                    ((__local\n                      float *) red_arr_mem_228878)[sext_i32_i64(local_tid_228870)] =\n                        x_228897;\n                }\n            }\n            skip_waves_228906 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_228870) == (int64_t) 0) {\n                x_acc_228891 = x_228895;\n                x_acc_228892 = x_228896;\n                x_acc_228893 = x_228897;\n            }\n        }\n        if (groups_per_segment_228856 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_228870 == 0) {\n                    ((__global float *) mem_224232)[gtid_217315 * t_n_m_196759 +\n                                                    gtid_217316] = x_acc_228891;\n                    ((__global float *) mem_224236)[gtid_217315 * t_n_m_196759 +\n                                                    gtid_217316] = x_acc_228892;\n                    ((__global float *) mem_224",
            "240)[gtid_217315 * t_n_m_196759 +\n                                                    gtid_217316] = x_acc_228893;\n                }\n            }\n        } else {\n            int32_t old_counter_228907;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_228870 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_228861)[sext_i32_i64(virt_group_id_228884)] =\n                        x_acc_228891;\n                    ((__global\n                      float *) segred_tmp_mem_228863)[sext_i32_i64(virt_group_id_228884)] =\n                        x_acc_228892;\n                    ((__global\n                      float *) segred_tmp_mem_228865)[sext_i32_i64(virt_group_id_228884)] =\n                        x_acc_228893;\n                    mem_fence_global();\n                    old_counter_228907 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228867)[sext_i32_i64(srem32(flat_segment_id_228885,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_228880)[(int64_t) 0] =\n                        old_counter_228907 == groups_per_segment_228856 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_228908;\n            \n            is_last_group_228908 = ((__local\n                                     bool *) sync_arr_mem_228880)[(int64_t) 0];\n            if (is_last_group_228908) {\n                if (local_tid_228870 == 0) {\n                    old_counter_228907 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainz",
            "icounter_mem_228867)[sext_i32_i64(srem32(flat_segment_id_228885,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_228856));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_228909 =\n                            sdiv_up64(groups_per_segment_228856,\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_228910 = 0; i_228910 <\n                         read_per_thread_228909; i_228910++) {\n                        int64_t group_res_id_228911 =\n                                sext_i32_i64(local_tid_228870) *\n                                read_per_thread_228909 + i_228910;\n                        int64_t index_of_group_res_228912 =\n                                sext_i32_i64(flat_segment_id_228885) *\n                                groups_per_segment_228856 + group_res_id_228911;\n                        \n                        if (slt64(group_res_id_228911,\n                                  groups_per_segment_228856)) {\n                            x_217322 = ((__global\n                                         float *) segred_tmp_mem_228861)[index_of_group_res_228912];\n                            x_217323 = ((__global\n                                         float *) segred_tmp_mem_228863)[index_of_group_res_228912];\n                            x_217324 = ((__global\n                                         float *) segred_tmp_mem_228865)[index_of_group_res_228912];\n                            \n                            float defunc_1_op_res_217325 = x_217319 + x_217322;\n                            float defunc_1_op_re",
            "s_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_228874)[sext_i32_i64(local_tid_228870)] =\n                    x_217319;\n                ((__local\n                  float *) red_arr_mem_228876)[sext_i32_i64(local_tid_228870)] =\n                    x_217320;\n                ((__local\n                  float *) red_arr_mem_228878)[sext_i32_i64(local_tid_228870)] =\n                    x_217321;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_228913;\n                    int32_t skip_waves_228914 = 1;\n                    float x_228895;\n                    float x_228896;\n                    float x_228897;\n                    float x_228898;\n                    float x_228899;\n                    float x_228900;\n                    \n                    offset_228913 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_228870,\n                                  sext_i64_i32(segred_group_sizze_217309))) {\n                            x_228895 = ((__local\n                                         float *) red_arr_mem_228874)[sext_i32_i64(local_tid_228870 +\n                                                                      offset_228913)];\n                            x_228896 = ((__local\n                                         float *) red_arr_mem_228876)[sext_i32_i64(local_tid_228870 +\n                                                                      offset_228913)];\n             ",
            "               x_228897 = ((__local\n                                         float *) red_arr_mem_228878)[sext_i32_i64(local_tid_228870 +\n                                                                      offset_228913)];\n                        }\n                    }\n                    offset_228913 = 1;\n                    while (slt32(offset_228913, wave_sizze_228872)) {\n                        if (slt32(local_tid_228870 + offset_228913,\n                                  sext_i64_i32(segred_group_sizze_217309)) &&\n                            ((local_tid_228870 - squot32(local_tid_228870,\n                                                         wave_sizze_228872) *\n                              wave_sizze_228872) & (2 * offset_228913 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_228898 = ((volatile __local\n                                             float *) red_arr_mem_228874)[sext_i32_i64(local_tid_228870 +\n                                                                          offset_228913)];\n                                x_228899 = ((volatile __local\n                                             float *) red_arr_mem_228876)[sext_i32_i64(local_tid_228870 +\n                                                                          offset_228913)];\n                                x_228900 = ((volatile __local\n                                             float *) red_arr_mem_228878)[sext_i32_i64(local_tid_228870 +\n                                                                          offset_228913)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228901 = x_228895 +\n                                      x_228898;\n                                float defunc_1_op_res_228902 = x_228896 +\n                                     ",
            " x_228899;\n                                float defunc_1_op_res_228903 = x_228897 +\n                                      x_228900;\n                                \n                                x_228895 = defunc_1_op_res_228901;\n                                x_228896 = defunc_1_op_res_228902;\n                                x_228897 = defunc_1_op_res_228903;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228874)[sext_i32_i64(local_tid_228870)] =\n                                    x_228895;\n                                ((volatile __local\n                                  float *) red_arr_mem_228876)[sext_i32_i64(local_tid_228870)] =\n                                    x_228896;\n                                ((volatile __local\n                                  float *) red_arr_mem_228878)[sext_i32_i64(local_tid_228870)] =\n                                    x_228897;\n                            }\n                        }\n                        offset_228913 *= 2;\n                    }\n                    while (slt32(skip_waves_228914,\n                                 squot32(sext_i64_i32(segred_group_sizze_217309) +\n                                         wave_sizze_228872 - 1,\n                                         wave_sizze_228872))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_228913 = skip_waves_228914 * wave_sizze_228872;\n                        if (slt32(local_tid_228870 + offset_228913,\n                                  sext_i64_i32(segred_group_sizze_217309)) &&\n                            ((local_tid_228870 - squot32(local_tid_228870,\n                                                         wave_sizze_228872) *\n                              wave_sizze_228872) == 0 &&\n                             (squot32(local_tid_228870, wave",
            "_sizze_228872) &\n                              (2 * skip_waves_228914 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_228898 = ((__local\n                                             float *) red_arr_mem_228874)[sext_i32_i64(local_tid_228870 +\n                                                                          offset_228913)];\n                                x_228899 = ((__local\n                                             float *) red_arr_mem_228876)[sext_i32_i64(local_tid_228870 +\n                                                                          offset_228913)];\n                                x_228900 = ((__local\n                                             float *) red_arr_mem_228878)[sext_i32_i64(local_tid_228870 +\n                                                                          offset_228913)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228901 = x_228895 +\n                                      x_228898;\n                                float defunc_1_op_res_228902 = x_228896 +\n                                      x_228899;\n                                float defunc_1_op_res_228903 = x_228897 +\n                                      x_228900;\n                                \n                                x_228895 = defunc_1_op_res_228901;\n                                x_228896 = defunc_1_op_res_228902;\n                                x_228897 = defunc_1_op_res_228903;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_228874)[sext_i32_i64(local_tid_228870)] =\n                                    x_228895;\n                                ((__local\n                        ",
            "          float *) red_arr_mem_228876)[sext_i32_i64(local_tid_228870)] =\n                                    x_228896;\n                                ((__local\n                                  float *) red_arr_mem_228878)[sext_i32_i64(local_tid_228870)] =\n                                    x_228897;\n                            }\n                        }\n                        skip_waves_228914 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_228870 == 0) {\n                            ((__global float *) mem_224232)[gtid_217315 *\n                                                            t_n_m_196759 +\n                                                            gtid_217316] =\n                                x_228895;\n                            ((__global float *) mem_224236)[gtid_217315 *\n                                                            t_n_m_196759 +\n                                                            gtid_217316] =\n                                x_228896;\n                            ((__global float *) mem_224240)[gtid_217315 *\n                                                            t_n_m_196759 +\n                                                            gtid_217316] =\n                                x_228897;\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                                        uint sync_arr_mem_228980_backing_offset_0,\n                                        uint red_arr_mem_228978_backing_offset_1,\n                                        uint red_arr_mem_228976_backing_offset_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_228960,\n                                        int64_t elements_per_thread_228961,\n                                        int64_t virt_num_groups_228962,\n                                        int64_t threads_per_segment_228964,\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_228965,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228967,\n                                        __global\n                                        unsigned char *mainzicounter_mem_228969)\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    volatile unsigned char *sync_arr_mem_2",
            "28980_backing_2 =\n                           &shared_mem[sync_arr_mem_228980_backing_offset_0];\n    volatile unsigned char *red_arr_mem_228978_backing_1 =\n                           &shared_mem[red_arr_mem_228978_backing_offset_1];\n    volatile unsigned char *red_arr_mem_228976_backing_0 =\n                           &shared_mem[red_arr_mem_228976_backing_offset_2];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228971;\n    int32_t local_tid_228972;\n    int64_t group_sizze_228975;\n    int32_t wave_sizze_228974;\n    int32_t group_tid_228973;\n    \n    global_tid_228971 = get_global_id(0);\n    local_tid_228972 = get_local_id(0);\n    group_sizze_228975 = get_local_size(0);\n    wave_sizze_228974 = LOCKSTEP_WIDTH;\n    group_tid_228973 = get_group_id(0);\n    \n    int32_t phys_tid_217390 = global_tid_228971;\n    __local unsigned char *red_arr_mem_228976;\n    \n    red_arr_mem_228976 = (__local unsigned char *) red_arr_mem_228976_backing_0;\n    \n    __local unsigned char *red_arr_mem_228978;\n    \n    red_arr_mem_228978 = (__local unsigned char *) red_arr_mem_228978_backing_1;\n    \n    __local unsigned char *sync_arr_mem_228980;\n    \n    sync_arr_mem_228980 = (__local\n                           unsigned char *) sync_arr_mem_228980_backing_2;\n    \n    int32_t phys_group_id_228982;\n    \n    phys_group_id_228982 = get_group_id(0);\n    for (int32_t i_228983 = 0; i_228983 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_228962) - phys_group_id_228982,\n                   sext_i64_i32(num_groups_217383)); i_228983++) {\n        int32_t virt_group_id_228984 = phys_group_id_228982 + i_228983 *\n                sext_i64_i32(num_groups_217383);\n        int32_t flat_segment_id_228985 = squot32(virt_group_id_228984,\n                                                 sext_i64_i32(groups_per_segment_228960));\n        int64_t global_tid_228986 = srem64(sext_i32_i64(virt_group_id_228984) *\n                                           segred_group_sizze_217382 +\n      ",
            "                                     sext_i32_i64(local_tid_228972),\n                                           segred_group_sizze_217382 *\n                                           groups_per_segment_228960);\n        int64_t slice_228987 = t_n_m_196759;\n        int64_t slice_228988 = m_196691 * slice_228987;\n        int64_t gtid_217387 = squot64(sext_i32_i64(flat_segment_id_228985),\n                                      slice_228987);\n        int64_t remnant_228989 = sext_i32_i64(flat_segment_id_228985) -\n                gtid_217387 * slice_228987;\n        int64_t gtid_217388 = remnant_228989;\n        int64_t remnant_228990 = remnant_228989 - gtid_217388;\n        int64_t gtid_217389;\n        float x_acc_228991;\n        float x_acc_228992;\n        int64_t chunk_sizze_228993 = smin64(elements_per_thread_228961,\n                                            sdiv_up64(q_t_196696 -\n                                                      global_tid_228986,\n                                                      threads_per_segment_228964));\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_228991 = 0.0F;\n            x_acc_228992 = 0.0F;\n        }\n        for (int64_t i_229000 = 0; i_229000 < chunk_sizze_228993; i_229000++) {\n            gtid_217389 = global_tid_228986 + threads_per_segment_228964 *\n                i_229000;\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_228991;\n                    x_217392 = x_acc_228992;\n                }\n                // load new values\n                {\n                    x_217393 = 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_228991 = defunc_1_op_res_217395;\n                        x_acc_228992 = 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_228991;\n            x_217392 = x_acc_228992;\n            ((__local\n              float *) red_arr_mem_228976)[sext_i32_i64(local_tid_228972)] =\n                x_217391;\n            ((__local\n              float *) red_arr_mem_228978)[sext_i32_i64(local_tid_228972)] =\n                x_217392;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_229001;\n        int32_t skip_waves_229002 = 1;\n        float x_228994;\n        float x_228995;\n        float x_228996;\n        float x_228997;\n        \n        offset_229001 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_228972,\n                      sext_i64_i32(segred_group_sizze_217382))) {\n                x_228994 = ((__local\n                             float *) red_arr_mem_228976)[sext_i32_i64(local_tid_228972 +\n                                                          offset_229001)];\n                x_228995 = ((__local\n                             float *) red_arr_mem_228978)[sext_i32_i64(local_tid_228972 +\n                                                          offset_229001)];\n            }\n        }\n        offset_229001 = 1;\n        while (slt32(offset_229001, wave_sizze_228974)) {\n            if (slt32(local_tid_228972 + offset_229001,\n                      sext_i64_i32(segred_group_sizze_217382)) &&\n                ((local_tid_228972 - squot32(local_tid_228972,\n                                             wave_sizze_228974) *\n                  wave_sizze_228974) & (2 * offset_229001 - 1)) == 0) {\n                // read array element\n                {\n                    x_228996 = ((volatile __local\n                    ",
            "             float *) red_arr_mem_228976)[sext_i32_i64(local_tid_228972 +\n                                                              offset_229001)];\n                    x_228997 = ((volatile __local\n                                 float *) red_arr_mem_228978)[sext_i32_i64(local_tid_228972 +\n                                                              offset_229001)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228998 = x_228994 + x_228996;\n                    float defunc_1_op_res_228999 = x_228995 + x_228997;\n                    \n                    x_228994 = defunc_1_op_res_228998;\n                    x_228995 = defunc_1_op_res_228999;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_228976)[sext_i32_i64(local_tid_228972)] =\n                        x_228994;\n                    ((volatile __local\n                      float *) red_arr_mem_228978)[sext_i32_i64(local_tid_228972)] =\n                        x_228995;\n                }\n            }\n            offset_229001 *= 2;\n        }\n        while (slt32(skip_waves_229002,\n                     squot32(sext_i64_i32(segred_group_sizze_217382) +\n                             wave_sizze_228974 - 1, wave_sizze_228974))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_229001 = skip_waves_229002 * wave_sizze_228974;\n            if (slt32(local_tid_228972 + offset_229001,\n                      sext_i64_i32(segred_group_sizze_217382)) &&\n                ((local_tid_228972 - squot32(local_tid_228972,\n                                             wave_sizze_228974) *\n                  wave_sizze_228974) == 0 && (squot32(local_tid_228972,\n                                                      wave_sizze_228974) & (2 *\n                                                                            skip_waves_229002 -\n   ",
            "                                                                         1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_228996 = ((__local\n                                 float *) red_arr_mem_228976)[sext_i32_i64(local_tid_228972 +\n                                                              offset_229001)];\n                    x_228997 = ((__local\n                                 float *) red_arr_mem_228978)[sext_i32_i64(local_tid_228972 +\n                                                              offset_229001)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228998 = x_228994 + x_228996;\n                    float defunc_1_op_res_228999 = x_228995 + x_228997;\n                    \n                    x_228994 = defunc_1_op_res_228998;\n                    x_228995 = defunc_1_op_res_228999;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_228976)[sext_i32_i64(local_tid_228972)] =\n                        x_228994;\n                    ((__local\n                      float *) red_arr_mem_228978)[sext_i32_i64(local_tid_228972)] =\n                        x_228995;\n                }\n            }\n            skip_waves_229002 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_228972) == (int64_t) 0) {\n                x_acc_228991 = x_228994;\n                x_acc_228992 = x_228995;\n            }\n        }\n        if (groups_per_segment_228960 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_228972 == 0) {\n                    ((__global float *) mem_224258)[gtid_217387 * t_n_m_196759 +\n                                                    gtid_217388",
            "] = x_acc_228991;\n                    ((__global float *) mem_224262)[gtid_217387 * t_n_m_196759 +\n                                                    gtid_217388] = x_acc_228992;\n                }\n            }\n        } else {\n            int32_t old_counter_229003;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_228972 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_228965)[sext_i32_i64(virt_group_id_228984)] =\n                        x_acc_228991;\n                    ((__global\n                      float *) segred_tmp_mem_228967)[sext_i32_i64(virt_group_id_228984)] =\n                        x_acc_228992;\n                    mem_fence_global();\n                    old_counter_229003 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228969)[sext_i32_i64(srem32(flat_segment_id_228985,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_228980)[(int64_t) 0] =\n                        old_counter_229003 == groups_per_segment_228960 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_229004;\n            \n            is_last_group_229004 = ((__local\n                                     bool *) sync_arr_mem_228980)[(int64_t) 0];\n            if (is_last_group_229004) {\n                if (local_tid_228972 == 0) {\n                    old_counter_229003 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228969)[sext_i32_i64(srem32(flat_segment_id_228985,\n                               ",
            "                                                                       10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_228960));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_229005 =\n                            sdiv_up64(groups_per_segment_228960,\n                                      segred_group_sizze_217382);\n                    \n                    x_217391 = 0.0F;\n                    x_217392 = 0.0F;\n                    for (int64_t i_229006 = 0; i_229006 <\n                         read_per_thread_229005; i_229006++) {\n                        int64_t group_res_id_229007 =\n                                sext_i32_i64(local_tid_228972) *\n                                read_per_thread_229005 + i_229006;\n                        int64_t index_of_group_res_229008 =\n                                sext_i32_i64(flat_segment_id_228985) *\n                                groups_per_segment_228960 + group_res_id_229007;\n                        \n                        if (slt64(group_res_id_229007,\n                                  groups_per_segment_228960)) {\n                            x_217393 = ((__global\n                                         float *) segred_tmp_mem_228965)[index_of_group_res_229008];\n                            x_217394 = ((__global\n                                         float *) segred_tmp_mem_228967)[index_of_group_res_229008];\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_228976)[sext_i32_i64(local_tid_228972)] =\n                    x_217391;\n                ((__local\n                  float *) red_arr_mem_228978)[sext_i32_i64(local_tid_228972)] =\n                    x_217392;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_229009;\n                    int32_t skip_waves_229010 = 1;\n                    float x_228994;\n                    float x_228995;\n                    float x_228996;\n                    float x_228997;\n                    \n                    offset_229009 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_228972,\n                                  sext_i64_i32(segred_group_sizze_217382))) {\n                            x_228994 = ((__local\n                                         float *) red_arr_mem_228976)[sext_i32_i64(local_tid_228972 +\n                                                                      offset_229009)];\n                            x_228995 = ((__local\n                                         float *) red_arr_mem_228978)[sext_i32_i64(local_tid_228972 +\n                                                                      offset_229009)];\n                        }\n                    }\n                    offset_229009 = 1;\n                    while (slt32(offset_229009, wave_sizze_228974)) {\n                        if (slt32(local_tid_228972 + offset_229009,\n                                  sext_i64_i32(segred_group_sizze_217382)) &&\n                            ((local_tid_228972 - squot32(local_tid_228972,\n                                                         wave_sizze_228974) *\n                              wave_sizze_228974) & (2 * offset_229009 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n ",
            "                               x_228996 = ((volatile __local\n                                             float *) red_arr_mem_228976)[sext_i32_i64(local_tid_228972 +\n                                                                          offset_229009)];\n                                x_228997 = ((volatile __local\n                                             float *) red_arr_mem_228978)[sext_i32_i64(local_tid_228972 +\n                                                                          offset_229009)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228998 = x_228994 +\n                                      x_228996;\n                                float defunc_1_op_res_228999 = x_228995 +\n                                      x_228997;\n                                \n                                x_228994 = defunc_1_op_res_228998;\n                                x_228995 = defunc_1_op_res_228999;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228976)[sext_i32_i64(local_tid_228972)] =\n                                    x_228994;\n                                ((volatile __local\n                                  float *) red_arr_mem_228978)[sext_i32_i64(local_tid_228972)] =\n                                    x_228995;\n                            }\n                        }\n                        offset_229009 *= 2;\n                    }\n                    while (slt32(skip_waves_229010,\n                                 squot32(sext_i64_i32(segred_group_sizze_217382) +\n                                         wave_sizze_228974 - 1,\n                                         wave_sizze_228974))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n           ",
            "             offset_229009 = skip_waves_229010 * wave_sizze_228974;\n                        if (slt32(local_tid_228972 + offset_229009,\n                                  sext_i64_i32(segred_group_sizze_217382)) &&\n                            ((local_tid_228972 - squot32(local_tid_228972,\n                                                         wave_sizze_228974) *\n                              wave_sizze_228974) == 0 &&\n                             (squot32(local_tid_228972, wave_sizze_228974) &\n                              (2 * skip_waves_229010 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_228996 = ((__local\n                                             float *) red_arr_mem_228976)[sext_i32_i64(local_tid_228972 +\n                                                                          offset_229009)];\n                                x_228997 = ((__local\n                                             float *) red_arr_mem_228978)[sext_i32_i64(local_tid_228972 +\n                                                                          offset_229009)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228998 = x_228994 +\n                                      x_228996;\n                                float defunc_1_op_res_228999 = x_228995 +\n                                      x_228997;\n                                \n                                x_228994 = defunc_1_op_res_228998;\n                                x_228995 = defunc_1_op_res_228999;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_228976)[sext_i32_i64(local_tid_228972)] =\n                                    x_228994;\n                     ",
            "           ((__local\n                                  float *) red_arr_mem_228978)[sext_i32_i64(local_tid_228972)] =\n                                    x_228995;\n                            }\n                        }\n                        skip_waves_229010 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_228972 == 0) {\n                            ((__global float *) mem_224258)[gtid_217387 *\n                                                            t_n_m_196759 +\n                                                            gtid_217388] =\n                                x_228994;\n                            ((__global float *) mem_224262)[gtid_217387 *\n                                                            t_n_m_196759 +\n                                                            gtid_217388] =\n                                x_228995;\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                                        uint sync_arr_mem_229177_backing_offset_0,\n                                        uint red_arr_mem_229175_backing_offset_1,\n                                        uint red_arr_mem_229173_backing_offset_2,\n                                        uint red_arr_mem_229171_backing_offset_3,\n                                        uint red_arr_mem_229169_backing_offset_4,\n                                        uint red_arr_mem_229167_backing_offset_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_229145,\n                                        int64_t elements_per_thread_229146,\n                                        int64_t virt_num_groups_229147,\n                                        int64_t threads_per_segment_229149,\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_229150,\n                                        __global\n                                        unsigned char *segred_tmp_mem_229152,\n                                        __global\n                                        unsigned char *segred_tmp_mem_229154,\n                                        __global\n                                        unsigned char *segred_tmp_mem_229156,\n                                        __global\n                                        unsigned char *segred_tmp_mem_229158,\n                                        __global\n                                        unsigned char *mainzicounter_mem_229160)\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    volatile unsigned char *sync_arr_mem_229177_backing_5 =\n                           &shared_mem[sync_arr_mem_229177_backing_offset_0];\n    volatile unsigned char *red_arr_mem_229175_backing_4 =\n                           &shared_mem[red_arr_mem_229175_backing_offset_1];\n    volatile unsigned char *red_arr_mem_229173_backing_3 =\n                           &shared_mem[red_arr_mem_229173_backing_offset_2];\n    volatile unsigned char *red_arr_mem_229171_backing_2 =\n                           &shared_mem[red_arr_mem_229171_backing_offset_3];\n    volatile unsigned char *red_arr_mem_229169_backing_1 =\n                           &shared_mem[red_arr_mem_229169_backing_offset_4];\n    volatile unsigned char *red_arr_mem_229167_backing_0 =\n                           &shared_mem[red_arr_mem_229167_backing_offset_5];\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_218606 = global_tid_229162;\n    __local unsigned char *red_arr_mem_229167;\n    \n    red_arr_mem_229167 = (__local unsigned char *) red_arr_mem_229167_backing_0;\n    \n    __local unsigned char *red_arr_mem_229169;\n    \n    red_arr_mem_229169 = (__local unsigned char *) red_arr_mem_229169_backing_1;\n    \n    __local unsigned char *red_arr_mem_229171;\n    \n    red_arr_mem_229171 = (__local unsigned char *) red_arr_mem_229171_backing_2;\n    \n    __local unsigned char *red_arr_mem_229173;\n    \n    red_arr_mem_229173 = (__local unsigned char *) red_arr_mem_229173_backing_3;\n    \n    __local unsigned char *red_arr_mem_229175;\n    \n",
            "    red_arr_mem_229175 = (__local unsigned char *) red_arr_mem_229175_backing_4;\n    \n    __local unsigned char *sync_arr_mem_229177;\n    \n    sync_arr_mem_229177 = (__local\n                           unsigned char *) sync_arr_mem_229177_backing_5;\n    \n    int32_t phys_group_id_229179;\n    \n    phys_group_id_229179 = get_group_id(0);\n    for (int32_t i_229180 = 0; i_229180 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_229147) - phys_group_id_229179,\n                   sext_i64_i32(num_groups_218596)); i_229180++) {\n        int32_t virt_group_id_229181 = phys_group_id_229179 + i_229180 *\n                sext_i64_i32(num_groups_218596);\n        int32_t flat_segment_id_229182 = squot32(virt_group_id_229181,\n                                                 sext_i64_i32(groups_per_segment_229145));\n        int64_t global_tid_229183 = srem64(sext_i32_i64(virt_group_id_229181) *\n                                           segred_group_sizze_218595 +\n                                           sext_i32_i64(local_tid_229163),\n                                           segred_group_sizze_218595 *\n                                           groups_per_segment_229145);\n        int64_t slice_229184 = t_n_m_196759;\n        int64_t slice_229185 = m_196691 * slice_229184;\n        int64_t gtid_218603 = squot64(sext_i32_i64(flat_segment_id_229182),\n                                      slice_229184);\n        int64_t remnant_229186 = sext_i32_i64(flat_segment_id_229182) -\n                gtid_218603 * slice_229184;\n        int64_t gtid_218604 = remnant_229186;\n        int64_t remnant_229187 = remnant_229186 - gtid_218604;\n        int64_t gtid_218605;\n        float x_acc_229188;\n        float x_acc_229189;\n        float x_acc_229190;\n        float x_acc_229191;\n        float x_acc_229192;\n        int64_t chunk_sizze_229193 = smin64(elements_per_thread_229146,\n                                            sdiv_up64(q_t_196696 -\n                                                      globa",
            "l_tid_229183,\n                                                      threads_per_segment_229149));\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_229188 = 0.0F;\n            x_acc_229189 = 0.0F;\n            x_acc_229190 = 0.0F;\n            x_acc_229191 = 0.0F;\n            x_acc_229192 = 0.0F;\n        }\n        for (int64_t i_229209 = 0; i_229209 < chunk_sizze_229193; i_229209++) {\n            gtid_218605 = global_tid_229183 + threads_per_segment_229149 *\n                i_229209;\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_218635);\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_229188;\n                    x_218608 = x_acc_229189;\n                    x_218609 = x_acc_229190;\n                    x_218610 = x_acc_229191;\n                    x_218611 = x_acc_229192;\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_229188 = defunc_1_op_res_218617;\n                        x_acc_229189 = defunc_1_op_res_218618;\n                        x_acc_229190 = defunc_1_op_res_218619;\n                        x_acc_229191 = defunc",
            "_1_op_res_218620;\n                        x_acc_229192 = 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_229188;\n            x_218608 = x_acc_229189;\n            x_218609 = x_acc_229190;\n            x_218610 = x_acc_229191;\n            x_218611 = x_acc_229192;\n            ((__local\n              float *) red_arr_mem_229167)[sext_i32_i64(local_tid_229163)] =\n                x_218607;\n            ((__local\n              float *) red_arr_mem_229169)[sext_i32_i64(local_tid_229163)] =\n                x_218608;\n            ((__local\n              float *) red_arr_mem_229171)[sext_i32_i64(local_tid_229163)] =\n                x_218609;\n            ((__local\n              float *) red_arr_mem_229173)[sext_i32_i64(local_tid_229163)] =\n                x_218610;\n            ((__local\n              float *) red_arr_mem_229175)[sext_i32_i64(local_tid_229163)] =\n                x_218611;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_229210;\n        int32_t skip_waves_229211 = 1;\n        float x_229194;\n        float x_229195;\n        float x_229196;\n        float x_229197;\n        float x_229198;\n        float x_229199;\n        float x_229200;\n        float x_229201;\n        float x_229202;\n        float x_229203;\n        \n        offset_229210 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_229163,\n                      sext_i64_i32(segred_group_sizze_218595))) {\n                x_229194 = ((__local\n                             float *) red_arr_mem_229167)[sext_i32_i64(local_tid_229163 +\n                                                          offset_229210)];\n                x_229195 = ((__local\n                             float *) red_arr_mem_229169)[sext_i32_i64(local_tid_229163 +\n                                                          of",
            "fset_229210)];\n                x_229196 = ((__local\n                             float *) red_arr_mem_229171)[sext_i32_i64(local_tid_229163 +\n                                                          offset_229210)];\n                x_229197 = ((__local\n                             float *) red_arr_mem_229173)[sext_i32_i64(local_tid_229163 +\n                                                          offset_229210)];\n                x_229198 = ((__local\n                             float *) red_arr_mem_229175)[sext_i32_i64(local_tid_229163 +\n                                                          offset_229210)];\n            }\n        }\n        offset_229210 = 1;\n        while (slt32(offset_229210, wave_sizze_229165)) {\n            if (slt32(local_tid_229163 + offset_229210,\n                      sext_i64_i32(segred_group_sizze_218595)) &&\n                ((local_tid_229163 - squot32(local_tid_229163,\n                                             wave_sizze_229165) *\n                  wave_sizze_229165) & (2 * offset_229210 - 1)) == 0) {\n                // read array element\n                {\n                    x_229199 = ((volatile __local\n                                 float *) red_arr_mem_229167)[sext_i32_i64(local_tid_229163 +\n                                                              offset_229210)];\n                    x_229200 = ((volatile __local\n                                 float *) red_arr_mem_229169)[sext_i32_i64(local_tid_229163 +\n                                                              offset_229210)];\n                    x_229201 = ((volatile __local\n                                 float *) red_arr_mem_229171)[sext_i32_i64(local_tid_229163 +\n                                                              offset_229210)];\n                    x_229202 = ((volatile __local\n                                 float *) red_arr_mem_229173)[sext_i32_i64(local_tid_229163 +\n                                                              offset_229210)];",
            "\n                    x_229203 = ((volatile __local\n                                 float *) red_arr_mem_229175)[sext_i32_i64(local_tid_229163 +\n                                                              offset_229210)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_229204 = x_229194 + x_229199;\n                    float defunc_1_op_res_229205 = x_229195 + x_229200;\n                    float defunc_1_op_res_229206 = x_229196 + x_229201;\n                    float defunc_1_op_res_229207 = x_229197 + x_229202;\n                    float defunc_1_op_res_229208 = x_229198 + x_229203;\n                    \n                    x_229194 = defunc_1_op_res_229204;\n                    x_229195 = defunc_1_op_res_229205;\n                    x_229196 = defunc_1_op_res_229206;\n                    x_229197 = defunc_1_op_res_229207;\n                    x_229198 = defunc_1_op_res_229208;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_229167)[sext_i32_i64(local_tid_229163)] =\n                        x_229194;\n                    ((volatile __local\n                      float *) red_arr_mem_229169)[sext_i32_i64(local_tid_229163)] =\n                        x_229195;\n                    ((volatile __local\n                      float *) red_arr_mem_229171)[sext_i32_i64(local_tid_229163)] =\n                        x_229196;\n                    ((volatile __local\n                      float *) red_arr_mem_229173)[sext_i32_i64(local_tid_229163)] =\n                        x_229197;\n                    ((volatile __local\n                      float *) red_arr_mem_229175)[sext_i32_i64(local_tid_229163)] =\n                        x_229198;\n                }\n            }\n            offset_229210 *= 2;\n        }\n        while (slt32(skip_waves_229211,\n                     squot32(sext_i64_i32(segred_group",
            "_sizze_218595) +\n                             wave_sizze_229165 - 1, wave_sizze_229165))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_229210 = skip_waves_229211 * wave_sizze_229165;\n            if (slt32(local_tid_229163 + offset_229210,\n                      sext_i64_i32(segred_group_sizze_218595)) &&\n                ((local_tid_229163 - squot32(local_tid_229163,\n                                             wave_sizze_229165) *\n                  wave_sizze_229165) == 0 && (squot32(local_tid_229163,\n                                                      wave_sizze_229165) & (2 *\n                                                                            skip_waves_229211 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_229199 = ((__local\n                                 float *) red_arr_mem_229167)[sext_i32_i64(local_tid_229163 +\n                                                              offset_229210)];\n                    x_229200 = ((__local\n                                 float *) red_arr_mem_229169)[sext_i32_i64(local_tid_229163 +\n                                                              offset_229210)];\n                    x_229201 = ((__local\n                                 float *) red_arr_mem_229171)[sext_i32_i64(local_tid_229163 +\n                                                              offset_229210)];\n                    x_229202 = ((__local\n                                 float *) red_arr_mem_229173)[sext_i32_i64(local_tid_229163 +\n                                                              offset_229210)];\n                    x_229203 = ((__local\n                                 float *) red_arr_mem_229175)[sext_i32_i64(local_tid_229163 +\n                                                              offset_229210)];\n                }\n                // apply reduction operation\n     ",
            "           {\n                    float defunc_1_op_res_229204 = x_229194 + x_229199;\n                    float defunc_1_op_res_229205 = x_229195 + x_229200;\n                    float defunc_1_op_res_229206 = x_229196 + x_229201;\n                    float defunc_1_op_res_229207 = x_229197 + x_229202;\n                    float defunc_1_op_res_229208 = x_229198 + x_229203;\n                    \n                    x_229194 = defunc_1_op_res_229204;\n                    x_229195 = defunc_1_op_res_229205;\n                    x_229196 = defunc_1_op_res_229206;\n                    x_229197 = defunc_1_op_res_229207;\n                    x_229198 = defunc_1_op_res_229208;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_229167)[sext_i32_i64(local_tid_229163)] =\n                        x_229194;\n                    ((__local\n                      float *) red_arr_mem_229169)[sext_i32_i64(local_tid_229163)] =\n                        x_229195;\n                    ((__local\n                      float *) red_arr_mem_229171)[sext_i32_i64(local_tid_229163)] =\n                        x_229196;\n                    ((__local\n                      float *) red_arr_mem_229173)[sext_i32_i64(local_tid_229163)] =\n                        x_229197;\n                    ((__local\n                      float *) red_arr_mem_229175)[sext_i32_i64(local_tid_229163)] =\n                        x_229198;\n                }\n            }\n            skip_waves_229211 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_229163) == (int64_t) 0) {\n                x_acc_229188 = x_229194;\n                x_acc_229189 = x_229195;\n                x_acc_229190 = x_229196;\n                x_acc_229191 = x_229197;\n                x_acc_229192 = x_229198;\n            }\n        }\n        if (groups_per_segmen",
            "t_229145 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_229163 == 0) {\n                    ((__global float *) mem_224404)[gtid_218603 * t_n_m_196759 +\n                                                    gtid_218604] = x_acc_229188;\n                    ((__global float *) mem_224408)[gtid_218603 * t_n_m_196759 +\n                                                    gtid_218604] = x_acc_229189;\n                    ((__global float *) mem_224412)[gtid_218603 * t_n_m_196759 +\n                                                    gtid_218604] = x_acc_229190;\n                    ((__global float *) mem_224416)[gtid_218603 * t_n_m_196759 +\n                                                    gtid_218604] = x_acc_229191;\n                    ((__global float *) mem_224420)[gtid_218603 * t_n_m_196759 +\n                                                    gtid_218604] = x_acc_229192;\n                }\n            }\n        } else {\n            int32_t old_counter_229212;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_229163 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_229150)[sext_i32_i64(virt_group_id_229181)] =\n                        x_acc_229188;\n                    ((__global\n                      float *) segred_tmp_mem_229152)[sext_i32_i64(virt_group_id_229181)] =\n                        x_acc_229189;\n                    ((__global\n                      float *) segred_tmp_mem_229154)[sext_i32_i64(virt_group_id_229181)] =\n                        x_acc_229190;\n                    ((__global\n                      float *) segred_tmp_mem_229156)[sext_i32_i64(virt_group_id_229181)] =\n                        x_acc_229191;\n                    ((__global\n                      float *) segred_tmp_mem_229158)[sext_i32_i64(virt_group_id_229181)] =\n                        x_acc_229192;",
            "\n                    mem_fence_global();\n                    old_counter_229212 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_229160)[sext_i32_i64(srem32(flat_segment_id_229182,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_229177)[(int64_t) 0] =\n                        old_counter_229212 == groups_per_segment_229145 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_229213;\n            \n            is_last_group_229213 = ((__local\n                                     bool *) sync_arr_mem_229177)[(int64_t) 0];\n            if (is_last_group_229213) {\n                if (local_tid_229163 == 0) {\n                    old_counter_229212 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_229160)[sext_i32_i64(srem32(flat_segment_id_229182,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_229145));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_229214 =\n                            sdiv_up64(groups_per_segment_229145,\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_229215 = 0; i_229215 <\n                         read_per_thread_229214; i_229215++) {\n                        int64_t group_res_id_229216 =\n                                sext_i32_i64(local_tid_229163) *\n                                read_per_thread_229214 + i_229215;\n                        int64_t index_of_group_res_229217 =\n                                sext_i32_i64(flat_segment_id_229182) *\n                                groups_per_segment_229145 + group_res_id_229216;\n                        \n                        if (slt64(group_res_id_229216,\n                                  groups_per_segment_229145)) {\n                            x_218612 = ((__global\n                                         float *) segred_tmp_mem_229150)[index_of_group_res_229217];\n                            x_218613 = ((__global\n                                         float *) segred_tmp_mem_229152)[index_of_group_res_229217];\n                            x_218614 = ((__global\n                                         float *) segred_tmp_mem_229154)[index_of_group_res_229217];\n                            x_218615 = ((__global\n                                         float *) segred_tmp_mem_229156)[index_of_group_res_229217];\n                            x_218616 = ((__global\n                                         float *) segred_tmp_mem_229158)[index_of_group_res_229217];\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_229167)[sext_i32_i64(local_tid_229163)] =\n                    x_218607;\n                ((__local\n                  float *) red_arr_mem_229169)[sext_i32_i64(local_tid_229163)] =\n                    x_218608;\n                ((__local\n                  float *) red_arr_mem_229171)[sext_i32_i64(local_tid_229163)] =\n                    x_218609;\n                ((__local\n                  float *) red_arr_mem_229173)[sext_i32_i64(local_tid_229163)] =\n                    x_218610;\n                ((__local\n                  float *) red_arr_mem_229175)[sext_i32_i64(local_tid_229163)] =\n                    x_218611;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_229218;\n                    int32_t skip_waves_229219 = 1;\n                    float x_229194;\n                    float x_229195;\n                    float x_229196;\n                    float x_229197;\n                    float x_229198;\n                    float x_229199;\n                    float x_229200;\n                    float x_229201;\n                    float x_229202;\n                    float x_229203;\n                    \n                    offset_229218 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_229163,\n                                  sext_i64_i32(segred_group_sizze_218595))) {\n                            x_229194 = ((__local\n                                         float *) red_arr_mem_229167)[sext_i32_i64(local_tid_229163 +\n                                                                      offset_229218)];\n  ",
            "                          x_229195 = ((__local\n                                         float *) red_arr_mem_229169)[sext_i32_i64(local_tid_229163 +\n                                                                      offset_229218)];\n                            x_229196 = ((__local\n                                         float *) red_arr_mem_229171)[sext_i32_i64(local_tid_229163 +\n                                                                      offset_229218)];\n                            x_229197 = ((__local\n                                         float *) red_arr_mem_229173)[sext_i32_i64(local_tid_229163 +\n                                                                      offset_229218)];\n                            x_229198 = ((__local\n                                         float *) red_arr_mem_229175)[sext_i32_i64(local_tid_229163 +\n                                                                      offset_229218)];\n                        }\n                    }\n                    offset_229218 = 1;\n                    while (slt32(offset_229218, wave_sizze_229165)) {\n                        if (slt32(local_tid_229163 + offset_229218,\n                                  sext_i64_i32(segred_group_sizze_218595)) &&\n                            ((local_tid_229163 - squot32(local_tid_229163,\n                                                         wave_sizze_229165) *\n                              wave_sizze_229165) & (2 * offset_229218 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_229199 = ((volatile __local\n                                             float *) red_arr_mem_229167)[sext_i32_i64(local_tid_229163 +\n                                                                          offset_229218)];\n                                x_229200 = ((volatile __local\n                                             float *) red_arr_mem_229169)[sext_i3",
            "2_i64(local_tid_229163 +\n                                                                          offset_229218)];\n                                x_229201 = ((volatile __local\n                                             float *) red_arr_mem_229171)[sext_i32_i64(local_tid_229163 +\n                                                                          offset_229218)];\n                                x_229202 = ((volatile __local\n                                             float *) red_arr_mem_229173)[sext_i32_i64(local_tid_229163 +\n                                                                          offset_229218)];\n                                x_229203 = ((volatile __local\n                                             float *) red_arr_mem_229175)[sext_i32_i64(local_tid_229163 +\n                                                                          offset_229218)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_229204 = x_229194 +\n                                      x_229199;\n                                float defunc_1_op_res_229205 = x_229195 +\n                                      x_229200;\n                                float defunc_1_op_res_229206 = x_229196 +\n                                      x_229201;\n                                float defunc_1_op_res_229207 = x_229197 +\n                                      x_229202;\n                                float defunc_1_op_res_229208 = x_229198 +\n                                      x_229203;\n                                \n                                x_229194 = defunc_1_op_res_229204;\n                                x_229195 = defunc_1_op_res_229205;\n                                x_229196 = defunc_1_op_res_229206;\n                                x_229197 = defunc_1_op_res_229207;\n                                x_229198 = defunc_1_op_res_229208;\n            ",
            "                }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_229167)[sext_i32_i64(local_tid_229163)] =\n                                    x_229194;\n                                ((volatile __local\n                                  float *) red_arr_mem_229169)[sext_i32_i64(local_tid_229163)] =\n                                    x_229195;\n                                ((volatile __local\n                                  float *) red_arr_mem_229171)[sext_i32_i64(local_tid_229163)] =\n                                    x_229196;\n                                ((volatile __local\n                                  float *) red_arr_mem_229173)[sext_i32_i64(local_tid_229163)] =\n                                    x_229197;\n                                ((volatile __local\n                                  float *) red_arr_mem_229175)[sext_i32_i64(local_tid_229163)] =\n                                    x_229198;\n                            }\n                        }\n                        offset_229218 *= 2;\n                    }\n                    while (slt32(skip_waves_229219,\n                                 squot32(sext_i64_i32(segred_group_sizze_218595) +\n                                         wave_sizze_229165 - 1,\n                                         wave_sizze_229165))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_229218 = skip_waves_229219 * wave_sizze_229165;\n                        if (slt32(local_tid_229163 + offset_229218,\n                                  sext_i64_i32(segred_group_sizze_218595)) &&\n                            ((local_tid_229163 - squot32(local_tid_229163,\n                                                         wave_sizze_229165) *\n                              wave_sizze_229165) == 0 &&\n                             (squot32(local_tid_229",
            "163, wave_sizze_229165) &\n                              (2 * skip_waves_229219 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_229199 = ((__local\n                                             float *) red_arr_mem_229167)[sext_i32_i64(local_tid_229163 +\n                                                                          offset_229218)];\n                                x_229200 = ((__local\n                                             float *) red_arr_mem_229169)[sext_i32_i64(local_tid_229163 +\n                                                                          offset_229218)];\n                                x_229201 = ((__local\n                                             float *) red_arr_mem_229171)[sext_i32_i64(local_tid_229163 +\n                                                                          offset_229218)];\n                                x_229202 = ((__local\n                                             float *) red_arr_mem_229173)[sext_i32_i64(local_tid_229163 +\n                                                                          offset_229218)];\n                                x_229203 = ((__local\n                                             float *) red_arr_mem_229175)[sext_i32_i64(local_tid_229163 +\n                                                                          offset_229218)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_229204 = x_229194 +\n                                      x_229199;\n                                float defunc_1_op_res_229205 = x_229195 +\n                                      x_229200;\n                                float defunc_1_op_res_229206 = x_229196 +\n                                      x_229201;\n                                float defunc_1_op_res_229207 = x_229197 +\n                   ",
            "                   x_229202;\n                                float defunc_1_op_res_229208 = x_229198 +\n                                      x_229203;\n                                \n                                x_229194 = defunc_1_op_res_229204;\n                                x_229195 = defunc_1_op_res_229205;\n                                x_229196 = defunc_1_op_res_229206;\n                                x_229197 = defunc_1_op_res_229207;\n                                x_229198 = defunc_1_op_res_229208;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_229167)[sext_i32_i64(local_tid_229163)] =\n                                    x_229194;\n                                ((__local\n                                  float *) red_arr_mem_229169)[sext_i32_i64(local_tid_229163)] =\n                                    x_229195;\n                                ((__local\n                                  float *) red_arr_mem_229171)[sext_i32_i64(local_tid_229163)] =\n                                    x_229196;\n                                ((__local\n                                  float *) red_arr_mem_229173)[sext_i32_i64(local_tid_229163)] =\n                                    x_229197;\n                                ((__local\n                                  float *) red_arr_mem_229175)[sext_i32_i64(local_tid_229163)] =\n                                    x_229198;\n                            }\n                        }\n                        skip_waves_229219 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_229163 == 0) {\n                            ((__global float *) mem_224404)[gtid_218603 *\n                                                            t_n_m_196759 +\n                         ",
            "                                   gtid_218604] =\n                                x_229194;\n                            ((__global float *) mem_224408)[gtid_218603 *\n                                                            t_n_m_196759 +\n                                                            gtid_218604] =\n                                x_229195;\n                            ((__global float *) mem_224412)[gtid_218603 *\n                                                            t_n_m_196759 +\n                                                            gtid_218604] =\n                                x_229196;\n                            ((__global float *) mem_224416)[gtid_218603 *\n                                                            t_n_m_196759 +\n                                                            gtid_218604] =\n                                x_229197;\n                            ((__global float *) mem_224420)[gtid_218603 *\n                                                            t_n_m_196759 +\n                                                            gtid_218604] =\n                                x_229198;\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                                        uint sync_arr_mem_229285_backing_offset_0,\n                                        uint red_arr_mem_229283_backing_offset_1,\n                                        uint red_arr_mem_229281_backing_offset_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_229265,\n                                        int64_t elements_per_thread_229266,\n                                        int64_t virt_num_groups_229267,\n                                        int64_t threads_per_segment_229269,\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_229270,\n                                        __global\n                                        unsigned char *segred_tmp_mem_229272,\n                                        __global\n                                        unsigned char *mainzicounter_mem_229274)\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    volatile unsigned char *sync_arr_mem_229285_backing_2 =\n                           &shared_mem[sy",
            "nc_arr_mem_229285_backing_offset_0];\n    volatile unsigned char *red_arr_mem_229283_backing_1 =\n                           &shared_mem[red_arr_mem_229283_backing_offset_1];\n    volatile unsigned char *red_arr_mem_229281_backing_0 =\n                           &shared_mem[red_arr_mem_229281_backing_offset_2];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229276;\n    int32_t local_tid_229277;\n    int64_t group_sizze_229280;\n    int32_t wave_sizze_229279;\n    int32_t group_tid_229278;\n    \n    global_tid_229276 = get_global_id(0);\n    local_tid_229277 = get_local_id(0);\n    group_sizze_229280 = get_local_size(0);\n    wave_sizze_229279 = LOCKSTEP_WIDTH;\n    group_tid_229278 = get_group_id(0);\n    \n    int32_t phys_tid_218707 = global_tid_229276;\n    __local unsigned char *red_arr_mem_229281;\n    \n    red_arr_mem_229281 = (__local unsigned char *) red_arr_mem_229281_backing_0;\n    \n    __local unsigned char *red_arr_mem_229283;\n    \n    red_arr_mem_229283 = (__local unsigned char *) red_arr_mem_229283_backing_1;\n    \n    __local unsigned char *sync_arr_mem_229285;\n    \n    sync_arr_mem_229285 = (__local\n                           unsigned char *) sync_arr_mem_229285_backing_2;\n    \n    int32_t phys_group_id_229287;\n    \n    phys_group_id_229287 = get_group_id(0);\n    for (int32_t i_229288 = 0; i_229288 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_229267) - phys_group_id_229287,\n                   sext_i64_i32(num_groups_218700)); i_229288++) {\n        int32_t virt_group_id_229289 = phys_group_id_229287 + i_229288 *\n                sext_i64_i32(num_groups_218700);\n        int32_t flat_segment_id_229290 = squot32(virt_group_id_229289,\n                                                 sext_i64_i32(groups_per_segment_229265));\n        int64_t global_tid_229291 = srem64(sext_i32_i64(virt_group_id_229289) *\n                                           segred_group_sizze_218699 +\n                                           sext_i32_i64(local_tid",
            "_229277),\n                                           segred_group_sizze_218699 *\n                                           groups_per_segment_229265);\n        int64_t slice_229292 = t_n_m_196759;\n        int64_t slice_229293 = m_196691 * slice_229292;\n        int64_t gtid_218704 = squot64(sext_i32_i64(flat_segment_id_229290),\n                                      slice_229292);\n        int64_t remnant_229294 = sext_i32_i64(flat_segment_id_229290) -\n                gtid_218704 * slice_229292;\n        int64_t gtid_218705 = remnant_229294;\n        int64_t remnant_229295 = remnant_229294 - gtid_218705;\n        int64_t gtid_218706;\n        float x_acc_229296;\n        float x_acc_229297;\n        int64_t chunk_sizze_229298 = smin64(elements_per_thread_229266,\n                                            sdiv_up64(q_t_196696 -\n                                                      global_tid_229291,\n                                                      threads_per_segment_229269));\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_229296 = 0.0F;\n            x_acc_229297 = 0.0F;\n        }\n        for (int64_t i_229305 = 0; i_229305 < chunk_sizze_229298; i_229305++) {\n            gtid_218706 = global_tid_229291 + threads_per_segment_229269 *\n                i_229305;\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_21",
            "8715, 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                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_21875",
            "4;\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_229296;\n                    x_218709 = x_acc_229297;\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_229296 = defunc_1_op_res_218712;\n                        x_acc_229297 = 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_229296;\n            x_218709 = x_acc_229297;\n            ((__local\n              float *) red_arr_mem_229281)[sext_i32_i64(local_tid_229277)] =\n                x_218708;\n            ((__local\n              float *) red_arr_mem_229283)[sext_i32_i64(local_tid_229277)] =\n                x_218709;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_229306;\n        int32_t skip_waves_229307 = 1;\n        float x_229299;\n        float x_229300;\n        float x_229301;\n        float x_229302;\n        \n        offset_229306 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_229277,\n                      sext_i64_i32(segred_group_sizze_218699))) {\n                x_229299 = ((__local\n                             float *) red_arr",
            "_mem_229281)[sext_i32_i64(local_tid_229277 +\n                                                          offset_229306)];\n                x_229300 = ((__local\n                             float *) red_arr_mem_229283)[sext_i32_i64(local_tid_229277 +\n                                                          offset_229306)];\n            }\n        }\n        offset_229306 = 1;\n        while (slt32(offset_229306, wave_sizze_229279)) {\n            if (slt32(local_tid_229277 + offset_229306,\n                      sext_i64_i32(segred_group_sizze_218699)) &&\n                ((local_tid_229277 - squot32(local_tid_229277,\n                                             wave_sizze_229279) *\n                  wave_sizze_229279) & (2 * offset_229306 - 1)) == 0) {\n                // read array element\n                {\n                    x_229301 = ((volatile __local\n                                 float *) red_arr_mem_229281)[sext_i32_i64(local_tid_229277 +\n                                                              offset_229306)];\n                    x_229302 = ((volatile __local\n                                 float *) red_arr_mem_229283)[sext_i32_i64(local_tid_229277 +\n                                                              offset_229306)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_229303 = x_229299 + x_229301;\n                    float defunc_1_op_res_229304 = x_229300 + x_229302;\n                    \n                    x_229299 = defunc_1_op_res_229303;\n                    x_229300 = defunc_1_op_res_229304;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_229281)[sext_i32_i64(local_tid_229277)] =\n                        x_229299;\n                    ((volatile __local\n                      float *) red_arr_mem_229283)[sext_i32_i64(local_tid_229277)] =\n                        x",
            "_229300;\n                }\n            }\n            offset_229306 *= 2;\n        }\n        while (slt32(skip_waves_229307,\n                     squot32(sext_i64_i32(segred_group_sizze_218699) +\n                             wave_sizze_229279 - 1, wave_sizze_229279))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_229306 = skip_waves_229307 * wave_sizze_229279;\n            if (slt32(local_tid_229277 + offset_229306,\n                      sext_i64_i32(segred_group_sizze_218699)) &&\n                ((local_tid_229277 - squot32(local_tid_229277,\n                                             wave_sizze_229279) *\n                  wave_sizze_229279) == 0 && (squot32(local_tid_229277,\n                                                      wave_sizze_229279) & (2 *\n                                                                            skip_waves_229307 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_229301 = ((__local\n                                 float *) red_arr_mem_229281)[sext_i32_i64(local_tid_229277 +\n                                                              offset_229306)];\n                    x_229302 = ((__local\n                                 float *) red_arr_mem_229283)[sext_i32_i64(local_tid_229277 +\n                                                              offset_229306)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_229303 = x_229299 + x_229301;\n                    float defunc_1_op_res_229304 = x_229300 + x_229302;\n                    \n                    x_229299 = defunc_1_op_res_229303;\n                    x_229300 = defunc_1_op_res_229304;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_229281)[sext_i32_i64(lo",
            "cal_tid_229277)] =\n                        x_229299;\n                    ((__local\n                      float *) red_arr_mem_229283)[sext_i32_i64(local_tid_229277)] =\n                        x_229300;\n                }\n            }\n            skip_waves_229307 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_229277) == (int64_t) 0) {\n                x_acc_229296 = x_229299;\n                x_acc_229297 = x_229300;\n            }\n        }\n        if (groups_per_segment_229265 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_229277 == 0) {\n                    ((__global float *) mem_224446)[gtid_218704 * t_n_m_196759 +\n                                                    gtid_218705] = x_acc_229296;\n                    ((__global float *) mem_224450)[gtid_218704 * t_n_m_196759 +\n                                                    gtid_218705] = x_acc_229297;\n                }\n            }\n        } else {\n            int32_t old_counter_229308;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_229277 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_229270)[sext_i32_i64(virt_group_id_229289)] =\n                        x_acc_229296;\n                    ((__global\n                      float *) segred_tmp_mem_229272)[sext_i32_i64(virt_group_id_229289)] =\n                        x_acc_229297;\n                    mem_fence_global();\n                    old_counter_229308 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_229274)[sext_i32_i64(srem32(flat_segment_id_229290,\n                                                                                                      10240))]",
            ",\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_229285)[(int64_t) 0] =\n                        old_counter_229308 == groups_per_segment_229265 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_229309;\n            \n            is_last_group_229309 = ((__local\n                                     bool *) sync_arr_mem_229285)[(int64_t) 0];\n            if (is_last_group_229309) {\n                if (local_tid_229277 == 0) {\n                    old_counter_229308 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_229274)[sext_i32_i64(srem32(flat_segment_id_229290,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_229265));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_229310 =\n                            sdiv_up64(groups_per_segment_229265,\n                                      segred_group_sizze_218699);\n                    \n                    x_218708 = 0.0F;\n                    x_218709 = 0.0F;\n                    for (int64_t i_229311 = 0; i_229311 <\n                         read_per_thread_229310; i_229311++) {\n                        int64_t group_res_id_229312 =\n                                sext_i32_i64(local_tid_229277) *\n                                read_per_thread_229310 + i_229311;\n                        int64_t index_of_group_res_229313 =\n                                sext_i32_i64(flat_segment_id_229290) *\n                                groups_per_segment_229265 + group_res_id_229312;\n       ",
            "                 \n                        if (slt64(group_res_id_229312,\n                                  groups_per_segment_229265)) {\n                            x_218710 = ((__global\n                                         float *) segred_tmp_mem_229270)[index_of_group_res_229313];\n                            x_218711 = ((__global\n                                         float *) segred_tmp_mem_229272)[index_of_group_res_229313];\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_229281)[sext_i32_i64(local_tid_229277)] =\n                    x_218708;\n                ((__local\n                  float *) red_arr_mem_229283)[sext_i32_i64(local_tid_229277)] =\n                    x_218709;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_229314;\n                    int32_t skip_waves_229315 = 1;\n                    float x_229299;\n                    float x_229300;\n                    float x_229301;\n                    float x_229302;\n                    \n                    offset_229314 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_229277,\n                                  sext_i64_i32(segred_group_sizze_218699))) {\n                            x_229299 = ((__local\n                                         float *) red_arr_mem_229281)[sext_i32_i64(local_tid_229277 +\n                                                                      offset_229314)];\n       ",
            "                     x_229300 = ((__local\n                                         float *) red_arr_mem_229283)[sext_i32_i64(local_tid_229277 +\n                                                                      offset_229314)];\n                        }\n                    }\n                    offset_229314 = 1;\n                    while (slt32(offset_229314, wave_sizze_229279)) {\n                        if (slt32(local_tid_229277 + offset_229314,\n                                  sext_i64_i32(segred_group_sizze_218699)) &&\n                            ((local_tid_229277 - squot32(local_tid_229277,\n                                                         wave_sizze_229279) *\n                              wave_sizze_229279) & (2 * offset_229314 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_229301 = ((volatile __local\n                                             float *) red_arr_mem_229281)[sext_i32_i64(local_tid_229277 +\n                                                                          offset_229314)];\n                                x_229302 = ((volatile __local\n                                             float *) red_arr_mem_229283)[sext_i32_i64(local_tid_229277 +\n                                                                          offset_229314)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_229303 = x_229299 +\n                                      x_229301;\n                                float defunc_1_op_res_229304 = x_229300 +\n                                      x_229302;\n                                \n                                x_229299 = defunc_1_op_res_229303;\n                                x_229300 = defunc_1_op_res_229304;\n                            }\n                            // write result o",
            "f operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_229281)[sext_i32_i64(local_tid_229277)] =\n                                    x_229299;\n                                ((volatile __local\n                                  float *) red_arr_mem_229283)[sext_i32_i64(local_tid_229277)] =\n                                    x_229300;\n                            }\n                        }\n                        offset_229314 *= 2;\n                    }\n                    while (slt32(skip_waves_229315,\n                                 squot32(sext_i64_i32(segred_group_sizze_218699) +\n                                         wave_sizze_229279 - 1,\n                                         wave_sizze_229279))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_229314 = skip_waves_229315 * wave_sizze_229279;\n                        if (slt32(local_tid_229277 + offset_229314,\n                                  sext_i64_i32(segred_group_sizze_218699)) &&\n                            ((local_tid_229277 - squot32(local_tid_229277,\n                                                         wave_sizze_229279) *\n                              wave_sizze_229279) == 0 &&\n                             (squot32(local_tid_229277, wave_sizze_229279) &\n                              (2 * skip_waves_229315 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_229301 = ((__local\n                                             float *) red_arr_mem_229281)[sext_i32_i64(local_tid_229277 +\n                                                                          offset_229314)];\n                                x_229302 = ((__local\n                                             float *) red_arr_mem_229283)[sext_i32_i64(local_tid_229277 +\n                                                              ",
            "            offset_229314)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_229303 = x_229299 +\n                                      x_229301;\n                                float defunc_1_op_res_229304 = x_229300 +\n                                      x_229302;\n                                \n                                x_229299 = defunc_1_op_res_229303;\n                                x_229300 = defunc_1_op_res_229304;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_229281)[sext_i32_i64(local_tid_229277)] =\n                                    x_229299;\n                                ((__local\n                                  float *) red_arr_mem_229283)[sext_i32_i64(local_tid_229277)] =\n                                    x_229300;\n                            }\n                        }\n                        skip_waves_229315 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_229277 == 0) {\n                            ((__global float *) mem_224446)[gtid_218704 *\n                                                            t_n_m_196759 +\n                                                            gtid_218705] =\n                                x_229299;\n                            ((__global float *) mem_224450)[gtid_218704 *\n                                                            t_n_m_196759 +\n                                                            gtid_218705] =\n                                x_229300;\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                                        uint sync_arr_mem_229940_backing_offset_0,\n                                        uint red_arr_mem_229938_backing_offset_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_229924,\n                                        int64_t elements_per_thread_229925,\n                                        int64_t virt_num_groups_229926,\n                                        int64_t threads_per_segment_229928,\n                                        __global unsigned char *ext_mem_224882,\n                                        __global unsigned char *mem_224899,\n                                        __global\n                                        unsigned char *segred_tmp_mem_229929,\n                                        __global\n                                        unsigned char *mainzicounter_mem_229931)\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    volatile unsigned char *sync_arr_mem_229940_backing_1 =\n                           &shared_mem[sync_arr_mem_229940_backing_offset_0];\n    volatile unsigned char *red_arr_mem_229938_backing_0 =\n                           &shared_mem[red_arr_mem_229938_backing_offset_1];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229933;\n    int32_t local_tid_229934;\n    int64_t group_sizze_229937;\n    int32_t wave_sizze_229936;\n    int32_t group_tid_229935;\n    \n    global_tid_229933 = get_global_id(0);\n    local_tid_22993",
            "4 = get_local_id(0);\n    group_sizze_229937 = get_local_size(0);\n    wave_sizze_229936 = LOCKSTEP_WIDTH;\n    group_tid_229935 = get_group_id(0);\n    \n    int32_t phys_tid_221141 = global_tid_229933;\n    __local unsigned char *red_arr_mem_229938;\n    \n    red_arr_mem_229938 = (__local unsigned char *) red_arr_mem_229938_backing_0;\n    \n    __local unsigned char *sync_arr_mem_229940;\n    \n    sync_arr_mem_229940 = (__local\n                           unsigned char *) sync_arr_mem_229940_backing_1;\n    \n    int32_t phys_group_id_229942;\n    \n    phys_group_id_229942 = get_group_id(0);\n    for (int32_t i_229943 = 0; i_229943 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_229926) - phys_group_id_229942,\n                   sext_i64_i32(num_groups_221136)); i_229943++) {\n        int32_t virt_group_id_229944 = phys_group_id_229942 + i_229943 *\n                sext_i64_i32(num_groups_221136);\n        int32_t flat_segment_id_229945 = squot32(virt_group_id_229944,\n                                                 sext_i64_i32(groups_per_segment_229924));\n        int64_t global_tid_229946 = srem64(sext_i32_i64(virt_group_id_229944) *\n                                           segred_group_sizze_221135 +\n                                           sext_i32_i64(local_tid_229934),\n                                           segred_group_sizze_221135 *\n                                           groups_per_segment_229924);\n        int64_t slice_229947 = m_196691;\n        int64_t gtid_221139 = sext_i32_i64(flat_segment_id_229945);\n        int64_t remnant_229948 = sext_i32_i64(flat_segment_id_229945) -\n                gtid_221139;\n        int64_t gtid_221140;\n        float x_acc_229949;\n        int64_t chunk_sizze_229950 = smin64(elements_per_thread_229925,\n                                            sdiv_up64(j_m_i_197246 -\n                                                      global_tid_229946,\n                                                      threads_per_segment_229928));\n      ",
            "  float x_221142;\n        float x_221143;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_229949 = 0.0F;\n        }\n        for (int64_t i_229954 = 0; i_229954 < chunk_sizze_229950; i_229954++) {\n            gtid_221140 = global_tid_229946 + threads_per_segment_229928 *\n                i_229954;\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_229949;\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_229949 = 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_229949;\n            ((__local\n              float *) red_arr_mem_229938)[sext_i32_i64(local_tid_229934)] =\n                x_221142;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_229955;\n        int32_t skip_waves_229956 = 1;\n        float x_229951;\n        float x_229952;\n        \n        offset_229955 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_229934,\n                      sext_i64_i32(segred_group_sizze_221135))) {\n          ",
            "      x_229951 = ((__local\n                             float *) red_arr_mem_229938)[sext_i32_i64(local_tid_229934 +\n                                                          offset_229955)];\n            }\n        }\n        offset_229955 = 1;\n        while (slt32(offset_229955, wave_sizze_229936)) {\n            if (slt32(local_tid_229934 + offset_229955,\n                      sext_i64_i32(segred_group_sizze_221135)) &&\n                ((local_tid_229934 - squot32(local_tid_229934,\n                                             wave_sizze_229936) *\n                  wave_sizze_229936) & (2 * offset_229955 - 1)) == 0) {\n                // read array element\n                {\n                    x_229952 = ((volatile __local\n                                 float *) red_arr_mem_229938)[sext_i32_i64(local_tid_229934 +\n                                                              offset_229955)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_229953 = x_229951 + x_229952;\n                    \n                    x_229951 = defunc_1_op_res_229953;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_229938)[sext_i32_i64(local_tid_229934)] =\n                        x_229951;\n                }\n            }\n            offset_229955 *= 2;\n        }\n        while (slt32(skip_waves_229956,\n                     squot32(sext_i64_i32(segred_group_sizze_221135) +\n                             wave_sizze_229936 - 1, wave_sizze_229936))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_229955 = skip_waves_229956 * wave_sizze_229936;\n            if (slt32(local_tid_229934 + offset_229955,\n                      sext_i64_i32(segred_group_sizze_221135)) &&\n                ((local_tid_229934 - squot32(local_tid_229934,\n                                             wave_sizze_229936) *\n         ",
            "         wave_sizze_229936) == 0 && (squot32(local_tid_229934,\n                                                      wave_sizze_229936) & (2 *\n                                                                            skip_waves_229956 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_229952 = ((__local\n                                 float *) red_arr_mem_229938)[sext_i32_i64(local_tid_229934 +\n                                                              offset_229955)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_229953 = x_229951 + x_229952;\n                    \n                    x_229951 = defunc_1_op_res_229953;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_229938)[sext_i32_i64(local_tid_229934)] =\n                        x_229951;\n                }\n            }\n            skip_waves_229956 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_229934) == (int64_t) 0) {\n                x_acc_229949 = x_229951;\n            }\n        }\n        if (groups_per_segment_229924 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_229934 == 0) {\n                    ((__global float *) mem_224899)[gtid_221139] = x_acc_229949;\n                }\n            }\n        } else {\n            int32_t old_counter_229957;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_229934 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_229929)[sext_i32_i64(virt_group_id_229944",
            ")] =\n                        x_acc_229949;\n                    mem_fence_global();\n                    old_counter_229957 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_229931)[sext_i32_i64(srem32(flat_segment_id_229945,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_229940)[(int64_t) 0] =\n                        old_counter_229957 == groups_per_segment_229924 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_229958;\n            \n            is_last_group_229958 = ((__local\n                                     bool *) sync_arr_mem_229940)[(int64_t) 0];\n            if (is_last_group_229958) {\n                if (local_tid_229934 == 0) {\n                    old_counter_229957 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_229931)[sext_i32_i64(srem32(flat_segment_id_229945,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_229924));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_229959 =\n                            sdiv_up64(groups_per_segment_229924,\n                                      segred_group_sizze_221135);\n                    \n                    x_221142 = 0.0F;\n                    for (int64_t i_229960 = 0; i_229960 <\n                         read_per_thread_229959; i_229960++) {\n               ",
            "         int64_t group_res_id_229961 =\n                                sext_i32_i64(local_tid_229934) *\n                                read_per_thread_229959 + i_229960;\n                        int64_t index_of_group_res_229962 =\n                                sext_i32_i64(flat_segment_id_229945) *\n                                groups_per_segment_229924 + group_res_id_229961;\n                        \n                        if (slt64(group_res_id_229961,\n                                  groups_per_segment_229924)) {\n                            x_221143 = ((__global\n                                         float *) segred_tmp_mem_229929)[index_of_group_res_229962];\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_229938)[sext_i32_i64(local_tid_229934)] =\n                    x_221142;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_229963;\n                    int32_t skip_waves_229964 = 1;\n                    float x_229951;\n                    float x_229952;\n                    \n                    offset_229963 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_229934,\n                                  sext_i64_i32(segred_group_sizze_221135))) {\n                            x_229951 = ((__local\n                                         float *) red_arr_mem_229938)[sext_i32_i64(local_tid_229934 +\n                                                                      offset_229963)];\n                        }\n                    }\n                    offset_229963 = 1;\n                    while (slt32(",
            "offset_229963, wave_sizze_229936)) {\n                        if (slt32(local_tid_229934 + offset_229963,\n                                  sext_i64_i32(segred_group_sizze_221135)) &&\n                            ((local_tid_229934 - squot32(local_tid_229934,\n                                                         wave_sizze_229936) *\n                              wave_sizze_229936) & (2 * offset_229963 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_229952 = ((volatile __local\n                                             float *) red_arr_mem_229938)[sext_i32_i64(local_tid_229934 +\n                                                                          offset_229963)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_229953 = x_229951 +\n                                      x_229952;\n                                \n                                x_229951 = defunc_1_op_res_229953;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_229938)[sext_i32_i64(local_tid_229934)] =\n                                    x_229951;\n                            }\n                        }\n                        offset_229963 *= 2;\n                    }\n                    while (slt32(skip_waves_229964,\n                                 squot32(sext_i64_i32(segred_group_sizze_221135) +\n                                         wave_sizze_229936 - 1,\n                                         wave_sizze_229936))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_229963 = skip_waves_229964 * wave_sizze_229936;\n                        if (slt32(local_tid_2",
            "29934 + offset_229963,\n                                  sext_i64_i32(segred_group_sizze_221135)) &&\n                            ((local_tid_229934 - squot32(local_tid_229934,\n                                                         wave_sizze_229936) *\n                              wave_sizze_229936) == 0 &&\n                             (squot32(local_tid_229934, wave_sizze_229936) &\n                              (2 * skip_waves_229964 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_229952 = ((__local\n                                             float *) red_arr_mem_229938)[sext_i32_i64(local_tid_229934 +\n                                                                          offset_229963)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_229953 = x_229951 +\n                                      x_229952;\n                                \n                                x_229951 = defunc_1_op_res_229953;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_229938)[sext_i32_i64(local_tid_229934)] =\n                                    x_229951;\n                            }\n                        }\n                        skip_waves_229964 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_229934 == 0) {\n                            ((__global float *) mem_224899)[gtid_221139] =\n                                x_229951;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #u",
            "ndef segred_group_sizze_221135\n}\n__kernel void mainzisegred_small_205086(__global int *global_failure,\n                                        uint red_arr_mem_226083_backing_offset_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_226076,\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    volatile unsigned char *red_arr_mem_226083_backing_0 =\n                           &shared_mem[red_arr_mem_226083_backing_offset_0];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226078;\n    int32_t local_tid_226079;\n    int64_t group_sizze_226082;\n    int32_t wave_sizze_226081;\n    int32_t group_tid_226080;\n    \n    global_tid_226078 = get_global_id(0);\n    local_tid_226079 = get_local_id(0);\n    group_sizze_226082 = get_local_size(0);\n    wave_sizze_226081 = LOCKSTEP_WIDTH;\n    group_tid_226080 = get_group_id(0);\n    \n    int32_t phys_tid_205086 = global_tid_226078;\n    __local unsigned char *red_arr_mem_226083;\n    \n    red_arr_mem_22",
            "6083 = (__local unsigned char *) red_arr_mem_226083_backing_0;\n    \n    int32_t phys_group_id_226085;\n    \n    phys_group_id_226085 = get_group_id(0);\n    for (int32_t i_226086 = 0; i_226086 <\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_226076))) -\n                   phys_group_id_226085, sext_i64_i32(num_groups_205079));\n         i_226086++) {\n        int32_t virt_group_id_226087 = phys_group_id_226085 + i_226086 *\n                sext_i64_i32(num_groups_205079);\n        int64_t slice_226088 = s_n_m_196745;\n        int64_t slice_226089 = n_p_196694 * slice_226088;\n        int64_t slice_226090 = m_196691 * slice_226089;\n        int64_t gtid_205082 = squot64(squot64(sext_i32_i64(local_tid_226079),\n                                              segment_sizze_nonzzero_226076) +\n                                      sext_i32_i64(virt_group_id_226087) *\n                                      squot64(segred_group_sizze_205078,\n                                              segment_sizze_nonzzero_226076),\n                                      slice_226089);\n        int64_t remnant_226091 = squot64(sext_i32_i64(local_tid_226079),\n                                         segment_sizze_nonzzero_226076) +\n                sext_i32_i64(virt_group_id_226087) *\n                squot64(segred_group_sizze_205078,\n                        segment_sizze_nonzzero_226076) - gtid_205082 *\n                slice_226089;\n        int64_t gtid_205083 = squot64(remnant_226091, slice_226088);\n        int64_t remnant_226092 = remnant_226091 - gtid_205083 * slice_226088;\n        int64_t gtid_205084 = remnant_226092;\n        int64_t remnant_226093 = remnant_226092 - gtid_205084;\n        int64_t gtid_205085 = srem64(sext_i32_i64(local_tid_226079),\n                                     q_s_196695);\n        \n        // app",
            "ly 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_226079),\n                                                         q_s_196695 *\n                                                         squot64(segred_group_sizze_205078,\n                                                                 segment_sizze_nonzzero_226076)))) {\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_205111 * tmp3_205122;\n                \n                // save map-out results\n                { }\n                // save results to be reduced\n     ",
            "           {\n                    ((__local\n                      float *) red_arr_mem_226083)[sext_i32_i64(local_tid_226079)] =\n                        w_j_205123;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_226083)[sext_i32_i64(local_tid_226079)] =\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_226094;\n                float x_226095;\n                bool ltid_in_bounds_226097 =\n                     slt64(sext_i32_i64(local_tid_226079), q_s_196695 *\n                           squot64(segred_group_sizze_205078,\n                                   segment_sizze_nonzzero_226076));\n                int32_t skip_threads_226098;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_226097) {\n                        x_205088 = ((volatile __local\n                                     float *) red_arr_mem_226083)[sext_i32_i64(local_tid_226079)];\n                        if ((local_tid_226079 - squot32(local_tid_226079, 32) *\n                             32) == 0) {\n                            x_205087 = x_205088;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_226098 = 1;\n                    while (slt32(skip_threads_226098, 32)) {\n                        bool thread_active_226099 = sle32(skip_threads_226098,\n                                                          local_tid_226079 -\n                                                          squot32(local_tid_226079,\n                                                                  32) * 32) &&\n                             ltid_i",
            "n_bounds_226097;\n                        \n                        if (thread_active_226099) {\n                            // read operands\n                            {\n                                x_205087 = ((volatile __local\n                                             float *) red_arr_mem_226083)[sext_i32_i64(local_tid_226079) -\n                                                                          sext_i32_i64(skip_threads_226098)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_226100 =\n                                 slt64(srem64(sext_i32_i64(local_tid_226079),\n                                              q_s_196695),\n                                       sext_i32_i64(local_tid_226079) -\n                                       sext_i32_i64(local_tid_226079 -\n                                       skip_threads_226098));\n                            \n                            if (thread_active_226099 && inactive_226100) {\n                                x_205087 = x_205088;\n                            }\n                            if (thread_active_226099) {\n                                if (!inactive_226100) {\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_226081, skip_threads_226098)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_226099) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_226083)[sext",
            "_i32_i64(local_tid_226079)] =\n                                    x_205087;\n                                x_205088 = x_205087;\n                            }\n                        }\n                        if (sle32(wave_sizze_226081, skip_threads_226098)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_226098 *= 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_226079 - squot32(local_tid_226079, 32) *\n                         32) == 31 && ltid_in_bounds_226097) {\n                        ((volatile __local\n                          float *) red_arr_mem_226083)[sext_i32_i64(squot32(local_tid_226079,\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_226101;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_226079, 32) == 0 &&\n                            ltid_in_bounds_226097) {\n                            x_226095 = ((volatile __local\n                                         float *) red_arr_mem_226083)[sext_i32_i64(local_tid_226079)];\n                            if ((local_tid_226079 - squot32(local_tid_226079,\n                                                            32) * 32) == 0) {\n                                x_226094 = x_226095;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                       ",
            " skip_threads_226101 = 1;\n                        while (slt32(skip_threads_226101, 32)) {\n                            bool thread_active_226102 =\n                                 sle32(skip_threads_226101, local_tid_226079 -\n                                       squot32(local_tid_226079, 32) * 32) &&\n                                 (squot32(local_tid_226079, 32) == 0 &&\n                                  ltid_in_bounds_226097);\n                            \n                            if (thread_active_226102) {\n                                // read operands\n                                {\n                                    x_226094 = ((volatile __local\n                                                 float *) red_arr_mem_226083)[sext_i32_i64(local_tid_226079) -\n                                                                              sext_i32_i64(skip_threads_226101)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_226103 =\n                                     slt64(srem64(sext_i32_i64(local_tid_226079 *\n                                                  32 + 32 - 1), q_s_196695),\n                                           sext_i32_i64(local_tid_226079 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_226079 -\n                                                         skip_threads_226101) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_226102 && inactive_226103) {\n                                    x_226094 = x_226095;\n                                }\n                                if (thread_active_226102) {\n                                    if (!inactive_226103) {\n                                        float defunc_1_op_res_226096 =\n         ",
            "                                     x_226094 + x_226095;\n                                        \n                                        x_226094 = defunc_1_op_res_226096;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_226081, skip_threads_226101)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_226102) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_226083)[sext_i32_i64(local_tid_226079)] =\n                                        x_226094;\n                                    x_226095 = x_226094;\n                                }\n                            }\n                            if (sle32(wave_sizze_226081, skip_threads_226101)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_226101 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_226104 = squot32(local_tid_226079, 32) == 0 ||\n                     !ltid_in_bounds_226097;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_226104) {\n                            x_205088 = x_205087;\n                            x_205087 = ((__local\n                                         float *) red_arr_mem_226083)[sext_i32_i64(squot32(local_tid_226079,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n          ",
            "              }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_226105 =\n                             slt64(srem64(sext_i32_i64(local_tid_226079),\n                                          q_s_196695),\n                                   sext_i32_i64(local_tid_226079) -\n                                   sext_i32_i64(squot32(local_tid_226079, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_226104) {\n                            if (inactive_226105) {\n                                x_205087 = x_205088;\n                            }\n                        }\n                        if (!no_carry_in_226104) {\n                            if (!inactive_226105) {\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_226104) {\n                            ((__local\n                              float *) red_arr_mem_226083)[sext_i32_i64(local_tid_226079)] =\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_226079, 32) == 0 &&\n                        ltid_in_bounds_226097) {\n                        ((__local\n                          float *) red_arr_mem_226083)[sext_i32_i64(local_tid_226079)] =\n                            x_205088;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FEN",
            "CE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_226087) *\n                      squot64(segred_group_sizze_205078,\n                              segment_sizze_nonzzero_226076) +\n                      sext_i32_i64(local_tid_226079), m_196691 * n_p_196694 *\n                      s_n_m_196745) && slt64(sext_i32_i64(local_tid_226079),\n                                             squot64(segred_group_sizze_205078,\n                                                     segment_sizze_nonzzero_226076))) {\n                float tmp_226106;\n                \n                tmp_226106 = ((__local\n                               float *) red_arr_mem_226083)[(sext_i32_i64(local_tid_226079) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226076 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_222754)[squot64(sext_i32_i64(virt_group_id_226087) *\n                                               squot64(segred_group_sizze_205078,\n                                                       segment_sizze_nonzzero_226076) +\n                                               sext_i32_i64(local_tid_226079),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226087) *\n                                               squot64(segred_group_sizze_205078,\n                                                       segment_sizze_nonzzero_226076) +\n                                               sext_i32_i64(local_tid_226079) -\n                                               squot64(sext_i32_i64(virt_group_id_226087) *\n                                                       squot64(segred_group_sizze_205",
            "078,\n                                                               segment_sizze_nonzzero_226076) +\n                                                       sext_i32_i64(local_tid_226079),\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_226087) *\n                                        squot64(segred_group_sizze_205078,\n                                                segment_sizze_nonzzero_226076) +\n                                        sext_i32_i64(local_tid_226079) -\n                                        squot64(sext_i32_i64(virt_group_id_226087) *\n                                                squot64(segred_group_sizze_205078,\n                                                        segment_sizze_nonzzero_226076) +\n                                                sext_i32_i64(local_tid_226079),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226087) *\n                                                squot64(segred_group_sizze_205078,\n                                                        segment_sizze_nonzzero_226076) +\n                                                sext_i32_i64(local_tid_226079) -\n                                                squot64(sext_i32_i64(virt_group_id_226087) *\n                                                        squot64(segred_group_sizze_205078,\n                                                                segment_sizze_nonzzero_226076) +\n                                                        sext_i32_i64(local_tid_226079),\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_226106;\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                                        uint red_arr_mem_226171_backing_offset_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_226164,\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 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    volatile unsigned char *red_arr_mem_226171_backing_0 ",
            "=\n                           &shared_mem[red_arr_mem_226171_backing_offset_0];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226166;\n    int32_t local_tid_226167;\n    int64_t group_sizze_226170;\n    int32_t wave_sizze_226169;\n    int32_t group_tid_226168;\n    \n    global_tid_226166 = get_global_id(0);\n    local_tid_226167 = get_local_id(0);\n    group_sizze_226170 = get_local_size(0);\n    wave_sizze_226169 = LOCKSTEP_WIDTH;\n    group_tid_226168 = get_group_id(0);\n    \n    int32_t phys_tid_205160 = global_tid_226166;\n    __local unsigned char *red_arr_mem_226171;\n    \n    red_arr_mem_226171 = (__local unsigned char *) red_arr_mem_226171_backing_0;\n    \n    int32_t phys_group_id_226173;\n    \n    phys_group_id_226173 = get_group_id(0);\n    for (int32_t i_226174 = 0; i_226174 <\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_226164))) -\n                   phys_group_id_226173, sext_i64_i32(num_groups_205153));\n         i_226174++) {\n        int32_t virt_group_id_226175 = phys_group_id_226173 + i_226174 *\n                sext_i64_i32(num_groups_205153);\n        int64_t slice_226176 = s_n_m_196745;\n        int64_t slice_226177 = n_p_196694 * slice_226176;\n        int64_t slice_226178 = m_196691 * slice_226177;\n        int64_t gtid_205156 = squot64(squot64(sext_i32_i64(local_tid_226167),\n                                              segment_sizze_nonzzero_226164) +\n                                      sext_i32_i64(virt_group_id_226175) *\n                                      squot64(segred_group_sizze_205152,\n                                              segment_sizze_nonzzero_226164),\n                                      slice_226177);\n        int64_t remnant_226179 = squot64(sext_i32_i64(local_tid_226167),\n                                         segment_sizz",
            "e_nonzzero_226164) +\n                sext_i32_i64(virt_group_id_226175) *\n                squot64(segred_group_sizze_205152,\n                        segment_sizze_nonzzero_226164) - gtid_205156 *\n                slice_226177;\n        int64_t gtid_205157 = squot64(remnant_226179, slice_226176);\n        int64_t remnant_226180 = remnant_226179 - gtid_205157 * slice_226176;\n        int64_t gtid_205158 = remnant_226180;\n        int64_t remnant_226181 = remnant_226180 - gtid_205158;\n        int64_t gtid_205159 = srem64(sext_i32_i64(local_tid_226167),\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_226167),\n                                                         q_s_196695 *\n                                                         squot64(segred_group_sizze_205152,\n                                                                 segment_sizze_nonzzero_226164)))) {\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_226171)[sext_i32_i64(local_tid_226167)] =\n                        defunc_9_fit_fun_res_205207;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_226171)[sext_i32_i64(local_tid_226167)] =\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_226182;\n                float x_226183;\n                bool ltid_in_bounds_226185 =\n                     slt64(sext_i32_i64(local_tid_226167), q_s_196695 *\n                           squot64(segred_group_sizze_205152,\n                                   segment_sizze_nonzzero_226164));\n                int32_t skip_threads_226186;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_226185) {\n                        x_205162 = ((volatile __local\n                                     float *) red_arr_mem_226171)[sext_i32_i64(local_tid_226167)];\n                        if ((local_tid_226167 - squot32(local_tid_226167, 32) *\n                             32) == 0) {\n                            x_205161 = x_205162;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_226186 = 1;\n                    while (slt32(skip_threads_226186, 32)) {\n                        bool thread_acti",
            "ve_226187 = sle32(skip_threads_226186,\n                                                          local_tid_226167 -\n                                                          squot32(local_tid_226167,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_226185;\n                        \n                        if (thread_active_226187) {\n                            // read operands\n                            {\n                                x_205161 = ((volatile __local\n                                             float *) red_arr_mem_226171)[sext_i32_i64(local_tid_226167) -\n                                                                          sext_i32_i64(skip_threads_226186)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_226188 =\n                                 slt64(srem64(sext_i32_i64(local_tid_226167),\n                                              q_s_196695),\n                                       sext_i32_i64(local_tid_226167) -\n                                       sext_i32_i64(local_tid_226167 -\n                                       skip_threads_226186));\n                            \n                            if (thread_active_226187 && inactive_226188) {\n                                x_205161 = x_205162;\n                            }\n                            if (thread_active_226187) {\n                                if (!inactive_226188) {\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                        if (sle32(wave_sizze_226169, skip_threads_226186)) {\n              ",
            "              barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_226187) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_226171)[sext_i32_i64(local_tid_226167)] =\n                                    x_205161;\n                                x_205162 = x_205161;\n                            }\n                        }\n                        if (sle32(wave_sizze_226169, skip_threads_226186)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_226186 *= 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_226167 - squot32(local_tid_226167, 32) *\n                         32) == 31 && ltid_in_bounds_226185) {\n                        ((volatile __local\n                          float *) red_arr_mem_226171)[sext_i32_i64(squot32(local_tid_226167,\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_226189;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_226167, 32) == 0 &&\n                            ltid_in_bounds_226185) {\n                            x_226183 = ((volatile __local\n                                         float *) red_arr_mem_226171)[sext_i32_i64(local_tid_226167)];\n                            if ((local_tid_226167 - squot32(local_tid_226167,\n        ",
            "                                                    32) * 32) == 0) {\n                                x_226182 = x_226183;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_226189 = 1;\n                        while (slt32(skip_threads_226189, 32)) {\n                            bool thread_active_226190 =\n                                 sle32(skip_threads_226189, local_tid_226167 -\n                                       squot32(local_tid_226167, 32) * 32) &&\n                                 (squot32(local_tid_226167, 32) == 0 &&\n                                  ltid_in_bounds_226185);\n                            \n                            if (thread_active_226190) {\n                                // read operands\n                                {\n                                    x_226182 = ((volatile __local\n                                                 float *) red_arr_mem_226171)[sext_i32_i64(local_tid_226167) -\n                                                                              sext_i32_i64(skip_threads_226189)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_226191 =\n                                     slt64(srem64(sext_i32_i64(local_tid_226167 *\n                                                  32 + 32 - 1), q_s_196695),\n                                           sext_i32_i64(local_tid_226167 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_226167 -\n                                                         skip_threads_226189) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_226190",
            " && inactive_226191) {\n                                    x_226182 = x_226183;\n                                }\n                                if (thread_active_226190) {\n                                    if (!inactive_226191) {\n                                        float defunc_1_op_res_226184 =\n                                              x_226182 + x_226183;\n                                        \n                                        x_226182 = defunc_1_op_res_226184;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_226169, skip_threads_226189)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_226190) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_226171)[sext_i32_i64(local_tid_226167)] =\n                                        x_226182;\n                                    x_226183 = x_226182;\n                                }\n                            }\n                            if (sle32(wave_sizze_226169, skip_threads_226189)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_226189 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_226192 = squot32(local_tid_226167, 32) == 0 ||\n                     !ltid_in_bounds_226185;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_226192) {\n                            x_205162 = x_205161;\n                            x_205161",
            " = ((__local\n                                         float *) red_arr_mem_226171)[sext_i32_i64(squot32(local_tid_226167,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_226193 =\n                             slt64(srem64(sext_i32_i64(local_tid_226167),\n                                          q_s_196695),\n                                   sext_i32_i64(local_tid_226167) -\n                                   sext_i32_i64(squot32(local_tid_226167, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_226192) {\n                            if (inactive_226193) {\n                                x_205161 = x_205162;\n                            }\n                        }\n                        if (!no_carry_in_226192) {\n                            if (!inactive_226193) {\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_226192) {\n                            ((__local\n                              float *) red_arr_mem_226171)[sext_i32_i64(local_tid_226167)] =\n                                x_205161;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_226167, 32) == 0 &&\n                        ltid_in_bounds_",
            "226185) {\n                        ((__local\n                          float *) red_arr_mem_226171)[sext_i32_i64(local_tid_226167)] =\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_226175) *\n                      squot64(segred_group_sizze_205152,\n                              segment_sizze_nonzzero_226164) +\n                      sext_i32_i64(local_tid_226167), m_196691 * n_p_196694 *\n                      s_n_m_196745) && slt64(sext_i32_i64(local_tid_226167),\n                                             squot64(segred_group_sizze_205152,\n                                                     segment_sizze_nonzzero_226164))) {\n                float tmp_226194;\n                \n                tmp_226194 = ((__local\n                               float *) red_arr_mem_226171)[(sext_i32_i64(local_tid_226167) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226164 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_222771)[squot64(sext_i32_i64(virt_group_id_226175) *\n                                               squot64(segred_group_sizze_205152,\n                                                       segment_sizze_nonzzero_226164) +\n                                               sext_i32_i64(local_tid_226167),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226175) *\n                                               squot64(segred_group_sizze_205152,\n                               ",
            "                        segment_sizze_nonzzero_226164) +\n                                               sext_i32_i64(local_tid_226167) -\n                                               squot64(sext_i32_i64(virt_group_id_226175) *\n                                                       squot64(segred_group_sizze_205152,\n                                                               segment_sizze_nonzzero_226164) +\n                                                       sext_i32_i64(local_tid_226167),\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_226175) *\n                                        squot64(segred_group_sizze_205152,\n                                                segment_sizze_nonzzero_226164) +\n                                        sext_i32_i64(local_tid_226167) -\n                                        squot64(sext_i32_i64(virt_group_id_226175) *\n                                                squot64(segred_group_sizze_205152,\n                                                        segment_sizze_nonzzero_226164) +\n                                                sext_i32_i64(local_tid_226167),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226175) *\n                                                squot64(segred_group_sizze_205152,\n                                                        segment_sizze_nonzzero_226164) +\n                                                sext_i32_i64(local_tid_226167) -\n                                                squot64(sext_i32_i64(virt_gro",
            "up_id_226175) *\n                                                        squot64(segred_group_sizze_205152,\n                                                                segment_sizze_nonzzero_226164) +\n                                                        sext_i32_i64(local_tid_226167),\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_226194;\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                                        uint red_arr_mem_226420_backing_offset_0,\n                                        uint red_arr_mem_226418_backing_offset_1,\n                                        uint red_arr_mem_226416_backing_offset_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_226409,\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 uns",
            "igned 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    volatile unsigned char *red_arr_mem_226420_backing_2 =\n                           &shared_mem[red_arr_mem_226420_backing_offset_0];\n    volatile unsigned char *red_arr_mem_226418_backing_1 =\n                           &shared_mem[red_arr_mem_226418_backing_offset_1];\n    volatile unsigned char *red_arr_mem_226416_backing_0 =\n                           &shared_mem[red_arr_mem_226416_backing_offset_2];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226411;\n    int32_t local_tid_226412;\n    int64_t group_sizze_226415;\n    int32_t wave_sizze_226414;\n    int32_t group_tid_226413;\n    \n    global_tid_226411 = get_global_id(0);\n    local_tid_226412 = get_local_id(0);\n    group_sizze_226415 = get_local_size(0);\n    wave_sizze_226414 = LOCKSTEP_WIDTH;\n    group_tid_226413 = get_group_id(0);\n    \n    int32_t phys_tid_207220 = global_tid_226411;\n    __local unsigned char *red_arr_mem_226416;\n    \n    red_arr_mem_226416 = (__local unsigned char *) red_arr_mem_226416_backing_0;\n    \n    __local unsigned char *red_arr_mem_226418;\n    \n    red_arr_mem_226418 = (__local unsigned char *) red_arr_mem_226418_backing_1;\n    \n    __local unsigned char *red_arr_mem_226420;\n    \n    red_arr_mem_226420 = (__local unsigned char *) red_arr_mem_226420_backing_2;\n    \n    int32_t phys_group_id_226422;\n    \n    phys_group_id_226422 = get_group_id(0);\n    for (int32_t i_226423 = 0; i_226423 <\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_226409))) -\n                   phys_group_id_226422, sext_i64_i32(num_groups_207211));\n         i_226423++) {\n        int32_t virt_group_id_226424 = phys_group_id_226422 + i_226423 *\n                sext_i64_i32(num_groups_207211);\n        int64_t slice_226425 = s_n_m_196745;\n        int64_t slice_226426 = n_p_196694 * slice_226425;\n        int64_t slice_226427 = m_196691 * slice_226426;\n        int64_t gtid_207216 = squot64(squot64(sext_i32_i64(local_tid_226412),\n                                              segment_sizze_nonzzero_226409) +\n                                      sext_i32_i64(virt_group_id_226424) *\n                                      squot64(segred_group_sizze_207210,\n                                              segment_sizze_nonzzero_226409),\n                                      slice_226426);\n        int64_t remnant_226428 = squot64(sext_i32_i64(local_tid_226412),\n                                         segment_sizze_nonzzero_226409) +\n                sext_i32_i64(virt_group_id_226424) *\n                squot64(segred_group_sizze_207210,\n                        segment_sizze_nonzzero_226409) - gtid_207216 *\n                slice_226426;\n        int64_t gtid_207217 = squot64(remnant_226428, slice_226425);\n        int64_t remnant_226429 = remnant_226428 - gtid_207217 * slice_226425;\n        int64_t gtid_207218 = remnant_226429;\n        int64_t remnant_226430 = remnant_226429 - gtid_207218;\n        int64_t gtid_207219 = srem64(sext_i32_i64(local_tid_226412),\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_226412),\n                                                         q_s_196695 *\n                                                         squot64(segred_group_sizze_207210,\n                                                                 segment_sizze_nonzzero_226409)))) {\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                    i",
            "nt64_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_226416)[sext_i32_i64(local_tid_226412)] =\n                        w_j_207263;\n                    ((__local\n          ",
            "            float *) red_arr_mem_226418)[sext_i32_i64(local_tid_226412)] =\n                        xw_j_207264;\n                    ((__local\n                      float *) red_arr_mem_226420)[sext_i32_i64(local_tid_226412)] =\n                        x2w_j_207265;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_226416)[sext_i32_i64(local_tid_226412)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_226418)[sext_i32_i64(local_tid_226412)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_226420)[sext_i32_i64(local_tid_226412)] =\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_226431;\n                float x_226432;\n                float x_226433;\n                float x_226434;\n                float x_226435;\n                float x_226436;\n                bool ltid_in_bounds_226440 =\n                     slt64(sext_i32_i64(local_tid_226412), q_s_196695 *\n                           squot64(segred_group_sizze_207210,\n                                   segment_sizze_nonzzero_226409));\n                int32_t skip_threads_226441;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_226440) {\n                        x_207224 = ((volatile __local\n                                     float *) red_arr_mem_226416)[sext_i32_i64(local_tid_226412)];\n                        x_207225 = ((volatile __local\n                                     float *) red_arr_mem_226418)[sext_i32_i64(local_tid_226412)];\n  ",
            "                      x_207226 = ((volatile __local\n                                     float *) red_arr_mem_226420)[sext_i32_i64(local_tid_226412)];\n                        if ((local_tid_226412 - squot32(local_tid_226412, 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_226441 = 1;\n                    while (slt32(skip_threads_226441, 32)) {\n                        bool thread_active_226442 = sle32(skip_threads_226441,\n                                                          local_tid_226412 -\n                                                          squot32(local_tid_226412,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_226440;\n                        \n                        if (thread_active_226442) {\n                            // read operands\n                            {\n                                x_207221 = ((volatile __local\n                                             float *) red_arr_mem_226416)[sext_i32_i64(local_tid_226412) -\n                                                                          sext_i32_i64(skip_threads_226441)];\n                                x_207222 = ((volatile __local\n                                             float *) red_arr_mem_226418)[sext_i32_i64(local_tid_226412) -\n                                                                          sext_i32_i64(skip_threads_226441)];\n                                x_207223 = ((volatile __local\n                                             float *) red_arr_mem_226420)[sext_i32_i64(local_tid_226412) -\n                                                                          sex",
            "t_i32_i64(skip_threads_226441)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_226443 =\n                                 slt64(srem64(sext_i32_i64(local_tid_226412),\n                                              q_s_196695),\n                                       sext_i32_i64(local_tid_226412) -\n                                       sext_i32_i64(local_tid_226412 -\n                                       skip_threads_226441));\n                            \n                            if (thread_active_226442 && inactive_226443) {\n                                x_207221 = x_207224;\n                                x_207222 = x_207225;\n                                x_207223 = x_207226;\n                            }\n                            if (thread_active_226442) {\n                                if (!inactive_226443) {\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_226414, skip_threads_226441)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_226442) {\n                            // write result\n                            {\n                         ",
            "       ((volatile __local\n                                  float *) red_arr_mem_226416)[sext_i32_i64(local_tid_226412)] =\n                                    x_207221;\n                                x_207224 = x_207221;\n                                ((volatile __local\n                                  float *) red_arr_mem_226418)[sext_i32_i64(local_tid_226412)] =\n                                    x_207222;\n                                x_207225 = x_207222;\n                                ((volatile __local\n                                  float *) red_arr_mem_226420)[sext_i32_i64(local_tid_226412)] =\n                                    x_207223;\n                                x_207226 = x_207223;\n                            }\n                        }\n                        if (sle32(wave_sizze_226414, skip_threads_226441)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_226441 *= 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_226412 - squot32(local_tid_226412, 32) *\n                         32) == 31 && ltid_in_bounds_226440) {\n                        ((volatile __local\n                          float *) red_arr_mem_226416)[sext_i32_i64(squot32(local_tid_226412,\n                                                                            32))] =\n                            x_207221;\n                        ((volatile __local\n                          float *) red_arr_mem_226418)[sext_i32_i64(squot32(local_tid_226412,\n                                                                            32))] =\n                            x_207222;\n                        ((volatile __local\n                          float *) red_arr_mem_226420)[sext_i32_i64(squot32(local_tid_226412,\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_226444;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_226412, 32) == 0 &&\n                            ltid_in_bounds_226440) {\n                            x_226434 = ((volatile __local\n                                         float *) red_arr_mem_226416)[sext_i32_i64(local_tid_226412)];\n                            x_226435 = ((volatile __local\n                                         float *) red_arr_mem_226418)[sext_i32_i64(local_tid_226412)];\n                            x_226436 = ((volatile __local\n                                         float *) red_arr_mem_226420)[sext_i32_i64(local_tid_226412)];\n                            if ((local_tid_226412 - squot32(local_tid_226412,\n                                                            32) * 32) == 0) {\n                                x_226431 = x_226434;\n                                x_226432 = x_226435;\n                                x_226433 = x_226436;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_226444 = 1;\n                        while (slt32(skip_threads_226444, 32)) {\n                            bool thread_active_226445 =\n                                 sle32(skip_threads_226444, local_tid_226412 -\n                                       squot32(local_tid_226412, 32) * 32) &&\n                                 (squot32(local_tid_226412, 32) == 0 &&\n                                  ltid_in_bounds_226440);\n                            \n    ",
            "                        if (thread_active_226445) {\n                                // read operands\n                                {\n                                    x_226431 = ((volatile __local\n                                                 float *) red_arr_mem_226416)[sext_i32_i64(local_tid_226412) -\n                                                                              sext_i32_i64(skip_threads_226444)];\n                                    x_226432 = ((volatile __local\n                                                 float *) red_arr_mem_226418)[sext_i32_i64(local_tid_226412) -\n                                                                              sext_i32_i64(skip_threads_226444)];\n                                    x_226433 = ((volatile __local\n                                                 float *) red_arr_mem_226420)[sext_i32_i64(local_tid_226412) -\n                                                                              sext_i32_i64(skip_threads_226444)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_226446 =\n                                     slt64(srem64(sext_i32_i64(local_tid_226412 *\n                                                  32 + 32 - 1), q_s_196695),\n                                           sext_i32_i64(local_tid_226412 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_226412 -\n                                                         skip_threads_226444) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_226445 && inactive_226446) {\n                                    x_226431 = x_226434;\n                                    x_226432 = x_226435;\n                                    x_226433 = x_226436;\n     ",
            "                           }\n                                if (thread_active_226445) {\n                                    if (!inactive_226446) {\n                                        float defunc_1_op_res_226437 =\n                                              x_226431 + x_226434;\n                                        float defunc_1_op_res_226438 =\n                                              x_226432 + x_226435;\n                                        float defunc_1_op_res_226439 =\n                                              x_226433 + x_226436;\n                                        \n                                        x_226431 = defunc_1_op_res_226437;\n                                        x_226432 = defunc_1_op_res_226438;\n                                        x_226433 = defunc_1_op_res_226439;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_226414, skip_threads_226444)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_226445) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_226416)[sext_i32_i64(local_tid_226412)] =\n                                        x_226431;\n                                    x_226434 = x_226431;\n                                    ((volatile __local\n                                      float *) red_arr_mem_226418)[sext_i32_i64(local_tid_226412)] =\n                                        x_226432;\n                                    x_226435 = x_226432;\n                                    ((volatile __local\n                                      float *) red_arr_mem_226420)[sext_i32_i64(local_tid_226412)] =\n                                        x_226433;\n                          ",
            "          x_226436 = x_226433;\n                                }\n                            }\n                            if (sle32(wave_sizze_226414, skip_threads_226444)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_226444 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_226447 = squot32(local_tid_226412, 32) == 0 ||\n                     !ltid_in_bounds_226440;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_226447) {\n                            x_207224 = x_207221;\n                            x_207225 = x_207222;\n                            x_207226 = x_207223;\n                            x_207221 = ((__local\n                                         float *) red_arr_mem_226416)[sext_i32_i64(squot32(local_tid_226412,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_207222 = ((__local\n                                         float *) red_arr_mem_226418)[sext_i32_i64(squot32(local_tid_226412,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_207223 = ((__local\n                                         float *) red_arr_mem_226420)[sext_i32_i64(squot32(local_tid_226412,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n   ",
            "                 // perform operation\n                    {\n                        bool inactive_226448 =\n                             slt64(srem64(sext_i32_i64(local_tid_226412),\n                                          q_s_196695),\n                                   sext_i32_i64(local_tid_226412) -\n                                   sext_i32_i64(squot32(local_tid_226412, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_226447) {\n                            if (inactive_226448) {\n                                x_207221 = x_207224;\n                                x_207222 = x_207225;\n                                x_207223 = x_207226;\n                            }\n                        }\n                        if (!no_carry_in_226447) {\n                            if (!inactive_226448) {\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_226447) {\n                            ((__local\n                              float *) red_arr_mem_226416)[sext_i32_i64(local_tid_226412)] =\n                                x_207221;\n                            ((__local\n                              float *) red_arr_mem_226418)[sext_i32_i64(local_tid_226412)] =\n                             ",
            "   x_207222;\n                            ((__local\n                              float *) red_arr_mem_226420)[sext_i32_i64(local_tid_226412)] =\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_226412, 32) == 0 &&\n                        ltid_in_bounds_226440) {\n                        ((__local\n                          float *) red_arr_mem_226416)[sext_i32_i64(local_tid_226412)] =\n                            x_207224;\n                        ((__local\n                          float *) red_arr_mem_226418)[sext_i32_i64(local_tid_226412)] =\n                            x_207225;\n                        ((__local\n                          float *) red_arr_mem_226420)[sext_i32_i64(local_tid_226412)] =\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_226424) *\n                      squot64(segred_group_sizze_207210,\n                              segment_sizze_nonzzero_226409) +\n                      sext_i32_i64(local_tid_226412), m_196691 * n_p_196694 *\n                      s_n_m_196745) && slt64(sext_i32_i64(local_tid_226412),\n                                             squot64(segred_group_sizze_207210,\n                                                     segment_sizze_nonzzero_226409))) {\n                float tmp_226449;\n                \n                tmp_226449 = ((__local\n                               float *) red_arr_mem_226416)[(sext_i32_i64(local_tid_226412) +\n                                                             (int64_t) 1) *\n                                                            segment_siz",
            "ze_nonzzero_226409 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223040)[squot64(sext_i32_i64(virt_group_id_226424) *\n                                               squot64(segred_group_sizze_207210,\n                                                       segment_sizze_nonzzero_226409) +\n                                               sext_i32_i64(local_tid_226412),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226424) *\n                                               squot64(segred_group_sizze_207210,\n                                                       segment_sizze_nonzzero_226409) +\n                                               sext_i32_i64(local_tid_226412) -\n                                               squot64(sext_i32_i64(virt_group_id_226424) *\n                                                       squot64(segred_group_sizze_207210,\n                                                               segment_sizze_nonzzero_226409) +\n                                                       sext_i32_i64(local_tid_226412),\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_226424) *\n                                        squot64(segred_group_sizze_207210,\n                                                segment_sizze_nonzzero_226409) +\n                                        sext_i32_i64(local_tid_226412) -\n                                        squot64(sext_i32_i64(virt_group_id_226424) *\n                 ",
            "                               squot64(segred_group_sizze_207210,\n                                                        segment_sizze_nonzzero_226409) +\n                                                sext_i32_i64(local_tid_226412),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226424) *\n                                                squot64(segred_group_sizze_207210,\n                                                        segment_sizze_nonzzero_226409) +\n                                                sext_i32_i64(local_tid_226412) -\n                                                squot64(sext_i32_i64(virt_group_id_226424) *\n                                                        squot64(segred_group_sizze_207210,\n                                                                segment_sizze_nonzzero_226409) +\n                                                        sext_i32_i64(local_tid_226412),\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_226449;\n                \n                float tmp_226450;\n                \n                tmp_226450 = ((__local\n                               float *) red_arr_mem_226418)[(sext_i32_i64(local_tid_226412) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226409 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223045)[squot64(sext_i32_i64(virt_group_id_226424) *\n                          ",
            "                     squot64(segred_group_sizze_207210,\n                                                       segment_sizze_nonzzero_226409) +\n                                               sext_i32_i64(local_tid_226412),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226424) *\n                                               squot64(segred_group_sizze_207210,\n                                                       segment_sizze_nonzzero_226409) +\n                                               sext_i32_i64(local_tid_226412) -\n                                               squot64(sext_i32_i64(virt_group_id_226424) *\n                                                       squot64(segred_group_sizze_207210,\n                                                               segment_sizze_nonzzero_226409) +\n                                                       sext_i32_i64(local_tid_226412),\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_226424) *\n                                        squot64(segred_group_sizze_207210,\n                                                segment_sizze_nonzzero_226409) +\n                                        sext_i32_i64(local_tid_226412) -\n                                        squot64(sext_i32_i64(virt_group_id_226424) *\n                                                squot64(segred_group_sizze_207210,\n                                                        segment_sizze_nonzzero_226409) +\n                                                sext_i32_i64(local_tid_226412",
            "),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226424) *\n                                                squot64(segred_group_sizze_207210,\n                                                        segment_sizze_nonzzero_226409) +\n                                                sext_i32_i64(local_tid_226412) -\n                                                squot64(sext_i32_i64(virt_group_id_226424) *\n                                                        squot64(segred_group_sizze_207210,\n                                                                segment_sizze_nonzzero_226409) +\n                                                        sext_i32_i64(local_tid_226412),\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_226450;\n                \n                float tmp_226451;\n                \n                tmp_226451 = ((__local\n                               float *) red_arr_mem_226420)[(sext_i32_i64(local_tid_226412) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226409 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223050)[squot64(sext_i32_i64(virt_group_id_226424) *\n                                               squot64(segred_group_sizze_207210,\n                                                       segment_sizze_nonzzero_226409) +\n                                               sext_i32_i64(local_tid_226412),\n         ",
            "                                      n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226424) *\n                                               squot64(segred_group_sizze_207210,\n                                                       segment_sizze_nonzzero_226409) +\n                                               sext_i32_i64(local_tid_226412) -\n                                               squot64(sext_i32_i64(virt_group_id_226424) *\n                                                       squot64(segred_group_sizze_207210,\n                                                               segment_sizze_nonzzero_226409) +\n                                                       sext_i32_i64(local_tid_226412),\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_226424) *\n                                        squot64(segred_group_sizze_207210,\n                                                segment_sizze_nonzzero_226409) +\n                                        sext_i32_i64(local_tid_226412) -\n                                        squot64(sext_i32_i64(virt_group_id_226424) *\n                                                squot64(segred_group_sizze_207210,\n                                                        segment_sizze_nonzzero_226409) +\n                                                sext_i32_i64(local_tid_226412),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226424)",
            " *\n                                                squot64(segred_group_sizze_207210,\n                                                        segment_sizze_nonzzero_226409) +\n                                                sext_i32_i64(local_tid_226412) -\n                                                squot64(sext_i32_i64(virt_group_id_226424) *\n                                                        squot64(segred_group_sizze_207210,\n                                                                segment_sizze_nonzzero_226409) +\n                                                        sext_i32_i64(local_tid_226412),\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_226451;\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                                        uint red_arr_mem_226534_backing_offset_0,\n                                        uint red_arr_mem_226532_backing_offset_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_226525,\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    volatile unsigned char *red_arr_mem_226534_backing_1 =\n                           &shared_mem[red_arr_mem_226534_backing_offset_0];\n    volatile unsigned char *red_arr_mem_226532_backing_0 =\n                           &shared_mem[red_arr_mem_226532_backing_offset_1];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226527;\n    int32_t local_tid_226528;\n    int64_t group_sizze_226531;\n    int32_t wave_sizze_226530;\n    int32_t group_tid_226529;\n    \n    global_tid_226527 = get_global_id(0);\n    local_tid_226528 = get_local_id(0);\n    group_sizze_226531 = get_local_size(0);\n    wave_sizze_226530 = LOCKSTEP_WIDTH;\n    group_tid_226529 = get_group_id(0);\n    \n    int32_t phys_tid_207314 = global_tid_226527;\n    __local unsigned char *red_arr_mem_226532;\n    \n    red_arr_mem_226532 = (__local unsigned char *) red_arr_mem_226532_backing_0;\n    \n    __local unsigned char *red_arr_mem_226534;\n    \n    red_arr_mem_226534 = (__local unsigned char *) red_arr_mem_226534_backing_1;\n    \n    int32_t phys_group_id_226536;\n    \n    phys_group_id_226536 = get_group_i",
            "d(0);\n    for (int32_t i_226537 = 0; i_226537 <\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_226525))) -\n                   phys_group_id_226536, sext_i64_i32(num_groups_207306));\n         i_226537++) {\n        int32_t virt_group_id_226538 = phys_group_id_226536 + i_226537 *\n                sext_i64_i32(num_groups_207306);\n        int64_t slice_226539 = s_n_m_196745;\n        int64_t slice_226540 = n_p_196694 * slice_226539;\n        int64_t slice_226541 = m_196691 * slice_226540;\n        int64_t gtid_207310 = squot64(squot64(sext_i32_i64(local_tid_226528),\n                                              segment_sizze_nonzzero_226525) +\n                                      sext_i32_i64(virt_group_id_226538) *\n                                      squot64(segred_group_sizze_207305,\n                                              segment_sizze_nonzzero_226525),\n                                      slice_226540);\n        int64_t remnant_226542 = squot64(sext_i32_i64(local_tid_226528),\n                                         segment_sizze_nonzzero_226525) +\n                sext_i32_i64(virt_group_id_226538) *\n                squot64(segred_group_sizze_207305,\n                        segment_sizze_nonzzero_226525) - gtid_207310 *\n                slice_226540;\n        int64_t gtid_207311 = squot64(remnant_226542, slice_226539);\n        int64_t remnant_226543 = remnant_226542 - gtid_207311 * slice_226539;\n        int64_t gtid_207312 = remnant_226543;\n        int64_t remnant_226544 = remnant_226543 - gtid_207312;\n        int64_t gtid_207313 = srem64(sext_i32_i64(local_tid_226528),\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_226528),\n                                                         q_s_196695 *\n                                                         squot64(segred_group_sizze_207305,\n                                                                 segment_sizze_nonzzero_226525)))) {\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_196",
            "694) +\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                                                floa",
            "t *) 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_226532)[sext_i32_i64(local_tid_226528)] =\n                        defunc_9_fit_fun_res_207373;\n                    ((__local\n                      float *) red_arr_mem_226534)[sext_i32_i64(local_tid_226528)] =\n                        defunc_9_slope_fun_res_207377;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_226532)[sext_i32_i64(local_tid_226528)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_226534)[sext_i32_i64(local_tid_226528)] =\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_226545;\n                float x_226546;\n                float x_226547;\n                float x_226548;\n                bool ltid_in_bounds_226551 =\n                     slt64(sext_i32_i64(local_tid_226528), q_s_196695 *\n                           squot64(segred_group_sizze_207305,\n                                   segment_sizze_nonzzero_226525));\n                int32_t skip_threads_226552;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_226551) {\n                        x_207317 = ((volatile __local\n                                     float *) red_arr_mem_226532)[sext_i32_i64(local_tid_226528)];\n                        x_207318 = ((volatile __local\n                                     float *) red_arr_mem_226534)[sext_i32_i64(local_tid_226528)];\n                        if ((local_tid_226528 - squot32(local_tid_226528, 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_226552 = 1;\n                    while (slt32(skip_threads_226552, 32)) {\n                        bool thread_active_226553 = sle32(skip_threads_226552,\n                                                          local_tid_226528 -\n                                                          squot32(local_tid_226528,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_226551;\n                        \n                        if (thread_active_226553) {\n                            // read operands\n                            {\n                                x_207315 = ((volatile __local\n                   ",
            "                          float *) red_arr_mem_226532)[sext_i32_i64(local_tid_226528) -\n                                                                          sext_i32_i64(skip_threads_226552)];\n                                x_207316 = ((volatile __local\n                                             float *) red_arr_mem_226534)[sext_i32_i64(local_tid_226528) -\n                                                                          sext_i32_i64(skip_threads_226552)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_226554 =\n                                 slt64(srem64(sext_i32_i64(local_tid_226528),\n                                              q_s_196695),\n                                       sext_i32_i64(local_tid_226528) -\n                                       sext_i32_i64(local_tid_226528 -\n                                       skip_threads_226552));\n                            \n                            if (thread_active_226553 && inactive_226554) {\n                                x_207315 = x_207317;\n                                x_207316 = x_207318;\n                            }\n                            if (thread_active_226553) {\n                                if (!inactive_226554) {\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_226530, skip_threads_226552)) {\n                            barrier(CLK_LOCAL",
            "_MEM_FENCE);\n                        }\n                        if (thread_active_226553) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_226532)[sext_i32_i64(local_tid_226528)] =\n                                    x_207315;\n                                x_207317 = x_207315;\n                                ((volatile __local\n                                  float *) red_arr_mem_226534)[sext_i32_i64(local_tid_226528)] =\n                                    x_207316;\n                                x_207318 = x_207316;\n                            }\n                        }\n                        if (sle32(wave_sizze_226530, skip_threads_226552)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_226552 *= 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_226528 - squot32(local_tid_226528, 32) *\n                         32) == 31 && ltid_in_bounds_226551) {\n                        ((volatile __local\n                          float *) red_arr_mem_226532)[sext_i32_i64(squot32(local_tid_226528,\n                                                                            32))] =\n                            x_207315;\n                        ((volatile __local\n                          float *) red_arr_mem_226534)[sext_i32_i64(squot32(local_tid_226528,\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_th",
            "reads_226555;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_226528, 32) == 0 &&\n                            ltid_in_bounds_226551) {\n                            x_226547 = ((volatile __local\n                                         float *) red_arr_mem_226532)[sext_i32_i64(local_tid_226528)];\n                            x_226548 = ((volatile __local\n                                         float *) red_arr_mem_226534)[sext_i32_i64(local_tid_226528)];\n                            if ((local_tid_226528 - squot32(local_tid_226528,\n                                                            32) * 32) == 0) {\n                                x_226545 = x_226547;\n                                x_226546 = x_226548;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_226555 = 1;\n                        while (slt32(skip_threads_226555, 32)) {\n                            bool thread_active_226556 =\n                                 sle32(skip_threads_226555, local_tid_226528 -\n                                       squot32(local_tid_226528, 32) * 32) &&\n                                 (squot32(local_tid_226528, 32) == 0 &&\n                                  ltid_in_bounds_226551);\n                            \n                            if (thread_active_226556) {\n                                // read operands\n                                {\n                                    x_226545 = ((volatile __local\n                                                 float *) red_arr_mem_226532)[sext_i32_i64(local_tid_226528) -\n                                                                              sext_i32_i64(skip_threads_226555)];\n                                    x_226546 = ((volatile __local\n                                      ",
            "           float *) red_arr_mem_226534)[sext_i32_i64(local_tid_226528) -\n                                                                              sext_i32_i64(skip_threads_226555)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_226557 =\n                                     slt64(srem64(sext_i32_i64(local_tid_226528 *\n                                                  32 + 32 - 1), q_s_196695),\n                                           sext_i32_i64(local_tid_226528 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_226528 -\n                                                         skip_threads_226555) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_226556 && inactive_226557) {\n                                    x_226545 = x_226547;\n                                    x_226546 = x_226548;\n                                }\n                                if (thread_active_226556) {\n                                    if (!inactive_226557) {\n                                        float defunc_1_op_res_226549 =\n                                              x_226545 + x_226547;\n                                        float defunc_1_op_res_226550 =\n                                              x_226546 + x_226548;\n                                        \n                                        x_226545 = defunc_1_op_res_226549;\n                                        x_226546 = defunc_1_op_res_226550;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_226530, skip_threads_226555)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                 ",
            "           }\n                            if (thread_active_226556) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_226532)[sext_i32_i64(local_tid_226528)] =\n                                        x_226545;\n                                    x_226547 = x_226545;\n                                    ((volatile __local\n                                      float *) red_arr_mem_226534)[sext_i32_i64(local_tid_226528)] =\n                                        x_226546;\n                                    x_226548 = x_226546;\n                                }\n                            }\n                            if (sle32(wave_sizze_226530, skip_threads_226555)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_226555 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_226558 = squot32(local_tid_226528, 32) == 0 ||\n                     !ltid_in_bounds_226551;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_226558) {\n                            x_207317 = x_207315;\n                            x_207318 = x_207316;\n                            x_207315 = ((__local\n                                         float *) red_arr_mem_226532)[sext_i32_i64(squot32(local_tid_226528,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_207316 = ((__local\n                                         float *) red_arr_mem_226534)[sext_i32_i64(sq",
            "uot32(local_tid_226528,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_226559 =\n                             slt64(srem64(sext_i32_i64(local_tid_226528),\n                                          q_s_196695),\n                                   sext_i32_i64(local_tid_226528) -\n                                   sext_i32_i64(squot32(local_tid_226528, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_226558) {\n                            if (inactive_226559) {\n                                x_207315 = x_207317;\n                                x_207316 = x_207318;\n                            }\n                        }\n                        if (!no_carry_in_226558) {\n                            if (!inactive_226559) {\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_226558) {\n                            ((__local\n                              float *) red_arr_mem_226532)[sext_i32_i64(local_tid_226528)] =\n                                x_207315;\n                            ((__local\n                              float *) red_arr_mem_226534)[sext_i32_i64(local_tid_226528)] =\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_226528, 32) == 0 &&\n                        ltid_in_bounds_226551) {\n                        ((__local\n                          float *) red_arr_mem_226532)[sext_i32_i64(local_tid_226528)] =\n                            x_207317;\n                        ((__local\n                          float *) red_arr_mem_226534)[sext_i32_i64(local_tid_226528)] =\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_226538) *\n                      squot64(segred_group_sizze_207305,\n                              segment_sizze_nonzzero_226525) +\n                      sext_i32_i64(local_tid_226528), m_196691 * n_p_196694 *\n                      s_n_m_196745) && slt64(sext_i32_i64(local_tid_226528),\n                                             squot64(segred_group_sizze_207305,\n                                                     segment_sizze_nonzzero_226525))) {\n                float tmp_226560;\n                \n                tmp_226560 = ((__local\n                               float *) red_arr_mem_226532)[(sext_i32_i64(local_tid_226528) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226525 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223077)[squot64(sext_i32_i64(virt_group_id_226538) *\n                                               squot64(segred_group_sizze_207305,\n                               ",
            "                        segment_sizze_nonzzero_226525) +\n                                               sext_i32_i64(local_tid_226528),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226538) *\n                                               squot64(segred_group_sizze_207305,\n                                                       segment_sizze_nonzzero_226525) +\n                                               sext_i32_i64(local_tid_226528) -\n                                               squot64(sext_i32_i64(virt_group_id_226538) *\n                                                       squot64(segred_group_sizze_207305,\n                                                               segment_sizze_nonzzero_226525) +\n                                                       sext_i32_i64(local_tid_226528),\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_226538) *\n                                        squot64(segred_group_sizze_207305,\n                                                segment_sizze_nonzzero_226525) +\n                                        sext_i32_i64(local_tid_226528) -\n                                        squot64(sext_i32_i64(virt_group_id_226538) *\n                                                squot64(segred_group_sizze_207305,\n                                                        segment_sizze_nonzzero_226525) +\n                                                sext_i32_i64(local_tid_226528),\n                                                n_p_196694 * s_n_m_196745) *\n       ",
            "                                 (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226538) *\n                                                squot64(segred_group_sizze_207305,\n                                                        segment_sizze_nonzzero_226525) +\n                                                sext_i32_i64(local_tid_226528) -\n                                                squot64(sext_i32_i64(virt_group_id_226538) *\n                                                        squot64(segred_group_sizze_207305,\n                                                                segment_sizze_nonzzero_226525) +\n                                                        sext_i32_i64(local_tid_226528),\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_226560;\n                \n                float tmp_226561;\n                \n                tmp_226561 = ((__local\n                               float *) red_arr_mem_226534)[(sext_i32_i64(local_tid_226528) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226525 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223082)[squot64(sext_i32_i64(virt_group_id_226538) *\n                                               squot64(segred_group_sizze_207305,\n                                                       segment_sizze_nonzzero_226525) +\n                                               sext_i32_i64(local_tid_226528),\n                                               n_p_196694 * s_n_m_196745) *\n                    ",
            "                   (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226538) *\n                                               squot64(segred_group_sizze_207305,\n                                                       segment_sizze_nonzzero_226525) +\n                                               sext_i32_i64(local_tid_226528) -\n                                               squot64(sext_i32_i64(virt_group_id_226538) *\n                                                       squot64(segred_group_sizze_207305,\n                                                               segment_sizze_nonzzero_226525) +\n                                                       sext_i32_i64(local_tid_226528),\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_226538) *\n                                        squot64(segred_group_sizze_207305,\n                                                segment_sizze_nonzzero_226525) +\n                                        sext_i32_i64(local_tid_226528) -\n                                        squot64(sext_i32_i64(virt_group_id_226538) *\n                                                squot64(segred_group_sizze_207305,\n                                                        segment_sizze_nonzzero_226525) +\n                                                sext_i32_i64(local_tid_226528),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226538) *\n                                                squot64(segred_group_sizze_207305,\n ",
            "                                                       segment_sizze_nonzzero_226525) +\n                                                sext_i32_i64(local_tid_226528) -\n                                                squot64(sext_i32_i64(virt_group_id_226538) *\n                                                        squot64(segred_group_sizze_207305,\n                                                                segment_sizze_nonzzero_226525) +\n                                                        sext_i32_i64(local_tid_226528),\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_226561;\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_207305\n}\n__kernel void mainzisegred_small_209867(__global int *global_failure,\n                                        uint red_arr_mem_226821_backing_offset_0,\n                                        uint red_arr_mem_226819_backing_offset_1,\n                                        uint red_arr_mem_226817_backing_offset_2,\n                                        uint red_arr_mem_226815_backing_offset_3,\n                                        uint red_arr_mem_226813_backing_offset_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_226806,\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    volatile unsigned char *red_arr_mem_226821_backing_4 =\n                           &shared_mem[red_arr_mem_226821_backing_offset_0];\n    volatile unsigned char *red_arr_mem_226819_backing_3 =\n                           &shared_mem[red_arr_mem_226819_backing_offset_1];\n    volatile unsigned char *red_arr_mem_226817_backing_2 =\n                           &shared_mem[red_arr_mem_226817_backing_offset_2];\n    volatile unsigned char *red_arr_mem_226815_backing_1 =\n                           &shared_mem[red_arr_mem_226815_backing_offset_3];\n    volatile unsigned char *red_arr_mem_226813_backing_0 =\n                           &shared_mem[red_arr_mem_226813_backing_offset_4];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226808;\n    int32_t local_tid_226809;\n    int64_t group_sizze_226812;\n    int32_t wave_sizze_226811;\n    int32_t group_tid_226810;\n    \n    global_tid_226808 = get_global_id(0);\n    local_tid_226809 = get_local_id(0);\n    group_sizze_226812 = get_local_size(",
            "0);\n    wave_sizze_226811 = LOCKSTEP_WIDTH;\n    group_tid_226810 = get_group_id(0);\n    \n    int32_t phys_tid_209867 = global_tid_226808;\n    __local unsigned char *red_arr_mem_226813;\n    \n    red_arr_mem_226813 = (__local unsigned char *) red_arr_mem_226813_backing_0;\n    \n    __local unsigned char *red_arr_mem_226815;\n    \n    red_arr_mem_226815 = (__local unsigned char *) red_arr_mem_226815_backing_1;\n    \n    __local unsigned char *red_arr_mem_226817;\n    \n    red_arr_mem_226817 = (__local unsigned char *) red_arr_mem_226817_backing_2;\n    \n    __local unsigned char *red_arr_mem_226819;\n    \n    red_arr_mem_226819 = (__local unsigned char *) red_arr_mem_226819_backing_3;\n    \n    __local unsigned char *red_arr_mem_226821;\n    \n    red_arr_mem_226821 = (__local unsigned char *) red_arr_mem_226821_backing_4;\n    \n    int32_t phys_group_id_226823;\n    \n    phys_group_id_226823 = get_group_id(0);\n    for (int32_t i_226824 = 0; i_226824 <\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_226806))) -\n                   phys_group_id_226823, sext_i64_i32(num_groups_209856));\n         i_226824++) {\n        int32_t virt_group_id_226825 = phys_group_id_226823 + i_226824 *\n                sext_i64_i32(num_groups_209856);\n        int64_t slice_226826 = s_n_m_196745;\n        int64_t slice_226827 = n_p_196694 * slice_226826;\n        int64_t slice_226828 = m_196691 * slice_226827;\n        int64_t gtid_209863 = squot64(squot64(sext_i32_i64(local_tid_226809),\n                                              segment_sizze_nonzzero_226806) +\n                                      sext_i32_i64(virt_group_id_226825) *\n                                      squot64(segred_group_sizze_209855,\n                                              segment_sizze_nonzzero_226806),\n                                      slice",
            "_226827);\n        int64_t remnant_226829 = squot64(sext_i32_i64(local_tid_226809),\n                                         segment_sizze_nonzzero_226806) +\n                sext_i32_i64(virt_group_id_226825) *\n                squot64(segred_group_sizze_209855,\n                        segment_sizze_nonzzero_226806) - gtid_209863 *\n                slice_226827;\n        int64_t gtid_209864 = squot64(remnant_226829, slice_226826);\n        int64_t remnant_226830 = remnant_226829 - gtid_209864 * slice_226826;\n        int64_t gtid_209865 = remnant_226830;\n        int64_t remnant_226831 = remnant_226830 - gtid_209865;\n        int64_t gtid_209866 = srem64(sext_i32_i64(local_tid_226809),\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_226809),\n                                                         q_s_196695 *\n                                                         squot64(segred_group_sizze_209855,\n                                                                 segment_sizze_nonzzero_226806)))) {\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                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_226813)[sext_i32_i64(local_tid_226809)] =\n                        w_j_209916;\n                    ((__local\n                      float *) red_arr_mem_226815)[sext_i32_i64(local_tid_226809)] =\n                        xw_j_209917;\n                    ((__local\n                      float *) red_arr_mem_226817)[sext_i32_i64(local_tid_226809)] =\n                        x2w_j_209918;\n                    ((__local\n                      float *) red_arr_mem_226819)[sext_i32_i64(local_tid_226809)] =\n                        x3w_j_209919;\n                    ((__local\n                      float *) red_arr_mem_226821)[sext_i32_i64(local_tid_226809)] =\n                        x4w_j_209920;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_226813)[sext_i32_i64(local_tid_226809)] =\n                    0.0",
            "F;\n                ((__local\n                  float *) red_arr_mem_226815)[sext_i32_i64(local_tid_226809)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_226817)[sext_i32_i64(local_tid_226809)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_226819)[sext_i32_i64(local_tid_226809)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_226821)[sext_i32_i64(local_tid_226809)] =\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_226832;\n                float x_226833;\n                float x_226834;\n                float x_226835;\n                float x_226836;\n                float x_226837;\n                float x_226838;\n                float x_226839;\n                float x_226840;\n                float x_226841;\n                bool ltid_in_bounds_226847 =\n                     slt64(sext_i32_i64(local_tid_226809), q_s_196695 *\n                           squot64(segred_group_sizze_209855,\n                                   segment_sizze_nonzzero_226806));\n                int32_t skip_threads_226848;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_226847) {\n                        x_209873 = ((volatile __local\n                                     float *) red_arr_mem_226813)[sext_i32_i64(local_tid_226809)];\n                        x_209874 = ((volatile __local\n             ",
            "                        float *) red_arr_mem_226815)[sext_i32_i64(local_tid_226809)];\n                        x_209875 = ((volatile __local\n                                     float *) red_arr_mem_226817)[sext_i32_i64(local_tid_226809)];\n                        x_209876 = ((volatile __local\n                                     float *) red_arr_mem_226819)[sext_i32_i64(local_tid_226809)];\n                        x_209877 = ((volatile __local\n                                     float *) red_arr_mem_226821)[sext_i32_i64(local_tid_226809)];\n                        if ((local_tid_226809 - squot32(local_tid_226809, 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_226848 = 1;\n                    while (slt32(skip_threads_226848, 32)) {\n                        bool thread_active_226849 = sle32(skip_threads_226848,\n                                                          local_tid_226809 -\n                                                          squot32(local_tid_226809,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_226847;\n                        \n                        if (thread_active_226849) {\n                            // read operands\n                            {\n                                x_209868 = ((volatile __local\n                                             float *) red_arr_mem_226813)[sext_i32_i64(local_tid_226809) -\n                                                                          sext_i32_i64(skip_threads_226848)];\n                                x",
            "_209869 = ((volatile __local\n                                             float *) red_arr_mem_226815)[sext_i32_i64(local_tid_226809) -\n                                                                          sext_i32_i64(skip_threads_226848)];\n                                x_209870 = ((volatile __local\n                                             float *) red_arr_mem_226817)[sext_i32_i64(local_tid_226809) -\n                                                                          sext_i32_i64(skip_threads_226848)];\n                                x_209871 = ((volatile __local\n                                             float *) red_arr_mem_226819)[sext_i32_i64(local_tid_226809) -\n                                                                          sext_i32_i64(skip_threads_226848)];\n                                x_209872 = ((volatile __local\n                                             float *) red_arr_mem_226821)[sext_i32_i64(local_tid_226809) -\n                                                                          sext_i32_i64(skip_threads_226848)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_226850 =\n                                 slt64(srem64(sext_i32_i64(local_tid_226809),\n                                              q_s_196695),\n                                       sext_i32_i64(local_tid_226809) -\n                                       sext_i32_i64(local_tid_226809 -\n                                       skip_threads_226848));\n                            \n                            if (thread_active_226849 && inactive_226850) {\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_226849) {\n                                if (!inactive_226850) {\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_226811, skip_threads_226848)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_226849) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_226813)[sext_i32_i64(local_tid_226809)] =\n                                    x_209868;\n                                x_209873 = x_209868;\n                                ((volatile __local\n                                  float *) red_arr_mem_226815)[sext_i32_i64(local_tid_226809)] =\n                                    x_209869;\n                          ",
            "      x_209874 = x_209869;\n                                ((volatile __local\n                                  float *) red_arr_mem_226817)[sext_i32_i64(local_tid_226809)] =\n                                    x_209870;\n                                x_209875 = x_209870;\n                                ((volatile __local\n                                  float *) red_arr_mem_226819)[sext_i32_i64(local_tid_226809)] =\n                                    x_209871;\n                                x_209876 = x_209871;\n                                ((volatile __local\n                                  float *) red_arr_mem_226821)[sext_i32_i64(local_tid_226809)] =\n                                    x_209872;\n                                x_209877 = x_209872;\n                            }\n                        }\n                        if (sle32(wave_sizze_226811, skip_threads_226848)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_226848 *= 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_226809 - squot32(local_tid_226809, 32) *\n                         32) == 31 && ltid_in_bounds_226847) {\n                        ((volatile __local\n                          float *) red_arr_mem_226813)[sext_i32_i64(squot32(local_tid_226809,\n                                                                            32))] =\n                            x_209868;\n                        ((volatile __local\n                          float *) red_arr_mem_226815)[sext_i32_i64(squot32(local_tid_226809,\n                                                                            32))] =\n                            x_209869;\n                        ((volatile __local\n                          float *) red_arr_mem_226817)[sext_i32_i64(squot32(local_tid",
            "_226809,\n                                                                            32))] =\n                            x_209870;\n                        ((volatile __local\n                          float *) red_arr_mem_226819)[sext_i32_i64(squot32(local_tid_226809,\n                                                                            32))] =\n                            x_209871;\n                        ((volatile __local\n                          float *) red_arr_mem_226821)[sext_i32_i64(squot32(local_tid_226809,\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_226851;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_226809, 32) == 0 &&\n                            ltid_in_bounds_226847) {\n                            x_226837 = ((volatile __local\n                                         float *) red_arr_mem_226813)[sext_i32_i64(local_tid_226809)];\n                            x_226838 = ((volatile __local\n                                         float *) red_arr_mem_226815)[sext_i32_i64(local_tid_226809)];\n                            x_226839 = ((volatile __local\n                                         float *) red_arr_mem_226817)[sext_i32_i64(local_tid_226809)];\n                            x_226840 = ((volatile __local\n                                         float *) red_arr_mem_226819)[sext_i32_i64(local_tid_226809)];\n                            x_226841 = ((volatile __local\n                                         float *) red_arr_mem_226821)[sext_i32_i64(local_tid_226809)];\n                            if ((local_tid_226809 - squot32(local_tid_226809,\n   ",
            "                                                         32) * 32) == 0) {\n                                x_226832 = x_226837;\n                                x_226833 = x_226838;\n                                x_226834 = x_226839;\n                                x_226835 = x_226840;\n                                x_226836 = x_226841;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_226851 = 1;\n                        while (slt32(skip_threads_226851, 32)) {\n                            bool thread_active_226852 =\n                                 sle32(skip_threads_226851, local_tid_226809 -\n                                       squot32(local_tid_226809, 32) * 32) &&\n                                 (squot32(local_tid_226809, 32) == 0 &&\n                                  ltid_in_bounds_226847);\n                            \n                            if (thread_active_226852) {\n                                // read operands\n                                {\n                                    x_226832 = ((volatile __local\n                                                 float *) red_arr_mem_226813)[sext_i32_i64(local_tid_226809) -\n                                                                              sext_i32_i64(skip_threads_226851)];\n                                    x_226833 = ((volatile __local\n                                                 float *) red_arr_mem_226815)[sext_i32_i64(local_tid_226809) -\n                                                                              sext_i32_i64(skip_threads_226851)];\n                                    x_226834 = ((volatile __local\n                                                 float *) red_arr_mem_226817)[sext_i32_i64(local_tid_226809) -\n                                                                              sext_i32_i64(skip_threads_2268",
            "51)];\n                                    x_226835 = ((volatile __local\n                                                 float *) red_arr_mem_226819)[sext_i32_i64(local_tid_226809) -\n                                                                              sext_i32_i64(skip_threads_226851)];\n                                    x_226836 = ((volatile __local\n                                                 float *) red_arr_mem_226821)[sext_i32_i64(local_tid_226809) -\n                                                                              sext_i32_i64(skip_threads_226851)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_226853 =\n                                     slt64(srem64(sext_i32_i64(local_tid_226809 *\n                                                  32 + 32 - 1), q_s_196695),\n                                           sext_i32_i64(local_tid_226809 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_226809 -\n                                                         skip_threads_226851) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_226852 && inactive_226853) {\n                                    x_226832 = x_226837;\n                                    x_226833 = x_226838;\n                                    x_226834 = x_226839;\n                                    x_226835 = x_226840;\n                                    x_226836 = x_226841;\n                                }\n                                if (thread_active_226852) {\n                                    if (!inactive_226853) {\n                                        float defunc_1_op_res_226842 =\n                                              x_226832 + x_226837;\n                   ",
            "                     float defunc_1_op_res_226843 =\n                                              x_226833 + x_226838;\n                                        float defunc_1_op_res_226844 =\n                                              x_226834 + x_226839;\n                                        float defunc_1_op_res_226845 =\n                                              x_226835 + x_226840;\n                                        float defunc_1_op_res_226846 =\n                                              x_226836 + x_226841;\n                                        \n                                        x_226832 = defunc_1_op_res_226842;\n                                        x_226833 = defunc_1_op_res_226843;\n                                        x_226834 = defunc_1_op_res_226844;\n                                        x_226835 = defunc_1_op_res_226845;\n                                        x_226836 = defunc_1_op_res_226846;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_226811, skip_threads_226851)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_226852) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_226813)[sext_i32_i64(local_tid_226809)] =\n                                        x_226832;\n                                    x_226837 = x_226832;\n                                    ((volatile __local\n                                      float *) red_arr_mem_226815)[sext_i32_i64(local_tid_226809)] =\n                                        x_226833;\n                                    x_226838 = x_226833;\n                                    ((volatile __local\n                                      float *) red_arr_me",
            "m_226817)[sext_i32_i64(local_tid_226809)] =\n                                        x_226834;\n                                    x_226839 = x_226834;\n                                    ((volatile __local\n                                      float *) red_arr_mem_226819)[sext_i32_i64(local_tid_226809)] =\n                                        x_226835;\n                                    x_226840 = x_226835;\n                                    ((volatile __local\n                                      float *) red_arr_mem_226821)[sext_i32_i64(local_tid_226809)] =\n                                        x_226836;\n                                    x_226841 = x_226836;\n                                }\n                            }\n                            if (sle32(wave_sizze_226811, skip_threads_226851)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_226851 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_226854 = squot32(local_tid_226809, 32) == 0 ||\n                     !ltid_in_bounds_226847;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_226854) {\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_226813)[sext_i32_i64(squot32(local_tid_226809,\n                                                                                           32)) -\n                                                                      (",
            "int64_t) 1];\n                            x_209869 = ((__local\n                                         float *) red_arr_mem_226815)[sext_i32_i64(squot32(local_tid_226809,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_209870 = ((__local\n                                         float *) red_arr_mem_226817)[sext_i32_i64(squot32(local_tid_226809,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_209871 = ((__local\n                                         float *) red_arr_mem_226819)[sext_i32_i64(squot32(local_tid_226809,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_209872 = ((__local\n                                         float *) red_arr_mem_226821)[sext_i32_i64(squot32(local_tid_226809,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_226855 =\n                             slt64(srem64(sext_i32_i64(local_tid_226809),\n                                          q_s_196695),\n                                   sext_i32_i64(local_tid_226809) -\n                                   sext_i32_i64(squot32(local_tid_226809, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_226854) {\n                            if (inactive_226855) {\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_226854) {\n                            if (!inactive_226855) {\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_226854) {\n                            ((__local\n                              float *) red_arr_mem_226813)[sext_i32_i64(local_tid_226809)] =\n                                x_209868;\n                            ((__local\n                              float *) red_arr_mem_226815)[sext_i32_i64(local_tid_226809)] =\n                                x_209869;\n                            ((__local\n                              float *) re",
            "d_arr_mem_226817)[sext_i32_i64(local_tid_226809)] =\n                                x_209870;\n                            ((__local\n                              float *) red_arr_mem_226819)[sext_i32_i64(local_tid_226809)] =\n                                x_209871;\n                            ((__local\n                              float *) red_arr_mem_226821)[sext_i32_i64(local_tid_226809)] =\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_226809, 32) == 0 &&\n                        ltid_in_bounds_226847) {\n                        ((__local\n                          float *) red_arr_mem_226813)[sext_i32_i64(local_tid_226809)] =\n                            x_209873;\n                        ((__local\n                          float *) red_arr_mem_226815)[sext_i32_i64(local_tid_226809)] =\n                            x_209874;\n                        ((__local\n                          float *) red_arr_mem_226817)[sext_i32_i64(local_tid_226809)] =\n                            x_209875;\n                        ((__local\n                          float *) red_arr_mem_226819)[sext_i32_i64(local_tid_226809)] =\n                            x_209876;\n                        ((__local\n                          float *) red_arr_mem_226821)[sext_i32_i64(local_tid_226809)] =\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_226825) *\n                      squot64(segred_group_sizze_209855,\n                              segment_sizze_nonzzero_226806) +\n                      sext_i32_i64(local_tid_226809), m_196691 * n_p_196694 *\n",
            "                      s_n_m_196745) && slt64(sext_i32_i64(local_tid_226809),\n                                             squot64(segred_group_sizze_209855,\n                                                     segment_sizze_nonzzero_226806))) {\n                float tmp_226856;\n                \n                tmp_226856 = ((__local\n                               float *) red_arr_mem_226813)[(sext_i32_i64(local_tid_226809) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226806 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223379)[squot64(sext_i32_i64(virt_group_id_226825) *\n                                               squot64(segred_group_sizze_209855,\n                                                       segment_sizze_nonzzero_226806) +\n                                               sext_i32_i64(local_tid_226809),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226825) *\n                                               squot64(segred_group_sizze_209855,\n                                                       segment_sizze_nonzzero_226806) +\n                                               sext_i32_i64(local_tid_226809) -\n                                               squot64(sext_i32_i64(virt_group_id_226825) *\n                                                       squot64(segred_group_sizze_209855,\n                                                               segment_sizze_nonzzero_226806) +\n                                                       sext_i32_i64(local_tid_226809),\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_226825) *\n                                        squot64(segred_group_sizze_209855,\n                                                segment_sizze_nonzzero_226806) +\n                                        sext_i32_i64(local_tid_226809) -\n                                        squot64(sext_i32_i64(virt_group_id_226825) *\n                                                squot64(segred_group_sizze_209855,\n                                                        segment_sizze_nonzzero_226806) +\n                                                sext_i32_i64(local_tid_226809),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226825) *\n                                                squot64(segred_group_sizze_209855,\n                                                        segment_sizze_nonzzero_226806) +\n                                                sext_i32_i64(local_tid_226809) -\n                                                squot64(sext_i32_i64(virt_group_id_226825) *\n                                                        squot64(segred_group_sizze_209855,\n                                                                segment_sizze_nonzzero_226806) +\n                                                        sext_i32_i64(local_tid_226809),\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_226856;\n    ",
            "            \n                float tmp_226857;\n                \n                tmp_226857 = ((__local\n                               float *) red_arr_mem_226815)[(sext_i32_i64(local_tid_226809) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226806 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223384)[squot64(sext_i32_i64(virt_group_id_226825) *\n                                               squot64(segred_group_sizze_209855,\n                                                       segment_sizze_nonzzero_226806) +\n                                               sext_i32_i64(local_tid_226809),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226825) *\n                                               squot64(segred_group_sizze_209855,\n                                                       segment_sizze_nonzzero_226806) +\n                                               sext_i32_i64(local_tid_226809) -\n                                               squot64(sext_i32_i64(virt_group_id_226825) *\n                                                       squot64(segred_group_sizze_209855,\n                                                               segment_sizze_nonzzero_226806) +\n                                                       sext_i32_i64(local_tid_226809),\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_226825) *\n                                        squot64(segred_group_sizze_209855,\n                                                segment_sizze_nonzzero_226806) +\n                                        sext_i32_i64(local_tid_226809) -\n                                        squot64(sext_i32_i64(virt_group_id_226825) *\n                                                squot64(segred_group_sizze_209855,\n                                                        segment_sizze_nonzzero_226806) +\n                                                sext_i32_i64(local_tid_226809),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226825) *\n                                                squot64(segred_group_sizze_209855,\n                                                        segment_sizze_nonzzero_226806) +\n                                                sext_i32_i64(local_tid_226809) -\n                                                squot64(sext_i32_i64(virt_group_id_226825) *\n                                                        squot64(segred_group_sizze_209855,\n                                                                segment_sizze_nonzzero_226806) +\n                                                        sext_i32_i64(local_tid_226809),\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_226857;\n                \n                float tmp_226858;\n                \n                tmp_226858 = ((__local\n                               float *) red_arr_mem_226817)[(sext_i32_i64(local_tid_226809) +\n                                   ",
            "                          (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226806 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223389)[squot64(sext_i32_i64(virt_group_id_226825) *\n                                               squot64(segred_group_sizze_209855,\n                                                       segment_sizze_nonzzero_226806) +\n                                               sext_i32_i64(local_tid_226809),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226825) *\n                                               squot64(segred_group_sizze_209855,\n                                                       segment_sizze_nonzzero_226806) +\n                                               sext_i32_i64(local_tid_226809) -\n                                               squot64(sext_i32_i64(virt_group_id_226825) *\n                                                       squot64(segred_group_sizze_209855,\n                                                               segment_sizze_nonzzero_226806) +\n                                                       sext_i32_i64(local_tid_226809),\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_226825) *\n                                        squot64(segred_group_sizze_209855,\n                                                segment_sizze_nonzzero_226806) +\n                                        sext_i32_i64(local_tid_",
            "226809) -\n                                        squot64(sext_i32_i64(virt_group_id_226825) *\n                                                squot64(segred_group_sizze_209855,\n                                                        segment_sizze_nonzzero_226806) +\n                                                sext_i32_i64(local_tid_226809),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226825) *\n                                                squot64(segred_group_sizze_209855,\n                                                        segment_sizze_nonzzero_226806) +\n                                                sext_i32_i64(local_tid_226809) -\n                                                squot64(sext_i32_i64(virt_group_id_226825) *\n                                                        squot64(segred_group_sizze_209855,\n                                                                segment_sizze_nonzzero_226806) +\n                                                        sext_i32_i64(local_tid_226809),\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_226858;\n                \n                float tmp_226859;\n                \n                tmp_226859 = ((__local\n                               float *) red_arr_mem_226819)[(sext_i32_i64(local_tid_226809) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226806 -\n                                                            (int64_t) 1];\n                ((__globa",
            "l\n                  float *) mem_223394)[squot64(sext_i32_i64(virt_group_id_226825) *\n                                               squot64(segred_group_sizze_209855,\n                                                       segment_sizze_nonzzero_226806) +\n                                               sext_i32_i64(local_tid_226809),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226825) *\n                                               squot64(segred_group_sizze_209855,\n                                                       segment_sizze_nonzzero_226806) +\n                                               sext_i32_i64(local_tid_226809) -\n                                               squot64(sext_i32_i64(virt_group_id_226825) *\n                                                       squot64(segred_group_sizze_209855,\n                                                               segment_sizze_nonzzero_226806) +\n                                                       sext_i32_i64(local_tid_226809),\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_226825) *\n                                        squot64(segred_group_sizze_209855,\n                                                segment_sizze_nonzzero_226806) +\n                                        sext_i32_i64(local_tid_226809) -\n                                        squot64(sext_i32_i64(virt_group_id_226825) *\n                                                squot64(segred_group_sizze_209855,\n                                                      ",
            "  segment_sizze_nonzzero_226806) +\n                                                sext_i32_i64(local_tid_226809),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226825) *\n                                                squot64(segred_group_sizze_209855,\n                                                        segment_sizze_nonzzero_226806) +\n                                                sext_i32_i64(local_tid_226809) -\n                                                squot64(sext_i32_i64(virt_group_id_226825) *\n                                                        squot64(segred_group_sizze_209855,\n                                                                segment_sizze_nonzzero_226806) +\n                                                        sext_i32_i64(local_tid_226809),\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_226859;\n                \n                float tmp_226860;\n                \n                tmp_226860 = ((__local\n                               float *) red_arr_mem_226821)[(sext_i32_i64(local_tid_226809) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226806 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223399)[squot64(sext_i32_i64(virt_group_id_226825) *\n                                               squot64(segred_group_sizze_209855,\n                                                       segment_s",
            "izze_nonzzero_226806) +\n                                               sext_i32_i64(local_tid_226809),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226825) *\n                                               squot64(segred_group_sizze_209855,\n                                                       segment_sizze_nonzzero_226806) +\n                                               sext_i32_i64(local_tid_226809) -\n                                               squot64(sext_i32_i64(virt_group_id_226825) *\n                                                       squot64(segred_group_sizze_209855,\n                                                               segment_sizze_nonzzero_226806) +\n                                                       sext_i32_i64(local_tid_226809),\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_226825) *\n                                        squot64(segred_group_sizze_209855,\n                                                segment_sizze_nonzzero_226806) +\n                                        sext_i32_i64(local_tid_226809) -\n                                        squot64(sext_i32_i64(virt_group_id_226825) *\n                                                squot64(segred_group_sizze_209855,\n                                                        segment_sizze_nonzzero_226806) +\n                                                sext_i32_i64(local_tid_226809),\n                                                n_p_196694 * s_n_m_196745) *\n                                        ",
            "(n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226825) *\n                                                squot64(segred_group_sizze_209855,\n                                                        segment_sizze_nonzzero_226806) +\n                                                sext_i32_i64(local_tid_226809) -\n                                                squot64(sext_i32_i64(virt_group_id_226825) *\n                                                        squot64(segred_group_sizze_209855,\n                                                                segment_sizze_nonzzero_226806) +\n                                                        sext_i32_i64(local_tid_226809),\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_226860;\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                                        uint red_arr_mem_226959_backing_offset_0,\n                                        uint red_arr_mem_226957_backing_offset_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_226950,\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 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    volatile unsigned char *red_arr_mem_226959_backing_1 =\n                           &shared_mem[red_arr_mem_226959_backing_offset_0];\n    volatile unsigned char *red_arr_mem_226957_backing_0 =\n                           &shared_mem[red_arr_mem_226957_backing_offset_1];\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_209990 = global_tid_226952;\n    __local unsigned char *red_arr_mem_226957;\n    \n    red_arr_mem_226957 = (__local uns",
            "igned char *) red_arr_mem_226957_backing_0;\n    \n    __local unsigned char *red_arr_mem_226959;\n    \n    red_arr_mem_226959 = (__local unsigned char *) red_arr_mem_226959_backing_1;\n    \n    int32_t phys_group_id_226961;\n    \n    phys_group_id_226961 = get_group_id(0);\n    for (int32_t i_226962 = 0; i_226962 <\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_226950))) -\n                   phys_group_id_226961, sext_i64_i32(num_groups_209982));\n         i_226962++) {\n        int32_t virt_group_id_226963 = phys_group_id_226961 + i_226962 *\n                sext_i64_i32(num_groups_209982);\n        int64_t slice_226964 = s_n_m_196745;\n        int64_t slice_226965 = n_p_196694 * slice_226964;\n        int64_t slice_226966 = m_196691 * slice_226965;\n        int64_t gtid_209986 = squot64(squot64(sext_i32_i64(local_tid_226953),\n                                              segment_sizze_nonzzero_226950) +\n                                      sext_i32_i64(virt_group_id_226963) *\n                                      squot64(segred_group_sizze_209981,\n                                              segment_sizze_nonzzero_226950),\n                                      slice_226965);\n        int64_t remnant_226967 = squot64(sext_i32_i64(local_tid_226953),\n                                         segment_sizze_nonzzero_226950) +\n                sext_i32_i64(virt_group_id_226963) *\n                squot64(segred_group_sizze_209981,\n                        segment_sizze_nonzzero_226950) - gtid_209986 *\n                slice_226965;\n        int64_t gtid_209987 = squot64(remnant_226967, slice_226964);\n        int64_t remnant_226968 = remnant_226967 - gtid_209987 * slice_226964;\n        int64_t gtid_209988 = remnant_226968;\n        int64_t remnant_226969 = remnant_226968 - gtid_209988;\n        int64_t gtid_20",
            "9989 = srem64(sext_i32_i64(local_tid_226953),\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_226953),\n                                                         q_s_196695 *\n                                                         squot64(segred_group_sizze_209981,\n                                                                 segment_sizze_nonzzero_226950)))) {\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_22",
            "3420)[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_2",
            "10028);\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_210055 = x_210053 + y_210054;\n                flo",
            "at 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_226957)[sext_i32_i64(local_tid_226953)] =\n                        defunc_9_fit_fun_res_210058;\n                    ((__local\n                      float *) red_arr_mem_226959)[sext_i32_i64(local_tid_226953)] =\n                        defunc_9_slope_fun_res_210064;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_226957)[sext_i32_i64(local_tid_226953)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_226959)[sext_i32_i64(local_tid_226953)] =\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_226970;\n                float x_226971;\n                float x_226972;\n                float x_226973;\n                bool ltid_in_bounds_226976 =\n                     slt64(sext_i32_i64(local_tid_226953), q_s_196695 *\n                           squot64(se",
            "gred_group_sizze_209981,\n                                   segment_sizze_nonzzero_226950));\n                int32_t skip_threads_226977;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_226976) {\n                        x_209993 = ((volatile __local\n                                     float *) red_arr_mem_226957)[sext_i32_i64(local_tid_226953)];\n                        x_209994 = ((volatile __local\n                                     float *) red_arr_mem_226959)[sext_i32_i64(local_tid_226953)];\n                        if ((local_tid_226953 - squot32(local_tid_226953, 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_226977 = 1;\n                    while (slt32(skip_threads_226977, 32)) {\n                        bool thread_active_226978 = sle32(skip_threads_226977,\n                                                          local_tid_226953 -\n                                                          squot32(local_tid_226953,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_226976;\n                        \n                        if (thread_active_226978) {\n                            // read operands\n                            {\n                                x_209991 = ((volatile __local\n                                             float *) red_arr_mem_226957)[sext_i32_i64(local_tid_226953) -\n                                                                          sext_i32_i64(skip_threads_226977)];\n                                x_209992 = ((volatile __local\n                                             float *) red_arr_mem_226959)[sext_i32_i64(",
            "local_tid_226953) -\n                                                                          sext_i32_i64(skip_threads_226977)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_226979 =\n                                 slt64(srem64(sext_i32_i64(local_tid_226953),\n                                              q_s_196695),\n                                       sext_i32_i64(local_tid_226953) -\n                                       sext_i32_i64(local_tid_226953 -\n                                       skip_threads_226977));\n                            \n                            if (thread_active_226978 && inactive_226979) {\n                                x_209991 = x_209993;\n                                x_209992 = x_209994;\n                            }\n                            if (thread_active_226978) {\n                                if (!inactive_226979) {\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_226955, skip_threads_226977)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_226978) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_226957)[sext_i32_i64(local_tid_226953)] =\n                                  ",
            "  x_209991;\n                                x_209993 = x_209991;\n                                ((volatile __local\n                                  float *) red_arr_mem_226959)[sext_i32_i64(local_tid_226953)] =\n                                    x_209992;\n                                x_209994 = x_209992;\n                            }\n                        }\n                        if (sle32(wave_sizze_226955, skip_threads_226977)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_226977 *= 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_226953 - squot32(local_tid_226953, 32) *\n                         32) == 31 && ltid_in_bounds_226976) {\n                        ((volatile __local\n                          float *) red_arr_mem_226957)[sext_i32_i64(squot32(local_tid_226953,\n                                                                            32))] =\n                            x_209991;\n                        ((volatile __local\n                          float *) red_arr_mem_226959)[sext_i32_i64(squot32(local_tid_226953,\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_226980;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_226953, 32) == 0 &&\n                            ltid_in_bounds_226976) {\n                            x_226972 = ((volatile __local\n                                         float *) red_arr_mem",
            "_226957)[sext_i32_i64(local_tid_226953)];\n                            x_226973 = ((volatile __local\n                                         float *) red_arr_mem_226959)[sext_i32_i64(local_tid_226953)];\n                            if ((local_tid_226953 - squot32(local_tid_226953,\n                                                            32) * 32) == 0) {\n                                x_226970 = x_226972;\n                                x_226971 = x_226973;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_226980 = 1;\n                        while (slt32(skip_threads_226980, 32)) {\n                            bool thread_active_226981 =\n                                 sle32(skip_threads_226980, local_tid_226953 -\n                                       squot32(local_tid_226953, 32) * 32) &&\n                                 (squot32(local_tid_226953, 32) == 0 &&\n                                  ltid_in_bounds_226976);\n                            \n                            if (thread_active_226981) {\n                                // read operands\n                                {\n                                    x_226970 = ((volatile __local\n                                                 float *) red_arr_mem_226957)[sext_i32_i64(local_tid_226953) -\n                                                                              sext_i32_i64(skip_threads_226980)];\n                                    x_226971 = ((volatile __local\n                                                 float *) red_arr_mem_226959)[sext_i32_i64(local_tid_226953) -\n                                                                              sext_i32_i64(skip_threads_226980)];\n                                }\n                            }\n                            // perform operation\n                            {\n                 ",
            "               bool inactive_226982 =\n                                     slt64(srem64(sext_i32_i64(local_tid_226953 *\n                                                  32 + 32 - 1), q_s_196695),\n                                           sext_i32_i64(local_tid_226953 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_226953 -\n                                                         skip_threads_226980) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_226981 && inactive_226982) {\n                                    x_226970 = x_226972;\n                                    x_226971 = x_226973;\n                                }\n                                if (thread_active_226981) {\n                                    if (!inactive_226982) {\n                                        float defunc_1_op_res_226974 =\n                                              x_226970 + x_226972;\n                                        float defunc_1_op_res_226975 =\n                                              x_226971 + x_226973;\n                                        \n                                        x_226970 = defunc_1_op_res_226974;\n                                        x_226971 = defunc_1_op_res_226975;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_226955, skip_threads_226980)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_226981) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_226957)[sext_i32_i64(local_tid_226953)] =\n                                        ",
            "x_226970;\n                                    x_226972 = x_226970;\n                                    ((volatile __local\n                                      float *) red_arr_mem_226959)[sext_i32_i64(local_tid_226953)] =\n                                        x_226971;\n                                    x_226973 = x_226971;\n                                }\n                            }\n                            if (sle32(wave_sizze_226955, skip_threads_226980)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_226980 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_226983 = squot32(local_tid_226953, 32) == 0 ||\n                     !ltid_in_bounds_226976;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_226983) {\n                            x_209993 = x_209991;\n                            x_209994 = x_209992;\n                            x_209991 = ((__local\n                                         float *) red_arr_mem_226957)[sext_i32_i64(squot32(local_tid_226953,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_209992 = ((__local\n                                         float *) red_arr_mem_226959)[sext_i32_i64(squot32(local_tid_226953,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool i",
            "nactive_226984 =\n                             slt64(srem64(sext_i32_i64(local_tid_226953),\n                                          q_s_196695),\n                                   sext_i32_i64(local_tid_226953) -\n                                   sext_i32_i64(squot32(local_tid_226953, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_226983) {\n                            if (inactive_226984) {\n                                x_209991 = x_209993;\n                                x_209992 = x_209994;\n                            }\n                        }\n                        if (!no_carry_in_226983) {\n                            if (!inactive_226984) {\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_226983) {\n                            ((__local\n                              float *) red_arr_mem_226957)[sext_i32_i64(local_tid_226953)] =\n                                x_209991;\n                            ((__local\n                              float *) red_arr_mem_226959)[sext_i32_i64(local_tid_226953)] =\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_226953, 32) == 0 &&\n                        ltid_in_bounds_226976) {\n                    ",
            "    ((__local\n                          float *) red_arr_mem_226957)[sext_i32_i64(local_tid_226953)] =\n                            x_209993;\n                        ((__local\n                          float *) red_arr_mem_226959)[sext_i32_i64(local_tid_226953)] =\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_226963) *\n                      squot64(segred_group_sizze_209981,\n                              segment_sizze_nonzzero_226950) +\n                      sext_i32_i64(local_tid_226953), m_196691 * n_p_196694 *\n                      s_n_m_196745) && slt64(sext_i32_i64(local_tid_226953),\n                                             squot64(segred_group_sizze_209981,\n                                                     segment_sizze_nonzzero_226950))) {\n                float tmp_226985;\n                \n                tmp_226985 = ((__local\n                               float *) red_arr_mem_226957)[(sext_i32_i64(local_tid_226953) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226950 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223436)[squot64(sext_i32_i64(virt_group_id_226963) *\n                                               squot64(segred_group_sizze_209981,\n                                                       segment_sizze_nonzzero_226950) +\n                                               sext_i32_i64(local_tid_226953),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_g",
            "roup_id_226963) *\n                                               squot64(segred_group_sizze_209981,\n                                                       segment_sizze_nonzzero_226950) +\n                                               sext_i32_i64(local_tid_226953) -\n                                               squot64(sext_i32_i64(virt_group_id_226963) *\n                                                       squot64(segred_group_sizze_209981,\n                                                               segment_sizze_nonzzero_226950) +\n                                                       sext_i32_i64(local_tid_226953),\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_226963) *\n                                        squot64(segred_group_sizze_209981,\n                                                segment_sizze_nonzzero_226950) +\n                                        sext_i32_i64(local_tid_226953) -\n                                        squot64(sext_i32_i64(virt_group_id_226963) *\n                                                squot64(segred_group_sizze_209981,\n                                                        segment_sizze_nonzzero_226950) +\n                                                sext_i32_i64(local_tid_226953),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226963) *\n                                                squot64(segred_group_sizze_209981,\n                                                        segment_sizze_nonzzero_226950) +\n                           ",
            "                     sext_i32_i64(local_tid_226953) -\n                                                squot64(sext_i32_i64(virt_group_id_226963) *\n                                                        squot64(segred_group_sizze_209981,\n                                                                segment_sizze_nonzzero_226950) +\n                                                        sext_i32_i64(local_tid_226953),\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_226985;\n                \n                float tmp_226986;\n                \n                tmp_226986 = ((__local\n                               float *) red_arr_mem_226959)[(sext_i32_i64(local_tid_226953) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226950 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223441)[squot64(sext_i32_i64(virt_group_id_226963) *\n                                               squot64(segred_group_sizze_209981,\n                                                       segment_sizze_nonzzero_226950) +\n                                               sext_i32_i64(local_tid_226953),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226963) *\n                                               squot64(segred_group_sizze_209981,\n                                                       segment_sizze_nonzzero_226950) +\n                                            ",
            "   sext_i32_i64(local_tid_226953) -\n                                               squot64(sext_i32_i64(virt_group_id_226963) *\n                                                       squot64(segred_group_sizze_209981,\n                                                               segment_sizze_nonzzero_226950) +\n                                                       sext_i32_i64(local_tid_226953),\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_226963) *\n                                        squot64(segred_group_sizze_209981,\n                                                segment_sizze_nonzzero_226950) +\n                                        sext_i32_i64(local_tid_226953) -\n                                        squot64(sext_i32_i64(virt_group_id_226963) *\n                                                squot64(segred_group_sizze_209981,\n                                                        segment_sizze_nonzzero_226950) +\n                                                sext_i32_i64(local_tid_226953),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226963) *\n                                                squot64(segred_group_sizze_209981,\n                                                        segment_sizze_nonzzero_226950) +\n                                                sext_i32_i64(local_tid_226953) -\n                                                squot64(sext_i32_i64(virt_group_id_226963) *\n                                                        squot64(segred_group_sizze_20",
            "9981,\n                                                                segment_sizze_nonzzero_226950) +\n                                                        sext_i32_i64(local_tid_226953),\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_226986;\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                                        uint red_arr_mem_227164_backing_offset_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_227157,\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    volatile unsigned char *red_arr_mem_227164_backing_0 =\n                           &shared_mem[red_arr_mem_227164_backing_offset_0];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227159;\n    int32_t local_tid_227160;\n    int64_t group_sizze_227163;\n    int32_t wave_sizze_227162;\n    int32_t group_tid_227161;\n    \n    global_tid_227159 = get_global_id(0);\n    local_tid_227160 = get_local_id(0);\n    group_sizze_227163 = get_local_size(0);\n    wave_sizze_227162 = LOCKSTEP_WIDTH;\n    gr",
            "oup_tid_227161 = get_group_id(0);\n    \n    int32_t phys_tid_211714 = global_tid_227159;\n    __local unsigned char *red_arr_mem_227164;\n    \n    red_arr_mem_227164 = (__local unsigned char *) red_arr_mem_227164_backing_0;\n    \n    int32_t phys_group_id_227166;\n    \n    phys_group_id_227166 = get_group_id(0);\n    for (int32_t i_227167 = 0; i_227167 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          squot64(segred_group_sizze_211708,\n                                                  segment_sizze_nonzzero_227157))) -\n                   phys_group_id_227166, sext_i64_i32(num_groups_211709));\n         i_227167++) {\n        int32_t virt_group_id_227168 = phys_group_id_227166 + i_227167 *\n                sext_i64_i32(num_groups_211709);\n        int64_t slice_227169 = m_196691;\n        int64_t gtid_211712 = squot64(sext_i32_i64(local_tid_227160),\n                                      segment_sizze_nonzzero_227157) +\n                sext_i32_i64(virt_group_id_227168) *\n                squot64(segred_group_sizze_211708,\n                        segment_sizze_nonzzero_227157);\n        int64_t remnant_227170 = squot64(sext_i32_i64(local_tid_227160),\n                                         segment_sizze_nonzzero_227157) +\n                sext_i32_i64(virt_group_id_227168) *\n                squot64(segred_group_sizze_211708,\n                        segment_sizze_nonzzero_227157) - gtid_211712;\n        int64_t gtid_211713 = srem64(sext_i32_i64(local_tid_227160),\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_227160),\n                                                         n_p_196694 *\n                                                         squot64(segred_",
            "group_sizze_211708,\n                                                                 segment_sizze_nonzzero_227157)))) {\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_227164)[sext_i32_i64(local_tid_227160)] =\n                        x_211719;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_227164)[sext_i32_i64(local_tid_227160)] =\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_227171;\n                float x_227172;\n                bool ltid_in_bounds_227174 =\n                     slt64(sext_i32_i64(local_tid_227160), n_p_196694 *\n                           squot64(segred_group_sizze_211708,\n                                   segment_sizze_nonzzero_227157));\n                int32_t skip_threads_227175;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_227174) {\n                        x_211716 = ((volatile __local\n                                     float *) red_arr_mem_227164)[sext_i32_i64(local_tid_227160)];\n                        if ((local_tid_227160 - squot32(local_tid_227160, 32) *\n                             32) == 0) {\n                            x_211715 = x_211716;\n                        }\n                    }\n                }\n                // in-block scan (hopefully",
            " no barriers needed)\n                {\n                    skip_threads_227175 = 1;\n                    while (slt32(skip_threads_227175, 32)) {\n                        bool thread_active_227176 = sle32(skip_threads_227175,\n                                                          local_tid_227160 -\n                                                          squot32(local_tid_227160,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_227174;\n                        \n                        if (thread_active_227176) {\n                            // read operands\n                            {\n                                x_211715 = ((volatile __local\n                                             float *) red_arr_mem_227164)[sext_i32_i64(local_tid_227160) -\n                                                                          sext_i32_i64(skip_threads_227175)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_227177 =\n                                 slt64(srem64(sext_i32_i64(local_tid_227160),\n                                              n_p_196694),\n                                       sext_i32_i64(local_tid_227160) -\n                                       sext_i32_i64(local_tid_227160 -\n                                       skip_threads_227175));\n                            \n                            if (thread_active_227176 && inactive_227177) {\n                                x_211715 = x_211716;\n                            }\n                            if (thread_active_227176) {\n                                if (!inactive_227177) {\n                                    float defunc_1_op_res_211717 = x_211715 +\n                                          x_211716;\n                                    \n                                    x_211715 = defunc_1_op_res_2117",
            "17;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_227162, skip_threads_227175)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_227176) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227164)[sext_i32_i64(local_tid_227160)] =\n                                    x_211715;\n                                x_211716 = x_211715;\n                            }\n                        }\n                        if (sle32(wave_sizze_227162, skip_threads_227175)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_227175 *= 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_227160 - squot32(local_tid_227160, 32) *\n                         32) == 31 && ltid_in_bounds_227174) {\n                        ((volatile __local\n                          float *) red_arr_mem_227164)[sext_i32_i64(squot32(local_tid_227160,\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_227178;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_227160, 32) == 0 &&\n                            ltid_in_bounds_227174) {\n                            x_227172 = ((volatile __local\n    ",
            "                                     float *) red_arr_mem_227164)[sext_i32_i64(local_tid_227160)];\n                            if ((local_tid_227160 - squot32(local_tid_227160,\n                                                            32) * 32) == 0) {\n                                x_227171 = x_227172;\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 =\n                                 sle32(skip_threads_227178, local_tid_227160 -\n                                       squot32(local_tid_227160, 32) * 32) &&\n                                 (squot32(local_tid_227160, 32) == 0 &&\n                                  ltid_in_bounds_227174);\n                            \n                            if (thread_active_227179) {\n                                // read operands\n                                {\n                                    x_227171 = ((volatile __local\n                                                 float *) red_arr_mem_227164)[sext_i32_i64(local_tid_227160) -\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_227160 *\n                                                  32 + 32 - 1), n_p_196694),\n                                           sext_i32_i64(local_tid_227160 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_227160 -\n                                          ",
            "               skip_threads_227178) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_227179 && inactive_227180) {\n                                    x_227171 = x_227172;\n                                }\n                                if (thread_active_227179) {\n                                    if (!inactive_227180) {\n                                        float defunc_1_op_res_227173 =\n                                              x_227171 + x_227172;\n                                        \n                                        x_227171 = defunc_1_op_res_227173;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_227162, skip_threads_227178)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_227179) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_227164)[sext_i32_i64(local_tid_227160)] =\n                                        x_227171;\n                                    x_227172 = x_227171;\n                                }\n                            }\n                            if (sle32(wave_sizze_227162, skip_threads_227178)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_227178 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_227181 = squot32(local_tid_227160, 32) == 0 ||\n                     !ltid_in_bounds_227174;\n                \n                // carry-in for every block except the first\n                {\n          ",
            "          // read operands\n                    {\n                        if (!no_carry_in_227181) {\n                            x_211716 = x_211715;\n                            x_211715 = ((__local\n                                         float *) red_arr_mem_227164)[sext_i32_i64(squot32(local_tid_227160,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_227182 =\n                             slt64(srem64(sext_i32_i64(local_tid_227160),\n                                          n_p_196694),\n                                   sext_i32_i64(local_tid_227160) -\n                                   sext_i32_i64(squot32(local_tid_227160, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_227181) {\n                            if (inactive_227182) {\n                                x_211715 = x_211716;\n                            }\n                        }\n                        if (!no_carry_in_227181) {\n                            if (!inactive_227182) {\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_227181) {\n                            ((__local\n                              float *) red_arr_mem_227164)[sext_i32_i64(local_tid_227160)] =\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_227160, 32) == 0 &&\n                        ltid_in_bounds_227174) {\n                        ((__local\n                          float *) red_arr_mem_227164)[sext_i32_i64(local_tid_227160)] =\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_227168) *\n                      squot64(segred_group_sizze_211708,\n                              segment_sizze_nonzzero_227157) +\n                      sext_i32_i64(local_tid_227160), m_196691) &&\n                slt64(sext_i32_i64(local_tid_227160),\n                      squot64(segred_group_sizze_211708,\n                              segment_sizze_nonzzero_227157))) {\n                float tmp_227183;\n                \n                tmp_227183 = ((__local\n                               float *) red_arr_mem_227164)[(sext_i32_i64(local_tid_227160) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227157 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223568)[sext_i32_i64(virt_group_id_227168) *\n                                       squot64(segred_group_sizze_211708,\n                                               segment_sizze_nonzzero_227157) +\n                                       sext_i32_i64(local_tid_227160)] =\n                    tmp_227183;\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_211708\n}\n__kernel void mainzisegred_small_211845",
            "(__global int *global_failure,\n                                        uint red_arr_mem_227345_backing_offset_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_227338,\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    volatile unsigned char *red_arr_mem_227345_backing_0 =\n                           &shared_mem[red_arr_mem_227345_backing_offset_0];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227340;\n    int32_t local_tid_227341;\n    int64_t group_sizze_227344;\n    int32_t wave_sizze_227343;\n    int32_t group_tid_227342;\n    \n    global_tid_227340 = get_global_id(0);\n    local_tid_227341 = get_local_id(0);\n    group_sizze_227344 = get_local_size(0);\n    wave_sizze_227343 = LOCKSTEP_WIDTH;\n    group_tid_227342 = get_group_id(0);\n    \n    int32_t phys_tid_211845 = global_tid_227340;\n    __local unsigned char *red_arr_mem_227345;\n    \n    red_arr_mem_227345 = (__local unsigned char *) red_arr_mem_227345_backing_0;\n    \n    int32_t phys_group_id_227347;\n    \n    phys_group_id_227347 = get_group_id(0);\n    for (int32_t i_227348 = 0; i_227348 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          squot64(segred_group_sizze_211839,\n                                                  segment_sizze_nonzzero_227338))) -\n                   phys_group_id_227347, sext_i64_i32(num_groups_211840));\n         i_227348++) {\n        int32_t virt_group_id_227349 = phys_group_id_227347 + i_227348 *\n    ",
            "            sext_i64_i32(num_groups_211840);\n        int64_t slice_227350 = m_196691;\n        int64_t gtid_211843 = squot64(sext_i32_i64(local_tid_227341),\n                                      segment_sizze_nonzzero_227338) +\n                sext_i32_i64(virt_group_id_227349) *\n                squot64(segred_group_sizze_211839,\n                        segment_sizze_nonzzero_227338);\n        int64_t remnant_227351 = squot64(sext_i32_i64(local_tid_227341),\n                                         segment_sizze_nonzzero_227338) +\n                sext_i32_i64(virt_group_id_227349) *\n                squot64(segred_group_sizze_211839,\n                        segment_sizze_nonzzero_227338) - gtid_211843;\n        int64_t gtid_211844 = srem64(sext_i32_i64(local_tid_227341),\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_227341),\n                                                         n_p_196694 *\n                                                         squot64(segred_group_sizze_211839,\n                                                                 segment_sizze_nonzzero_227338)))) {\n                float x_211850;\n                \n                x_211850 = ((__global float *) mem_223574)[gtid_211843 *\n                                                           lifted_single_ma_l_arg_197247 +\n                                                           gtid_211844];\n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_227345)[sext_i32_i64(local_tid_227341)] =\n                        x_211850;\n                }\n            } else {\n                ((__l",
            "ocal\n                  float *) red_arr_mem_227345)[sext_i32_i64(local_tid_227341)] =\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_227352;\n                float x_227353;\n                bool ltid_in_bounds_227355 =\n                     slt64(sext_i32_i64(local_tid_227341), n_p_196694 *\n                           squot64(segred_group_sizze_211839,\n                                   segment_sizze_nonzzero_227338));\n                int32_t skip_threads_227356;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_227355) {\n                        x_211847 = ((volatile __local\n                                     float *) red_arr_mem_227345)[sext_i32_i64(local_tid_227341)];\n                        if ((local_tid_227341 - squot32(local_tid_227341, 32) *\n                             32) == 0) {\n                            x_211846 = x_211847;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_227356 = 1;\n                    while (slt32(skip_threads_227356, 32)) {\n                        bool thread_active_227357 = sle32(skip_threads_227356,\n                                                          local_tid_227341 -\n                                                          squot32(local_tid_227341,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_227355;\n                        \n                        if (thread_active_227357) {\n                            // read operands\n                            {\n                                x_211846 = ((volatile _",
            "_local\n                                             float *) red_arr_mem_227345)[sext_i32_i64(local_tid_227341) -\n                                                                          sext_i32_i64(skip_threads_227356)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_227358 =\n                                 slt64(srem64(sext_i32_i64(local_tid_227341),\n                                              n_p_196694),\n                                       sext_i32_i64(local_tid_227341) -\n                                       sext_i32_i64(local_tid_227341 -\n                                       skip_threads_227356));\n                            \n                            if (thread_active_227357 && inactive_227358) {\n                                x_211846 = x_211847;\n                            }\n                            if (thread_active_227357) {\n                                if (!inactive_227358) {\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_227343, skip_threads_227356)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_227357) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227345)[sext_i32_i64(local_tid_227341)] =\n                                    x_211846;\n                                x_211847 = x_211846;\n                            }\n                        }\n                        if (sle32(wave_",
            "sizze_227343, skip_threads_227356)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_227356 *= 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_227341 - squot32(local_tid_227341, 32) *\n                         32) == 31 && ltid_in_bounds_227355) {\n                        ((volatile __local\n                          float *) red_arr_mem_227345)[sext_i32_i64(squot32(local_tid_227341,\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_227359;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_227341, 32) == 0 &&\n                            ltid_in_bounds_227355) {\n                            x_227353 = ((volatile __local\n                                         float *) red_arr_mem_227345)[sext_i32_i64(local_tid_227341)];\n                            if ((local_tid_227341 - squot32(local_tid_227341,\n                                                            32) * 32) == 0) {\n                                x_227352 = x_227353;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_227359 = 1;\n                        while (slt32(skip_threads_227359, 32)) {\n                            bool thread_active_227360 =\n                                 sle32(skip_threads_227359, local_tid_227341 ",
            "-\n                                       squot32(local_tid_227341, 32) * 32) &&\n                                 (squot32(local_tid_227341, 32) == 0 &&\n                                  ltid_in_bounds_227355);\n                            \n                            if (thread_active_227360) {\n                                // read operands\n                                {\n                                    x_227352 = ((volatile __local\n                                                 float *) red_arr_mem_227345)[sext_i32_i64(local_tid_227341) -\n                                                                              sext_i32_i64(skip_threads_227359)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_227361 =\n                                     slt64(srem64(sext_i32_i64(local_tid_227341 *\n                                                  32 + 32 - 1), n_p_196694),\n                                           sext_i32_i64(local_tid_227341 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_227341 -\n                                                         skip_threads_227359) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_227360 && inactive_227361) {\n                                    x_227352 = x_227353;\n                                }\n                                if (thread_active_227360) {\n                                    if (!inactive_227361) {\n                                        float defunc_1_op_res_227354 =\n                                              x_227352 + x_227353;\n                                        \n                                        x_227352 = defunc_1_op_res_227354;\n                                    }\n            ",
            "                    }\n                            }\n                            if (sle32(wave_sizze_227343, skip_threads_227359)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_227360) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_227345)[sext_i32_i64(local_tid_227341)] =\n                                        x_227352;\n                                    x_227353 = x_227352;\n                                }\n                            }\n                            if (sle32(wave_sizze_227343, skip_threads_227359)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_227359 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_227362 = squot32(local_tid_227341, 32) == 0 ||\n                     !ltid_in_bounds_227355;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_227362) {\n                            x_211847 = x_211846;\n                            x_211846 = ((__local\n                                         float *) red_arr_mem_227345)[sext_i32_i64(squot32(local_tid_227341,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_227363 =\n                             slt64(srem64(sext_i32_i64(local_tid_227341),\n  ",
            "                                        n_p_196694),\n                                   sext_i32_i64(local_tid_227341) -\n                                   sext_i32_i64(squot32(local_tid_227341, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_227362) {\n                            if (inactive_227363) {\n                                x_211846 = x_211847;\n                            }\n                        }\n                        if (!no_carry_in_227362) {\n                            if (!inactive_227363) {\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_227362) {\n                            ((__local\n                              float *) red_arr_mem_227345)[sext_i32_i64(local_tid_227341)] =\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_227341, 32) == 0 &&\n                        ltid_in_bounds_227355) {\n                        ((__local\n                          float *) red_arr_mem_227345)[sext_i32_i64(local_tid_227341)] =\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_227349) *\n                      squot64(segred_group_sizze_211839,\n                              segment_sizze_nonzzero",
            "_227338) +\n                      sext_i32_i64(local_tid_227341), m_196691) &&\n                slt64(sext_i32_i64(local_tid_227341),\n                      squot64(segred_group_sizze_211839,\n                              segment_sizze_nonzzero_227338))) {\n                float tmp_227364;\n                \n                tmp_227364 = ((__local\n                               float *) red_arr_mem_227345)[(sext_i32_i64(local_tid_227341) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227338 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223585)[sext_i32_i64(virt_group_id_227349) *\n                                       squot64(segred_group_sizze_211839,\n                                               segment_sizze_nonzzero_227338) +\n                                       sext_i32_i64(local_tid_227341)] =\n                    tmp_227364;\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                                        uint red_arr_mem_227526_backing_offset_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_227519,\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  ",
            "  volatile unsigned char *red_arr_mem_227526_backing_0 =\n                           &shared_mem[red_arr_mem_227526_backing_offset_0];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227521;\n    int32_t local_tid_227522;\n    int64_t group_sizze_227525;\n    int32_t wave_sizze_227524;\n    int32_t group_tid_227523;\n    \n    global_tid_227521 = get_global_id(0);\n    local_tid_227522 = get_local_id(0);\n    group_sizze_227525 = get_local_size(0);\n    wave_sizze_227524 = LOCKSTEP_WIDTH;\n    group_tid_227523 = get_group_id(0);\n    \n    int32_t phys_tid_211976 = global_tid_227521;\n    __local unsigned char *red_arr_mem_227526;\n    \n    red_arr_mem_227526 = (__local unsigned char *) red_arr_mem_227526_backing_0;\n    \n    int32_t phys_group_id_227528;\n    \n    phys_group_id_227528 = get_group_id(0);\n    for (int32_t i_227529 = 0; i_227529 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          squot64(segred_group_sizze_211970,\n                                                  segment_sizze_nonzzero_227519))) -\n                   phys_group_id_227528, sext_i64_i32(num_groups_211971));\n         i_227529++) {\n        int32_t virt_group_id_227530 = phys_group_id_227528 + i_227529 *\n                sext_i64_i32(num_groups_211971);\n        int64_t slice_227531 = m_196691;\n        int64_t gtid_211974 = squot64(sext_i32_i64(local_tid_227522),\n                                      segment_sizze_nonzzero_227519) +\n                sext_i32_i64(virt_group_id_227530) *\n                squot64(segred_group_sizze_211970,\n                        segment_sizze_nonzzero_227519);\n        int64_t remnant_227532 = squot64(sext_i32_i64(local_tid_227522),\n                                         segment_sizze_nonzzero_227519) +\n                sext_i32_i64(virt_group_id_227530) *\n                squot64(segred_group_sizze_211970,\n                        segment_sizze_nonzzero_227519) - gtid_211974;\n        int64_t gtid_211975 = s",
            "rem64(sext_i32_i64(local_tid_227522),\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_227522),\n                                                          (int64_t) 3 *\n                                                          squot64(segred_group_sizze_211970,\n                                                                  segment_sizze_nonzzero_227519)))) {\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_227526)[sext_i32_i64(local_tid_227522)] =\n                        x_211981;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_227526)[sext_i32_i64(local_tid_227522)] =\n                    0.0F;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (slt64((int64_t) 0, (int64_t) 3)) {\n            // perform segmented scan to imitate reduction\n            {\n                float x_211977;\n                float x_211978;\n                float x_227533;\n                float x_227534;\n                bool ltid_in_bounds_227536 =\n                     slt64(sext_i32_i64(local_tid_227522), (int64_t) 3 *\n                           squot64(segred_group_sizze_211970,\n                                   segment_sizze_nonzzero_227519));\n                int32_t skip_threads_227537;\n            ",
            "    \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_227536) {\n                        x_211978 = ((volatile __local\n                                     float *) red_arr_mem_227526)[sext_i32_i64(local_tid_227522)];\n                        if ((local_tid_227522 - squot32(local_tid_227522, 32) *\n                             32) == 0) {\n                            x_211977 = x_211978;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_227537 = 1;\n                    while (slt32(skip_threads_227537, 32)) {\n                        bool thread_active_227538 = sle32(skip_threads_227537,\n                                                          local_tid_227522 -\n                                                          squot32(local_tid_227522,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_227536;\n                        \n                        if (thread_active_227538) {\n                            // read operands\n                            {\n                                x_211977 = ((volatile __local\n                                             float *) red_arr_mem_227526)[sext_i32_i64(local_tid_227522) -\n                                                                          sext_i32_i64(skip_threads_227537)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_227539 =\n                                 slt64(srem64(sext_i32_i64(local_tid_227522),\n                                              (int64_t) 3),\n                                       sext_i32_i64(local_tid_227522) -\n                                       sext_i32_i64(local_tid_227522 -\n                                       ski",
            "p_threads_227537));\n                            \n                            if (thread_active_227538 && inactive_227539) {\n                                x_211977 = x_211978;\n                            }\n                            if (thread_active_227538) {\n                                if (!inactive_227539) {\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_227524, skip_threads_227537)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_227538) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227526)[sext_i32_i64(local_tid_227522)] =\n                                    x_211977;\n                                x_211978 = x_211977;\n                            }\n                        }\n                        if (sle32(wave_sizze_227524, skip_threads_227537)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_227537 *= 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_227522 - squot32(local_tid_227522, 32) *\n                         32) == 31 && ltid_in_bounds_227536) {\n                        ((volatile __local\n                          float *) red_arr_mem_227526)[sext_i32_i64(squot32(local_tid_227522,\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_227540;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_227522, 32) == 0 &&\n                            ltid_in_bounds_227536) {\n                            x_227534 = ((volatile __local\n                                         float *) red_arr_mem_227526)[sext_i32_i64(local_tid_227522)];\n                            if ((local_tid_227522 - squot32(local_tid_227522,\n                                                            32) * 32) == 0) {\n                                x_227533 = x_227534;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_227540 = 1;\n                        while (slt32(skip_threads_227540, 32)) {\n                            bool thread_active_227541 =\n                                 sle32(skip_threads_227540, local_tid_227522 -\n                                       squot32(local_tid_227522, 32) * 32) &&\n                                 (squot32(local_tid_227522, 32) == 0 &&\n                                  ltid_in_bounds_227536);\n                            \n                            if (thread_active_227541) {\n                                // read operands\n                                {\n                                    x_227533 = ((volatile __local\n                                                 float *) red_arr_mem_227526)[sext_i32_i64(local_tid_227522) -\n                                                                              sext_i32_i64(skip_threads_227540)];\n                                }\n                     ",
            "       }\n                            // perform operation\n                            {\n                                bool inactive_227542 =\n                                     slt64(srem64(sext_i32_i64(local_tid_227522 *\n                                                  32 + 32 - 1), (int64_t) 3),\n                                           sext_i32_i64(local_tid_227522 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_227522 -\n                                                         skip_threads_227540) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_227541 && inactive_227542) {\n                                    x_227533 = x_227534;\n                                }\n                                if (thread_active_227541) {\n                                    if (!inactive_227542) {\n                                        float defunc_1_op_res_227535 =\n                                              x_227533 + x_227534;\n                                        \n                                        x_227533 = defunc_1_op_res_227535;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_227524, skip_threads_227540)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_227541) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_227526)[sext_i32_i64(local_tid_227522)] =\n                                        x_227533;\n                                    x_227534 = x_227533;\n                                }\n                            }\n                            if (s",
            "le32(wave_sizze_227524, skip_threads_227540)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_227540 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_227543 = squot32(local_tid_227522, 32) == 0 ||\n                     !ltid_in_bounds_227536;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_227543) {\n                            x_211978 = x_211977;\n                            x_211977 = ((__local\n                                         float *) red_arr_mem_227526)[sext_i32_i64(squot32(local_tid_227522,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_227544 =\n                             slt64(srem64(sext_i32_i64(local_tid_227522),\n                                          (int64_t) 3),\n                                   sext_i32_i64(local_tid_227522) -\n                                   sext_i32_i64(squot32(local_tid_227522, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_227543) {\n                            if (inactive_227544) {\n                                x_211977 = x_211978;\n                            }\n                        }\n                        if (!no_carry_in_227543) {\n                            if (!inactive_227544) {\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_227543) {\n                            ((__local\n                              float *) red_arr_mem_227526)[sext_i32_i64(local_tid_227522)] =\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_227522, 32) == 0 &&\n                        ltid_in_bounds_227536) {\n                        ((__local\n                          float *) red_arr_mem_227526)[sext_i32_i64(local_tid_227522)] =\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_227530) *\n                      squot64(segred_group_sizze_211970,\n                              segment_sizze_nonzzero_227519) +\n                      sext_i32_i64(local_tid_227522), m_196691) &&\n                slt64(sext_i32_i64(local_tid_227522),\n                      squot64(segred_group_sizze_211970,\n                              segment_sizze_nonzzero_227519))) {\n                float tmp_227545;\n                \n                tmp_227545 = ((__local\n                               float *) red_arr_mem_227526)[(sext_i32_i64(local_tid_227522) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227519 -\n                                                            (int64_t) 1];\n                ((__global\n               ",
            "   float *) mem_223602)[sext_i32_i64(virt_group_id_227530) *\n                                       squot64(segred_group_sizze_211970,\n                                               segment_sizze_nonzzero_227519) +\n                                       sext_i32_i64(local_tid_227522)] =\n                    tmp_227545;\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                                        uint red_arr_mem_227741_backing_offset_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_227734,\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{\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    volatile unsigned char *red_arr_mem_227741_backing_0 =\n                           &shared_mem[red_arr_mem_227741_backing_offset_0];\n    \n    if (*global_failure >= 0)",
            "\n        return;\n    \n    int32_t global_tid_227736;\n    int32_t local_tid_227737;\n    int64_t group_sizze_227740;\n    int32_t wave_sizze_227739;\n    int32_t group_tid_227738;\n    \n    global_tid_227736 = get_global_id(0);\n    local_tid_227737 = get_local_id(0);\n    group_sizze_227740 = get_local_size(0);\n    wave_sizze_227739 = LOCKSTEP_WIDTH;\n    group_tid_227738 = get_group_id(0);\n    \n    int32_t phys_tid_212598 = global_tid_227736;\n    __local unsigned char *red_arr_mem_227741;\n    \n    red_arr_mem_227741 = (__local unsigned char *) red_arr_mem_227741_backing_0;\n    \n    int32_t phys_group_id_227743;\n    \n    phys_group_id_227743 = get_group_id(0);\n    for (int32_t i_227744 = 0; i_227744 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * l_n_m_196752,\n                                          squot64(segred_group_sizze_212591,\n                                                  segment_sizze_nonzzero_227734))) -\n                   phys_group_id_227743, sext_i64_i32(num_groups_212592));\n         i_227744++) {\n        int32_t virt_group_id_227745 = phys_group_id_227743 + i_227744 *\n                sext_i64_i32(num_groups_212592);\n        int64_t slice_227746 = l_n_m_196752;\n        int64_t slice_227747 = m_196691 * slice_227746;\n        int64_t gtid_212595 = squot64(squot64(sext_i32_i64(local_tid_227737),\n                                              segment_sizze_nonzzero_227734) +\n                                      sext_i32_i64(virt_group_id_227745) *\n                                      squot64(segred_group_sizze_212591,\n                                              segment_sizze_nonzzero_227734),\n                                      slice_227746);\n        int64_t remnant_227748 = squot64(sext_i32_i64(local_tid_227737),\n                                         segment_sizze_nonzzero_227734) +\n                sext_i32_i64(virt_group_id_227745) *\n                squot64(segred_group_sizze_212591,\n                        segment_sizze_nonzzero_227734) - gt",
            "id_212595 *\n                slice_227746;\n        int64_t gtid_212596 = remnant_227748;\n        int64_t remnant_227749 = remnant_227748 - gtid_212596;\n        int64_t gtid_212597 = srem64(sext_i32_i64(local_tid_227737),\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_227737),\n                                                         q_l_196697 *\n                                                         squot64(segred_group_sizze_212591,\n                                                                 segment_sizze_nonzzero_227734)))) {\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                f",
            "loat 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_227741)[sext_i32_i64(local_tid_227737)] =\n                        w_j_212626;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_227741)[sext_i32_i64(local_tid_227737)] =\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_227750;\n                float x_227751;\n                bool ltid_in_bounds_227753 =\n                     slt64(sext_i32_i64(local_tid_227737), q_l_196697 *\n                           squot64(segred_group_sizze_212591,\n                                   segment_sizze_nonzzero_227734));\n                int32_t skip_threads_227754;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_227753) {\n                        x_212600 = ((volatile __local\n                                     float *) red_arr_mem_227741)[sext_i32_i64(local_tid_227737)];\n                        if ((local_tid_227737 - squot32(local_tid_227737, 32) *\n                             32) == 0) {\n                            x_212599 = x_212600;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_227754 = 1;\n                    while (slt32(skip_threads_227754, 32)) {\n                        bool thread_active_227755 = sle32(skip_threads_227754,\n                                ",
            "                          local_tid_227737 -\n                                                          squot32(local_tid_227737,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_227753;\n                        \n                        if (thread_active_227755) {\n                            // read operands\n                            {\n                                x_212599 = ((volatile __local\n                                             float *) red_arr_mem_227741)[sext_i32_i64(local_tid_227737) -\n                                                                          sext_i32_i64(skip_threads_227754)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_227756 =\n                                 slt64(srem64(sext_i32_i64(local_tid_227737),\n                                              q_l_196697),\n                                       sext_i32_i64(local_tid_227737) -\n                                       sext_i32_i64(local_tid_227737 -\n                                       skip_threads_227754));\n                            \n                            if (thread_active_227755 && inactive_227756) {\n                                x_212599 = x_212600;\n                            }\n                            if (thread_active_227755) {\n                                if (!inactive_227756) {\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_227739, skip_threads_227754)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n ",
            "                       if (thread_active_227755) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227741)[sext_i32_i64(local_tid_227737)] =\n                                    x_212599;\n                                x_212600 = x_212599;\n                            }\n                        }\n                        if (sle32(wave_sizze_227739, skip_threads_227754)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_227754 *= 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_227737 - squot32(local_tid_227737, 32) *\n                         32) == 31 && ltid_in_bounds_227753) {\n                        ((volatile __local\n                          float *) red_arr_mem_227741)[sext_i32_i64(squot32(local_tid_227737,\n                                                                            32))] =\n                            x_212599;\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_227757;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_227737, 32) == 0 &&\n                            ltid_in_bounds_227753) {\n                            x_227751 = ((volatile __local\n                                         float *) red_arr_mem_227741)[sext_i32_i64(local_tid_227737)];\n                            if ((local_tid_227737 - squot32(local_tid_227737,\n                                                            32) * 32) == 0) {\n ",
            "                               x_227750 = x_227751;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_227757 = 1;\n                        while (slt32(skip_threads_227757, 32)) {\n                            bool thread_active_227758 =\n                                 sle32(skip_threads_227757, local_tid_227737 -\n                                       squot32(local_tid_227737, 32) * 32) &&\n                                 (squot32(local_tid_227737, 32) == 0 &&\n                                  ltid_in_bounds_227753);\n                            \n                            if (thread_active_227758) {\n                                // read operands\n                                {\n                                    x_227750 = ((volatile __local\n                                                 float *) red_arr_mem_227741)[sext_i32_i64(local_tid_227737) -\n                                                                              sext_i32_i64(skip_threads_227757)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_227759 =\n                                     slt64(srem64(sext_i32_i64(local_tid_227737 *\n                                                  32 + 32 - 1), q_l_196697),\n                                           sext_i32_i64(local_tid_227737 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_227737 -\n                                                         skip_threads_227757) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_227758 && inactive_227759) {\n                                    x_227750 = x",
            "_227751;\n                                }\n                                if (thread_active_227758) {\n                                    if (!inactive_227759) {\n                                        float defunc_1_op_res_227752 =\n                                              x_227750 + x_227751;\n                                        \n                                        x_227750 = defunc_1_op_res_227752;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_227739, skip_threads_227757)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_227758) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_227741)[sext_i32_i64(local_tid_227737)] =\n                                        x_227750;\n                                    x_227751 = x_227750;\n                                }\n                            }\n                            if (sle32(wave_sizze_227739, skip_threads_227757)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_227757 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_227760 = squot32(local_tid_227737, 32) == 0 ||\n                     !ltid_in_bounds_227753;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_227760) {\n                            x_212600 = x_212599;\n                            x_212599 = ((__local\n                                         float *) red_arr_",
            "mem_227741)[sext_i32_i64(squot32(local_tid_227737,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_227761 =\n                             slt64(srem64(sext_i32_i64(local_tid_227737),\n                                          q_l_196697),\n                                   sext_i32_i64(local_tid_227737) -\n                                   sext_i32_i64(squot32(local_tid_227737, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_227760) {\n                            if (inactive_227761) {\n                                x_212599 = x_212600;\n                            }\n                        }\n                        if (!no_carry_in_227760) {\n                            if (!inactive_227761) {\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_227760) {\n                            ((__local\n                              float *) red_arr_mem_227741)[sext_i32_i64(local_tid_227737)] =\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_227737, 32) == 0 &&\n                        ltid_in_bounds_227753) {\n                        ((__local\n                          f",
            "loat *) red_arr_mem_227741)[sext_i32_i64(local_tid_227737)] =\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_227745) *\n                      squot64(segred_group_sizze_212591,\n                              segment_sizze_nonzzero_227734) +\n                      sext_i32_i64(local_tid_227737), m_196691 *\n                      l_n_m_196752) && slt64(sext_i32_i64(local_tid_227737),\n                                             squot64(segred_group_sizze_212591,\n                                                     segment_sizze_nonzzero_227734))) {\n                float tmp_227762;\n                \n                tmp_227762 = ((__local\n                               float *) red_arr_mem_227741)[(sext_i32_i64(local_tid_227737) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227734 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223653)[squot64(sext_i32_i64(virt_group_id_227745) *\n                                               squot64(segred_group_sizze_212591,\n                                                       segment_sizze_nonzzero_227734) +\n                                               sext_i32_i64(local_tid_227737),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_227745) *\n                                        squot64(segred_group_sizze_212591,\n                                                segment_sizze_nonzzero_227734) +\n                                        sext_i32_i64(local_tid_227737) -\n                                        sq",
            "uot64(sext_i32_i64(virt_group_id_227745) *\n                                                squot64(segred_group_sizze_212591,\n                                                        segment_sizze_nonzzero_227734) +\n                                                sext_i32_i64(local_tid_227737),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_227762;\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                                        uint red_arr_mem_227823_backing_offset_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_222548,\n                                        int64_t segment_sizze_nonzzero_227816,\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    volatile unsigned char *red_arr_mem_227823_backing_0 =\n                           &shared_mem[red_arr_mem_227823_backing_offset_0];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227818;\n    int32_t local_tid_227819;\n    int64_t group_sizze_227822;\n    int32_t wave_sizze_227821;\n    int32_t group_tid_227820;\n    \n    global_tid_227818 = get_global_id(0);\n    local_tid_227819 = get_local_id(0);\n    group_sizze_227822 = get_local_size(0);\n    wave_sizze_227821 = LOCKSTEP_WIDTH;\n    group_tid_227820 = get_group_id(0);\n    \n    int32_t phys_tid_212647 = global_tid_227818;\n    __local unsigned char *red_arr_mem_227823;\n    \n    red_arr_mem_227823 = (__local unsigned char *) red_arr_mem_227823_backing_0;\n    \n    int32_t phys_group_id_227825;\n    \n    phys_group_id_227825 = get_group_id(0);\n    for (int32_t i_227826 = 0; i_227826 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * l_n_m_196752,\n                                          squot64(segred_group_sizze_212640,\n                                                  segment_sizze_nonzzero_227816))) -\n                   phys_group_id_227825, sext_i64_i32(num_groups_212641));\n         i_227826++) {\n        int32_t virt_group_id_227827 = phys_group_id_227825 + i_227826 *\n                sext_i64_i32(num_groups_212641);\n        int64_t slice_227828 = l_n_m_196752;\n        int64_t slice_227829 = m_196691 * slice_227828;\n        int64_t gtid_212644 = squot64(squot64(sext_i32_i64(local_tid_227819),\n                                              segment_sizze_nonzzero_227816) +\n                                      sext_i32_i64(virt_group_id_227827) *\n                                      squot64(segred_group_sizze_212640,\n                                              segment_sizze_nonzzero_227816),\n                                      slice_227828);\n        int64_t remnant_227830 = squot64(sext_i32_i64(local_tid_227819",
            "),\n                                         segment_sizze_nonzzero_227816) +\n                sext_i32_i64(virt_group_id_227827) *\n                squot64(segred_group_sizze_212640,\n                        segment_sizze_nonzzero_227816) - gtid_212644 *\n                slice_227828;\n        int64_t gtid_212645 = remnant_227830;\n        int64_t remnant_227831 = remnant_227830 - gtid_212645;\n        int64_t gtid_212646 = srem64(sext_i32_i64(local_tid_227819),\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_227819),\n                                                         q_l_196697 *\n                                                         squot64(segred_group_sizze_212640,\n                                                                 segment_sizze_nonzzero_227816)))) {\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_pr",
            "imexp_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_227823)[sext_i32_i64(local_tid_227819)] =\n                        defunc_9_fit_fun_res_212683;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_227823)[sext_i32_i64(local_tid_227819)] =\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_227832;\n                float x_227833;\n                bool ltid_in_bounds_227835 =\n                     slt64(sext_i32_i64(local_tid_227819), q_l_196697 *\n                           squot64(segred_group_sizze_212640,\n                                   segment_sizze_nonzzero_227816));\n                int32_t skip_threads_227836;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_227835) {\n                        x_212649 = ((volatile __local\n                                     float *) red_arr_mem_227823)[sext_i32_i64(local_tid_227819)];\n                        if ((local_tid_227819 - squot32(local_tid_227819, 32) *\n                             32) == 0) {\n                            x_212648 = x_212649;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_227836 = 1;\n                    while (slt32(skip_threads_227836, 32)) {\n                        bool thread_active_227837 = sle32(skip_threads_227836,\n                                                          local_tid_227819 -\n                                                          squot32(local_tid_227819,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_227835;\n                        \n                        if (thread_active_227837) {\n                            // read operands\n                            {\n                                x_212648 = ((volatile __local\n                                             float *) red_arr_mem_227823)[sext_i32_i64(local_ti",
            "d_227819) -\n                                                                          sext_i32_i64(skip_threads_227836)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_227838 =\n                                 slt64(srem64(sext_i32_i64(local_tid_227819),\n                                              q_l_196697),\n                                       sext_i32_i64(local_tid_227819) -\n                                       sext_i32_i64(local_tid_227819 -\n                                       skip_threads_227836));\n                            \n                            if (thread_active_227837 && inactive_227838) {\n                                x_212648 = x_212649;\n                            }\n                            if (thread_active_227837) {\n                                if (!inactive_227838) {\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_227821, skip_threads_227836)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_227837) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227823)[sext_i32_i64(local_tid_227819)] =\n                                    x_212648;\n                                x_212649 = x_212648;\n                            }\n                        }\n                        if (sle32(wave_sizze_227821, skip_threads_227836)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n      ",
            "                  }\n                        skip_threads_227836 *= 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_227819 - squot32(local_tid_227819, 32) *\n                         32) == 31 && ltid_in_bounds_227835) {\n                        ((volatile __local\n                          float *) red_arr_mem_227823)[sext_i32_i64(squot32(local_tid_227819,\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_227839;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_227819, 32) == 0 &&\n                            ltid_in_bounds_227835) {\n                            x_227833 = ((volatile __local\n                                         float *) red_arr_mem_227823)[sext_i32_i64(local_tid_227819)];\n                            if ((local_tid_227819 - squot32(local_tid_227819,\n                                                            32) * 32) == 0) {\n                                x_227832 = x_227833;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_227839 = 1;\n                        while (slt32(skip_threads_227839, 32)) {\n                            bool thread_active_227840 =\n                                 sle32(skip_threads_227839, local_tid_227819 -\n                                       squot32(local_tid_227819, 32) * 32) &&\n                      ",
            "           (squot32(local_tid_227819, 32) == 0 &&\n                                  ltid_in_bounds_227835);\n                            \n                            if (thread_active_227840) {\n                                // read operands\n                                {\n                                    x_227832 = ((volatile __local\n                                                 float *) red_arr_mem_227823)[sext_i32_i64(local_tid_227819) -\n                                                                              sext_i32_i64(skip_threads_227839)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_227841 =\n                                     slt64(srem64(sext_i32_i64(local_tid_227819 *\n                                                  32 + 32 - 1), q_l_196697),\n                                           sext_i32_i64(local_tid_227819 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_227819 -\n                                                         skip_threads_227839) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_227840 && inactive_227841) {\n                                    x_227832 = x_227833;\n                                }\n                                if (thread_active_227840) {\n                                    if (!inactive_227841) {\n                                        float defunc_1_op_res_227834 =\n                                              x_227832 + x_227833;\n                                        \n                                        x_227832 = defunc_1_op_res_227834;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_2",
            "27821, skip_threads_227839)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_227840) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_227823)[sext_i32_i64(local_tid_227819)] =\n                                        x_227832;\n                                    x_227833 = x_227832;\n                                }\n                            }\n                            if (sle32(wave_sizze_227821, skip_threads_227839)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_227839 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_227842 = squot32(local_tid_227819, 32) == 0 ||\n                     !ltid_in_bounds_227835;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_227842) {\n                            x_212649 = x_212648;\n                            x_212648 = ((__local\n                                         float *) red_arr_mem_227823)[sext_i32_i64(squot32(local_tid_227819,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_227843 =\n                             slt64(srem64(sext_i32_i64(local_tid_227819),\n                                          q_l_196697),\n                                   sext_i32_i64(l",
            "ocal_tid_227819) -\n                                   sext_i32_i64(squot32(local_tid_227819, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_227842) {\n                            if (inactive_227843) {\n                                x_212648 = x_212649;\n                            }\n                        }\n                        if (!no_carry_in_227842) {\n                            if (!inactive_227843) {\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_227842) {\n                            ((__local\n                              float *) red_arr_mem_227823)[sext_i32_i64(local_tid_227819)] =\n                                x_212648;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_227819, 32) == 0 &&\n                        ltid_in_bounds_227835) {\n                        ((__local\n                          float *) red_arr_mem_227823)[sext_i32_i64(local_tid_227819)] =\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_227827) *\n                      squot64(segred_group_sizze_212640,\n                              segment_sizze_nonzzero_227816) +\n                      sext_i32_i64(local_tid_227819), m_196691 *\n                      l_n_",
            "m_196752) && slt64(sext_i32_i64(local_tid_227819),\n                                             squot64(segred_group_sizze_212640,\n                                                     segment_sizze_nonzzero_227816))) {\n                float tmp_227844;\n                \n                tmp_227844 = ((__local\n                               float *) red_arr_mem_227823)[(sext_i32_i64(local_tid_227819) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227816 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223663)[squot64(sext_i32_i64(virt_group_id_227827) *\n                                               squot64(segred_group_sizze_212640,\n                                                       segment_sizze_nonzzero_227816) +\n                                               sext_i32_i64(local_tid_227819),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_227827) *\n                                        squot64(segred_group_sizze_212640,\n                                                segment_sizze_nonzzero_227816) +\n                                        sext_i32_i64(local_tid_227819) -\n                                        squot64(sext_i32_i64(virt_group_id_227827) *\n                                                squot64(segred_group_sizze_212640,\n                                                        segment_sizze_nonzzero_227816) +\n                                                sext_i32_i64(local_tid_227819),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_227844;\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                                        uint red_arr_mem_227953_backing_offset_0,\n                                        uint red_arr_mem_227951_backing_offset_1,\n                                        uint red_arr_mem_227949_backing_offset_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_227942,\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{\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    volatile unsigned char *red_arr_mem_227953_backing_2 =\n                           &shared_mem[red_arr_mem_227953_backing_offset_0];\n    volatile unsigned char *red_arr_mem_227951_backing_1 =\n                           &shared_mem[red_arr_mem_227951_backing_offset_1];\n    volatile unsigned char *red_arr_mem_227949_backing_0 =\n    ",
            "                       &shared_mem[red_arr_mem_227949_backing_offset_2];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227944;\n    int32_t local_tid_227945;\n    int64_t group_sizze_227948;\n    int32_t wave_sizze_227947;\n    int32_t group_tid_227946;\n    \n    global_tid_227944 = get_global_id(0);\n    local_tid_227945 = get_local_id(0);\n    group_sizze_227948 = get_local_size(0);\n    wave_sizze_227947 = LOCKSTEP_WIDTH;\n    group_tid_227946 = get_group_id(0);\n    \n    int32_t phys_tid_213427 = global_tid_227944;\n    __local unsigned char *red_arr_mem_227949;\n    \n    red_arr_mem_227949 = (__local unsigned char *) red_arr_mem_227949_backing_0;\n    \n    __local unsigned char *red_arr_mem_227951;\n    \n    red_arr_mem_227951 = (__local unsigned char *) red_arr_mem_227951_backing_1;\n    \n    __local unsigned char *red_arr_mem_227953;\n    \n    red_arr_mem_227953 = (__local unsigned char *) red_arr_mem_227953_backing_2;\n    \n    int32_t phys_group_id_227955;\n    \n    phys_group_id_227955 = get_group_id(0);\n    for (int32_t i_227956 = 0; i_227956 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * l_n_m_196752,\n                                          squot64(segred_group_sizze_213418,\n                                                  segment_sizze_nonzzero_227942))) -\n                   phys_group_id_227955, sext_i64_i32(num_groups_213419));\n         i_227956++) {\n        int32_t virt_group_id_227957 = phys_group_id_227955 + i_227956 *\n                sext_i64_i32(num_groups_213419);\n        int64_t slice_227958 = l_n_m_196752;\n        int64_t slice_227959 = m_196691 * slice_227958;\n        int64_t gtid_213424 = squot64(squot64(sext_i32_i64(local_tid_227945),\n                                              segment_sizze_nonzzero_227942) +\n                                      sext_i32_i64(virt_group_id_227957) *\n                                      squot64(segred_group_sizze_213418,\n                                              segment_sizz",
            "e_nonzzero_227942),\n                                      slice_227958);\n        int64_t remnant_227960 = squot64(sext_i32_i64(local_tid_227945),\n                                         segment_sizze_nonzzero_227942) +\n                sext_i32_i64(virt_group_id_227957) *\n                squot64(segred_group_sizze_213418,\n                        segment_sizze_nonzzero_227942) - gtid_213424 *\n                slice_227958;\n        int64_t gtid_213425 = remnant_227960;\n        int64_t remnant_227961 = remnant_227960 - gtid_213425;\n        int64_t gtid_213426 = srem64(sext_i32_i64(local_tid_227945),\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_227945),\n                                                         q_l_196697 *\n                                                         squot64(segred_group_sizze_213418,\n                                                                 segment_sizze_nonzzero_227942)))) {\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                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_227949)[sext_i32_i64(local_tid_227945)] =\n                        w_j_213461;\n                    ((__local\n                      float *) red_arr_mem_227951)[sext_i32_i64(local_tid_227945)] =\n                        xw_j_213462;\n                    ((__local\n                      float *) red_arr_mem_227953)[sext_i32_i64(local_tid_227945)] =\n                        x2w_j_213463;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_227949)[sext_i32_i64(local_tid_227945)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_227951)[sext_i32_i64(local_tid_227945)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_227953)[sext_i32_i64(local_tid_227945)] =\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_227962;\n                float x_227963;\n                float x_227964;\n                float x_227965;\n                float x_227966;\n                float x_227967;\n                bool ltid_in_bounds_227971 =\n                     slt64(sext_i32_i64(local_tid_227945), q_l_196697 *\n                           squot64(segred_group_sizze_213418,\n                                   segment_sizze_nonzzero_227942));\n                int32_t skip_threads_227972;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_227971) {\n                        x_213431 = ((volatile __local\n                                     float *) red_arr_mem_227949)[sext_i32_i64(local_tid_227945)];\n                        x_213432 = ((volatile __local\n                                     float *) red_arr_mem_227951)[sext_i32_i64(local_tid_227945)];\n                        x_213433 = ((volatile __local\n                                     float *) red_arr_mem_227953)[sext_i32_i64(local_tid_227945)];\n                        if ((local_tid_227945 - squot32(local_tid_227945, 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_227972 = 1;\n                    while (slt32(skip_threads_227972, 32)) {\n                        bool thread_active_227973 = sle32(skip_threads_227972,\n                                                          local_tid_227945 -\n                                                          squot32(local_tid_227945,\n                                                                  32) * 32) &&\n                             lti",
            "d_in_bounds_227971;\n                        \n                        if (thread_active_227973) {\n                            // read operands\n                            {\n                                x_213428 = ((volatile __local\n                                             float *) red_arr_mem_227949)[sext_i32_i64(local_tid_227945) -\n                                                                          sext_i32_i64(skip_threads_227972)];\n                                x_213429 = ((volatile __local\n                                             float *) red_arr_mem_227951)[sext_i32_i64(local_tid_227945) -\n                                                                          sext_i32_i64(skip_threads_227972)];\n                                x_213430 = ((volatile __local\n                                             float *) red_arr_mem_227953)[sext_i32_i64(local_tid_227945) -\n                                                                          sext_i32_i64(skip_threads_227972)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_227974 =\n                                 slt64(srem64(sext_i32_i64(local_tid_227945),\n                                              q_l_196697),\n                                       sext_i32_i64(local_tid_227945) -\n                                       sext_i32_i64(local_tid_227945 -\n                                       skip_threads_227972));\n                            \n                            if (thread_active_227973 && inactive_227974) {\n                                x_213428 = x_213431;\n                                x_213429 = x_213432;\n                                x_213430 = x_213433;\n                            }\n                            if (thread_active_227973) {\n                                if (!inactive_227974) {\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_227947, skip_threads_227972)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_227973) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227949)[sext_i32_i64(local_tid_227945)] =\n                                    x_213428;\n                                x_213431 = x_213428;\n                                ((volatile __local\n                                  float *) red_arr_mem_227951)[sext_i32_i64(local_tid_227945)] =\n                                    x_213429;\n                                x_213432 = x_213429;\n                                ((volatile __local\n                                  float *) red_arr_mem_227953)[sext_i32_i64(local_tid_227945)] =\n                                    x_213430;\n                                x_213433 = x_213430;\n                            }\n                        }\n                        if (sle32(wave_sizze_227947, skip_threads_227972)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_227972 *= 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_227945 - squot32(local_tid_227945, 32) *\n                         32) == 31 && ltid_in_bounds_227971) {\n                        ((volatile __local\n                          float *) red_arr_mem_227949)[sext_i32_i64(squot32(local_tid_227945,\n                                                                            32))] =\n                            x_213428;\n                        ((volatile __local\n                          float *) red_arr_mem_227951)[sext_i32_i64(squot32(local_tid_227945,\n                                                                            32))] =\n                            x_213429;\n                        ((volatile __local\n                          float *) red_arr_mem_227953)[sext_i32_i64(squot32(local_tid_227945,\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_227975;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_227945, 32) == 0 &&\n                            ltid_in_bounds_227971) {\n                            x_227965 = ((volatile __local\n                                         float *) red_arr_mem_227949)[sext_i32_i64(local_tid_227945)];\n                            x_227966 = ((volatile __local\n                                         float *) red_arr_mem_227951)[sext_i32_i64(local_tid_227945)];\n                            x_227967 = ((volatile __local\n                                         float *) red_arr_mem_227953)[sext_i32_i64(local_tid_227945)",
            "];\n                            if ((local_tid_227945 - squot32(local_tid_227945,\n                                                            32) * 32) == 0) {\n                                x_227962 = x_227965;\n                                x_227963 = x_227966;\n                                x_227964 = x_227967;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_227975 = 1;\n                        while (slt32(skip_threads_227975, 32)) {\n                            bool thread_active_227976 =\n                                 sle32(skip_threads_227975, local_tid_227945 -\n                                       squot32(local_tid_227945, 32) * 32) &&\n                                 (squot32(local_tid_227945, 32) == 0 &&\n                                  ltid_in_bounds_227971);\n                            \n                            if (thread_active_227976) {\n                                // read operands\n                                {\n                                    x_227962 = ((volatile __local\n                                                 float *) red_arr_mem_227949)[sext_i32_i64(local_tid_227945) -\n                                                                              sext_i32_i64(skip_threads_227975)];\n                                    x_227963 = ((volatile __local\n                                                 float *) red_arr_mem_227951)[sext_i32_i64(local_tid_227945) -\n                                                                              sext_i32_i64(skip_threads_227975)];\n                                    x_227964 = ((volatile __local\n                                                 float *) red_arr_mem_227953)[sext_i32_i64(local_tid_227945) -\n                                                                              sext_i32_i64(skip_threads_227975)];\n                ",
            "                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_227977 =\n                                     slt64(srem64(sext_i32_i64(local_tid_227945 *\n                                                  32 + 32 - 1), q_l_196697),\n                                           sext_i32_i64(local_tid_227945 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_227945 -\n                                                         skip_threads_227975) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_227976 && inactive_227977) {\n                                    x_227962 = x_227965;\n                                    x_227963 = x_227966;\n                                    x_227964 = x_227967;\n                                }\n                                if (thread_active_227976) {\n                                    if (!inactive_227977) {\n                                        float defunc_1_op_res_227968 =\n                                              x_227962 + x_227965;\n                                        float defunc_1_op_res_227969 =\n                                              x_227963 + x_227966;\n                                        float defunc_1_op_res_227970 =\n                                              x_227964 + x_227967;\n                                        \n                                        x_227962 = defunc_1_op_res_227968;\n                                        x_227963 = defunc_1_op_res_227969;\n                                        x_227964 = defunc_1_op_res_227970;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_227947, skip_threads_227975)) {\n            ",
            "                    barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_227976) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_227949)[sext_i32_i64(local_tid_227945)] =\n                                        x_227962;\n                                    x_227965 = x_227962;\n                                    ((volatile __local\n                                      float *) red_arr_mem_227951)[sext_i32_i64(local_tid_227945)] =\n                                        x_227963;\n                                    x_227966 = x_227963;\n                                    ((volatile __local\n                                      float *) red_arr_mem_227953)[sext_i32_i64(local_tid_227945)] =\n                                        x_227964;\n                                    x_227967 = x_227964;\n                                }\n                            }\n                            if (sle32(wave_sizze_227947, skip_threads_227975)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_227975 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_227978 = squot32(local_tid_227945, 32) == 0 ||\n                     !ltid_in_bounds_227971;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_227978) {\n                            x_213431 = x_213428;\n                            x_213432 = x_213429;\n                            x_213433 = x_213430;\n                            x_213428 = ((__local\n                                         float",
            " *) red_arr_mem_227949)[sext_i32_i64(squot32(local_tid_227945,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_213429 = ((__local\n                                         float *) red_arr_mem_227951)[sext_i32_i64(squot32(local_tid_227945,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_213430 = ((__local\n                                         float *) red_arr_mem_227953)[sext_i32_i64(squot32(local_tid_227945,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_227979 =\n                             slt64(srem64(sext_i32_i64(local_tid_227945),\n                                          q_l_196697),\n                                   sext_i32_i64(local_tid_227945) -\n                                   sext_i32_i64(squot32(local_tid_227945, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_227978) {\n                            if (inactive_227979) {\n                                x_213428 = x_213431;\n                                x_213429 = x_213432;\n                                x_213430 = x_213433;\n                            }\n                        }\n                        if (!no_carry_in_227978) {\n                            if (!inactive_227979) {\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_227978) {\n                            ((__local\n                              float *) red_arr_mem_227949)[sext_i32_i64(local_tid_227945)] =\n                                x_213428;\n                            ((__local\n                              float *) red_arr_mem_227951)[sext_i32_i64(local_tid_227945)] =\n                                x_213429;\n                            ((__local\n                              float *) red_arr_mem_227953)[sext_i32_i64(local_tid_227945)] =\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_227945, 32) == 0 &&\n                        ltid_in_bounds_227971) {\n                        ((__local\n                          float *) red_arr_mem_227949)[sext_i32_i64(local_tid_227945)] =\n                            x_213431;\n                        ((__local\n                          float *) red_arr_mem_227951)[sext_i32_i64(local_tid_227945)] =\n                            x_213432;\n                        ((__local\n                          float *) red_arr_mem_227953)[sext_i32_i64(local_tid_227945)] =\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_227957) *\n                      squot64(segred_group_sizze_213418,\n                              segment_sizze_nonzzero_227942) +\n                      sext_i32_i64(local_tid_227945), m_196691 *\n                      l_n_m_196752) && slt64(sext_i32_i64(local_tid_227945),\n                                             squot64(segred_group_sizze_213418,\n                                                     segment_sizze_nonzzero_227942))) {\n                float tmp_227980;\n                \n                tmp_227980 = ((__local\n                               float *) red_arr_mem_227949)[(sext_i32_i64(local_tid_227945) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227942 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223733)[squot64(sext_i32_i64(virt_group_id_227957) *\n                                               squot64(segred_group_sizze_213418,\n                                                       segment_sizze_nonzzero_227942) +\n                                               sext_i32_i64(local_tid_227945),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_227957) *\n                                        squot64(segred_group_sizze_213418,\n                                                segment_sizze_nonzzero_227942) +\n                                        sext_i32_i64(local_tid_227945) -\n                                        squot64(sext_i32_i64(virt_group_id_227957) *\n                                                squot64(segred_group_sizze_213418,\n                              ",
            "                          segment_sizze_nonzzero_227942) +\n                                                sext_i32_i64(local_tid_227945),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_227980;\n                \n                float tmp_227981;\n                \n                tmp_227981 = ((__local\n                               float *) red_arr_mem_227951)[(sext_i32_i64(local_tid_227945) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227942 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223737)[squot64(sext_i32_i64(virt_group_id_227957) *\n                                               squot64(segred_group_sizze_213418,\n                                                       segment_sizze_nonzzero_227942) +\n                                               sext_i32_i64(local_tid_227945),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_227957) *\n                                        squot64(segred_group_sizze_213418,\n                                                segment_sizze_nonzzero_227942) +\n                                        sext_i32_i64(local_tid_227945) -\n                                        squot64(sext_i32_i64(virt_group_id_227957) *\n                                                squot64(segred_group_sizze_213418,\n                                                        segment_sizze_nonzzero_227942) +\n                                                sext_i32_i64(local_tid_227945),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_227981;\n                \n                float tmp_227982;\n                \n                tmp_227982 = ((__local\n    ",
            "                           float *) red_arr_mem_227953)[(sext_i32_i64(local_tid_227945) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227942 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223741)[squot64(sext_i32_i64(virt_group_id_227957) *\n                                               squot64(segred_group_sizze_213418,\n                                                       segment_sizze_nonzzero_227942) +\n                                               sext_i32_i64(local_tid_227945),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_227957) *\n                                        squot64(segred_group_sizze_213418,\n                                                segment_sizze_nonzzero_227942) +\n                                        sext_i32_i64(local_tid_227945) -\n                                        squot64(sext_i32_i64(virt_group_id_227957) *\n                                                squot64(segred_group_sizze_213418,\n                                                        segment_sizze_nonzzero_227942) +\n                                                sext_i32_i64(local_tid_227945),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_227982;\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                                        uint red_arr_mem_228061_backing_offset_0,\n                                        uint red_arr_mem_228059_backing_offset_1,\n                                        int6",
            "4_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_228052,\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{\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    volatile unsigned char *red_arr_mem_228061_backing_1 =\n                           &shared_mem[red_arr_mem_228061_backing_offset_0];\n    volatile unsigned char *red_arr_mem_228059_backing_0 =\n                           &shared_mem[red_arr_mem_228059_backing_offset_1];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228054;\n    int32_t local_tid_228055;\n    int64_t group_sizze_228058;\n    int32_t wave_sizze_228057;\n    int32_t group_tid_228056;\n    \n    global_tid_",
            "228054 = get_global_id(0);\n    local_tid_228055 = get_local_id(0);\n    group_sizze_228058 = get_local_size(0);\n    wave_sizze_228057 = LOCKSTEP_WIDTH;\n    group_tid_228056 = get_group_id(0);\n    \n    int32_t phys_tid_213496 = global_tid_228054;\n    __local unsigned char *red_arr_mem_228059;\n    \n    red_arr_mem_228059 = (__local unsigned char *) red_arr_mem_228059_backing_0;\n    \n    __local unsigned char *red_arr_mem_228061;\n    \n    red_arr_mem_228061 = (__local unsigned char *) red_arr_mem_228061_backing_1;\n    \n    int32_t phys_group_id_228063;\n    \n    phys_group_id_228063 = get_group_id(0);\n    for (int32_t i_228064 = 0; i_228064 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * l_n_m_196752,\n                                          squot64(segred_group_sizze_213488,\n                                                  segment_sizze_nonzzero_228052))) -\n                   phys_group_id_228063, sext_i64_i32(num_groups_213489));\n         i_228064++) {\n        int32_t virt_group_id_228065 = phys_group_id_228063 + i_228064 *\n                sext_i64_i32(num_groups_213489);\n        int64_t slice_228066 = l_n_m_196752;\n        int64_t slice_228067 = m_196691 * slice_228066;\n        int64_t gtid_213493 = squot64(squot64(sext_i32_i64(local_tid_228055),\n                                              segment_sizze_nonzzero_228052) +\n                                      sext_i32_i64(virt_group_id_228065) *\n                                      squot64(segred_group_sizze_213488,\n                                              segment_sizze_nonzzero_228052),\n                                      slice_228066);\n        int64_t remnant_228068 = squot64(sext_i32_i64(local_tid_228055),\n                                         segment_sizze_nonzzero_228052) +\n                sext_i32_i64(virt_group_id_228065) *\n                squot64(segred_group_sizze_213488,\n                        segment_sizze_nonzzero_228052) - gtid_213493 *\n                slice_228066;\n        int64_t ",
            "gtid_213494 = remnant_228068;\n        int64_t remnant_228069 = remnant_228068 - gtid_213494;\n        int64_t gtid_213495 = srem64(sext_i32_i64(local_tid_228055),\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_228055),\n                                                         q_l_196697 *\n                                                         squot64(segred_group_sizze_213488,\n                                                                 segment_sizze_nonzzero_228052)))) {\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_1",
            "96752 +\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(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 = defu",
            "nc_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_228059)[sext_i32_i64(local_tid_228055)] =\n                        defunc_9_fit_fun_res_213542;\n                    ((__local\n                      float *) red_arr_mem_228061)[sext_i32_i64(local_tid_228055)] =\n                        defunc_9_slope_fun_res_213546;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_228059)[sext_i32_i64(local_tid_228055)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_228061)[sext_i32_i64(local_tid_228055)] =\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_228070;\n                float x_228071;\n                float x_228072;\n                float x_228073;\n                bool ltid_in_bounds_228076 =\n                     slt64(sext_i32_i64(local_tid_228055), q_l_196697 *\n                           squot64(segred_group_sizze_213488,\n                                   segment_sizze_nonzzero_228052));\n                int32_t skip_threads_228077;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_228076) {\n           ",
            "             x_213499 = ((volatile __local\n                                     float *) red_arr_mem_228059)[sext_i32_i64(local_tid_228055)];\n                        x_213500 = ((volatile __local\n                                     float *) red_arr_mem_228061)[sext_i32_i64(local_tid_228055)];\n                        if ((local_tid_228055 - squot32(local_tid_228055, 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_228077 = 1;\n                    while (slt32(skip_threads_228077, 32)) {\n                        bool thread_active_228078 = sle32(skip_threads_228077,\n                                                          local_tid_228055 -\n                                                          squot32(local_tid_228055,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_228076;\n                        \n                        if (thread_active_228078) {\n                            // read operands\n                            {\n                                x_213497 = ((volatile __local\n                                             float *) red_arr_mem_228059)[sext_i32_i64(local_tid_228055) -\n                                                                          sext_i32_i64(skip_threads_228077)];\n                                x_213498 = ((volatile __local\n                                             float *) red_arr_mem_228061)[sext_i32_i64(local_tid_228055) -\n                                                                          sext_i32_i64(skip_threads_228077)];\n                            }\n                        }\n                        // perform operation\n                        {\n                        ",
            "    bool inactive_228079 =\n                                 slt64(srem64(sext_i32_i64(local_tid_228055),\n                                              q_l_196697),\n                                       sext_i32_i64(local_tid_228055) -\n                                       sext_i32_i64(local_tid_228055 -\n                                       skip_threads_228077));\n                            \n                            if (thread_active_228078 && inactive_228079) {\n                                x_213497 = x_213499;\n                                x_213498 = x_213500;\n                            }\n                            if (thread_active_228078) {\n                                if (!inactive_228079) {\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_228057, skip_threads_228077)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_228078) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228059)[sext_i32_i64(local_tid_228055)] =\n                                    x_213497;\n                                x_213499 = x_213497;\n                                ((volatile __local\n                                  float *) red_arr_mem_228061)[sext_i32_i64(local_tid_228055)] =\n                                    x_213498;\n                      ",
            "          x_213500 = x_213498;\n                            }\n                        }\n                        if (sle32(wave_sizze_228057, skip_threads_228077)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_228077 *= 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_228055 - squot32(local_tid_228055, 32) *\n                         32) == 31 && ltid_in_bounds_228076) {\n                        ((volatile __local\n                          float *) red_arr_mem_228059)[sext_i32_i64(squot32(local_tid_228055,\n                                                                            32))] =\n                            x_213497;\n                        ((volatile __local\n                          float *) red_arr_mem_228061)[sext_i32_i64(squot32(local_tid_228055,\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_228080;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_228055, 32) == 0 &&\n                            ltid_in_bounds_228076) {\n                            x_228072 = ((volatile __local\n                                         float *) red_arr_mem_228059)[sext_i32_i64(local_tid_228055)];\n                            x_228073 = ((volatile __local\n                                         float *) red_arr_mem_228061)[sext_i32_i64(local_tid_228055)];\n                            if ((local_tid_228055 - squot32(local_tid_228055,\n",
            "                                                            32) * 32) == 0) {\n                                x_228070 = x_228072;\n                                x_228071 = x_228073;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_228080 = 1;\n                        while (slt32(skip_threads_228080, 32)) {\n                            bool thread_active_228081 =\n                                 sle32(skip_threads_228080, local_tid_228055 -\n                                       squot32(local_tid_228055, 32) * 32) &&\n                                 (squot32(local_tid_228055, 32) == 0 &&\n                                  ltid_in_bounds_228076);\n                            \n                            if (thread_active_228081) {\n                                // read operands\n                                {\n                                    x_228070 = ((volatile __local\n                                                 float *) red_arr_mem_228059)[sext_i32_i64(local_tid_228055) -\n                                                                              sext_i32_i64(skip_threads_228080)];\n                                    x_228071 = ((volatile __local\n                                                 float *) red_arr_mem_228061)[sext_i32_i64(local_tid_228055) -\n                                                                              sext_i32_i64(skip_threads_228080)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_228082 =\n                                     slt64(srem64(sext_i32_i64(local_tid_228055 *\n                                                  32 + 32 - 1), q_l_196697),\n                                           sext_i32_i64(local_tid_228055 * 32 +\n    ",
            "                                       32 - 1) -\n                                           sext_i32_i64((local_tid_228055 -\n                                                         skip_threads_228080) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_228081 && inactive_228082) {\n                                    x_228070 = x_228072;\n                                    x_228071 = x_228073;\n                                }\n                                if (thread_active_228081) {\n                                    if (!inactive_228082) {\n                                        float defunc_1_op_res_228074 =\n                                              x_228070 + x_228072;\n                                        float defunc_1_op_res_228075 =\n                                              x_228071 + x_228073;\n                                        \n                                        x_228070 = defunc_1_op_res_228074;\n                                        x_228071 = defunc_1_op_res_228075;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_228057, skip_threads_228080)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_228081) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_228059)[sext_i32_i64(local_tid_228055)] =\n                                        x_228070;\n                                    x_228072 = x_228070;\n                                    ((volatile __local\n                                      float *) red_arr_mem_228061)[sext_i32_i64(local_tid_228055)] =\n                                        x_228071;\n        ",
            "                            x_228073 = x_228071;\n                                }\n                            }\n                            if (sle32(wave_sizze_228057, skip_threads_228080)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_228080 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_228083 = squot32(local_tid_228055, 32) == 0 ||\n                     !ltid_in_bounds_228076;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_228083) {\n                            x_213499 = x_213497;\n                            x_213500 = x_213498;\n                            x_213497 = ((__local\n                                         float *) red_arr_mem_228059)[sext_i32_i64(squot32(local_tid_228055,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_213498 = ((__local\n                                         float *) red_arr_mem_228061)[sext_i32_i64(squot32(local_tid_228055,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_228084 =\n                             slt64(srem64(sext_i32_i64(local_tid_228055),\n                                          q_l_196697),\n                                   sext_i32_i64(local_tid_228055) -\n                                   sext_i32_i64(squot32(local_tid_2",
            "28055, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_228083) {\n                            if (inactive_228084) {\n                                x_213497 = x_213499;\n                                x_213498 = x_213500;\n                            }\n                        }\n                        if (!no_carry_in_228083) {\n                            if (!inactive_228084) {\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                    // write final result\n                    {\n                        if (!no_carry_in_228083) {\n                            ((__local\n                              float *) red_arr_mem_228059)[sext_i32_i64(local_tid_228055)] =\n                                x_213497;\n                            ((__local\n                              float *) red_arr_mem_228061)[sext_i32_i64(local_tid_228055)] =\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_228055, 32) == 0 &&\n                        ltid_in_bounds_228076) {\n                        ((__local\n                          float *) red_arr_mem_228059)[sext_i32_i64(local_tid_228055)] =\n                            x_213499;\n                        ((__local\n                          float *) red_arr_mem_228061)[sext_i32_i64(local_tid_228055)] =\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_228065) *\n                      squot64(segred_group_sizze_213488,\n                              segment_sizze_nonzzero_228052) +\n                      sext_i32_i64(local_tid_228055), m_196691 *\n                      l_n_m_196752) && slt64(sext_i32_i64(local_tid_228055),\n                                             squot64(segred_group_sizze_213488,\n                                                     segment_sizze_nonzzero_228052))) {\n                float tmp_228085;\n                \n                tmp_228085 = ((__local\n                               float *) red_arr_mem_228059)[(sext_i32_i64(local_tid_228055) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228052 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223759)[squot64(sext_i32_i64(virt_group_id_228065) *\n                                               squot64(segred_group_sizze_213488,\n                                                       segment_sizze_nonzzero_228052) +\n                                               sext_i32_i64(local_tid_228055),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_228065) *\n                                        squot64(segred_group_sizze_213488,\n                                                segment_sizze_nonzzero_228052) +\n                                        sext_i32_i64(local_tid_228055) -\n                                        squot64(sext_i32_i64(virt_group_id_228065) *\n                                    ",
            "            squot64(segred_group_sizze_213488,\n                                                        segment_sizze_nonzzero_228052) +\n                                                sext_i32_i64(local_tid_228055),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_228085;\n                \n                float tmp_228086;\n                \n                tmp_228086 = ((__local\n                               float *) red_arr_mem_228061)[(sext_i32_i64(local_tid_228055) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228052 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223763)[squot64(sext_i32_i64(virt_group_id_228065) *\n                                               squot64(segred_group_sizze_213488,\n                                                       segment_sizze_nonzzero_228052) +\n                                               sext_i32_i64(local_tid_228055),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_228065) *\n                                        squot64(segred_group_sizze_213488,\n                                                segment_sizze_nonzzero_228052) +\n                                        sext_i32_i64(local_tid_228055) -\n                                        squot64(sext_i32_i64(virt_group_id_228065) *\n                                                squot64(segred_group_sizze_213488,\n                                                        segment_sizze_nonzzero_228052) +\n                                                sext_i32_i64(local_tid_228055),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_228086;\n            }\n        }\n        ba",
            "rrier(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                                        uint red_arr_mem_228211_backing_offset_0,\n                                        uint red_arr_mem_228209_backing_offset_1,\n                                        uint red_arr_mem_228207_backing_offset_2,\n                                        uint red_arr_mem_228205_backing_offset_3,\n                                        uint red_arr_mem_228203_backing_offset_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_228196,\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_s",
            "izze_214092)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    volatile unsigned char *red_arr_mem_228211_backing_4 =\n                           &shared_mem[red_arr_mem_228211_backing_offset_0];\n    volatile unsigned char *red_arr_mem_228209_backing_3 =\n                           &shared_mem[red_arr_mem_228209_backing_offset_1];\n    volatile unsigned char *red_arr_mem_228207_backing_2 =\n                           &shared_mem[red_arr_mem_228207_backing_offset_2];\n    volatile unsigned char *red_arr_mem_228205_backing_1 =\n                           &shared_mem[red_arr_mem_228205_backing_offset_3];\n    volatile unsigned char *red_arr_mem_228203_backing_0 =\n                           &shared_mem[red_arr_mem_228203_backing_offset_4];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228198;\n    int32_t local_tid_228199;\n    int64_t group_sizze_228202;\n    int32_t wave_sizze_228201;\n    int32_t group_tid_228200;\n    \n    global_tid_228198 = get_global_id(0);\n    local_tid_228199 = get_local_id(0);\n    group_sizze_228202 = get_local_size(0);\n    wave_sizze_228201 = LOCKSTEP_WIDTH;\n    group_tid_228200 = get_group_id(0);\n    \n    int32_t phys_tid_214506 = global_tid_228198;\n    __local unsigned char *red_arr_mem_228203;\n    \n    red_arr_mem_228203 = (__local unsigned char *) red_arr_mem_228203_backing_0;\n    \n    __local unsigned char *red_arr_mem_228205;\n    \n    red_arr_mem_228205 = (__local unsigned char *) red_arr_mem_228205_backing_1;\n    \n    __local unsigned char *red_arr_mem_228207;\n    \n    red_arr_mem_228207 = (__local unsigned char *) red_arr_mem_228207_backing_2;\n    \n    __local unsigned char *red_arr_mem_228209;\n    \n    red_arr_mem_228209 = (__local unsigned char *) red_arr_mem_228209_backing_3;\n    \n    __local unsigned char *red_arr_mem_228211;\n    \n    red_arr_mem_228211 = (__local unsigned char *) red_arr_mem_228211_backing_4;\n    \n    int32_t phys_group_id_228213;\n    \n    phys",
            "_group_id_228213 = get_group_id(0);\n    for (int32_t i_228214 = 0; i_228214 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * l_n_m_196752,\n                                          squot64(segred_group_sizze_214495,\n                                                  segment_sizze_nonzzero_228196))) -\n                   phys_group_id_228213, sext_i64_i32(num_groups_214496));\n         i_228214++) {\n        int32_t virt_group_id_228215 = phys_group_id_228213 + i_228214 *\n                sext_i64_i32(num_groups_214496);\n        int64_t slice_228216 = l_n_m_196752;\n        int64_t slice_228217 = m_196691 * slice_228216;\n        int64_t gtid_214503 = squot64(squot64(sext_i32_i64(local_tid_228199),\n                                              segment_sizze_nonzzero_228196) +\n                                      sext_i32_i64(virt_group_id_228215) *\n                                      squot64(segred_group_sizze_214495,\n                                              segment_sizze_nonzzero_228196),\n                                      slice_228216);\n        int64_t remnant_228218 = squot64(sext_i32_i64(local_tid_228199),\n                                         segment_sizze_nonzzero_228196) +\n                sext_i32_i64(virt_group_id_228215) *\n                squot64(segred_group_sizze_214495,\n                        segment_sizze_nonzzero_228196) - gtid_214503 *\n                slice_228216;\n        int64_t gtid_214504 = remnant_228218;\n        int64_t remnant_228219 = remnant_228218 - gtid_214504;\n        int64_t gtid_214505 = srem64(sext_i32_i64(local_tid_228199),\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_228199),\n                                                         q_l_196697 *\n                                                         squot64(segred_group_sizze_214495,\n                                                                 segment_sizze_nonzzero_228196)))) {\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                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_2",
            "28203)[sext_i32_i64(local_tid_228199)] =\n                        w_j_214546;\n                    ((__local\n                      float *) red_arr_mem_228205)[sext_i32_i64(local_tid_228199)] =\n                        xw_j_214547;\n                    ((__local\n                      float *) red_arr_mem_228207)[sext_i32_i64(local_tid_228199)] =\n                        x2w_j_214548;\n                    ((__local\n                      float *) red_arr_mem_228209)[sext_i32_i64(local_tid_228199)] =\n                        x3w_j_214549;\n                    ((__local\n                      float *) red_arr_mem_228211)[sext_i32_i64(local_tid_228199)] =\n                        x4w_j_214550;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_228203)[sext_i32_i64(local_tid_228199)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_228205)[sext_i32_i64(local_tid_228199)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_228207)[sext_i32_i64(local_tid_228199)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_228209)[sext_i32_i64(local_tid_228199)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_228211)[sext_i32_i64(local_tid_228199)] =\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_228220;\n                float x_228221;\n                float x_228222;\n           ",
            "     float x_228223;\n                float x_228224;\n                float x_228225;\n                float x_228226;\n                float x_228227;\n                float x_228228;\n                float x_228229;\n                bool ltid_in_bounds_228235 =\n                     slt64(sext_i32_i64(local_tid_228199), q_l_196697 *\n                           squot64(segred_group_sizze_214495,\n                                   segment_sizze_nonzzero_228196));\n                int32_t skip_threads_228236;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_228235) {\n                        x_214512 = ((volatile __local\n                                     float *) red_arr_mem_228203)[sext_i32_i64(local_tid_228199)];\n                        x_214513 = ((volatile __local\n                                     float *) red_arr_mem_228205)[sext_i32_i64(local_tid_228199)];\n                        x_214514 = ((volatile __local\n                                     float *) red_arr_mem_228207)[sext_i32_i64(local_tid_228199)];\n                        x_214515 = ((volatile __local\n                                     float *) red_arr_mem_228209)[sext_i32_i64(local_tid_228199)];\n                        x_214516 = ((volatile __local\n                                     float *) red_arr_mem_228211)[sext_i32_i64(local_tid_228199)];\n                        if ((local_tid_228199 - squot32(local_tid_228199, 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_214516;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_228236 = 1;\n                    while (slt32(skip_t",
            "hreads_228236, 32)) {\n                        bool thread_active_228237 = sle32(skip_threads_228236,\n                                                          local_tid_228199 -\n                                                          squot32(local_tid_228199,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_228235;\n                        \n                        if (thread_active_228237) {\n                            // read operands\n                            {\n                                x_214507 = ((volatile __local\n                                             float *) red_arr_mem_228203)[sext_i32_i64(local_tid_228199) -\n                                                                          sext_i32_i64(skip_threads_228236)];\n                                x_214508 = ((volatile __local\n                                             float *) red_arr_mem_228205)[sext_i32_i64(local_tid_228199) -\n                                                                          sext_i32_i64(skip_threads_228236)];\n                                x_214509 = ((volatile __local\n                                             float *) red_arr_mem_228207)[sext_i32_i64(local_tid_228199) -\n                                                                          sext_i32_i64(skip_threads_228236)];\n                                x_214510 = ((volatile __local\n                                             float *) red_arr_mem_228209)[sext_i32_i64(local_tid_228199) -\n                                                                          sext_i32_i64(skip_threads_228236)];\n                                x_214511 = ((volatile __local\n                                             float *) red_arr_mem_228211)[sext_i32_i64(local_tid_228199) -\n                                                                          sext_i32_i64(skip_threads_228236)];\n                            }\n                        }\n    ",
            "                    // perform operation\n                        {\n                            bool inactive_228238 =\n                                 slt64(srem64(sext_i32_i64(local_tid_228199),\n                                              q_l_196697),\n                                       sext_i32_i64(local_tid_228199) -\n                                       sext_i32_i64(local_tid_228199 -\n                                       skip_threads_228236));\n                            \n                            if (thread_active_228237 && inactive_228238) {\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_228237) {\n                                if (!inactive_228238) {\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_228201, skip_threads_228236)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_228237) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228203)[sext_i32_i64(local_tid_228199)] =\n                                    x_214507;\n                                x_214512 = x_214507;\n                                ((volatile __local\n                                  float *) red_arr_mem_228205)[sext_i32_i64(local_tid_228199)] =\n                                    x_214508;\n                                x_214513 = x_214508;\n                                ((volatile __local\n                                  float *) red_arr_mem_228207)[sext_i32_i64(local_tid_228199)] =\n                                    x_214509;\n                                x_214514 = x_214509;\n                                ((volatile __local\n                                  float *) red_arr_mem_228209)[sext_i32_i64(local_tid_228199)] =\n                                    x_214510;\n                                x_214515 = x_214510;\n                                ((volatile __local\n                                  float *) red_arr_mem_228211)[sext_i32_i64(local_tid_228199)] =\n                                    x_214511;\n                                x_214516 = x_214511;\n                            }\n                        }\n                        if (sle32(wave_sizze_228201, skip_threads_228236)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_228236 *= 2;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // las",
            "t thread of block 'i' writes its result to offset 'i'\n                {\n                    if ((local_tid_228199 - squot32(local_tid_228199, 32) *\n                         32) == 31 && ltid_in_bounds_228235) {\n                        ((volatile __local\n                          float *) red_arr_mem_228203)[sext_i32_i64(squot32(local_tid_228199,\n                                                                            32))] =\n                            x_214507;\n                        ((volatile __local\n                          float *) red_arr_mem_228205)[sext_i32_i64(squot32(local_tid_228199,\n                                                                            32))] =\n                            x_214508;\n                        ((volatile __local\n                          float *) red_arr_mem_228207)[sext_i32_i64(squot32(local_tid_228199,\n                                                                            32))] =\n                            x_214509;\n                        ((volatile __local\n                          float *) red_arr_mem_228209)[sext_i32_i64(squot32(local_tid_228199,\n                                                                            32))] =\n                            x_214510;\n                        ((volatile __local\n                          float *) red_arr_mem_228211)[sext_i32_i64(squot32(local_tid_228199,\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_228239;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_228199, 32) == 0 &&\n                            ltid_in_bounds_228235) {\n                            x",
            "_228225 = ((volatile __local\n                                         float *) red_arr_mem_228203)[sext_i32_i64(local_tid_228199)];\n                            x_228226 = ((volatile __local\n                                         float *) red_arr_mem_228205)[sext_i32_i64(local_tid_228199)];\n                            x_228227 = ((volatile __local\n                                         float *) red_arr_mem_228207)[sext_i32_i64(local_tid_228199)];\n                            x_228228 = ((volatile __local\n                                         float *) red_arr_mem_228209)[sext_i32_i64(local_tid_228199)];\n                            x_228229 = ((volatile __local\n                                         float *) red_arr_mem_228211)[sext_i32_i64(local_tid_228199)];\n                            if ((local_tid_228199 - squot32(local_tid_228199,\n                                                            32) * 32) == 0) {\n                                x_228220 = x_228225;\n                                x_228221 = x_228226;\n                                x_228222 = x_228227;\n                                x_228223 = x_228228;\n                                x_228224 = x_228229;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_228239 = 1;\n                        while (slt32(skip_threads_228239, 32)) {\n                            bool thread_active_228240 =\n                                 sle32(skip_threads_228239, local_tid_228199 -\n                                       squot32(local_tid_228199, 32) * 32) &&\n                                 (squot32(local_tid_228199, 32) == 0 &&\n                                  ltid_in_bounds_228235);\n                            \n                            if (thread_active_228240) {\n                                // read operands\n                                {\n          ",
            "                          x_228220 = ((volatile __local\n                                                 float *) red_arr_mem_228203)[sext_i32_i64(local_tid_228199) -\n                                                                              sext_i32_i64(skip_threads_228239)];\n                                    x_228221 = ((volatile __local\n                                                 float *) red_arr_mem_228205)[sext_i32_i64(local_tid_228199) -\n                                                                              sext_i32_i64(skip_threads_228239)];\n                                    x_228222 = ((volatile __local\n                                                 float *) red_arr_mem_228207)[sext_i32_i64(local_tid_228199) -\n                                                                              sext_i32_i64(skip_threads_228239)];\n                                    x_228223 = ((volatile __local\n                                                 float *) red_arr_mem_228209)[sext_i32_i64(local_tid_228199) -\n                                                                              sext_i32_i64(skip_threads_228239)];\n                                    x_228224 = ((volatile __local\n                                                 float *) red_arr_mem_228211)[sext_i32_i64(local_tid_228199) -\n                                                                              sext_i32_i64(skip_threads_228239)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_228241 =\n                                     slt64(srem64(sext_i32_i64(local_tid_228199 *\n                                                  32 + 32 - 1), q_l_196697),\n                                           sext_i32_i64(local_tid_228199 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_ti",
            "d_228199 -\n                                                         skip_threads_228239) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_228240 && inactive_228241) {\n                                    x_228220 = x_228225;\n                                    x_228221 = x_228226;\n                                    x_228222 = x_228227;\n                                    x_228223 = x_228228;\n                                    x_228224 = x_228229;\n                                }\n                                if (thread_active_228240) {\n                                    if (!inactive_228241) {\n                                        float defunc_1_op_res_228230 =\n                                              x_228220 + x_228225;\n                                        float defunc_1_op_res_228231 =\n                                              x_228221 + x_228226;\n                                        float defunc_1_op_res_228232 =\n                                              x_228222 + x_228227;\n                                        float defunc_1_op_res_228233 =\n                                              x_228223 + x_228228;\n                                        float defunc_1_op_res_228234 =\n                                              x_228224 + x_228229;\n                                        \n                                        x_228220 = defunc_1_op_res_228230;\n                                        x_228221 = defunc_1_op_res_228231;\n                                        x_228222 = defunc_1_op_res_228232;\n                                        x_228223 = defunc_1_op_res_228233;\n                                        x_228224 = defunc_1_op_res_228234;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_228201, skip_threads_228239)) {\n           ",
            "                     barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_228240) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_228203)[sext_i32_i64(local_tid_228199)] =\n                                        x_228220;\n                                    x_228225 = x_228220;\n                                    ((volatile __local\n                                      float *) red_arr_mem_228205)[sext_i32_i64(local_tid_228199)] =\n                                        x_228221;\n                                    x_228226 = x_228221;\n                                    ((volatile __local\n                                      float *) red_arr_mem_228207)[sext_i32_i64(local_tid_228199)] =\n                                        x_228222;\n                                    x_228227 = x_228222;\n                                    ((volatile __local\n                                      float *) red_arr_mem_228209)[sext_i32_i64(local_tid_228199)] =\n                                        x_228223;\n                                    x_228228 = x_228223;\n                                    ((volatile __local\n                                      float *) red_arr_mem_228211)[sext_i32_i64(local_tid_228199)] =\n                                        x_228224;\n                                    x_228229 = x_228224;\n                                }\n                            }\n                            if (sle32(wave_sizze_228201, skip_threads_228239)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_228239 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_228242 = squo",
            "t32(local_tid_228199, 32) == 0 ||\n                     !ltid_in_bounds_228235;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_228242) {\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_228203)[sext_i32_i64(squot32(local_tid_228199,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_214508 = ((__local\n                                         float *) red_arr_mem_228205)[sext_i32_i64(squot32(local_tid_228199,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_214509 = ((__local\n                                         float *) red_arr_mem_228207)[sext_i32_i64(squot32(local_tid_228199,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_214510 = ((__local\n                                         float *) red_arr_mem_228209)[sext_i32_i64(squot32(local_tid_228199,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_214511 = ((__local\n                                         float *) red_arr_mem",
            "_228211)[sext_i32_i64(squot32(local_tid_228199,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_228243 =\n                             slt64(srem64(sext_i32_i64(local_tid_228199),\n                                          q_l_196697),\n                                   sext_i32_i64(local_tid_228199) -\n                                   sext_i32_i64(squot32(local_tid_228199, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_228242) {\n                            if (inactive_228243) {\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_228242) {\n                            if (!inactive_228243) {\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_228242) {\n                            ((__local\n                              float *) red_arr_mem_228203)[sext_i32_i64(local_tid_228199)] =\n                                x_214507;\n                            ((__local\n                              float *) red_arr_mem_228205)[sext_i32_i64(local_tid_228199)] =\n                                x_214508;\n                            ((__local\n                              float *) red_arr_mem_228207)[sext_i32_i64(local_tid_228199)] =\n                                x_214509;\n                            ((__local\n                              float *) red_arr_mem_228209)[sext_i32_i64(local_tid_228199)] =\n                                x_214510;\n                            ((__local\n                              float *) red_arr_mem_228211)[sext_i32_i64(local_tid_228199)] =\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_228199, 32) == 0 &&\n                        ltid_in_bounds_228235) {\n                        ((__local\n                          float *) red_arr_mem_228203)[sext_i32_i64(local_tid_228199)] =\n                            x_214512;\n                        ((__local\n                          float *) red_arr_mem_228205)[sext_i32_i64(local_tid_228199)] =\n                            x_214513;\n                        ((__local\n                          float *) red_arr_mem_2",
            "28207)[sext_i32_i64(local_tid_228199)] =\n                            x_214514;\n                        ((__local\n                          float *) red_arr_mem_228209)[sext_i32_i64(local_tid_228199)] =\n                            x_214515;\n                        ((__local\n                          float *) red_arr_mem_228211)[sext_i32_i64(local_tid_228199)] =\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_228215) *\n                      squot64(segred_group_sizze_214495,\n                              segment_sizze_nonzzero_228196) +\n                      sext_i32_i64(local_tid_228199), m_196691 *\n                      l_n_m_196752) && slt64(sext_i32_i64(local_tid_228199),\n                                             squot64(segred_group_sizze_214495,\n                                                     segment_sizze_nonzzero_228196))) {\n                float tmp_228244;\n                \n                tmp_228244 = ((__local\n                               float *) red_arr_mem_228203)[(sext_i32_i64(local_tid_228199) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228196 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223840)[squot64(sext_i32_i64(virt_group_id_228215) *\n                                               squot64(segred_group_sizze_214495,\n                                                       segment_sizze_nonzzero_228196) +\n                                               sext_i32_i64(local_tid_228199),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i3",
            "2_i64(virt_group_id_228215) *\n                                        squot64(segred_group_sizze_214495,\n                                                segment_sizze_nonzzero_228196) +\n                                        sext_i32_i64(local_tid_228199) -\n                                        squot64(sext_i32_i64(virt_group_id_228215) *\n                                                squot64(segred_group_sizze_214495,\n                                                        segment_sizze_nonzzero_228196) +\n                                                sext_i32_i64(local_tid_228199),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_228244;\n                \n                float tmp_228245;\n                \n                tmp_228245 = ((__local\n                               float *) red_arr_mem_228205)[(sext_i32_i64(local_tid_228199) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228196 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223844)[squot64(sext_i32_i64(virt_group_id_228215) *\n                                               squot64(segred_group_sizze_214495,\n                                                       segment_sizze_nonzzero_228196) +\n                                               sext_i32_i64(local_tid_228199),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_228215) *\n                                        squot64(segred_group_sizze_214495,\n                                                segment_sizze_nonzzero_228196) +\n                                        sext_i32_i64(local_tid_228199) -\n                                        squot64(sext_i32_i64(virt_group_id_228215) *\n                   ",
            "                             squot64(segred_group_sizze_214495,\n                                                        segment_sizze_nonzzero_228196) +\n                                                sext_i32_i64(local_tid_228199),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_228245;\n                \n                float tmp_228246;\n                \n                tmp_228246 = ((__local\n                               float *) red_arr_mem_228207)[(sext_i32_i64(local_tid_228199) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228196 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223848)[squot64(sext_i32_i64(virt_group_id_228215) *\n                                               squot64(segred_group_sizze_214495,\n                                                       segment_sizze_nonzzero_228196) +\n                                               sext_i32_i64(local_tid_228199),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_228215) *\n                                        squot64(segred_group_sizze_214495,\n                                                segment_sizze_nonzzero_228196) +\n                                        sext_i32_i64(local_tid_228199) -\n                                        squot64(sext_i32_i64(virt_group_id_228215) *\n                                                squot64(segred_group_sizze_214495,\n                                                        segment_sizze_nonzzero_228196) +\n                                                sext_i32_i64(local_tid_228199),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_228246;\n                \n",
            "                float tmp_228247;\n                \n                tmp_228247 = ((__local\n                               float *) red_arr_mem_228209)[(sext_i32_i64(local_tid_228199) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228196 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223852)[squot64(sext_i32_i64(virt_group_id_228215) *\n                                               squot64(segred_group_sizze_214495,\n                                                       segment_sizze_nonzzero_228196) +\n                                               sext_i32_i64(local_tid_228199),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_228215) *\n                                        squot64(segred_group_sizze_214495,\n                                                segment_sizze_nonzzero_228196) +\n                                        sext_i32_i64(local_tid_228199) -\n                                        squot64(sext_i32_i64(virt_group_id_228215) *\n                                                squot64(segred_group_sizze_214495,\n                                                        segment_sizze_nonzzero_228196) +\n                                                sext_i32_i64(local_tid_228199),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_228247;\n                \n                float tmp_228248;\n                \n                tmp_228248 = ((__local\n                               float *) red_arr_mem_228211)[(sext_i32_i64(local_tid_228199) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228196 -\n           ",
            "                                                 (int64_t) 1];\n                ((__global\n                  float *) mem_223856)[squot64(sext_i32_i64(virt_group_id_228215) *\n                                               squot64(segred_group_sizze_214495,\n                                                       segment_sizze_nonzzero_228196) +\n                                               sext_i32_i64(local_tid_228199),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_228215) *\n                                        squot64(segred_group_sizze_214495,\n                                                segment_sizze_nonzzero_228196) +\n                                        sext_i32_i64(local_tid_228199) -\n                                        squot64(sext_i32_i64(virt_group_id_228215) *\n                                                squot64(segred_group_sizze_214495,\n                                                        segment_sizze_nonzzero_228196) +\n                                                sext_i32_i64(local_tid_228199),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_228248;\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                                        uint red_arr_mem_228343_backing_offset_0,\n                                        uint red_arr_mem_228341_backing_offset_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_228334,\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    volatile unsigned char *red_arr_mem_228343_backing_1 =\n                           &shared_mem[red_arr_mem_228343_backing_offset_0];\n    volatile unsigned char *red_arr_mem_228341_backing_0 =\n                           &shared_mem[red_arr_mem_228341_backing_offset_1];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228336;\n    int32_t local_tid_228337;\n    int64_t group_sizze_228340;\n    int32_t wave_sizze_228339;\n    int32_t group_tid_228338;\n    \n    global_tid_228336 = get_global_id(0);\n    local_tid_228337 = get_local_id(0);\n    group_sizze_228340 = get_local_size(0);\n    wa",
            "ve_sizze_228339 = LOCKSTEP_WIDTH;\n    group_tid_228338 = get_group_id(0);\n    \n    int32_t phys_tid_214604 = global_tid_228336;\n    __local unsigned char *red_arr_mem_228341;\n    \n    red_arr_mem_228341 = (__local unsigned char *) red_arr_mem_228341_backing_0;\n    \n    __local unsigned char *red_arr_mem_228343;\n    \n    red_arr_mem_228343 = (__local unsigned char *) red_arr_mem_228343_backing_1;\n    \n    int32_t phys_group_id_228345;\n    \n    phys_group_id_228345 = get_group_id(0);\n    for (int32_t i_228346 = 0; i_228346 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * l_n_m_196752,\n                                          squot64(segred_group_sizze_214596,\n                                                  segment_sizze_nonzzero_228334))) -\n                   phys_group_id_228345, sext_i64_i32(num_groups_214597));\n         i_228346++) {\n        int32_t virt_group_id_228347 = phys_group_id_228345 + i_228346 *\n                sext_i64_i32(num_groups_214597);\n        int64_t slice_228348 = l_n_m_196752;\n        int64_t slice_228349 = m_196691 * slice_228348;\n        int64_t gtid_214601 = squot64(squot64(sext_i32_i64(local_tid_228337),\n                                              segment_sizze_nonzzero_228334) +\n                                      sext_i32_i64(virt_group_id_228347) *\n                                      squot64(segred_group_sizze_214596,\n                                              segment_sizze_nonzzero_228334),\n                                      slice_228348);\n        int64_t remnant_228350 = squot64(sext_i32_i64(local_tid_228337),\n                                         segment_sizze_nonzzero_228334) +\n                sext_i32_i64(virt_group_id_228347) *\n                squot64(segred_group_sizze_214596,\n                        segment_sizze_nonzzero_228334) - gtid_214601 *\n                slice_228348;\n        int64_t gtid_214602 = remnant_228350;\n        int64_t remnant_228351 = remnant_228350 - gtid_214602;\n        int64_t gtid_214",
            "603 = srem64(sext_i32_i64(local_tid_228337),\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_228337),\n                                                         q_l_196697 *\n                                                         squot64(segred_group_sizze_214596,\n                                                                 segment_sizze_nonzzero_228334)))) {\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                f",
            "loat 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                    floa",
            "t 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_228341)[sext_i32_i64(local_tid_228337)] =\n                        defunc_9_fit_fun_res_214657;\n                    ((__local\n                      float *) red_arr_mem_228343)[sext_i32_i64(local_tid_228337)] =\n                        defunc_9_slope_fun_res_214663;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_228341)[sext_i32_i64(local_tid_228337)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_228343)[sext_i32_i64(local_tid_228337)] =\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_228352;\n                float x_228353;\n                float x_228354;\n                float x_228355;\n                bool ltid_in_bounds_228358 =\n                     slt64(sext_i32_i64(local_tid_228337), q_l_196697 *\n                           squot64(segred_group_sizze_214596,\n                                   segment_sizze_nonzzero_228334));\n                int32_t skip_threads_228359;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_228358) {\n                        x_214607 = ((volatile __local\n                                     float *) red_arr_mem_228341)[sext_i32_i64(local_tid_228337)];\n                        x_214608 = ((volatile __local\n                                     float *) red_arr_mem_228343)[sext_i32_i64(local_tid_228337)];\n                        if ((local_tid_228337 - squot32(local_tid_228337, 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_228359 = 1;\n                    while (slt32(skip_threads_228359, 32)) {\n                        bool thread_active_228360 = sle32(skip_threads_228359,\n                                                          local_tid_228337 -\n                                                          squot32(local_tid_228337,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_228358;\n                        \n              ",
            "          if (thread_active_228360) {\n                            // read operands\n                            {\n                                x_214605 = ((volatile __local\n                                             float *) red_arr_mem_228341)[sext_i32_i64(local_tid_228337) -\n                                                                          sext_i32_i64(skip_threads_228359)];\n                                x_214606 = ((volatile __local\n                                             float *) red_arr_mem_228343)[sext_i32_i64(local_tid_228337) -\n                                                                          sext_i32_i64(skip_threads_228359)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_228361 =\n                                 slt64(srem64(sext_i32_i64(local_tid_228337),\n                                              q_l_196697),\n                                       sext_i32_i64(local_tid_228337) -\n                                       sext_i32_i64(local_tid_228337 -\n                                       skip_threads_228359));\n                            \n                            if (thread_active_228360 && inactive_228361) {\n                                x_214605 = x_214607;\n                                x_214606 = x_214608;\n                            }\n                            if (thread_active_228360) {\n                                if (!inactive_228361) {\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_228339, skip_threads_228359)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_228360) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228341)[sext_i32_i64(local_tid_228337)] =\n                                    x_214605;\n                                x_214607 = x_214605;\n                                ((volatile __local\n                                  float *) red_arr_mem_228343)[sext_i32_i64(local_tid_228337)] =\n                                    x_214606;\n                                x_214608 = x_214606;\n                            }\n                        }\n                        if (sle32(wave_sizze_228339, skip_threads_228359)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_228359 *= 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_228337 - squot32(local_tid_228337, 32) *\n                         32) == 31 && ltid_in_bounds_228358) {\n                        ((volatile __local\n                          float *) red_arr_mem_228341)[sext_i32_i64(squot32(local_tid_228337,\n                                                                            32))] =\n                            x_214605;\n                        ((volatile __local\n                          float *) red_arr_mem_228343)[sext_i32_i64(squot32(local_tid_228337,\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_228362;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_228337, 32) == 0 &&\n                            ltid_in_bounds_228358) {\n                            x_228354 = ((volatile __local\n                                         float *) red_arr_mem_228341)[sext_i32_i64(local_tid_228337)];\n                            x_228355 = ((volatile __local\n                                         float *) red_arr_mem_228343)[sext_i32_i64(local_tid_228337)];\n                            if ((local_tid_228337 - squot32(local_tid_228337,\n                                                            32) * 32) == 0) {\n                                x_228352 = x_228354;\n                                x_228353 = x_228355;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_228362 = 1;\n                        while (slt32(skip_threads_228362, 32)) {\n                            bool thread_active_228363 =\n                                 sle32(skip_threads_228362, local_tid_228337 -\n                                       squot32(local_tid_228337, 32) * 32) &&\n                                 (squot32(local_tid_228337, 32) == 0 &&\n                                  ltid_in_bounds_228358);\n                            \n                            if (thread_active_228363) {\n                                // read operands\n                                {\n                                    x_228352 = ((volatile __local\n                                                 float *) red_arr_mem_228341)[sext_i32_i64(local_tid_228337) -\n                        ",
            "                                                      sext_i32_i64(skip_threads_228362)];\n                                    x_228353 = ((volatile __local\n                                                 float *) red_arr_mem_228343)[sext_i32_i64(local_tid_228337) -\n                                                                              sext_i32_i64(skip_threads_228362)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_228364 =\n                                     slt64(srem64(sext_i32_i64(local_tid_228337 *\n                                                  32 + 32 - 1), q_l_196697),\n                                           sext_i32_i64(local_tid_228337 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_228337 -\n                                                         skip_threads_228362) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_228363 && inactive_228364) {\n                                    x_228352 = x_228354;\n                                    x_228353 = x_228355;\n                                }\n                                if (thread_active_228363) {\n                                    if (!inactive_228364) {\n                                        float defunc_1_op_res_228356 =\n                                              x_228352 + x_228354;\n                                        float defunc_1_op_res_228357 =\n                                              x_228353 + x_228355;\n                                        \n                                        x_228352 = defunc_1_op_res_228356;\n                                        x_228353 = defunc_1_op_res_228357;\n                                    }\n                              ",
            "  }\n                            }\n                            if (sle32(wave_sizze_228339, skip_threads_228362)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_228363) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_228341)[sext_i32_i64(local_tid_228337)] =\n                                        x_228352;\n                                    x_228354 = x_228352;\n                                    ((volatile __local\n                                      float *) red_arr_mem_228343)[sext_i32_i64(local_tid_228337)] =\n                                        x_228353;\n                                    x_228355 = x_228353;\n                                }\n                            }\n                            if (sle32(wave_sizze_228339, skip_threads_228362)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_228362 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_228365 = squot32(local_tid_228337, 32) == 0 ||\n                     !ltid_in_bounds_228358;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_228365) {\n                            x_214607 = x_214605;\n                            x_214608 = x_214606;\n                            x_214605 = ((__local\n                                         float *) red_arr_mem_228341)[sext_i32_i64(squot32(local_tid_228337,\n                                                                                           32)) -\n                        ",
            "                                              (int64_t) 1];\n                            x_214606 = ((__local\n                                         float *) red_arr_mem_228343)[sext_i32_i64(squot32(local_tid_228337,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_228366 =\n                             slt64(srem64(sext_i32_i64(local_tid_228337),\n                                          q_l_196697),\n                                   sext_i32_i64(local_tid_228337) -\n                                   sext_i32_i64(squot32(local_tid_228337, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_228365) {\n                            if (inactive_228366) {\n                                x_214605 = x_214607;\n                                x_214606 = x_214608;\n                            }\n                        }\n                        if (!no_carry_in_228365) {\n                            if (!inactive_228366) {\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_228365) {\n                            ((__local\n                              float *) red_arr_mem_228341)[sext_i32_i64(local_tid_2283",
            "37)] =\n                                x_214605;\n                            ((__local\n                              float *) red_arr_mem_228343)[sext_i32_i64(local_tid_228337)] =\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_228337, 32) == 0 &&\n                        ltid_in_bounds_228358) {\n                        ((__local\n                          float *) red_arr_mem_228341)[sext_i32_i64(local_tid_228337)] =\n                            x_214607;\n                        ((__local\n                          float *) red_arr_mem_228343)[sext_i32_i64(local_tid_228337)] =\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_228347) *\n                      squot64(segred_group_sizze_214596,\n                              segment_sizze_nonzzero_228334) +\n                      sext_i32_i64(local_tid_228337), m_196691 *\n                      l_n_m_196752) && slt64(sext_i32_i64(local_tid_228337),\n                                             squot64(segred_group_sizze_214596,\n                                                     segment_sizze_nonzzero_228334))) {\n                float tmp_228367;\n                \n                tmp_228367 = ((__local\n                               float *) red_arr_mem_228341)[(sext_i32_i64(local_tid_228337) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228334 -\n                                                            (int64_t) 1];\n                ((__global\n                ",
            "  float *) mem_223882)[squot64(sext_i32_i64(virt_group_id_228347) *\n                                               squot64(segred_group_sizze_214596,\n                                                       segment_sizze_nonzzero_228334) +\n                                               sext_i32_i64(local_tid_228337),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_228347) *\n                                        squot64(segred_group_sizze_214596,\n                                                segment_sizze_nonzzero_228334) +\n                                        sext_i32_i64(local_tid_228337) -\n                                        squot64(sext_i32_i64(virt_group_id_228347) *\n                                                squot64(segred_group_sizze_214596,\n                                                        segment_sizze_nonzzero_228334) +\n                                                sext_i32_i64(local_tid_228337),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_228367;\n                \n                float tmp_228368;\n                \n                tmp_228368 = ((__local\n                               float *) red_arr_mem_228343)[(sext_i32_i64(local_tid_228337) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228334 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223886)[squot64(sext_i32_i64(virt_group_id_228347) *\n                                               squot64(segred_group_sizze_214596,\n                                                       segment_sizze_nonzzero_228334) +\n                                               sext_i32_i64(local_tid_228337),\n                                              ",
            " l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_228347) *\n                                        squot64(segred_group_sizze_214596,\n                                                segment_sizze_nonzzero_228334) +\n                                        sext_i32_i64(local_tid_228337) -\n                                        squot64(sext_i32_i64(virt_group_id_228347) *\n                                                squot64(segred_group_sizze_214596,\n                                                        segment_sizze_nonzzero_228334) +\n                                                sext_i32_i64(local_tid_228337),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_228368;\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                                        uint red_arr_mem_228591_backing_offset_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_216274,\n                                        int64_t segment_sizze_nonzzero_228584,\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                                        __g",
            "lobal 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    volatile unsigned char *red_arr_mem_228591_backing_0 =\n                           &shared_mem[red_arr_mem_228591_backing_offset_0];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228586;\n    int32_t local_tid_228587;\n    int64_t group_sizze_228590;\n    int32_t wave_sizze_228589;\n    int32_t group_tid_228588;\n    \n    global_tid_228586 = get_global_id(0);\n    local_tid_228587 = get_local_id(0);\n    group_sizze_228590 = get_local_size(0);\n    wave_sizze_228589 = LOCKSTEP_WIDTH;\n    group_tid_228588 = get_group_id(0);\n    \n    int32_t phys_tid_216280 = global_tid_228586;\n    __local unsigned char *red_arr_mem_228591;\n    \n    red_arr_mem_228591 = (__local unsigned char *) red_arr_mem_228591_backing_0;\n    \n    int32_t phys_group_id_228593;\n    \n    phys_group_id_228593 = get_group_id(0);\n    for (int32_t i_228594 = 0; i_228594 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * t_n_m_196759,\n                                          squot64(segred_group_sizze_216273,\n                                                  segment_sizze_nonzzero_228584))) -\n                   phys_group_id_228593, sext_i64_i32(num_groups_216274));\n         i_228594++) {\n        int32_t virt_group_id_228595 = phys_group_id_228593 + i_228594 *\n                sext_i64_i32(num_groups_216274);\n        int64_t slice_228596 = t_n_m_196759;\n        int64_t slice_228597 = m_196691 * slice_228596;\n        int64_t gtid_216277 = squot64(squot64(sext_i32_i64(local_tid_228587),\n                                              segment_sizze_nonzzero_228584) +\n                                      sext_i32_i64(virt_group_id_228595) *\n                                      squot64(segred_group_sizze_216273,\n                                              segment_sizze_nonzzero_",
            "228584),\n                                      slice_228596);\n        int64_t remnant_228598 = squot64(sext_i32_i64(local_tid_228587),\n                                         segment_sizze_nonzzero_228584) +\n                sext_i32_i64(virt_group_id_228595) *\n                squot64(segred_group_sizze_216273,\n                        segment_sizze_nonzzero_228584) - gtid_216277 *\n                slice_228596;\n        int64_t gtid_216278 = remnant_228598;\n        int64_t remnant_228599 = remnant_228598 - gtid_216278;\n        int64_t gtid_216279 = srem64(sext_i32_i64(local_tid_228587),\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_228587),\n                                                         q_t_196696 *\n                                                         squot64(segred_group_sizze_216273,\n                                                                 segment_sizze_nonzzero_228584)))) {\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_2",
            "16300];\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_228591)[sext_i32_i64(local_tid_228587)] =\n                        w_j_216311;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_228591)[sext_i32_i64(local_tid_228587)] =\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_228600;\n                float x_228601;\n                bool ltid_in_bounds_228603 =\n                     slt64(sext_i32_i64(local_tid_228587), q_t_196696 *\n                           squot64(segred_group_sizze_216273,\n                                   segment_sizze_nonzzero_228584));\n                int32_t skip_threads_228604;\n                \n                // read input for in-block scan\n                {\n                    i",
            "f (ltid_in_bounds_228603) {\n                        x_216282 = ((volatile __local\n                                     float *) red_arr_mem_228591)[sext_i32_i64(local_tid_228587)];\n                        if ((local_tid_228587 - squot32(local_tid_228587, 32) *\n                             32) == 0) {\n                            x_216281 = x_216282;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_228604 = 1;\n                    while (slt32(skip_threads_228604, 32)) {\n                        bool thread_active_228605 = sle32(skip_threads_228604,\n                                                          local_tid_228587 -\n                                                          squot32(local_tid_228587,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_228603;\n                        \n                        if (thread_active_228605) {\n                            // read operands\n                            {\n                                x_216281 = ((volatile __local\n                                             float *) red_arr_mem_228591)[sext_i32_i64(local_tid_228587) -\n                                                                          sext_i32_i64(skip_threads_228604)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_228606 =\n                                 slt64(srem64(sext_i32_i64(local_tid_228587),\n                                              q_t_196696),\n                                       sext_i32_i64(local_tid_228587) -\n                                       sext_i32_i64(local_tid_228587 -\n                                       skip_threads_228604));\n                            \n                            if (thread_activ",
            "e_228605 && inactive_228606) {\n                                x_216281 = x_216282;\n                            }\n                            if (thread_active_228605) {\n                                if (!inactive_228606) {\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_228589, skip_threads_228604)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_228605) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228591)[sext_i32_i64(local_tid_228587)] =\n                                    x_216281;\n                                x_216282 = x_216281;\n                            }\n                        }\n                        if (sle32(wave_sizze_228589, skip_threads_228604)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_228604 *= 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_228587 - squot32(local_tid_228587, 32) *\n                         32) == 31 && ltid_in_bounds_228603) {\n                        ((volatile __local\n                          float *) red_arr_mem_228591)[sext_i32_i64(squot32(local_tid_228587,\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_228607;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_228587, 32) == 0 &&\n                            ltid_in_bounds_228603) {\n                            x_228601 = ((volatile __local\n                                         float *) red_arr_mem_228591)[sext_i32_i64(local_tid_228587)];\n                            if ((local_tid_228587 - squot32(local_tid_228587,\n                                                            32) * 32) == 0) {\n                                x_228600 = x_228601;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_228607 = 1;\n                        while (slt32(skip_threads_228607, 32)) {\n                            bool thread_active_228608 =\n                                 sle32(skip_threads_228607, local_tid_228587 -\n                                       squot32(local_tid_228587, 32) * 32) &&\n                                 (squot32(local_tid_228587, 32) == 0 &&\n                                  ltid_in_bounds_228603);\n                            \n                            if (thread_active_228608) {\n                                // read operands\n                                {\n                                    x_228600 = ((volatile __local\n                                                 float *) red_arr_mem_228591)[sext_i32_i64(local_tid_228587) -\n                                                                              sext_i32_i64(skip_threads_228607)];\n                                }\n                            }\n                            // perform operation\n                            {\n     ",
            "                           bool inactive_228609 =\n                                     slt64(srem64(sext_i32_i64(local_tid_228587 *\n                                                  32 + 32 - 1), q_t_196696),\n                                           sext_i32_i64(local_tid_228587 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_228587 -\n                                                         skip_threads_228607) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_228608 && inactive_228609) {\n                                    x_228600 = x_228601;\n                                }\n                                if (thread_active_228608) {\n                                    if (!inactive_228609) {\n                                        float defunc_1_op_res_228602 =\n                                              x_228600 + x_228601;\n                                        \n                                        x_228600 = defunc_1_op_res_228602;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_228589, skip_threads_228607)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_228608) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_228591)[sext_i32_i64(local_tid_228587)] =\n                                        x_228600;\n                                    x_228601 = x_228600;\n                                }\n                            }\n                            if (sle32(wave_sizze_228589, skip_threads_228607)) {\n                                barrier(CLK_LO",
            "CAL_MEM_FENCE);\n                            }\n                            skip_threads_228607 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_228610 = squot32(local_tid_228587, 32) == 0 ||\n                     !ltid_in_bounds_228603;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_228610) {\n                            x_216282 = x_216281;\n                            x_216281 = ((__local\n                                         float *) red_arr_mem_228591)[sext_i32_i64(squot32(local_tid_228587,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_228611 =\n                             slt64(srem64(sext_i32_i64(local_tid_228587),\n                                          q_t_196696),\n                                   sext_i32_i64(local_tid_228587) -\n                                   sext_i32_i64(squot32(local_tid_228587, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_228610) {\n                            if (inactive_228611) {\n                                x_216281 = x_216282;\n                            }\n                        }\n                        if (!no_carry_in_228610) {\n                            if (!inactive_228611) {\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_228610) {\n                            ((__local\n                              float *) red_arr_mem_228591)[sext_i32_i64(local_tid_228587)] =\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_228587, 32) == 0 &&\n                        ltid_in_bounds_228603) {\n                        ((__local\n                          float *) red_arr_mem_228591)[sext_i32_i64(local_tid_228587)] =\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_228595) *\n                      squot64(segred_group_sizze_216273,\n                              segment_sizze_nonzzero_228584) +\n                      sext_i32_i64(local_tid_228587), m_196691 *\n                      t_n_m_196759) && slt64(sext_i32_i64(local_tid_228587),\n                                             squot64(segred_group_sizze_216273,\n                                                     segment_sizze_nonzzero_228584))) {\n                float tmp_228612;\n                \n                tmp_228612 = ((__local\n                               float *) red_arr_mem_228591)[(sext_i32_i64(local_tid_228587) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228584 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224087)[squo",
            "t64(sext_i32_i64(virt_group_id_228595) *\n                                               squot64(segred_group_sizze_216273,\n                                                       segment_sizze_nonzzero_228584) +\n                                               sext_i32_i64(local_tid_228587),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_228595) *\n                                        squot64(segred_group_sizze_216273,\n                                                segment_sizze_nonzzero_228584) +\n                                        sext_i32_i64(local_tid_228587) -\n                                        squot64(sext_i32_i64(virt_group_id_228595) *\n                                                squot64(segred_group_sizze_216273,\n                                                        segment_sizze_nonzzero_228584) +\n                                                sext_i32_i64(local_tid_228587),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_228612;\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__kernel void mainzisegred_small_216332(__global int *global_failure,\n                                        uint red_arr_mem_228673_backing_offset_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_228666,\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    volatile unsigned char *red_arr_mem_228673_backing_0 =\n                           &shared_mem[red_arr_mem_228673_backing_offset_0];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228668;\n    int32_t local_tid_228669;\n    int64_t group_sizze_228672;\n    int32_t wave_sizze_228671;\n    int32_t group_tid_228670;\n    \n    global_tid_228668 = get_global_id(0);\n    local_tid_228669 = get_local_id(0);\n    group_sizze_228672 = get_local_size(0);\n    wave_sizze_228671 = LOCKSTEP_WIDTH;\n    group_tid_228670 = get_group_id(0);\n    \n    int32_t phys_tid_216332 = global_tid_228668;\n    __local unsigned char *red_arr_mem_228673;\n    \n    red_arr_mem_228673 = (__local unsigned char *) red_arr_mem_228673_backing_0;\n    \n    int32_t phys_group_id_228675;\n    \n    phys_group_id_228675 = get_group_id(0);\n    for (int32_t i_228676 = 0; i_228676 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * t_n_m_196759,\n                                          squot64(segred_group_sizze_216325,\n                                                  segment_sizze_nonzzero_228666))) -\n                   phys_group_id_228675, sext_i64_i32(num_groups_216326));\n         i_228676++) {\n        int32_t virt_group_id_228677 = phys_group_id_228675 + i_228676 *\n                sext_i64_i32(num_gro",
            "ups_216326);\n        int64_t slice_228678 = t_n_m_196759;\n        int64_t slice_228679 = m_196691 * slice_228678;\n        int64_t gtid_216329 = squot64(squot64(sext_i32_i64(local_tid_228669),\n                                              segment_sizze_nonzzero_228666) +\n                                      sext_i32_i64(virt_group_id_228677) *\n                                      squot64(segred_group_sizze_216325,\n                                              segment_sizze_nonzzero_228666),\n                                      slice_228678);\n        int64_t remnant_228680 = squot64(sext_i32_i64(local_tid_228669),\n                                         segment_sizze_nonzzero_228666) +\n                sext_i32_i64(virt_group_id_228677) *\n                squot64(segred_group_sizze_216325,\n                        segment_sizze_nonzzero_228666) - gtid_216329 *\n                slice_228678;\n        int64_t gtid_216330 = remnant_228680;\n        int64_t remnant_228681 = remnant_228680 - gtid_216330;\n        int64_t gtid_216331 = srem64(sext_i32_i64(local_tid_228669),\n                                     q_t_196696);\n        \n        // apply map function if in bounds\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_228669),\n                                                         q_t_196696 *\n                                                         squot64(segred_group_sizze_216325,\n                                                                 segment_sizze_nonzzero_228666)))) {\n                int64_t x_216337;\n                \n                x_216337 = ((__global int64_t *) ext_mem_222256)[gtid_216329];\n                \n                int6",
            "4_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_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_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                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_228673)[sext_i32_i64(local_tid_228669)] =\n                        defunc_9_fit_fun_res_216371;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_228673)[sext_i32_i64(local_tid_228669)] =\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_228682;\n                float x_228683;\n                bool ltid_in_bounds_228685 =\n                     slt64(sext_i32_i64(local_tid_228669), q_t_196696 *\n                           squot64(segred_group_sizze_216325,\n                                   segment_sizze_nonzzero_228666));\n                int32_t skip_threads_228686;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_228685) {\n                        x_216334 = ((volatile __local\n                                     float *) red_arr_mem_228673)[sext_i32_i64(local_tid_228669)];\n                        if ((local_tid_228669 - squot32(local_tid_228669, 32) *\n                             32) == 0) {\n                   ",
            "         x_216333 = x_216334;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_228686 = 1;\n                    while (slt32(skip_threads_228686, 32)) {\n                        bool thread_active_228687 = sle32(skip_threads_228686,\n                                                          local_tid_228669 -\n                                                          squot32(local_tid_228669,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_228685;\n                        \n                        if (thread_active_228687) {\n                            // read operands\n                            {\n                                x_216333 = ((volatile __local\n                                             float *) red_arr_mem_228673)[sext_i32_i64(local_tid_228669) -\n                                                                          sext_i32_i64(skip_threads_228686)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_228688 =\n                                 slt64(srem64(sext_i32_i64(local_tid_228669),\n                                              q_t_196696),\n                                       sext_i32_i64(local_tid_228669) -\n                                       sext_i32_i64(local_tid_228669 -\n                                       skip_threads_228686));\n                            \n                            if (thread_active_228687 && inactive_228688) {\n                                x_216333 = x_216334;\n                            }\n                            if (thread_active_228687) {\n                                if (!inactive_228688) {\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_228671, skip_threads_228686)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_228687) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228673)[sext_i32_i64(local_tid_228669)] =\n                                    x_216333;\n                                x_216334 = x_216333;\n                            }\n                        }\n                        if (sle32(wave_sizze_228671, skip_threads_228686)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_228686 *= 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_228669 - squot32(local_tid_228669, 32) *\n                         32) == 31 && ltid_in_bounds_228685) {\n                        ((volatile __local\n                          float *) red_arr_mem_228673)[sext_i32_i64(squot32(local_tid_228669,\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_228689;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_",
            "tid_228669, 32) == 0 &&\n                            ltid_in_bounds_228685) {\n                            x_228683 = ((volatile __local\n                                         float *) red_arr_mem_228673)[sext_i32_i64(local_tid_228669)];\n                            if ((local_tid_228669 - squot32(local_tid_228669,\n                                                            32) * 32) == 0) {\n                                x_228682 = x_228683;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_228689 = 1;\n                        while (slt32(skip_threads_228689, 32)) {\n                            bool thread_active_228690 =\n                                 sle32(skip_threads_228689, local_tid_228669 -\n                                       squot32(local_tid_228669, 32) * 32) &&\n                                 (squot32(local_tid_228669, 32) == 0 &&\n                                  ltid_in_bounds_228685);\n                            \n                            if (thread_active_228690) {\n                                // read operands\n                                {\n                                    x_228682 = ((volatile __local\n                                                 float *) red_arr_mem_228673)[sext_i32_i64(local_tid_228669) -\n                                                                              sext_i32_i64(skip_threads_228689)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_228691 =\n                                     slt64(srem64(sext_i32_i64(local_tid_228669 *\n                                                  32 + 32 - 1), q_t_196696),\n                                           sext_i32_i64(local_tid_228669 * 32 +\n                                ",
            "           32 - 1) -\n                                           sext_i32_i64((local_tid_228669 -\n                                                         skip_threads_228689) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_228690 && inactive_228691) {\n                                    x_228682 = x_228683;\n                                }\n                                if (thread_active_228690) {\n                                    if (!inactive_228691) {\n                                        float defunc_1_op_res_228684 =\n                                              x_228682 + x_228683;\n                                        \n                                        x_228682 = defunc_1_op_res_228684;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_228671, skip_threads_228689)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_228690) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_228673)[sext_i32_i64(local_tid_228669)] =\n                                        x_228682;\n                                    x_228683 = x_228682;\n                                }\n                            }\n                            if (sle32(wave_sizze_228671, skip_threads_228689)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_228689 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_228692 = squot32(local_tid_228669, 32) == 0 ||\n            ",
            "         !ltid_in_bounds_228685;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_228692) {\n                            x_216334 = x_216333;\n                            x_216333 = ((__local\n                                         float *) red_arr_mem_228673)[sext_i32_i64(squot32(local_tid_228669,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_228693 =\n                             slt64(srem64(sext_i32_i64(local_tid_228669),\n                                          q_t_196696),\n                                   sext_i32_i64(local_tid_228669) -\n                                   sext_i32_i64(squot32(local_tid_228669, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_228692) {\n                            if (inactive_228693) {\n                                x_216333 = x_216334;\n                            }\n                        }\n                        if (!no_carry_in_228692) {\n                            if (!inactive_228693) {\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_228692) {\n                            ((__local\n                              float *) red_arr_mem_228673)[sext_i32_i64(local_tid_228669)] =\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_228669, 32) == 0 &&\n                        ltid_in_bounds_228685) {\n                        ((__local\n                          float *) red_arr_mem_228673)[sext_i32_i64(local_tid_228669)] =\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_228677) *\n                      squot64(segred_group_sizze_216325,\n                              segment_sizze_nonzzero_228666) +\n                      sext_i32_i64(local_tid_228669), m_196691 *\n                      t_n_m_196759) && slt64(sext_i32_i64(local_tid_228669),\n                                             squot64(segred_group_sizze_216325,\n                                                     segment_sizze_nonzzero_228666))) {\n                float tmp_228694;\n                \n                tmp_228694 = ((__local\n                               float *) red_arr_mem_228673)[(sext_i32_i64(local_tid_228669) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228666 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224097)[squot64(sext_i32_i64(virt_group_id_228677) *\n                                               squot64(segred_group_sizze_216325,\n                                                       segment_sizze_nonzzero_228666) +\n                                               sext_i32_i64(local_tid_228669),\n                               ",
            "                t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_228677) *\n                                        squot64(segred_group_sizze_216325,\n                                                segment_sizze_nonzzero_228666) +\n                                        sext_i32_i64(local_tid_228669) -\n                                        squot64(sext_i32_i64(virt_group_id_228677) *\n                                                squot64(segred_group_sizze_216325,\n                                                        segment_sizze_nonzzero_228666) +\n                                                sext_i32_i64(local_tid_228669),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_228694;\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                                        uint red_arr_mem_228826_backing_offset_0,\n                                        uint red_arr_mem_228824_backing_offset_1,\n                                        uint red_arr_mem_228822_backing_offset_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_228815,\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    volatile unsigned char *red_arr_mem_228826_backing_2 =\n                           &shared_mem[red_arr_mem_228826_backing_offset_0];\n    volatile unsigned char *red_arr_mem_228824_backing_1 =\n                           &shared_mem[red_arr_mem_228824_backing_offset_1];\n    volatile unsigned char *red_arr_mem_228822_backing_0 =\n                           &shared_mem[red_arr_mem_228822_backing_offset_2];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228817;\n    int32_t local_tid_228818;\n    int64_t group_sizze_228821;\n    int32_t wave_sizze_228820;\n    int32_t group_tid_228819;\n    \n    global_tid_228817 = get_global_id(0);\n    local_tid_228818 = get_local_id(0);\n    group_sizze_228821 = get_local_size(0);\n    wave_sizze_228820 = LOCKSTEP_WIDTH;\n    group_tid_228819 = get_group_id(0);\n    \n    int32_t phys_tid_217318 = global_tid_228817;\n    __local unsigned char *red_arr_mem_228822;\n    \n    red_arr_mem_228822 = (__local unsigned char *) red_arr_mem_228822_backing_0;\n    \n    __local unsigned char *red_arr_mem_228824;\n    \n    red_arr_mem_228824 = (__local unsigned char *) red_arr_mem_228824_backing_1;\n    \n    __local unsigned char *red_arr_mem_228826;\n    \n    red_arr_mem_228826 = (__local unsigned char *) red_arr_mem_228826_backing_2;\n    \n    int32_t phys_group_id_228828;\n    \n    phys_group_id_228828 = get_group_id(0);\n    for (int32_t i_228829 = 0; i_228829 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_1",
            "96691 * t_n_m_196759,\n                                          squot64(segred_group_sizze_217309,\n                                                  segment_sizze_nonzzero_228815))) -\n                   phys_group_id_228828, sext_i64_i32(num_groups_217310));\n         i_228829++) {\n        int32_t virt_group_id_228830 = phys_group_id_228828 + i_228829 *\n                sext_i64_i32(num_groups_217310);\n        int64_t slice_228831 = t_n_m_196759;\n        int64_t slice_228832 = m_196691 * slice_228831;\n        int64_t gtid_217315 = squot64(squot64(sext_i32_i64(local_tid_228818),\n                                              segment_sizze_nonzzero_228815) +\n                                      sext_i32_i64(virt_group_id_228830) *\n                                      squot64(segred_group_sizze_217309,\n                                              segment_sizze_nonzzero_228815),\n                                      slice_228831);\n        int64_t remnant_228833 = squot64(sext_i32_i64(local_tid_228818),\n                                         segment_sizze_nonzzero_228815) +\n                sext_i32_i64(virt_group_id_228830) *\n                squot64(segred_group_sizze_217309,\n                        segment_sizze_nonzzero_228815) - gtid_217315 *\n                slice_228831;\n        int64_t gtid_217316 = remnant_228833;\n        int64_t remnant_228834 = remnant_228833 - gtid_217316;\n        int64_t gtid_217317 = srem64(sext_i32_i64(local_tid_228818),\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_228818),\n                                       ",
            "                  q_t_196696 *\n                                                         squot64(segred_group_sizze_217309,\n                                                                 segment_sizze_nonzzero_228815)))) {\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_228822)[sext_i32_i64(local_tid_228818)] =\n                        w_j_217355;\n                    ((__local\n                      float *) red_arr_mem_228824)[sext_i32_i64(local_tid_228818)] =\n                        xw_j_217356;\n                    ((__local\n                      float *) red_arr_mem_228826)[sext_i32_i64(local_tid_228818)] =\n                        x2w_j_217357;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_228822)[sext_i32_i64(local_tid_228818)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_228824)[sext_i32_i64(local_tid_228818)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_228826)[sext_i32_i64(local_tid_228818)] =\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_228835;\n                float x_228836;\n                float x_228837;\n                float x_228838;\n                float x_228839;\n                float x_228840;\n                bool ltid_in_bounds_228844 =\n                     slt64(sext_i32_i64(local_tid_228818), q_t_196696 *\n                           squot64(segred_group_sizze_217309,\n                                   segment_sizze_nonzzero_228815));\n                int32_t skip_threads_228845;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_228844) {\n                        x_217322 = ((volatile __local\n                                     float *) red_arr_mem_228822)[",
            "sext_i32_i64(local_tid_228818)];\n                        x_217323 = ((volatile __local\n                                     float *) red_arr_mem_228824)[sext_i32_i64(local_tid_228818)];\n                        x_217324 = ((volatile __local\n                                     float *) red_arr_mem_228826)[sext_i32_i64(local_tid_228818)];\n                        if ((local_tid_228818 - squot32(local_tid_228818, 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_228845 = 1;\n                    while (slt32(skip_threads_228845, 32)) {\n                        bool thread_active_228846 = sle32(skip_threads_228845,\n                                                          local_tid_228818 -\n                                                          squot32(local_tid_228818,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_228844;\n                        \n                        if (thread_active_228846) {\n                            // read operands\n                            {\n                                x_217319 = ((volatile __local\n                                             float *) red_arr_mem_228822)[sext_i32_i64(local_tid_228818) -\n                                                                          sext_i32_i64(skip_threads_228845)];\n                                x_217320 = ((volatile __local\n                                             float *) red_arr_mem_228824)[sext_i32_i64(local_tid_228818) -\n                                                                          sext_i32_i64(skip_threads_228845)];\n                                x_217321 = ((volatile __lo",
            "cal\n                                             float *) red_arr_mem_228826)[sext_i32_i64(local_tid_228818) -\n                                                                          sext_i32_i64(skip_threads_228845)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_228847 =\n                                 slt64(srem64(sext_i32_i64(local_tid_228818),\n                                              q_t_196696),\n                                       sext_i32_i64(local_tid_228818) -\n                                       sext_i32_i64(local_tid_228818 -\n                                       skip_threads_228845));\n                            \n                            if (thread_active_228846 && inactive_228847) {\n                                x_217319 = x_217322;\n                                x_217320 = x_217323;\n                                x_217321 = x_217324;\n                            }\n                            if (thread_active_228846) {\n                                if (!inactive_228847) {\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_228820, skip_threads_228845)) {\n                            barrier(CLK_LOCAL_M",
            "EM_FENCE);\n                        }\n                        if (thread_active_228846) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228822)[sext_i32_i64(local_tid_228818)] =\n                                    x_217319;\n                                x_217322 = x_217319;\n                                ((volatile __local\n                                  float *) red_arr_mem_228824)[sext_i32_i64(local_tid_228818)] =\n                                    x_217320;\n                                x_217323 = x_217320;\n                                ((volatile __local\n                                  float *) red_arr_mem_228826)[sext_i32_i64(local_tid_228818)] =\n                                    x_217321;\n                                x_217324 = x_217321;\n                            }\n                        }\n                        if (sle32(wave_sizze_228820, skip_threads_228845)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_228845 *= 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_228818 - squot32(local_tid_228818, 32) *\n                         32) == 31 && ltid_in_bounds_228844) {\n                        ((volatile __local\n                          float *) red_arr_mem_228822)[sext_i32_i64(squot32(local_tid_228818,\n                                                                            32))] =\n                            x_217319;\n                        ((volatile __local\n                          float *) red_arr_mem_228824)[sext_i32_i64(squot32(local_tid_228818,\n                                                                            32))] =\n                            x_",
            "217320;\n                        ((volatile __local\n                          float *) red_arr_mem_228826)[sext_i32_i64(squot32(local_tid_228818,\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_228848;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_228818, 32) == 0 &&\n                            ltid_in_bounds_228844) {\n                            x_228838 = ((volatile __local\n                                         float *) red_arr_mem_228822)[sext_i32_i64(local_tid_228818)];\n                            x_228839 = ((volatile __local\n                                         float *) red_arr_mem_228824)[sext_i32_i64(local_tid_228818)];\n                            x_228840 = ((volatile __local\n                                         float *) red_arr_mem_228826)[sext_i32_i64(local_tid_228818)];\n                            if ((local_tid_228818 - squot32(local_tid_228818,\n                                                            32) * 32) == 0) {\n                                x_228835 = x_228838;\n                                x_228836 = x_228839;\n                                x_228837 = x_228840;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_228848 = 1;\n                        while (slt32(skip_threads_228848, 32)) {\n                            bool thread_active_228849 =\n                                 sle32(skip_threads_228848, local_tid_228818 -\n                                       squot32(local_",
            "tid_228818, 32) * 32) &&\n                                 (squot32(local_tid_228818, 32) == 0 &&\n                                  ltid_in_bounds_228844);\n                            \n                            if (thread_active_228849) {\n                                // read operands\n                                {\n                                    x_228835 = ((volatile __local\n                                                 float *) red_arr_mem_228822)[sext_i32_i64(local_tid_228818) -\n                                                                              sext_i32_i64(skip_threads_228848)];\n                                    x_228836 = ((volatile __local\n                                                 float *) red_arr_mem_228824)[sext_i32_i64(local_tid_228818) -\n                                                                              sext_i32_i64(skip_threads_228848)];\n                                    x_228837 = ((volatile __local\n                                                 float *) red_arr_mem_228826)[sext_i32_i64(local_tid_228818) -\n                                                                              sext_i32_i64(skip_threads_228848)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_228850 =\n                                     slt64(srem64(sext_i32_i64(local_tid_228818 *\n                                                  32 + 32 - 1), q_t_196696),\n                                           sext_i32_i64(local_tid_228818 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_228818 -\n                                                         skip_threads_228848) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_228849 && inactiv",
            "e_228850) {\n                                    x_228835 = x_228838;\n                                    x_228836 = x_228839;\n                                    x_228837 = x_228840;\n                                }\n                                if (thread_active_228849) {\n                                    if (!inactive_228850) {\n                                        float defunc_1_op_res_228841 =\n                                              x_228835 + x_228838;\n                                        float defunc_1_op_res_228842 =\n                                              x_228836 + x_228839;\n                                        float defunc_1_op_res_228843 =\n                                              x_228837 + x_228840;\n                                        \n                                        x_228835 = defunc_1_op_res_228841;\n                                        x_228836 = defunc_1_op_res_228842;\n                                        x_228837 = defunc_1_op_res_228843;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_228820, skip_threads_228848)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_228849) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_228822)[sext_i32_i64(local_tid_228818)] =\n                                        x_228835;\n                                    x_228838 = x_228835;\n                                    ((volatile __local\n                                      float *) red_arr_mem_228824)[sext_i32_i64(local_tid_228818)] =\n                                        x_228836;\n                                    x_228839 = x_228836;\n                                    ((volati",
            "le __local\n                                      float *) red_arr_mem_228826)[sext_i32_i64(local_tid_228818)] =\n                                        x_228837;\n                                    x_228840 = x_228837;\n                                }\n                            }\n                            if (sle32(wave_sizze_228820, skip_threads_228848)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_228848 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_228851 = squot32(local_tid_228818, 32) == 0 ||\n                     !ltid_in_bounds_228844;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_228851) {\n                            x_217322 = x_217319;\n                            x_217323 = x_217320;\n                            x_217324 = x_217321;\n                            x_217319 = ((__local\n                                         float *) red_arr_mem_228822)[sext_i32_i64(squot32(local_tid_228818,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_217320 = ((__local\n                                         float *) red_arr_mem_228824)[sext_i32_i64(squot32(local_tid_228818,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_217321 = ((__local\n                                         float *) red_arr_mem_228826)[sext_i32_i64(squot32(local_tid_228818,\n                                             ",
            "                                              32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_228852 =\n                             slt64(srem64(sext_i32_i64(local_tid_228818),\n                                          q_t_196696),\n                                   sext_i32_i64(local_tid_228818) -\n                                   sext_i32_i64(squot32(local_tid_228818, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_228851) {\n                            if (inactive_228852) {\n                                x_217319 = x_217322;\n                                x_217320 = x_217323;\n                                x_217321 = x_217324;\n                            }\n                        }\n                        if (!no_carry_in_228851) {\n                            if (!inactive_228852) {\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_228851) {\n                            ((__local\n                              float *) red_arr_mem_228822)[sext_i32_i64(local_tid_228818)] =\n              ",
            "                  x_217319;\n                            ((__local\n                              float *) red_arr_mem_228824)[sext_i32_i64(local_tid_228818)] =\n                                x_217320;\n                            ((__local\n                              float *) red_arr_mem_228826)[sext_i32_i64(local_tid_228818)] =\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_228818, 32) == 0 &&\n                        ltid_in_bounds_228844) {\n                        ((__local\n                          float *) red_arr_mem_228822)[sext_i32_i64(local_tid_228818)] =\n                            x_217322;\n                        ((__local\n                          float *) red_arr_mem_228824)[sext_i32_i64(local_tid_228818)] =\n                            x_217323;\n                        ((__local\n                          float *) red_arr_mem_228826)[sext_i32_i64(local_tid_228818)] =\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_228830) *\n                      squot64(segred_group_sizze_217309,\n                              segment_sizze_nonzzero_228815) +\n                      sext_i32_i64(local_tid_228818), m_196691 *\n                      t_n_m_196759) && slt64(sext_i32_i64(local_tid_228818),\n                                             squot64(segred_group_sizze_217309,\n                                                     segment_sizze_nonzzero_228815))) {\n                float tmp_228853;\n                \n                tmp_228853 = ((__local\n                               float *) red_arr_mem_228822)[(sext_",
            "i32_i64(local_tid_228818) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228815 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224232)[squot64(sext_i32_i64(virt_group_id_228830) *\n                                               squot64(segred_group_sizze_217309,\n                                                       segment_sizze_nonzzero_228815) +\n                                               sext_i32_i64(local_tid_228818),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_228830) *\n                                        squot64(segred_group_sizze_217309,\n                                                segment_sizze_nonzzero_228815) +\n                                        sext_i32_i64(local_tid_228818) -\n                                        squot64(sext_i32_i64(virt_group_id_228830) *\n                                                squot64(segred_group_sizze_217309,\n                                                        segment_sizze_nonzzero_228815) +\n                                                sext_i32_i64(local_tid_228818),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_228853;\n                \n                float tmp_228854;\n                \n                tmp_228854 = ((__local\n                               float *) red_arr_mem_228824)[(sext_i32_i64(local_tid_228818) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228815 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224236)[squot64(sext_i32_i64(virt_g",
            "roup_id_228830) *\n                                               squot64(segred_group_sizze_217309,\n                                                       segment_sizze_nonzzero_228815) +\n                                               sext_i32_i64(local_tid_228818),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_228830) *\n                                        squot64(segred_group_sizze_217309,\n                                                segment_sizze_nonzzero_228815) +\n                                        sext_i32_i64(local_tid_228818) -\n                                        squot64(sext_i32_i64(virt_group_id_228830) *\n                                                squot64(segred_group_sizze_217309,\n                                                        segment_sizze_nonzzero_228815) +\n                                                sext_i32_i64(local_tid_228818),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_228854;\n                \n                float tmp_228855;\n                \n                tmp_228855 = ((__local\n                               float *) red_arr_mem_228826)[(sext_i32_i64(local_tid_228818) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228815 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224240)[squot64(sext_i32_i64(virt_group_id_228830) *\n                                               squot64(segred_group_sizze_217309,\n                                                       segment_sizze_nonzzero_228815) +\n                                               sext_i32_i64(local_tid_228818),\n                                               t_n_m_196759) * t_n_m_196759 +\n                  ",
            "                     (sext_i32_i64(virt_group_id_228830) *\n                                        squot64(segred_group_sizze_217309,\n                                                segment_sizze_nonzzero_228815) +\n                                        sext_i32_i64(local_tid_228818) -\n                                        squot64(sext_i32_i64(virt_group_id_228830) *\n                                                squot64(segred_group_sizze_217309,\n                                                        segment_sizze_nonzzero_228815) +\n                                                sext_i32_i64(local_tid_228818),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_228855;\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                                        uint red_arr_mem_228934_backing_offset_0,\n                                        uint red_arr_mem_228932_backing_offset_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_228925,\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    volatile unsigned char *red_arr_mem_228934_backing_1 =\n                           &shared_mem[red_arr_mem_228934_backing_offset_0];\n    volatile unsigned char *red_arr_mem_228932_backing_0 =\n                           &shared_mem[red_arr_mem_228932_backing_offset_1];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228927;\n    int32_t local_tid_228928;\n    int64_t group_sizze_228931;\n    int32_t wave_sizze_228930;\n    int32_t group_tid_228929;\n    \n    global_tid_228927 = get_global_id(0);\n    local_tid_228928 = get_local_id(0);\n    group_sizze_228931 = get_local_size(0);\n    wave_sizze_228930 = LOCKSTEP_WIDTH;\n    group_tid_228929 = get_group_id(0);\n    \n    int32_t phys_tid_217390 = global_tid_228927;\n    __local unsigned char *red_arr_mem_228932;\n    \n    red_arr_mem_228932 = (__local unsigned char *) red_arr_mem_228932_backing_0;\n    \n    __local unsigned char *red_arr_mem_228934;\n    \n    red_arr_mem_228934 = (__local unsigned char *) red_arr_mem_228934_backing_1;\n    \n    int32_t phys_group_id_228936;\n    \n    phys_group_id_228936 = get_group_id(0);\n    for (int32_t i_228937 = 0; i_228937 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * t_n_m_196759,\n                                          squot64(segred_group_sizze_217382,\n                                                  segment_sizze_nonzzero_228925))) -\n         ",
            "          phys_group_id_228936, sext_i64_i32(num_groups_217383));\n         i_228937++) {\n        int32_t virt_group_id_228938 = phys_group_id_228936 + i_228937 *\n                sext_i64_i32(num_groups_217383);\n        int64_t slice_228939 = t_n_m_196759;\n        int64_t slice_228940 = m_196691 * slice_228939;\n        int64_t gtid_217387 = squot64(squot64(sext_i32_i64(local_tid_228928),\n                                              segment_sizze_nonzzero_228925) +\n                                      sext_i32_i64(virt_group_id_228938) *\n                                      squot64(segred_group_sizze_217382,\n                                              segment_sizze_nonzzero_228925),\n                                      slice_228939);\n        int64_t remnant_228941 = squot64(sext_i32_i64(local_tid_228928),\n                                         segment_sizze_nonzzero_228925) +\n                sext_i32_i64(virt_group_id_228938) *\n                squot64(segred_group_sizze_217382,\n                        segment_sizze_nonzzero_228925) - gtid_217387 *\n                slice_228939;\n        int64_t gtid_217388 = remnant_228941;\n        int64_t remnant_228942 = remnant_228941 - gtid_217388;\n        int64_t gtid_217389 = srem64(sext_i32_i64(local_tid_228928),\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_228928),\n                                                         q_t_196696 *\n                                                         squot64(segred_group_sizze_217382,\n                                                                 segme",
            "nt_sizze_nonzzero_228925)))) {\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                // save results to be reduced\n                {\n                    ((__local\n                      flo",
            "at *) red_arr_mem_228932)[sext_i32_i64(local_tid_228928)] =\n                        defunc_9_fit_fun_res_217439;\n                    ((__local\n                      float *) red_arr_mem_228934)[sext_i32_i64(local_tid_228928)] =\n                        defunc_9_slope_fun_res_217443;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_228932)[sext_i32_i64(local_tid_228928)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_228934)[sext_i32_i64(local_tid_228928)] =\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_228943;\n                float x_228944;\n                float x_228945;\n                float x_228946;\n                bool ltid_in_bounds_228949 =\n                     slt64(sext_i32_i64(local_tid_228928), q_t_196696 *\n                           squot64(segred_group_sizze_217382,\n                                   segment_sizze_nonzzero_228925));\n                int32_t skip_threads_228950;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_228949) {\n                        x_217393 = ((volatile __local\n                                     float *) red_arr_mem_228932)[sext_i32_i64(local_tid_228928)];\n                        x_217394 = ((volatile __local\n                                     float *) red_arr_mem_228934)[sext_i32_i64(local_tid_228928)];\n                        if ((local_tid_228928 - squot32(local_tid_228928, 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_228950 = 1;\n                    while (slt32(skip_threads_228950, 32)) {\n                        bool thread_active_228951 = sle32(skip_threads_228950,\n                                                          local_tid_228928 -\n                                                          squot32(local_tid_228928,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_228949;\n                        \n                        if (thread_active_228951) {\n                            // read operands\n                            {\n                                x_217391 = ((volatile __local\n                                             float *) red_arr_mem_228932)[sext_i32_i64(local_tid_228928) -\n                                                                          sext_i32_i64(skip_threads_228950)];\n                                x_217392 = ((volatile __local\n                                             float *) red_arr_mem_228934)[sext_i32_i64(local_tid_228928) -\n                                                                          sext_i32_i64(skip_threads_228950)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_228952 =\n                                 slt64(srem64(sext_i32_i64(local_tid_228928),\n                                              q_t_196696),\n                                       sext_i32_i64(local_tid_228928) -\n                                       sext_i32_i64(local_tid_228928 -\n                                       skip_threads_228950));\n                            \n                            if (thread_active_228951 && inactive_228952) {\n                                x_217391 = x_217393;\n              ",
            "                  x_217392 = x_217394;\n                            }\n                            if (thread_active_228951) {\n                                if (!inactive_228952) {\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_228930, skip_threads_228950)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_228951) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228932)[sext_i32_i64(local_tid_228928)] =\n                                    x_217391;\n                                x_217393 = x_217391;\n                                ((volatile __local\n                                  float *) red_arr_mem_228934)[sext_i32_i64(local_tid_228928)] =\n                                    x_217392;\n                                x_217394 = x_217392;\n                            }\n                        }\n                        if (sle32(wave_sizze_228930, skip_threads_228950)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_228950 *= 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_228928 - squot32(local_tid_",
            "228928, 32) *\n                         32) == 31 && ltid_in_bounds_228949) {\n                        ((volatile __local\n                          float *) red_arr_mem_228932)[sext_i32_i64(squot32(local_tid_228928,\n                                                                            32))] =\n                            x_217391;\n                        ((volatile __local\n                          float *) red_arr_mem_228934)[sext_i32_i64(squot32(local_tid_228928,\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_228953;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_228928, 32) == 0 &&\n                            ltid_in_bounds_228949) {\n                            x_228945 = ((volatile __local\n                                         float *) red_arr_mem_228932)[sext_i32_i64(local_tid_228928)];\n                            x_228946 = ((volatile __local\n                                         float *) red_arr_mem_228934)[sext_i32_i64(local_tid_228928)];\n                            if ((local_tid_228928 - squot32(local_tid_228928,\n                                                            32) * 32) == 0) {\n                                x_228943 = x_228945;\n                                x_228944 = x_228946;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_228953 = 1;\n                        while (slt32(skip_threads_228953, 32)) {\n                            bool thread_active_228954 =\n                  ",
            "               sle32(skip_threads_228953, local_tid_228928 -\n                                       squot32(local_tid_228928, 32) * 32) &&\n                                 (squot32(local_tid_228928, 32) == 0 &&\n                                  ltid_in_bounds_228949);\n                            \n                            if (thread_active_228954) {\n                                // read operands\n                                {\n                                    x_228943 = ((volatile __local\n                                                 float *) red_arr_mem_228932)[sext_i32_i64(local_tid_228928) -\n                                                                              sext_i32_i64(skip_threads_228953)];\n                                    x_228944 = ((volatile __local\n                                                 float *) red_arr_mem_228934)[sext_i32_i64(local_tid_228928) -\n                                                                              sext_i32_i64(skip_threads_228953)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_228955 =\n                                     slt64(srem64(sext_i32_i64(local_tid_228928 *\n                                                  32 + 32 - 1), q_t_196696),\n                                           sext_i32_i64(local_tid_228928 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_228928 -\n                                                         skip_threads_228953) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_228954 && inactive_228955) {\n                                    x_228943 = x_228945;\n                                    x_228944 = x_228946;\n                                }\n                 ",
            "               if (thread_active_228954) {\n                                    if (!inactive_228955) {\n                                        float defunc_1_op_res_228947 =\n                                              x_228943 + x_228945;\n                                        float defunc_1_op_res_228948 =\n                                              x_228944 + x_228946;\n                                        \n                                        x_228943 = defunc_1_op_res_228947;\n                                        x_228944 = defunc_1_op_res_228948;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_228930, skip_threads_228953)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_228954) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_228932)[sext_i32_i64(local_tid_228928)] =\n                                        x_228943;\n                                    x_228945 = x_228943;\n                                    ((volatile __local\n                                      float *) red_arr_mem_228934)[sext_i32_i64(local_tid_228928)] =\n                                        x_228944;\n                                    x_228946 = x_228944;\n                                }\n                            }\n                            if (sle32(wave_sizze_228930, skip_threads_228953)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_228953 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_228956 = squot32(local_tid_228928, 32)",
            " == 0 ||\n                     !ltid_in_bounds_228949;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_228956) {\n                            x_217393 = x_217391;\n                            x_217394 = x_217392;\n                            x_217391 = ((__local\n                                         float *) red_arr_mem_228932)[sext_i32_i64(squot32(local_tid_228928,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_217392 = ((__local\n                                         float *) red_arr_mem_228934)[sext_i32_i64(squot32(local_tid_228928,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_228957 =\n                             slt64(srem64(sext_i32_i64(local_tid_228928),\n                                          q_t_196696),\n                                   sext_i32_i64(local_tid_228928) -\n                                   sext_i32_i64(squot32(local_tid_228928, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_228956) {\n                            if (inactive_228957) {\n                                x_217391 = x_217393;\n                                x_217392 = x_217394;\n                            }\n                        }\n                        if (!no_carry_in_228956) {\n                            if (!inactive_228957) {\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_228956) {\n                            ((__local\n                              float *) red_arr_mem_228932)[sext_i32_i64(local_tid_228928)] =\n                                x_217391;\n                            ((__local\n                              float *) red_arr_mem_228934)[sext_i32_i64(local_tid_228928)] =\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_228928, 32) == 0 &&\n                        ltid_in_bounds_228949) {\n                        ((__local\n                          float *) red_arr_mem_228932)[sext_i32_i64(local_tid_228928)] =\n                            x_217393;\n                        ((__local\n                          float *) red_arr_mem_228934)[sext_i32_i64(local_tid_228928)] =\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_228938) *\n                      squot64(segred_group_sizze_217382,\n                              segment_sizze_nonzzero_228925) +\n                      sext_i32_i64(local_tid_228928), m_196691 *\n                      t_n_m_196759) && slt64(sext_i32_i64(local_tid_228928),",
            "\n                                             squot64(segred_group_sizze_217382,\n                                                     segment_sizze_nonzzero_228925))) {\n                float tmp_228958;\n                \n                tmp_228958 = ((__local\n                               float *) red_arr_mem_228932)[(sext_i32_i64(local_tid_228928) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228925 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224258)[squot64(sext_i32_i64(virt_group_id_228938) *\n                                               squot64(segred_group_sizze_217382,\n                                                       segment_sizze_nonzzero_228925) +\n                                               sext_i32_i64(local_tid_228928),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_228938) *\n                                        squot64(segred_group_sizze_217382,\n                                                segment_sizze_nonzzero_228925) +\n                                        sext_i32_i64(local_tid_228928) -\n                                        squot64(sext_i32_i64(virt_group_id_228938) *\n                                                squot64(segred_group_sizze_217382,\n                                                        segment_sizze_nonzzero_228925) +\n                                                sext_i32_i64(local_tid_228928),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_228958;\n                \n                float tmp_228959;\n                \n                tmp_228959 = ((__local\n                               float *) red_arr_mem_228934)[(sext_i32_i64(local_tid_228928) +\n          ",
            "                                                   (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228925 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224262)[squot64(sext_i32_i64(virt_group_id_228938) *\n                                               squot64(segred_group_sizze_217382,\n                                                       segment_sizze_nonzzero_228925) +\n                                               sext_i32_i64(local_tid_228928),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_228938) *\n                                        squot64(segred_group_sizze_217382,\n                                                segment_sizze_nonzzero_228925) +\n                                        sext_i32_i64(local_tid_228928) -\n                                        squot64(sext_i32_i64(virt_group_id_228938) *\n                                                squot64(segred_group_sizze_217382,\n                                                        segment_sizze_nonzzero_228925) +\n                                                sext_i32_i64(local_tid_228928),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_228959;\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                                        uint red_arr_mem_229107_backing_offset_0,\n                                        uint red_arr_mem_229105_backing_offset_1,\n                                        uint red_arr_mem_229103_backing_offset_2,\n                                        uint red_arr_mem_22910",
            "1_backing_offset_3,\n                                        uint red_arr_mem_229099_backing_offset_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_229092,\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    volatile unsigned char *red_arr_mem_229107_backing_4 =\n                           &shared_mem[red_arr_mem_229107_backing_offset_0];\n    volatile unsigned char *red_arr_mem_229105_backing_3 =\n                           &shared_mem[red_arr_mem_229105_backing_offset_1];\n    volatile unsigned char *red_arr_mem_229103_backing_2 =\n                           &shared_mem[red_arr_mem_229103_backing_offset_2];\n    volatile unsigned char *red_arr_mem_229101_backing_1 =\n                           &shared_mem[red_arr_mem_229101_bac",
            "king_offset_3];\n    volatile unsigned char *red_arr_mem_229099_backing_0 =\n                           &shared_mem[red_arr_mem_229099_backing_offset_4];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229094;\n    int32_t local_tid_229095;\n    int64_t group_sizze_229098;\n    int32_t wave_sizze_229097;\n    int32_t group_tid_229096;\n    \n    global_tid_229094 = get_global_id(0);\n    local_tid_229095 = get_local_id(0);\n    group_sizze_229098 = get_local_size(0);\n    wave_sizze_229097 = LOCKSTEP_WIDTH;\n    group_tid_229096 = get_group_id(0);\n    \n    int32_t phys_tid_218606 = global_tid_229094;\n    __local unsigned char *red_arr_mem_229099;\n    \n    red_arr_mem_229099 = (__local unsigned char *) red_arr_mem_229099_backing_0;\n    \n    __local unsigned char *red_arr_mem_229101;\n    \n    red_arr_mem_229101 = (__local unsigned char *) red_arr_mem_229101_backing_1;\n    \n    __local unsigned char *red_arr_mem_229103;\n    \n    red_arr_mem_229103 = (__local unsigned char *) red_arr_mem_229103_backing_2;\n    \n    __local unsigned char *red_arr_mem_229105;\n    \n    red_arr_mem_229105 = (__local unsigned char *) red_arr_mem_229105_backing_3;\n    \n    __local unsigned char *red_arr_mem_229107;\n    \n    red_arr_mem_229107 = (__local unsigned char *) red_arr_mem_229107_backing_4;\n    \n    int32_t phys_group_id_229109;\n    \n    phys_group_id_229109 = get_group_id(0);\n    for (int32_t i_229110 = 0; i_229110 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * t_n_m_196759,\n                                          squot64(segred_group_sizze_218595,\n                                                  segment_sizze_nonzzero_229092))) -\n                   phys_group_id_229109, sext_i64_i32(num_groups_218596));\n         i_229110++) {\n        int32_t virt_group_id_229111 = phys_group_id_229109 + i_229110 *\n                sext_i64_i32(num_groups_218596);\n        int64_t slice_229112 = t_n_m_196759;\n        int64_t slice_229113 = m_196691 * slice_229112;\n        ",
            "int64_t gtid_218603 = squot64(squot64(sext_i32_i64(local_tid_229095),\n                                              segment_sizze_nonzzero_229092) +\n                                      sext_i32_i64(virt_group_id_229111) *\n                                      squot64(segred_group_sizze_218595,\n                                              segment_sizze_nonzzero_229092),\n                                      slice_229112);\n        int64_t remnant_229114 = squot64(sext_i32_i64(local_tid_229095),\n                                         segment_sizze_nonzzero_229092) +\n                sext_i32_i64(virt_group_id_229111) *\n                squot64(segred_group_sizze_218595,\n                        segment_sizze_nonzzero_229092) - gtid_218603 *\n                slice_229112;\n        int64_t gtid_218604 = remnant_229114;\n        int64_t remnant_229115 = remnant_229114 - gtid_218604;\n        int64_t gtid_218605 = srem64(sext_i32_i64(local_tid_229095),\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_229095),\n                                                         q_t_196696 *\n                                                         squot64(segred_group_sizze_218595,\n                                                                 segment_sizze_nonzzero_229092)))) {\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_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                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_229099)[sext_i32_i64(local_tid_229095)] =\n                        w_j_218649;\n                    ((__local\n                      float *) red_arr_mem_229101)[sext_i32_i64(local_tid_229095)] =\n                        xw_j_218650;\n                    ((__local\n                      float *) re",
            "d_arr_mem_229103)[sext_i32_i64(local_tid_229095)] =\n                        x2w_j_218651;\n                    ((__local\n                      float *) red_arr_mem_229105)[sext_i32_i64(local_tid_229095)] =\n                        x3w_j_218652;\n                    ((__local\n                      float *) red_arr_mem_229107)[sext_i32_i64(local_tid_229095)] =\n                        x4w_j_218653;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_229099)[sext_i32_i64(local_tid_229095)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_229101)[sext_i32_i64(local_tid_229095)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_229103)[sext_i32_i64(local_tid_229095)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_229105)[sext_i32_i64(local_tid_229095)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_229107)[sext_i32_i64(local_tid_229095)] =\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_229116;\n                float x_229117;\n                float x_229118;\n                float x_229119;\n                float x_229120;\n                float x_229121;\n                float x_229122;\n                float x_229123;\n                float x_229124;\n                float x_229125;\n                bool ltid_in_bounds_229131 =\n                     slt64(sext_i3",
            "2_i64(local_tid_229095), q_t_196696 *\n                           squot64(segred_group_sizze_218595,\n                                   segment_sizze_nonzzero_229092));\n                int32_t skip_threads_229132;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_229131) {\n                        x_218612 = ((volatile __local\n                                     float *) red_arr_mem_229099)[sext_i32_i64(local_tid_229095)];\n                        x_218613 = ((volatile __local\n                                     float *) red_arr_mem_229101)[sext_i32_i64(local_tid_229095)];\n                        x_218614 = ((volatile __local\n                                     float *) red_arr_mem_229103)[sext_i32_i64(local_tid_229095)];\n                        x_218615 = ((volatile __local\n                                     float *) red_arr_mem_229105)[sext_i32_i64(local_tid_229095)];\n                        x_218616 = ((volatile __local\n                                     float *) red_arr_mem_229107)[sext_i32_i64(local_tid_229095)];\n                        if ((local_tid_229095 - squot32(local_tid_229095, 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_229132 = 1;\n                    while (slt32(skip_threads_229132, 32)) {\n                        bool thread_active_229133 = sle32(skip_threads_229132,\n                                                          local_tid_229095 -\n                                                          squot32(local_tid_229095,\n                              ",
            "                                    32) * 32) &&\n                             ltid_in_bounds_229131;\n                        \n                        if (thread_active_229133) {\n                            // read operands\n                            {\n                                x_218607 = ((volatile __local\n                                             float *) red_arr_mem_229099)[sext_i32_i64(local_tid_229095) -\n                                                                          sext_i32_i64(skip_threads_229132)];\n                                x_218608 = ((volatile __local\n                                             float *) red_arr_mem_229101)[sext_i32_i64(local_tid_229095) -\n                                                                          sext_i32_i64(skip_threads_229132)];\n                                x_218609 = ((volatile __local\n                                             float *) red_arr_mem_229103)[sext_i32_i64(local_tid_229095) -\n                                                                          sext_i32_i64(skip_threads_229132)];\n                                x_218610 = ((volatile __local\n                                             float *) red_arr_mem_229105)[sext_i32_i64(local_tid_229095) -\n                                                                          sext_i32_i64(skip_threads_229132)];\n                                x_218611 = ((volatile __local\n                                             float *) red_arr_mem_229107)[sext_i32_i64(local_tid_229095) -\n                                                                          sext_i32_i64(skip_threads_229132)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_229134 =\n                                 slt64(srem64(sext_i32_i64(local_tid_229095),\n                                              q_t_196696),\n                                     ",
            "  sext_i32_i64(local_tid_229095) -\n                                       sext_i32_i64(local_tid_229095 -\n                                       skip_threads_229132));\n                            \n                            if (thread_active_229133 && inactive_229134) {\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_229133) {\n                                if (!inactive_229134) {\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_229097, skip_threads_229132)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (",
            "thread_active_229133) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_229099)[sext_i32_i64(local_tid_229095)] =\n                                    x_218607;\n                                x_218612 = x_218607;\n                                ((volatile __local\n                                  float *) red_arr_mem_229101)[sext_i32_i64(local_tid_229095)] =\n                                    x_218608;\n                                x_218613 = x_218608;\n                                ((volatile __local\n                                  float *) red_arr_mem_229103)[sext_i32_i64(local_tid_229095)] =\n                                    x_218609;\n                                x_218614 = x_218609;\n                                ((volatile __local\n                                  float *) red_arr_mem_229105)[sext_i32_i64(local_tid_229095)] =\n                                    x_218610;\n                                x_218615 = x_218610;\n                                ((volatile __local\n                                  float *) red_arr_mem_229107)[sext_i32_i64(local_tid_229095)] =\n                                    x_218611;\n                                x_218616 = x_218611;\n                            }\n                        }\n                        if (sle32(wave_sizze_229097, skip_threads_229132)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_229132 *= 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_229095 - squot32(local_tid_229095, 32) *\n                         32) == 31 && ltid_in_bounds_229131) {\n                        ((volatile __local\n                          float *) red",
            "_arr_mem_229099)[sext_i32_i64(squot32(local_tid_229095,\n                                                                            32))] =\n                            x_218607;\n                        ((volatile __local\n                          float *) red_arr_mem_229101)[sext_i32_i64(squot32(local_tid_229095,\n                                                                            32))] =\n                            x_218608;\n                        ((volatile __local\n                          float *) red_arr_mem_229103)[sext_i32_i64(squot32(local_tid_229095,\n                                                                            32))] =\n                            x_218609;\n                        ((volatile __local\n                          float *) red_arr_mem_229105)[sext_i32_i64(squot32(local_tid_229095,\n                                                                            32))] =\n                            x_218610;\n                        ((volatile __local\n                          float *) red_arr_mem_229107)[sext_i32_i64(squot32(local_tid_229095,\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_229135;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_229095, 32) == 0 &&\n                            ltid_in_bounds_229131) {\n                            x_229121 = ((volatile __local\n                                         float *) red_arr_mem_229099)[sext_i32_i64(local_tid_229095)];\n                            x_229122 = ((volatile __local\n                                         float *) red_arr_mem_229101)[sext_i32_i64(local_tid_229095)];",
            "\n                            x_229123 = ((volatile __local\n                                         float *) red_arr_mem_229103)[sext_i32_i64(local_tid_229095)];\n                            x_229124 = ((volatile __local\n                                         float *) red_arr_mem_229105)[sext_i32_i64(local_tid_229095)];\n                            x_229125 = ((volatile __local\n                                         float *) red_arr_mem_229107)[sext_i32_i64(local_tid_229095)];\n                            if ((local_tid_229095 - squot32(local_tid_229095,\n                                                            32) * 32) == 0) {\n                                x_229116 = x_229121;\n                                x_229117 = x_229122;\n                                x_229118 = x_229123;\n                                x_229119 = x_229124;\n                                x_229120 = x_229125;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_229135 = 1;\n                        while (slt32(skip_threads_229135, 32)) {\n                            bool thread_active_229136 =\n                                 sle32(skip_threads_229135, local_tid_229095 -\n                                       squot32(local_tid_229095, 32) * 32) &&\n                                 (squot32(local_tid_229095, 32) == 0 &&\n                                  ltid_in_bounds_229131);\n                            \n                            if (thread_active_229136) {\n                                // read operands\n                                {\n                                    x_229116 = ((volatile __local\n                                                 float *) red_arr_mem_229099)[sext_i32_i64(local_tid_229095) -\n                                                                              sext_i32_i64(skip_threads_229135)];\n           ",
            "                         x_229117 = ((volatile __local\n                                                 float *) red_arr_mem_229101)[sext_i32_i64(local_tid_229095) -\n                                                                              sext_i32_i64(skip_threads_229135)];\n                                    x_229118 = ((volatile __local\n                                                 float *) red_arr_mem_229103)[sext_i32_i64(local_tid_229095) -\n                                                                              sext_i32_i64(skip_threads_229135)];\n                                    x_229119 = ((volatile __local\n                                                 float *) red_arr_mem_229105)[sext_i32_i64(local_tid_229095) -\n                                                                              sext_i32_i64(skip_threads_229135)];\n                                    x_229120 = ((volatile __local\n                                                 float *) red_arr_mem_229107)[sext_i32_i64(local_tid_229095) -\n                                                                              sext_i32_i64(skip_threads_229135)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_229137 =\n                                     slt64(srem64(sext_i32_i64(local_tid_229095 *\n                                                  32 + 32 - 1), q_t_196696),\n                                           sext_i32_i64(local_tid_229095 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_229095 -\n                                                         skip_threads_229135) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_229136 && inactive_229137) {\n                               ",
            "     x_229116 = x_229121;\n                                    x_229117 = x_229122;\n                                    x_229118 = x_229123;\n                                    x_229119 = x_229124;\n                                    x_229120 = x_229125;\n                                }\n                                if (thread_active_229136) {\n                                    if (!inactive_229137) {\n                                        float defunc_1_op_res_229126 =\n                                              x_229116 + x_229121;\n                                        float defunc_1_op_res_229127 =\n                                              x_229117 + x_229122;\n                                        float defunc_1_op_res_229128 =\n                                              x_229118 + x_229123;\n                                        float defunc_1_op_res_229129 =\n                                              x_229119 + x_229124;\n                                        float defunc_1_op_res_229130 =\n                                              x_229120 + x_229125;\n                                        \n                                        x_229116 = defunc_1_op_res_229126;\n                                        x_229117 = defunc_1_op_res_229127;\n                                        x_229118 = defunc_1_op_res_229128;\n                                        x_229119 = defunc_1_op_res_229129;\n                                        x_229120 = defunc_1_op_res_229130;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_229097, skip_threads_229135)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_229136) {\n                                // write result\n                                {\n                                    ((volatile __local\n                  ",
            "                    float *) red_arr_mem_229099)[sext_i32_i64(local_tid_229095)] =\n                                        x_229116;\n                                    x_229121 = x_229116;\n                                    ((volatile __local\n                                      float *) red_arr_mem_229101)[sext_i32_i64(local_tid_229095)] =\n                                        x_229117;\n                                    x_229122 = x_229117;\n                                    ((volatile __local\n                                      float *) red_arr_mem_229103)[sext_i32_i64(local_tid_229095)] =\n                                        x_229118;\n                                    x_229123 = x_229118;\n                                    ((volatile __local\n                                      float *) red_arr_mem_229105)[sext_i32_i64(local_tid_229095)] =\n                                        x_229119;\n                                    x_229124 = x_229119;\n                                    ((volatile __local\n                                      float *) red_arr_mem_229107)[sext_i32_i64(local_tid_229095)] =\n                                        x_229120;\n                                    x_229125 = x_229120;\n                                }\n                            }\n                            if (sle32(wave_sizze_229097, skip_threads_229135)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_229135 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_229138 = squot32(local_tid_229095, 32) == 0 ||\n                     !ltid_in_bounds_229131;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_229138) {\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_229099)[sext_i32_i64(squot32(local_tid_229095,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_218608 = ((__local\n                                         float *) red_arr_mem_229101)[sext_i32_i64(squot32(local_tid_229095,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_218609 = ((__local\n                                         float *) red_arr_mem_229103)[sext_i32_i64(squot32(local_tid_229095,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_218610 = ((__local\n                                         float *) red_arr_mem_229105)[sext_i32_i64(squot32(local_tid_229095,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_218611 = ((__local\n                                         float *) red_arr_mem_229107)[sext_i32_i64(squot32(local_tid_229095,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n              ",
            "      // perform operation\n                    {\n                        bool inactive_229139 =\n                             slt64(srem64(sext_i32_i64(local_tid_229095),\n                                          q_t_196696),\n                                   sext_i32_i64(local_tid_229095) -\n                                   sext_i32_i64(squot32(local_tid_229095, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_229138) {\n                            if (inactive_229139) {\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_229138) {\n                            if (!inactive_229139) {\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_229138) {\n                            ((__local\n                              float *) red_arr_mem_229099)[sext_i32_i64(local_tid_229095)] =\n                                x_218607;\n                            ((__local\n                              float *) red_arr_mem_229101)[sext_i32_i64(local_tid_229095)] =\n                                x_218608;\n                            ((__local\n                              float *) red_arr_mem_229103)[sext_i32_i64(local_tid_229095)] =\n                                x_218609;\n                            ((__local\n                              float *) red_arr_mem_229105)[sext_i32_i64(local_tid_229095)] =\n                                x_218610;\n                            ((__local\n                              float *) red_arr_mem_229107)[sext_i32_i64(local_tid_229095)] =\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_229095, 32) == 0 &&\n                        ltid_in_bounds_229131) {\n                        ((__local\n                          float *) red_arr_mem_229099)[sext_i32_i64(local_tid_229095)] =\n                            x_218612;\n                        ((__local\n                          float *) red_arr_mem_229101)[sext_i32_i64(local_tid_229095)] =\n                            x_218613;\n                        ((__local\n                          float *) red_arr_mem_229103)[sext_i32_i64(local_tid_229095)] =\n                            x_218614;\n                        ((__local\n                          float *) red_arr_mem_229105)[sext_i32_i64(local_tid_229095)] =\n                            x_218615;\n                        ((__local\n                  ",
            "        float *) red_arr_mem_229107)[sext_i32_i64(local_tid_229095)] =\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_229111) *\n                      squot64(segred_group_sizze_218595,\n                              segment_sizze_nonzzero_229092) +\n                      sext_i32_i64(local_tid_229095), m_196691 *\n                      t_n_m_196759) && slt64(sext_i32_i64(local_tid_229095),\n                                             squot64(segred_group_sizze_218595,\n                                                     segment_sizze_nonzzero_229092))) {\n                float tmp_229140;\n                \n                tmp_229140 = ((__local\n                               float *) red_arr_mem_229099)[(sext_i32_i64(local_tid_229095) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_229092 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224404)[squot64(sext_i32_i64(virt_group_id_229111) *\n                                               squot64(segred_group_sizze_218595,\n                                                       segment_sizze_nonzzero_229092) +\n                                               sext_i32_i64(local_tid_229095),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_229111) *\n                                        squot64(segred_group_sizze_218595,\n                                                segment_sizze_nonzzero_229092) +\n                                        sext_i32_i64(local_tid_229095) -\n                                 ",
            "       squot64(sext_i32_i64(virt_group_id_229111) *\n                                                squot64(segred_group_sizze_218595,\n                                                        segment_sizze_nonzzero_229092) +\n                                                sext_i32_i64(local_tid_229095),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_229140;\n                \n                float tmp_229141;\n                \n                tmp_229141 = ((__local\n                               float *) red_arr_mem_229101)[(sext_i32_i64(local_tid_229095) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_229092 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224408)[squot64(sext_i32_i64(virt_group_id_229111) *\n                                               squot64(segred_group_sizze_218595,\n                                                       segment_sizze_nonzzero_229092) +\n                                               sext_i32_i64(local_tid_229095),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_229111) *\n                                        squot64(segred_group_sizze_218595,\n                                                segment_sizze_nonzzero_229092) +\n                                        sext_i32_i64(local_tid_229095) -\n                                        squot64(sext_i32_i64(virt_group_id_229111) *\n                                                squot64(segred_group_sizze_218595,\n                                                        segment_sizze_nonzzero_229092) +\n                                                sext_i32_i64(local_tid_229095),\n                                                t_n_m_19675",
            "9) * t_n_m_196759)] =\n                    tmp_229141;\n                \n                float tmp_229142;\n                \n                tmp_229142 = ((__local\n                               float *) red_arr_mem_229103)[(sext_i32_i64(local_tid_229095) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_229092 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224412)[squot64(sext_i32_i64(virt_group_id_229111) *\n                                               squot64(segred_group_sizze_218595,\n                                                       segment_sizze_nonzzero_229092) +\n                                               sext_i32_i64(local_tid_229095),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_229111) *\n                                        squot64(segred_group_sizze_218595,\n                                                segment_sizze_nonzzero_229092) +\n                                        sext_i32_i64(local_tid_229095) -\n                                        squot64(sext_i32_i64(virt_group_id_229111) *\n                                                squot64(segred_group_sizze_218595,\n                                                        segment_sizze_nonzzero_229092) +\n                                                sext_i32_i64(local_tid_229095),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_229142;\n                \n                float tmp_229143;\n                \n                tmp_229143 = ((__local\n                               float *) red_arr_mem_229105)[(sext_i32_i64(local_tid_229095) +\n                                                             (int64_t) 1) *\n                                ",
            "                            segment_sizze_nonzzero_229092 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224416)[squot64(sext_i32_i64(virt_group_id_229111) *\n                                               squot64(segred_group_sizze_218595,\n                                                       segment_sizze_nonzzero_229092) +\n                                               sext_i32_i64(local_tid_229095),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_229111) *\n                                        squot64(segred_group_sizze_218595,\n                                                segment_sizze_nonzzero_229092) +\n                                        sext_i32_i64(local_tid_229095) -\n                                        squot64(sext_i32_i64(virt_group_id_229111) *\n                                                squot64(segred_group_sizze_218595,\n                                                        segment_sizze_nonzzero_229092) +\n                                                sext_i32_i64(local_tid_229095),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_229143;\n                \n                float tmp_229144;\n                \n                tmp_229144 = ((__local\n                               float *) red_arr_mem_229107)[(sext_i32_i64(local_tid_229095) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_229092 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224420)[squot64(sext_i32_i64(virt_group_id_229111) *\n                                               squot64(segred_group_sizze_218595,\n                                    ",
            "                   segment_sizze_nonzzero_229092) +\n                                               sext_i32_i64(local_tid_229095),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_229111) *\n                                        squot64(segred_group_sizze_218595,\n                                                segment_sizze_nonzzero_229092) +\n                                        sext_i32_i64(local_tid_229095) -\n                                        squot64(sext_i32_i64(virt_group_id_229111) *\n                                                squot64(segred_group_sizze_218595,\n                                                        segment_sizze_nonzzero_229092) +\n                                                sext_i32_i64(local_tid_229095),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_229144;\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                                        uint red_arr_mem_229239_backing_offset_0,\n                                        uint red_arr_mem_229237_backing_offset_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_229230,\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    volatile unsigned char *red_arr_mem_229239_backing_1 =\n                           &shared_mem[red_arr_mem_229239_backing_offset_0];\n    volatile unsigned char *red_arr_mem_229237_backing_0 =\n                           &shared_mem[red_arr_mem_229237_backing_offset_1];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229232;\n    int32_t local_tid_229233;\n    int64_t group_sizze_229236;\n    int32_t wave_sizze_229235;\n    int32_t group_tid_229234;\n    \n    global_tid_229232 = get_global_id(0);\n    local_tid_229233 = get_local_id(0);\n    group_sizze_229236 = get_local_size(0);\n    wave_sizze_229235 = LOCKSTEP_WIDTH;\n    group_tid_229234 = get_group_id(0);\n    \n    int32_t phys_tid_218707 = global_tid_229232;\n    __local unsigned char *red_arr_mem_229237;\n    \n    red_arr_mem_229237 = (__local unsigned char *) red_arr_mem_229237_backing_0;\n    \n    __local unsigned char *red_arr_mem_229239;\n    \n    red_arr_mem_229239 = (__local unsigned char *) red_arr_mem_229239_",
            "backing_1;\n    \n    int32_t phys_group_id_229241;\n    \n    phys_group_id_229241 = get_group_id(0);\n    for (int32_t i_229242 = 0; i_229242 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * t_n_m_196759,\n                                          squot64(segred_group_sizze_218699,\n                                                  segment_sizze_nonzzero_229230))) -\n                   phys_group_id_229241, sext_i64_i32(num_groups_218700));\n         i_229242++) {\n        int32_t virt_group_id_229243 = phys_group_id_229241 + i_229242 *\n                sext_i64_i32(num_groups_218700);\n        int64_t slice_229244 = t_n_m_196759;\n        int64_t slice_229245 = m_196691 * slice_229244;\n        int64_t gtid_218704 = squot64(squot64(sext_i32_i64(local_tid_229233),\n                                              segment_sizze_nonzzero_229230) +\n                                      sext_i32_i64(virt_group_id_229243) *\n                                      squot64(segred_group_sizze_218699,\n                                              segment_sizze_nonzzero_229230),\n                                      slice_229244);\n        int64_t remnant_229246 = squot64(sext_i32_i64(local_tid_229233),\n                                         segment_sizze_nonzzero_229230) +\n                sext_i32_i64(virt_group_id_229243) *\n                squot64(segred_group_sizze_218699,\n                        segment_sizze_nonzzero_229230) - gtid_218704 *\n                slice_229244;\n        int64_t gtid_218705 = remnant_229246;\n        int64_t remnant_229247 = remnant_229246 - gtid_218705;\n        int64_t gtid_218706 = srem64(sext_i32_i64(local_tid_229233),\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_229233),\n                                                         q_t_196696 *\n                                                         squot64(segred_group_sizze_218699,\n                                                                 segment_sizze_nonzzero_229230)))) {\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                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                                                flo",
            "at *) 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_229237)[sext_i32_i64(local_tid_229233)] =\n                        defunc_9_fit_fun_res_218763;\n                    ((__local\n                      float *) red_arr_mem_229239)[sext_i32_i64(local_tid_229233)] =\n                        defunc_9_slope_fun_res_218769;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_229237)[sext_i32_i64(local_tid_229233)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_229239)[sext_i32_i64(local_tid_229233)] =\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_229248;\n                float x_229249;\n                float x_229250;\n                float x_229251;\n                bool ltid_in_bounds_229254 =\n                     slt64(sext_i32_i64(local_tid_229233), q_t_196696 *\n                           squot64(segred_group_sizze_218699,\n                                   segment_sizze_nonzzero_229230));\n                int32_t skip_threads_229255;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_229254) {\n                        x_218710 = ((volatile __local\n                                     float *) red_arr_mem_229237)[sext_i32_i64(local_tid_229233)];\n                        x_218711 = ((volatile __local\n                                     float *) red_arr_mem_229239)[sext_i32_i64(local_tid_229233)];\n                        if ((local_tid_229233 - squot32(local_tid_229233, 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_229255 = 1;\n                    while (slt32(skip_threads_229255, 32)) {\n                        bool thread_active_229256 = sle32(skip_threads_229255,\n                                                          local_tid_229233 -\n                                                          squot32(local_tid_229233,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_229254;\n                        \n                        if (thread_active_229256) {\n      ",
            "                      // read operands\n                            {\n                                x_218708 = ((volatile __local\n                                             float *) red_arr_mem_229237)[sext_i32_i64(local_tid_229233) -\n                                                                          sext_i32_i64(skip_threads_229255)];\n                                x_218709 = ((volatile __local\n                                             float *) red_arr_mem_229239)[sext_i32_i64(local_tid_229233) -\n                                                                          sext_i32_i64(skip_threads_229255)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_229257 =\n                                 slt64(srem64(sext_i32_i64(local_tid_229233),\n                                              q_t_196696),\n                                       sext_i32_i64(local_tid_229233) -\n                                       sext_i32_i64(local_tid_229233 -\n                                       skip_threads_229255));\n                            \n                            if (thread_active_229256 && inactive_229257) {\n                                x_218708 = x_218710;\n                                x_218709 = x_218711;\n                            }\n                            if (thread_active_229256) {\n                                if (!inactive_229257) {\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_229235, skip_threads_229255)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_229256) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_229237)[sext_i32_i64(local_tid_229233)] =\n                                    x_218708;\n                                x_218710 = x_218708;\n                                ((volatile __local\n                                  float *) red_arr_mem_229239)[sext_i32_i64(local_tid_229233)] =\n                                    x_218709;\n                                x_218711 = x_218709;\n                            }\n                        }\n                        if (sle32(wave_sizze_229235, skip_threads_229255)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_229255 *= 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_229233 - squot32(local_tid_229233, 32) *\n                         32) == 31 && ltid_in_bounds_229254) {\n                        ((volatile __local\n                          float *) red_arr_mem_229237)[sext_i32_i64(squot32(local_tid_229233,\n                                                                            32))] =\n                            x_218708;\n                        ((volatile __local\n                          float *) red_arr_mem_229239)[sext_i32_i64(squot32(local_tid_229233,\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_229258;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_229233, 32) == 0 &&\n                            ltid_in_bounds_229254) {\n                            x_229250 = ((volatile __local\n                                         float *) red_arr_mem_229237)[sext_i32_i64(local_tid_229233)];\n                            x_229251 = ((volatile __local\n                                         float *) red_arr_mem_229239)[sext_i32_i64(local_tid_229233)];\n                            if ((local_tid_229233 - squot32(local_tid_229233,\n                                                            32) * 32) == 0) {\n                                x_229248 = x_229250;\n                                x_229249 = x_229251;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_229258 = 1;\n                        while (slt32(skip_threads_229258, 32)) {\n                            bool thread_active_229259 =\n                                 sle32(skip_threads_229258, local_tid_229233 -\n                                       squot32(local_tid_229233, 32) * 32) &&\n                                 (squot32(local_tid_229233, 32) == 0 &&\n                                  ltid_in_bounds_229254);\n                            \n                            if (thread_active_229259) {\n                                // read operands\n                                {\n                                    x_229248 = ((volatile __local\n                                                 float *) red_arr_mem_229237)[sext_i32_i64(local_tid_229233) -\n                                                                    ",
            "          sext_i32_i64(skip_threads_229258)];\n                                    x_229249 = ((volatile __local\n                                                 float *) red_arr_mem_229239)[sext_i32_i64(local_tid_229233) -\n                                                                              sext_i32_i64(skip_threads_229258)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_229260 =\n                                     slt64(srem64(sext_i32_i64(local_tid_229233 *\n                                                  32 + 32 - 1), q_t_196696),\n                                           sext_i32_i64(local_tid_229233 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_229233 -\n                                                         skip_threads_229258) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_229259 && inactive_229260) {\n                                    x_229248 = x_229250;\n                                    x_229249 = x_229251;\n                                }\n                                if (thread_active_229259) {\n                                    if (!inactive_229260) {\n                                        float defunc_1_op_res_229252 =\n                                              x_229248 + x_229250;\n                                        float defunc_1_op_res_229253 =\n                                              x_229249 + x_229251;\n                                        \n                                        x_229248 = defunc_1_op_res_229252;\n                                        x_229249 = defunc_1_op_res_229253;\n                                    }\n                                }\n                            }\n          ",
            "                  if (sle32(wave_sizze_229235, skip_threads_229258)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_229259) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_229237)[sext_i32_i64(local_tid_229233)] =\n                                        x_229248;\n                                    x_229250 = x_229248;\n                                    ((volatile __local\n                                      float *) red_arr_mem_229239)[sext_i32_i64(local_tid_229233)] =\n                                        x_229249;\n                                    x_229251 = x_229249;\n                                }\n                            }\n                            if (sle32(wave_sizze_229235, skip_threads_229258)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_229258 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_229261 = squot32(local_tid_229233, 32) == 0 ||\n                     !ltid_in_bounds_229254;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_229261) {\n                            x_218710 = x_218708;\n                            x_218711 = x_218709;\n                            x_218708 = ((__local\n                                         float *) red_arr_mem_229237)[sext_i32_i64(squot32(local_tid_229233,\n                                                                                           32)) -\n                                                                    ",
            "  (int64_t) 1];\n                            x_218709 = ((__local\n                                         float *) red_arr_mem_229239)[sext_i32_i64(squot32(local_tid_229233,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_229262 =\n                             slt64(srem64(sext_i32_i64(local_tid_229233),\n                                          q_t_196696),\n                                   sext_i32_i64(local_tid_229233) -\n                                   sext_i32_i64(squot32(local_tid_229233, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_229261) {\n                            if (inactive_229262) {\n                                x_218708 = x_218710;\n                                x_218709 = x_218711;\n                            }\n                        }\n                        if (!no_carry_in_229261) {\n                            if (!inactive_229262) {\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_229261) {\n                            ((__local\n                              float *) red_arr_mem_229237)[sext_i32_i64(local_tid_229233)] =\n                                x_218",
            "708;\n                            ((__local\n                              float *) red_arr_mem_229239)[sext_i32_i64(local_tid_229233)] =\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_229233, 32) == 0 &&\n                        ltid_in_bounds_229254) {\n                        ((__local\n                          float *) red_arr_mem_229237)[sext_i32_i64(local_tid_229233)] =\n                            x_218710;\n                        ((__local\n                          float *) red_arr_mem_229239)[sext_i32_i64(local_tid_229233)] =\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_229243) *\n                      squot64(segred_group_sizze_218699,\n                              segment_sizze_nonzzero_229230) +\n                      sext_i32_i64(local_tid_229233), m_196691 *\n                      t_n_m_196759) && slt64(sext_i32_i64(local_tid_229233),\n                                             squot64(segred_group_sizze_218699,\n                                                     segment_sizze_nonzzero_229230))) {\n                float tmp_229263;\n                \n                tmp_229263 = ((__local\n                               float *) red_arr_mem_229237)[(sext_i32_i64(local_tid_229233) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_229230 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224446)[squot64(sext_i32_i64(",
            "virt_group_id_229243) *\n                                               squot64(segred_group_sizze_218699,\n                                                       segment_sizze_nonzzero_229230) +\n                                               sext_i32_i64(local_tid_229233),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_229243) *\n                                        squot64(segred_group_sizze_218699,\n                                                segment_sizze_nonzzero_229230) +\n                                        sext_i32_i64(local_tid_229233) -\n                                        squot64(sext_i32_i64(virt_group_id_229243) *\n                                                squot64(segred_group_sizze_218699,\n                                                        segment_sizze_nonzzero_229230) +\n                                                sext_i32_i64(local_tid_229233),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_229263;\n                \n                float tmp_229264;\n                \n                tmp_229264 = ((__local\n                               float *) red_arr_mem_229239)[(sext_i32_i64(local_tid_229233) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_229230 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224450)[squot64(sext_i32_i64(virt_group_id_229243) *\n                                               squot64(segred_group_sizze_218699,\n                                                       segment_sizze_nonzzero_229230) +\n                                               sext_i32_i64(local_tid_229233),\n                                               t_n_m_196759) * t_n_m_196759 +\n            ",
            "                           (sext_i32_i64(virt_group_id_229243) *\n                                        squot64(segred_group_sizze_218699,\n                                                segment_sizze_nonzzero_229230) +\n                                        sext_i32_i64(local_tid_229233) -\n                                        squot64(sext_i32_i64(virt_group_id_229243) *\n                                                squot64(segred_group_sizze_218699,\n                                                        segment_sizze_nonzzero_229230) +\n                                                sext_i32_i64(local_tid_229233),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_229264;\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                                        uint red_arr_mem_229904_backing_offset_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_229897,\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    volatile unsigned char *red_arr_mem_229904_backing_0 =\n                           &shared_mem[red_arr_mem_229904_backing_offset_0];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229899;\n    int32_t ",
            "local_tid_229900;\n    int64_t group_sizze_229903;\n    int32_t wave_sizze_229902;\n    int32_t group_tid_229901;\n    \n    global_tid_229899 = get_global_id(0);\n    local_tid_229900 = get_local_id(0);\n    group_sizze_229903 = get_local_size(0);\n    wave_sizze_229902 = LOCKSTEP_WIDTH;\n    group_tid_229901 = get_group_id(0);\n    \n    int32_t phys_tid_221141 = global_tid_229899;\n    __local unsigned char *red_arr_mem_229904;\n    \n    red_arr_mem_229904 = (__local unsigned char *) red_arr_mem_229904_backing_0;\n    \n    int32_t phys_group_id_229906;\n    \n    phys_group_id_229906 = get_group_id(0);\n    for (int32_t i_229907 = 0; i_229907 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          squot64(segred_group_sizze_221135,\n                                                  segment_sizze_nonzzero_229897))) -\n                   phys_group_id_229906, sext_i64_i32(num_groups_221136));\n         i_229907++) {\n        int32_t virt_group_id_229908 = phys_group_id_229906 + i_229907 *\n                sext_i64_i32(num_groups_221136);\n        int64_t slice_229909 = m_196691;\n        int64_t gtid_221139 = squot64(sext_i32_i64(local_tid_229900),\n                                      segment_sizze_nonzzero_229897) +\n                sext_i32_i64(virt_group_id_229908) *\n                squot64(segred_group_sizze_221135,\n                        segment_sizze_nonzzero_229897);\n        int64_t remnant_229910 = squot64(sext_i32_i64(local_tid_229900),\n                                         segment_sizze_nonzzero_229897) +\n                sext_i32_i64(virt_group_id_229908) *\n                squot64(segred_group_sizze_221135,\n                        segment_sizze_nonzzero_229897) - gtid_221139;\n        int64_t gtid_221140 = srem64(sext_i32_i64(local_tid_229900),\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_229900),\n                                                           j_m_i_197246 *\n                                                           squot64(segred_group_sizze_221135,\n                                                                   segment_sizze_nonzzero_229897)))) {\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_229904)[sext_i32_i64(local_tid_229900)] =\n                        x_221146;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_229904)[sext_i32_i64(local_tid_229900)] =\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_229911;\n                float x_229912;\n                bool ltid_in_bounds_229914 =\n                     slt64(sext_i32_i64(local_tid_229900), j_m_i_197246 *\n                           squot64(segred_group_sizze_221135,\n                                   segment_sizze_nonzzero_229897));\n                int32_t skip_threads_229915;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_229914) {\n                        x_221143 = ((volatile ",
            "__local\n                                     float *) red_arr_mem_229904)[sext_i32_i64(local_tid_229900)];\n                        if ((local_tid_229900 - squot32(local_tid_229900, 32) *\n                             32) == 0) {\n                            x_221142 = x_221143;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_229915 = 1;\n                    while (slt32(skip_threads_229915, 32)) {\n                        bool thread_active_229916 = sle32(skip_threads_229915,\n                                                          local_tid_229900 -\n                                                          squot32(local_tid_229900,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_229914;\n                        \n                        if (thread_active_229916) {\n                            // read operands\n                            {\n                                x_221142 = ((volatile __local\n                                             float *) red_arr_mem_229904)[sext_i32_i64(local_tid_229900) -\n                                                                          sext_i32_i64(skip_threads_229915)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_229917 =\n                                 slt64(srem64(sext_i32_i64(local_tid_229900),\n                                              j_m_i_197246),\n                                       sext_i32_i64(local_tid_229900) -\n                                       sext_i32_i64(local_tid_229900 -\n                                       skip_threads_229915));\n                            \n                            if (thread_active_229916 && inactive_229917) {\n                                x_221142 ",
            "= x_221143;\n                            }\n                            if (thread_active_229916) {\n                                if (!inactive_229917) {\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_229902, skip_threads_229915)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_229916) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_229904)[sext_i32_i64(local_tid_229900)] =\n                                    x_221142;\n                                x_221143 = x_221142;\n                            }\n                        }\n                        if (sle32(wave_sizze_229902, skip_threads_229915)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_229915 *= 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_229900 - squot32(local_tid_229900, 32) *\n                         32) == 31 && ltid_in_bounds_229914) {\n                        ((volatile __local\n                          float *) red_arr_mem_229904)[sext_i32_i64(squot32(local_tid_229900,\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_229918;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_229900, 32) == 0 &&\n                            ltid_in_bounds_229914) {\n                            x_229912 = ((volatile __local\n                                         float *) red_arr_mem_229904)[sext_i32_i64(local_tid_229900)];\n                            if ((local_tid_229900 - squot32(local_tid_229900,\n                                                            32) * 32) == 0) {\n                                x_229911 = x_229912;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_229918 = 1;\n                        while (slt32(skip_threads_229918, 32)) {\n                            bool thread_active_229919 =\n                                 sle32(skip_threads_229918, local_tid_229900 -\n                                       squot32(local_tid_229900, 32) * 32) &&\n                                 (squot32(local_tid_229900, 32) == 0 &&\n                                  ltid_in_bounds_229914);\n                            \n                            if (thread_active_229919) {\n                                // read operands\n                                {\n                                    x_229911 = ((volatile __local\n                                                 float *) red_arr_mem_229904)[sext_i32_i64(local_tid_229900) -\n                                                                              sext_i32_i64(skip_threads_229918)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_229920 =\n                      ",
            "               slt64(srem64(sext_i32_i64(local_tid_229900 *\n                                                  32 + 32 - 1), j_m_i_197246),\n                                           sext_i32_i64(local_tid_229900 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_229900 -\n                                                         skip_threads_229918) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_229919 && inactive_229920) {\n                                    x_229911 = x_229912;\n                                }\n                                if (thread_active_229919) {\n                                    if (!inactive_229920) {\n                                        float defunc_1_op_res_229913 =\n                                              x_229911 + x_229912;\n                                        \n                                        x_229911 = defunc_1_op_res_229913;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_229902, skip_threads_229918)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_229919) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_229904)[sext_i32_i64(local_tid_229900)] =\n                                        x_229911;\n                                    x_229912 = x_229911;\n                                }\n                            }\n                            if (sle32(wave_sizze_229902, skip_threads_229918)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                        ",
            "    skip_threads_229918 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_229921 = squot32(local_tid_229900, 32) == 0 ||\n                     !ltid_in_bounds_229914;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_229921) {\n                            x_221143 = x_221142;\n                            x_221142 = ((__local\n                                         float *) red_arr_mem_229904)[sext_i32_i64(squot32(local_tid_229900,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_229922 =\n                             slt64(srem64(sext_i32_i64(local_tid_229900),\n                                          j_m_i_197246),\n                                   sext_i32_i64(local_tid_229900) -\n                                   sext_i32_i64(squot32(local_tid_229900, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_229921) {\n                            if (inactive_229922) {\n                                x_221142 = x_221143;\n                            }\n                        }\n                        if (!no_carry_in_229921) {\n                            if (!inactive_229922) {\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_229921) {\n                            ((__local\n                              float *) red_arr_mem_229904)[sext_i32_i64(local_tid_229900)] =\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_229900, 32) == 0 &&\n                        ltid_in_bounds_229914) {\n                        ((__local\n                          float *) red_arr_mem_229904)[sext_i32_i64(local_tid_229900)] =\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_229908) *\n                      squot64(segred_group_sizze_221135,\n                              segment_sizze_nonzzero_229897) +\n                      sext_i32_i64(local_tid_229900), m_196691) &&\n                slt64(sext_i32_i64(local_tid_229900),\n                      squot64(segred_group_sizze_221135,\n                              segment_sizze_nonzzero_229897))) {\n                float tmp_229923;\n                \n                tmp_229923 = ((__local\n                               float *) red_arr_mem_229904)[(sext_i32_i64(local_tid_229900) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_229897 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224899)[sext_i32_i64(virt_group_id_229908) *\n                                       squot64(segred_group_sizze_221135,\n                            ",
            "                   segment_sizze_nonzzero_229897) +\n                                       sext_i32_i64(local_tid_229900)] =\n                    tmp_229923;\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__kernel void mainzisegscan_200090(__global int *global_failure,\n                                   uint local_mem_225350_backing_offset_0,\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 *mainziid_counter_mem_225321,\n                                   __global\n                                   unsigned char *status_flags_mem_225323,\n                                   __global\n                                   unsigned char *aggregates_mem_225325,\n                                   __global\n                                   unsigned char *incprefixes_mem_225327)\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    volatile unsigned char *local_mem_225350_backing_0 =\n                           &shared_mem[local_mem_225350_backing_offset_0];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225341;\n    int32_t local_tid_225342;\n    int64_t group_sizze_225345;\n    int32_t wave_sizze_225344;\n    int32_t group_tid_225343;\n    \n    global_tid_225341 = get_global_id(0);\n    local_tid_225342 = get_local_id(0);\n    group_sizze_225345 = get_local_size(0);\n    wave_sizze_225344 = LOCKSTEP_WIDTH;\n    group_tid_225343 = get_group_id(0);\n    \n    int32_t phys_tid_200090 = global_tid_225341;\n    int64_t byte_offsets_225346 = (int64_t) 0;\n    int64_t byte_offsets_",
            "225347 = segscan_group_sizze_200084 * (int64_t) 8;\n    int64_t warp_byte_offset_225348 = (int64_t) 32;\n    int64_t warp_byte_offset_225349 = (int64_t) 288;\n    \n    // Allocate reused shared memeory\n    { }\n    \n    __local unsigned char *local_mem_225350;\n    \n    local_mem_225350 = (__local unsigned char *) local_mem_225350_backing_0;\n    \n    int64_t trans_arr_len_225351 = (int64_t) 11 * segscan_group_sizze_200084;\n    int32_t dynamic_id_225357;\n    \n    if (local_tid_225342 == 0) {\n        dynamic_id_225357 = atomic_add_i32_global(&((volatile __global\n                                                     int *) mainziid_counter_mem_225321)[(int64_t) 0],\n                                                  (int) 1);\n        ((__local int32_t *) local_mem_225350)[(int64_t) 0] = dynamic_id_225357;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    dynamic_id_225357 = ((__local int32_t *) local_mem_225350)[(int64_t) 0];\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t blockOff_225358 = sext_i32_i64(dynamic_id_225357) * (int64_t) 11 *\n            segscan_group_sizze_200084;\n    int64_t sgm_idx_225359 = smod64(blockOff_225358, n_196692);\n    int32_t boundary_225360 = sext_i64_i32(smin64((int64_t) 11 *\n                                                  segscan_group_sizze_200084,\n                                                  n_196692 - sgm_idx_225359));\n    int32_t segsizze_compact_225361 = sext_i64_i32(smin64((int64_t) 11 *\n                                                          segscan_group_sizze_200084,\n                                                          n_196692));\n    int64_t private_mem_225362[(int64_t) 11];\n    \n    // Load and map\n    {\n        for (int64_t i_225364 = 0; i_225364 < (int64_t) 11; i_225364++) {\n            int64_t phys_tid_225365 = blockOff_225358 +\n                    sext_i32_i64(local_tid_225342) + i_225364 *\n                    segscan_group_sizze_200084;\n            int64_t slice_225366 = n_196692;\n            int64_t slice_225367 = m_196",
            "691 * slice_225366;\n            int64_t gtid_200088 = squot64(phys_tid_225365, slice_225366);\n            int64_t remnant_225368 = phys_tid_225365 - gtid_200088 *\n                    slice_225366;\n            int64_t gtid_200089 = remnant_225368;\n            int64_t remnant_225369 = remnant_225368 - gtid_200089;\n            \n            if (slt64(phys_tid_225365, m_196691 * 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                private_mem_225362[i_225364] = defunc_0_f_res_200098;\n            } else {\n                private_mem_225362[i_225364] = (int64_t) 0;\n            }\n        }\n    }\n    // Transpose scan inputs\n    {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int64_t i_225370 = 0; i_225370 < (int64_t) 11; i_225370++) {\n            int64_t sharedIdx_225371 = sext_i32_i64(local_tid_225342) +\n                    i_225370 * segscan_group_sizze_200084;\n            int64_t tmp_225372;\n            \n            tmp_225372 = private_mem_225362[i_225370];\n            ((__local int64_t *) local_mem_225350)[sharedIdx_225371] =\n                tmp_225372;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int32_t i_225373 = 0; i_225373 < 11; i_225373++) {\n            int32_t sharedIdx_225374 = local_tid_225342 * 11 + i_225373;\n            int64_t tmp_225375;\n            \n            tmp_225375 = ((__local\n                           int64_t *) local_mem_225350)[sext_i32_i64(share",
            "dIdx_225374)];\n            private_mem_225362[sext_i32_i64(i_225373)] = tmp_225375;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    // Per thread scan\n    {\n        int32_t gidx_225376 = local_tid_225342 * 11 + 1;\n        \n        for (int64_t i_225377 = 0; i_225377 < (int64_t) 10; i_225377++) {\n            bool new_sgm_225378 = smod32(gidx_225376 + sext_i64_i32(i_225377) -\n                                         boundary_225360,\n                                         segsizze_compact_225361) == 0;\n            \n            if (!new_sgm_225378) {\n                int64_t x_200091;\n                int64_t x_200092;\n                \n                x_200091 = private_mem_225362[i_225377];\n                x_200092 = private_mem_225362[i_225377 + (int64_t) 1];\n                \n                int64_t defunc_1_op_res_200093 = add64(x_200091, x_200092);\n                \n                private_mem_225362[i_225377 + (int64_t) 1] =\n                    defunc_1_op_res_200093;\n            }\n        }\n    }\n    // Publish results in shared memory\n    {\n        int64_t tmp_225379;\n        \n        tmp_225379 = private_mem_225362[(int64_t) 10];\n        ((__local int64_t *) local_mem_225350)[squot64(byte_offsets_225346,\n                                                       (int64_t) 8) +\n                                               sext_i32_i64(local_tid_225342)] =\n            tmp_225379;\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    \n    int64_t acc_225383;\n    \n    // Scan results (with warp scan)\n    {\n        int64_t x_225380;\n        int64_t x_225381;\n        int64_t x_225384;\n        int64_t x_225385;\n        bool ltid_in_bounds_225387 = slt64(sext_i32_i64(local_tid_225342),\n                                           segscan_group_sizze_200084);\n        int32_t skip_threads_225388;\n        \n        // read input for in-block scan\n        {\n            if (ltid_in_bounds_225387) {\n                x_225381 = ((volatile __local\n                             int6",
            "4_t *) local_mem_225350)[squot64(byte_offsets_225346,\n                                                                  (int64_t) 8) +\n                                                          sext_i32_i64(local_tid_225342)];\n                if ((local_tid_225342 - squot32(local_tid_225342, 32) * 32) ==\n                    0) {\n                    x_225380 = x_225381;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_225388 = 1;\n            while (slt32(skip_threads_225388, 32)) {\n                bool thread_active_225389 = sle32(skip_threads_225388,\n                                                  local_tid_225342 -\n                                                  squot32(local_tid_225342,\n                                                          32) * 32) &&\n                     ltid_in_bounds_225387;\n                \n                if (thread_active_225389) {\n                    // read operands\n                    {\n                        x_225380 = ((volatile __local\n                                     int64_t *) local_mem_225350)[squot64(byte_offsets_225346,\n                                                                          (int64_t) 8) +\n                                                                  (sext_i32_i64(local_tid_225342) -\n                                                                   sext_i32_i64(skip_threads_225388))];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_225390 = slt32(smod32((local_tid_225342 + 1) *\n                                                        11 - 1 +\n                                                        segsizze_compact_225361 -\n                                                        boundary_225360,\n                                                        segsizze_compact_225361),\n                                                 (local_tid_",
            "225342 + 1) * 11 -\n                                                 1 - ((local_tid_225342 -\n                                                       skip_threads_225388 +\n                                                       1) * 11 - 1));\n                    \n                    if (thread_active_225389 && inactive_225390) {\n                        x_225380 = x_225381;\n                    }\n                    if (thread_active_225389) {\n                        if (!inactive_225390) {\n                            int64_t defunc_1_op_res_225382 = add64(x_225380,\n                                                                   x_225381);\n                            \n                            x_225380 = defunc_1_op_res_225382;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_225344, skip_threads_225388)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_225389) {\n                    // write result\n                    {\n                        ((volatile __local\n                          int64_t *) local_mem_225350)[squot64(byte_offsets_225346,\n                                                               (int64_t) 8) +\n                                                       sext_i32_i64(local_tid_225342)] =\n                            x_225380;\n                        x_225381 = x_225380;\n                    }\n                }\n                if (sle32(wave_sizze_225344, skip_threads_225388)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_225388 *= 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_225342 - squot32(local_tid_225342, 32) * 32) == 31 &&\n                ltid_in_bounds_225387) {\n                ((volatile __local\n                  int64_t *) local_mem_225350)[squot64(byte_offs",
            "ets_225346,\n                                                       (int64_t) 8) +\n                                               sext_i32_i64(squot32(local_tid_225342,\n                                                                    32))] =\n                    x_225380;\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_225391;\n            \n            // read input for in-block scan\n            {\n                if (squot32(local_tid_225342, 32) == 0 &&\n                    ltid_in_bounds_225387) {\n                    x_225385 = ((volatile __local\n                                 int64_t *) local_mem_225350)[squot64(byte_offsets_225346,\n                                                                      (int64_t) 8) +\n                                                              sext_i32_i64(local_tid_225342)];\n                    if ((local_tid_225342 - squot32(local_tid_225342, 32) *\n                         32) == 0) {\n                        x_225384 = x_225385;\n                    }\n                }\n            }\n            // in-block scan (hopefully no barriers needed)\n            {\n                skip_threads_225391 = 1;\n                while (slt32(skip_threads_225391, 32)) {\n                    bool thread_active_225392 = sle32(skip_threads_225391,\n                                                      local_tid_225342 -\n                                                      squot32(local_tid_225342,\n                                                              32) * 32) &&\n                         (squot32(local_tid_225342, 32) == 0 &&\n                          ltid_in_bounds_225387);\n                    \n                    if (thread_active_225392) {\n                        // read operands\n                        {\n                            x_225384 = ((volatile __local\n                                 ",
            "        int64_t *) local_mem_225350)[squot64(byte_offsets_225346,\n                                                                              (int64_t) 8) +\n                                                                      (sext_i32_i64(local_tid_225342) -\n                                                                       sext_i32_i64(skip_threads_225391))];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_225393 = slt32(smod32((local_tid_225342 *\n                                                             32 + 32 - 1 + 1) *\n                                                            11 - 1 +\n                                                            segsizze_compact_225361 -\n                                                            boundary_225360,\n                                                            segsizze_compact_225361),\n                                                     (local_tid_225342 * 32 +\n                                                      32 - 1 + 1) * 11 - 1 -\n                                                     (((local_tid_225342 -\n                                                        skip_threads_225391) *\n                                                       32 + 32 - 1 + 1) * 11 -\n                                                      1));\n                        \n                        if (thread_active_225392 && inactive_225393) {\n                            x_225384 = x_225385;\n                        }\n                        if (thread_active_225392) {\n                            if (!inactive_225393) {\n                                int64_t defunc_1_op_res_225386 = add64(x_225384,\n                                                                       x_225385);\n                                \n                                x_225384 = defunc_1_op_res_225386;\n                            }\n                        }",
            "\n                    }\n                    if (sle32(wave_sizze_225344, skip_threads_225391)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    if (thread_active_225392) {\n                        // write result\n                        {\n                            ((volatile __local\n                              int64_t *) local_mem_225350)[squot64(byte_offsets_225346,\n                                                                   (int64_t) 8) +\n                                                           sext_i32_i64(local_tid_225342)] =\n                                x_225384;\n                            x_225385 = x_225384;\n                        }\n                    }\n                    if (sle32(wave_sizze_225344, skip_threads_225391)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    skip_threads_225391 *= 2;\n                }\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        bool no_carry_in_225394 = squot32(local_tid_225342, 32) == 0 ||\n             !ltid_in_bounds_225387;\n        \n        // carry-in for every block except the first\n        {\n            // read operands\n            {\n                if (!no_carry_in_225394) {\n                    x_225381 = x_225380;\n                    x_225380 = ((__local\n                                 int64_t *) local_mem_225350)[squot64(byte_offsets_225346,\n                                                                      (int64_t) 8) +\n                                                              (sext_i32_i64(squot32(local_tid_225342,\n                                                                                    32)) -\n                                                               (int64_t) 1)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_225395 = slt32(smod32((local_tid_225342 + 1) *\n                             ",
            "                       11 - 1 +\n                                                    segsizze_compact_225361 -\n                                                    boundary_225360,\n                                                    segsizze_compact_225361),\n                                             (local_tid_225342 + 1) * 11 - 1 -\n                                             ((squot32(local_tid_225342, 32) *\n                                               32 - 1 + 1) * 11 - 1));\n                \n                if (!no_carry_in_225394) {\n                    if (inactive_225395) {\n                        x_225380 = x_225381;\n                    }\n                }\n                if (!no_carry_in_225394) {\n                    if (!inactive_225395) {\n                        int64_t defunc_1_op_res_225382 = add64(x_225380,\n                                                               x_225381);\n                        \n                        x_225380 = defunc_1_op_res_225382;\n                    }\n                }\n            }\n            // write final result\n            {\n                if (!no_carry_in_225394) {\n                    ((__local\n                      int64_t *) local_mem_225350)[squot64(byte_offsets_225346,\n                                                           (int64_t) 8) +\n                                                   sext_i32_i64(local_tid_225342)] =\n                        x_225380;\n                }\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // restore correct values for first block\n        {\n            if (squot32(local_tid_225342, 32) == 0 && ltid_in_bounds_225387) {\n                ((__local\n                  int64_t *) local_mem_225350)[squot64(byte_offsets_225346,\n                                                       (int64_t) 8) +\n                                               sext_i32_i64(local_tid_225342)] =\n                    x_225381;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENC",
            "E);\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (local_tid_225342 == 0) {\n            acc_225383 = ((__local\n                           int64_t *) local_mem_225350)[squot64(byte_offsets_225346,\n                                                                (int64_t) 8) +\n                                                        (segscan_group_sizze_200084 -\n                                                         (int64_t) 1)];\n        } else {\n            acc_225383 = ((__local\n                           int64_t *) local_mem_225350)[squot64(byte_offsets_225346,\n                                                                (int64_t) 8) +\n                                                        (sext_i32_i64(local_tid_225342) -\n                                                         (int64_t) 1)];\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    \n    int64_t prefix_225396 = (int64_t) 0;\n    bool block_new_sgm_225397 = sgm_idx_225359 == (int64_t) 0;\n    \n    // Perform lookback\n    {\n        if (block_new_sgm_225397 && local_tid_225342 == 0) {\n            ((volatile __global\n              int64_t *) incprefixes_mem_225327)[dynamic_id_225357] =\n                acc_225383;\n            mem_fence_global();\n            ((volatile __global\n              int8_t *) status_flags_mem_225323)[dynamic_id_225357] =\n                (int8_t) 2;\n            acc_225383 = (int64_t) 0;\n        }\n        if (!block_new_sgm_225397 && slt32(local_tid_225342,\n                                           wave_sizze_225344)) {\n            if (local_tid_225342 == 0) {\n                if (boundary_225360 == sext_i64_i32(segscan_group_sizze_200084 *\n                    (int64_t) 11)) {\n                    ((volatile __global\n                      int64_t *) aggregates_mem_225325)[dynamic_id_225357] =\n                        acc_225383;\n                    mem_fence_global();\n                    ((volatile __global\n                      int8_t *) status_flags_mem_225323)[dynamic_id_2",
            "25357] =\n                        (int8_t) 1;\n                } else {\n                    ((volatile __global\n                      int64_t *) incprefixes_mem_225327)[dynamic_id_225357] =\n                        acc_225383;\n                    mem_fence_global();\n                    ((volatile __global\n                      int8_t *) status_flags_mem_225323)[dynamic_id_225357] =\n                        (int8_t) 2;\n                }\n                \n                int8_t tmp_225398;\n                \n                tmp_225398 = ((volatile __global\n                               int8_t *) status_flags_mem_225323)[dynamic_id_225357 -\n                                                                  (int64_t) 1];\n                ((volatile __local int8_t *) local_mem_225350)[(int64_t) 0] =\n                    tmp_225398;\n            }\n            mem_fence_local();\n            \n            int8_t status_225399;\n            \n            status_225399 = ((__local int8_t *) local_mem_225350)[(int64_t) 0];\n            if (status_225399 == (int8_t) 2) {\n                if (local_tid_225342 == 0) {\n                    prefix_225396 = ((volatile __global\n                                      int64_t *) incprefixes_mem_225327)[dynamic_id_225357 -\n                                                                         (int64_t) 1];\n                }\n            } else {\n                int32_t readOffset_225400 = dynamic_id_225357 -\n                        sext_i32_i64(wave_sizze_225344);\n                \n                while (slt32(wave_sizze_225344 * -1, readOffset_225400)) {\n                    int32_t read_i_225401 = readOffset_225400 +\n                            local_tid_225342;\n                    int64_t aggr_225402 = (int64_t) 0;\n                    int8_t flag_225403 = (int8_t) 0;\n                    \n                    if (sle32(0, read_i_225401)) {\n                        if (sle64(blockOff_225358 -\n                                  (sext_i32_i64(read_i_225401 +",
            " 1) *\n                                   segscan_group_sizze_200084 * (int64_t) 11 -\n                                   (int64_t) 1), sgm_idx_225359)) {\n                            flag_225403 = ((volatile __global\n                                            int8_t *) status_flags_mem_225323)[sext_i32_i64(read_i_225401)];\n                            if (flag_225403 == (int8_t) 2) {\n                                aggr_225402 = ((volatile __global\n                                                int64_t *) incprefixes_mem_225327)[sext_i32_i64(read_i_225401)];\n                            } else {\n                                if (flag_225403 == (int8_t) 1) {\n                                    aggr_225402 = ((volatile __global\n                                                    int64_t *) aggregates_mem_225325)[sext_i32_i64(read_i_225401)];\n                                }\n                            }\n                        } else {\n                            flag_225403 = (int8_t) 2;\n                        }\n                    }\n                    ((__local\n                      int64_t *) local_mem_225350)[squot64(warp_byte_offset_225348,\n                                                           (int64_t) 8) +\n                                                   sext_i32_i64(local_tid_225342)] =\n                        aggr_225402;\n                    ((__local\n                      int8_t *) local_mem_225350)[sext_i32_i64(local_tid_225342)] =\n                        flag_225403;\n                    flag_225403 = ((__local\n                                    int8_t *) local_mem_225350)[sext_i32_i64(wave_sizze_225344) -\n                                                                (int64_t) 1];\n                    if (slt8(flag_225403, (int8_t) 2)) {\n                        int8_t flg_x_225407;\n                        int8_t flg_y_225408;\n                        int64_t x_225404;\n                        int64_t x_225405;\n                        int32_t skip_",
            "threads_225409;\n                        \n                        // read input for in-block scan\n                        {\n                            flg_y_225408 = ((volatile __local\n                                             int8_t *) local_mem_225350)[sext_i32_i64(local_tid_225342)];\n                            x_225405 = ((volatile __local\n                                         int64_t *) local_mem_225350)[squot64(warp_byte_offset_225348,\n                                                                              (int64_t) 8) +\n                                                                      sext_i32_i64(local_tid_225342)];\n                            if ((local_tid_225342 - squot32(local_tid_225342,\n                                                            32) * 32) == 0) {\n                                x_225404 = x_225405;\n                                flg_x_225407 = flg_y_225408;\n                            }\n                        }\n                        // in-block scan (hopefully no barriers needed)\n                        {\n                            skip_threads_225409 = 1;\n                            while (slt32(skip_threads_225409, 32)) {\n                                if (sle32(skip_threads_225409,\n                                          local_tid_225342 -\n                                          squot32(local_tid_225342, 32) * 32)) {\n                                    // read operands\n                                    {\n                                        flg_x_225407 = ((volatile __local\n                                                         int8_t *) local_mem_225350)[sext_i32_i64(local_tid_225342) -\n                                                                                     sext_i32_i64(skip_threads_225409)];\n                                        x_225404 = ((volatile __local\n                                                     int64_t *) local_mem_225350)[squot64(warp_byte_offset_225348,\n            ",
            "                                                                              (int64_t) 8) +\n                                                                                  (sext_i32_i64(local_tid_225342) -\n                                                                                   sext_i32_i64(skip_threads_225409))];\n                                    }\n                                    // perform operation\n                                    {\n                                        if (flg_y_225408 == (int8_t) 2 ||\n                                            flg_y_225408 == (int8_t) 0) {\n                                            flg_x_225407 = flg_y_225408;\n                                            x_225404 = x_225405;\n                                        } else {\n                                            int64_t defunc_1_op_res_225406 =\n                                                    add64(x_225404, x_225405);\n                                            \n                                            x_225404 = defunc_1_op_res_225406;\n                                        }\n                                    }\n                                    // write result\n                                    {\n                                        ((volatile __local\n                                          int8_t *) local_mem_225350)[sext_i32_i64(local_tid_225342)] =\n                                            flg_x_225407;\n                                        flg_y_225408 = flg_x_225407;\n                                        ((volatile __local\n                                          int64_t *) local_mem_225350)[squot64(warp_byte_offset_225348,\n                                                                               (int64_t) 8) +\n                                                                       sext_i32_i64(local_tid_225342)] =\n                                            x_225404;\n                                        x_22540",
            "5 = x_225404;\n                                    }\n                                }\n                                skip_threads_225409 *= 2;\n                            }\n                        }\n                    }\n                    flag_225403 = ((__local\n                                    int8_t *) local_mem_225350)[sext_i32_i64(wave_sizze_225344) -\n                                                                (int64_t) 1];\n                    aggr_225402 = ((__local\n                                    int64_t *) local_mem_225350)[squot64(warp_byte_offset_225348,\n                                                                         (int64_t) 8) +\n                                                                 (sext_i32_i64(wave_sizze_225344) -\n                                                                  (int64_t) 1)];\n                    if (flag_225403 == (int8_t) 2) {\n                        readOffset_225400 = wave_sizze_225344 * -1;\n                    } else {\n                        if (flag_225403 == (int8_t) 1) {\n                            readOffset_225400 -= wave_sizze_225344;\n                        }\n                    }\n                    if (slt8((int8_t) 0, flag_225403)) {\n                        int64_t x_225410 = aggr_225402;\n                        int64_t x_225411 = prefix_225396;\n                        int64_t defunc_1_op_res_225412 = add64(x_225410,\n                                                               x_225411);\n                        \n                        prefix_225396 = defunc_1_op_res_225412;\n                    }\n                    mem_fence_local();\n                }\n            }\n            if (local_tid_225342 == 0) {\n                if (boundary_225360 == sext_i64_i32(segscan_group_sizze_200084 *\n                    (int64_t) 11)) {\n                    int64_t x_225413 = prefix_225396;\n                    int64_t x_225414 = acc_225383;\n                    int64_t defunc_1_op_res_225415 = add64(x",
            "_225413, x_225414);\n                    \n                    ((volatile __global\n                      int64_t *) incprefixes_mem_225327)[dynamic_id_225357] =\n                        defunc_1_op_res_225415;\n                    mem_fence_global();\n                    ((volatile __global\n                      int8_t *) status_flags_mem_225323)[dynamic_id_225357] =\n                        (int8_t) 2;\n                }\n                ((__local\n                  int64_t *) local_mem_225350)[squot64(warp_byte_offset_225348,\n                                                       (int64_t) 8)] =\n                    prefix_225396;\n                acc_225383 = (int64_t) 0;\n            }\n        }\n        if (!(dynamic_id_225357 == (int64_t) 0)) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            prefix_225396 = ((__local\n                              int64_t *) local_mem_225350)[squot64(warp_byte_offset_225348,\n                                                                   (int64_t) 8)];\n            barrier(CLK_LOCAL_MEM_FENCE);\n        }\n    }\n    // Distribute results\n    {\n        int64_t x_225416;\n        int64_t x_225417;\n        int64_t x_225419 = prefix_225396;\n        int64_t x_225420 = acc_225383;\n        \n        if (slt32(local_tid_225342 * 11, boundary_225360) &&\n            !block_new_sgm_225397) {\n            int64_t defunc_1_op_res_225421 = add64(x_225419, x_225420);\n            \n            x_225416 = defunc_1_op_res_225421;\n        } else {\n            x_225416 = acc_225383;\n        }\n        \n        int32_t stopping_point_225422 = segsizze_compact_225361 -\n                srem32(local_tid_225342 * 11 - 1 + segsizze_compact_225361 -\n                       boundary_225360, segsizze_compact_225361);\n        \n        for (int64_t i_225423 = 0; i_225423 < (int64_t) 11; i_225423++) {\n            if (slt32(sext_i64_i32(i_225423), stopping_point_225422 - 1)) {\n                x_225417 = private_mem_225362[i_225423];\n                \n                int64_t",
            " defunc_1_op_res_225418 = add64(x_225416, x_225417);\n                \n                private_mem_225362[i_225423] = defunc_1_op_res_225418;\n            }\n        }\n    }\n    // Transpose scan output and Write it to global memory in coalesced fashion\n    {\n        for (int64_t i_225424 = 0; i_225424 < (int64_t) 11; i_225424++) {\n            int64_t sharedIdx_225425 = sext_i32_i64(local_tid_225342 * 11) +\n                    i_225424;\n            int64_t tmp_225426;\n            \n            tmp_225426 = private_mem_225362[i_225424];\n            ((__local int64_t *) local_mem_225350)[sharedIdx_225425] =\n                tmp_225426;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int64_t i_225427 = 0; i_225427 < (int64_t) 11; i_225427++) {\n            int64_t flat_idx_225428 = blockOff_225358 +\n                    segscan_group_sizze_200084 * i_225427 +\n                    sext_i32_i64(local_tid_225342);\n            int64_t slice_225429 = n_196692;\n            int64_t slice_225430 = m_196691 * slice_225429;\n            int64_t gtid_200088 = squot64(flat_idx_225428, slice_225429);\n            int64_t remnant_225431 = flat_idx_225428 - gtid_200088 *\n                    slice_225429;\n            int64_t gtid_200089 = remnant_225431;\n            int64_t remnant_225432 = remnant_225431 - gtid_200089;\n            \n            if (slt64(flat_idx_225428, m_196691 * n_196692)) {\n                int64_t tmp_225433;\n                \n                tmp_225433 = ((__local\n                               int64_t *) local_mem_225350)[flat_idx_225428 -\n                                                            blockOff_225358];\n                ((__global int64_t *) mem_222246)[gtid_200088 * n_196692 +\n                                                  gtid_200089] = tmp_225433;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    // If this is the last block, reset the dynamicId\n    {\n        if (dynamic_id_225357 == sdiv_up64(m_196691 * n_196692,\n      ",
            "                                     segscan_group_sizze_200084 *\n                                           (int64_t) 11) - (int64_t) 1) {\n            ((__global int32_t *) mainziid_counter_mem_225321)[(int64_t) 0] = 0;\n        }\n    }\n    \n  error_0:\n    return;\n    #undef segscan_group_sizze_200084\n}\n__kernel void mainzisegscan_200642(__global int *global_failure,\n                                   uint local_mem_225557_backing_offset_0,\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 *mainziid_counter_mem_225540,\n                                   __global\n                                   unsigned char *status_flags_mem_225542,\n                                   __global\n                                   unsigned char *aggregates_mem_225544,\n                                   __global\n                                   unsigned char *incprefixes_mem_225546)\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    volatile unsigned char *local_mem_225557_backing_0 =\n                           &shared_mem[local_mem_225557_backing_offset_0];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225548;\n    int32_t local_tid_225549;\n    int64_t group_sizze_225552;\n    int32_t wave_sizze_225551;\n    int32_t group_tid_225550;\n    \n    global_tid_225548 = get_global_id(0);\n    local_tid_225549 = get_local_id(0);\n    group_sizze_225552 = get_local_size(0);\n    wave_sizze_225551 = LOCKSTEP_WIDTH;\n    group_tid_225550 = get_group_id(0);\n    \n    int32_t phys_tid_200642 = global_tid_225548;\n    int64_t byte_offsets_225553 = (int64_t) 0;\n    int",
            "64_t byte_offsets_225554 = segscan_group_sizze_200635 * (int64_t) 8;\n    int64_t warp_byte_offset_225555 = (int64_t) 32;\n    int64_t warp_byte_offset_225556 = (int64_t) 288;\n    \n    // Allocate reused shared memeory\n    { }\n    \n    __local unsigned char *local_mem_225557;\n    \n    local_mem_225557 = (__local unsigned char *) local_mem_225557_backing_0;\n    \n    int64_t trans_arr_len_225558 = (int64_t) 11 * segscan_group_sizze_200635;\n    int32_t dynamic_id_225564;\n    \n    if (local_tid_225549 == 0) {\n        dynamic_id_225564 = atomic_add_i32_global(&((volatile __global\n                                                     int *) mainziid_counter_mem_225540)[(int64_t) 0],\n                                                  (int) 1);\n        ((__local int32_t *) local_mem_225557)[(int64_t) 0] = dynamic_id_225564;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    dynamic_id_225564 = ((__local int32_t *) local_mem_225557)[(int64_t) 0];\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t blockOff_225565 = sext_i32_i64(dynamic_id_225564) * (int64_t) 11 *\n            segscan_group_sizze_200635;\n    int64_t sgm_idx_225566 = smod64(blockOff_225565, defunc_0_f_res_196740);\n    int32_t boundary_225567 = sext_i64_i32(smin64((int64_t) 11 *\n                                                  segscan_group_sizze_200635,\n                                                  defunc_0_f_res_196740 -\n                                                  sgm_idx_225566));\n    int32_t segsizze_compact_225568 = sext_i64_i32(smin64((int64_t) 11 *\n                                                          segscan_group_sizze_200635,\n                                                          defunc_0_f_res_196740));\n    int64_t private_mem_225569[(int64_t) 11];\n    \n    // Load and map\n    {\n        for (int64_t i_225571 = 0; i_225571 < (int64_t) 11; i_225571++) {\n            int64_t phys_tid_225572 = blockOff_225565 +\n                    sext_i32_i64(local_tid_225549) + i_225571 *\n                    segsca",
            "n_group_sizze_200635;\n            int64_t slice_225573 = defunc_0_f_res_196740;\n            int64_t slice_225574 = n_p_196694 * slice_225573;\n            int64_t slice_225575 = m_196691 * slice_225574;\n            int64_t gtid_200639 = squot64(phys_tid_225572, slice_225574);\n            int64_t remnant_225576 = phys_tid_225572 - gtid_200639 *\n                    slice_225574;\n            int64_t gtid_200640 = squot64(remnant_225576, slice_225573);\n            int64_t remnant_225577 = remnant_225576 - gtid_200640 *\n                    slice_225573;\n            int64_t gtid_200641 = remnant_225577;\n            int64_t remnant_225578 = remnant_225577 - gtid_200641;\n            \n            if (slt64(phys_tid_225572, m_196691 * n_p_196694 *\n                      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                private_mem_225569[i_225571] = defunc_0_f_res_200651;\n            } else {\n                private_mem_225569[i_225571] = (int64_t) 0;\n            }\n        }\n    }\n    // Transpose scan inputs\n    {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int64_t i_225579 = 0; i_225579 < (int64_t) 11; i_225579++) {\n            int64_t shared",
            "Idx_225580 = sext_i32_i64(local_tid_225549) +\n                    i_225579 * segscan_group_sizze_200635;\n            int64_t tmp_225581;\n            \n            tmp_225581 = private_mem_225569[i_225579];\n            ((__local int64_t *) local_mem_225557)[sharedIdx_225580] =\n                tmp_225581;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int32_t i_225582 = 0; i_225582 < 11; i_225582++) {\n            int32_t sharedIdx_225583 = local_tid_225549 * 11 + i_225582;\n            int64_t tmp_225584;\n            \n            tmp_225584 = ((__local\n                           int64_t *) local_mem_225557)[sext_i32_i64(sharedIdx_225583)];\n            private_mem_225569[sext_i32_i64(i_225582)] = tmp_225584;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    // Per thread scan\n    {\n        int32_t gidx_225585 = local_tid_225549 * 11 + 1;\n        \n        for (int64_t i_225586 = 0; i_225586 < (int64_t) 10; i_225586++) {\n            bool new_sgm_225587 = smod32(gidx_225585 + sext_i64_i32(i_225586) -\n                                         boundary_225567,\n                                         segsizze_compact_225568) == 0;\n            \n            if (!new_sgm_225587) {\n                int64_t x_200643;\n                int64_t x_200644;\n                \n                x_200643 = private_mem_225569[i_225586];\n                x_200644 = private_mem_225569[i_225586 + (int64_t) 1];\n                \n                int64_t defunc_1_op_res_200645 = add64(x_200643, x_200644);\n                \n                private_mem_225569[i_225586 + (int64_t) 1] =\n                    defunc_1_op_res_200645;\n            }\n        }\n    }\n    // Publish results in shared memory\n    {\n        int64_t tmp_225588;\n        \n        tmp_225588 = private_mem_225569[(int64_t) 10];\n        ((__local int64_t *) local_mem_225557)[squot64(byte_offsets_225553,\n                                                       (int64_t) 8) +\n                                               sex",
            "t_i32_i64(local_tid_225549)] =\n            tmp_225588;\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    \n    int64_t acc_225592;\n    \n    // Scan results (with warp scan)\n    {\n        int64_t x_225589;\n        int64_t x_225590;\n        int64_t x_225593;\n        int64_t x_225594;\n        bool ltid_in_bounds_225596 = slt64(sext_i32_i64(local_tid_225549),\n                                           segscan_group_sizze_200635);\n        int32_t skip_threads_225597;\n        \n        // read input for in-block scan\n        {\n            if (ltid_in_bounds_225596) {\n                x_225590 = ((volatile __local\n                             int64_t *) local_mem_225557)[squot64(byte_offsets_225553,\n                                                                  (int64_t) 8) +\n                                                          sext_i32_i64(local_tid_225549)];\n                if ((local_tid_225549 - squot32(local_tid_225549, 32) * 32) ==\n                    0) {\n                    x_225589 = x_225590;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_225597 = 1;\n            while (slt32(skip_threads_225597, 32)) {\n                bool thread_active_225598 = sle32(skip_threads_225597,\n                                                  local_tid_225549 -\n                                                  squot32(local_tid_225549,\n                                                          32) * 32) &&\n                     ltid_in_bounds_225596;\n                \n                if (thread_active_225598) {\n                    // read operands\n                    {\n                        x_225589 = ((volatile __local\n                                     int64_t *) local_mem_225557)[squot64(byte_offsets_225553,\n                                                                          (int64_t) 8) +\n                                                                  (sext_i32_i64(local_tid_225549) -",
            "\n                                                                   sext_i32_i64(skip_threads_225597))];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_225599 = slt32(smod32((local_tid_225549 + 1) *\n                                                        11 - 1 +\n                                                        segsizze_compact_225568 -\n                                                        boundary_225567,\n                                                        segsizze_compact_225568),\n                                                 (local_tid_225549 + 1) * 11 -\n                                                 1 - ((local_tid_225549 -\n                                                       skip_threads_225597 +\n                                                       1) * 11 - 1));\n                    \n                    if (thread_active_225598 && inactive_225599) {\n                        x_225589 = x_225590;\n                    }\n                    if (thread_active_225598) {\n                        if (!inactive_225599) {\n                            int64_t defunc_1_op_res_225591 = add64(x_225589,\n                                                                   x_225590);\n                            \n                            x_225589 = defunc_1_op_res_225591;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_225551, skip_threads_225597)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_225598) {\n                    // write result\n                    {\n                        ((volatile __local\n                          int64_t *) local_mem_225557)[squot64(byte_offsets_225553,\n                                                               (int64_t) 8) +\n                                                       sext_i32_i64(local_tid_225549)] =\n                    ",
            "        x_225589;\n                        x_225590 = x_225589;\n                    }\n                }\n                if (sle32(wave_sizze_225551, skip_threads_225597)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_225597 *= 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_225549 - squot32(local_tid_225549, 32) * 32) == 31 &&\n                ltid_in_bounds_225596) {\n                ((volatile __local\n                  int64_t *) local_mem_225557)[squot64(byte_offsets_225553,\n                                                       (int64_t) 8) +\n                                               sext_i32_i64(squot32(local_tid_225549,\n                                                                    32))] =\n                    x_225589;\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_225600;\n            \n            // read input for in-block scan\n            {\n                if (squot32(local_tid_225549, 32) == 0 &&\n                    ltid_in_bounds_225596) {\n                    x_225594 = ((volatile __local\n                                 int64_t *) local_mem_225557)[squot64(byte_offsets_225553,\n                                                                      (int64_t) 8) +\n                                                              sext_i32_i64(local_tid_225549)];\n                    if ((local_tid_225549 - squot32(local_tid_225549, 32) *\n                         32) == 0) {\n                        x_225593 = x_225594;\n                    }\n                }\n            }\n            // in-block scan (hopefully no barriers needed)\n            {\n                skip_threads_225600 = 1;\n                while (slt32(skip_threads_225600, 32)) {\n ",
            "                   bool thread_active_225601 = sle32(skip_threads_225600,\n                                                      local_tid_225549 -\n                                                      squot32(local_tid_225549,\n                                                              32) * 32) &&\n                         (squot32(local_tid_225549, 32) == 0 &&\n                          ltid_in_bounds_225596);\n                    \n                    if (thread_active_225601) {\n                        // read operands\n                        {\n                            x_225593 = ((volatile __local\n                                         int64_t *) local_mem_225557)[squot64(byte_offsets_225553,\n                                                                              (int64_t) 8) +\n                                                                      (sext_i32_i64(local_tid_225549) -\n                                                                       sext_i32_i64(skip_threads_225600))];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_225602 = slt32(smod32((local_tid_225549 *\n                                                             32 + 32 - 1 + 1) *\n                                                            11 - 1 +\n                                                            segsizze_compact_225568 -\n                                                            boundary_225567,\n                                                            segsizze_compact_225568),\n                                                     (local_tid_225549 * 32 +\n                                                      32 - 1 + 1) * 11 - 1 -\n                                                     (((local_tid_225549 -\n                                                        skip_threads_225600) *\n                                                       32 + 32 - 1 + 1) * 11 -\n         ",
            "                                             1));\n                        \n                        if (thread_active_225601 && inactive_225602) {\n                            x_225593 = x_225594;\n                        }\n                        if (thread_active_225601) {\n                            if (!inactive_225602) {\n                                int64_t defunc_1_op_res_225595 = add64(x_225593,\n                                                                       x_225594);\n                                \n                                x_225593 = defunc_1_op_res_225595;\n                            }\n                        }\n                    }\n                    if (sle32(wave_sizze_225551, skip_threads_225600)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    if (thread_active_225601) {\n                        // write result\n                        {\n                            ((volatile __local\n                              int64_t *) local_mem_225557)[squot64(byte_offsets_225553,\n                                                                   (int64_t) 8) +\n                                                           sext_i32_i64(local_tid_225549)] =\n                                x_225593;\n                            x_225594 = x_225593;\n                        }\n                    }\n                    if (sle32(wave_sizze_225551, skip_threads_225600)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    skip_threads_225600 *= 2;\n                }\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        bool no_carry_in_225603 = squot32(local_tid_225549, 32) == 0 ||\n             !ltid_in_bounds_225596;\n        \n        // carry-in for every block except the first\n        {\n            // read operands\n            {\n                if (!no_carry_in_225603) {\n                    x_225590 = x_225589;\n                    x_225589 =",
            " ((__local\n                                 int64_t *) local_mem_225557)[squot64(byte_offsets_225553,\n                                                                      (int64_t) 8) +\n                                                              (sext_i32_i64(squot32(local_tid_225549,\n                                                                                    32)) -\n                                                               (int64_t) 1)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_225604 = slt32(smod32((local_tid_225549 + 1) *\n                                                    11 - 1 +\n                                                    segsizze_compact_225568 -\n                                                    boundary_225567,\n                                                    segsizze_compact_225568),\n                                             (local_tid_225549 + 1) * 11 - 1 -\n                                             ((squot32(local_tid_225549, 32) *\n                                               32 - 1 + 1) * 11 - 1));\n                \n                if (!no_carry_in_225603) {\n                    if (inactive_225604) {\n                        x_225589 = x_225590;\n                    }\n                }\n                if (!no_carry_in_225603) {\n                    if (!inactive_225604) {\n                        int64_t defunc_1_op_res_225591 = add64(x_225589,\n                                                               x_225590);\n                        \n                        x_225589 = defunc_1_op_res_225591;\n                    }\n                }\n            }\n            // write final result\n            {\n                if (!no_carry_in_225603) {\n                    ((__local\n                      int64_t *) local_mem_225557)[squot64(byte_offsets_225553,\n                                                           (int64_t) 8) +\n                                    ",
            "               sext_i32_i64(local_tid_225549)] =\n                        x_225589;\n                }\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // restore correct values for first block\n        {\n            if (squot32(local_tid_225549, 32) == 0 && ltid_in_bounds_225596) {\n                ((__local\n                  int64_t *) local_mem_225557)[squot64(byte_offsets_225553,\n                                                       (int64_t) 8) +\n                                               sext_i32_i64(local_tid_225549)] =\n                    x_225590;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (local_tid_225549 == 0) {\n            acc_225592 = ((__local\n                           int64_t *) local_mem_225557)[squot64(byte_offsets_225553,\n                                                                (int64_t) 8) +\n                                                        (segscan_group_sizze_200635 -\n                                                         (int64_t) 1)];\n        } else {\n            acc_225592 = ((__local\n                           int64_t *) local_mem_225557)[squot64(byte_offsets_225553,\n                                                                (int64_t) 8) +\n                                                        (sext_i32_i64(local_tid_225549) -\n                                                         (int64_t) 1)];\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    \n    int64_t prefix_225605 = (int64_t) 0;\n    bool block_new_sgm_225606 = sgm_idx_225566 == (int64_t) 0;\n    \n    // Perform lookback\n    {\n        if (block_new_sgm_225606 && local_tid_225549 == 0) {\n            ((volatile __global\n              int64_t *) incprefixes_mem_225546)[dynamic_id_225564] =\n                acc_225592;\n            mem_fence_global();\n            ((volatile __global\n              int8_t *) status_flags_mem_225542)[dynamic_id_225564] =\n                (int",
            "8_t) 2;\n            acc_225592 = (int64_t) 0;\n        }\n        if (!block_new_sgm_225606 && slt32(local_tid_225549,\n                                           wave_sizze_225551)) {\n            if (local_tid_225549 == 0) {\n                if (boundary_225567 == sext_i64_i32(segscan_group_sizze_200635 *\n                    (int64_t) 11)) {\n                    ((volatile __global\n                      int64_t *) aggregates_mem_225544)[dynamic_id_225564] =\n                        acc_225592;\n                    mem_fence_global();\n                    ((volatile __global\n                      int8_t *) status_flags_mem_225542)[dynamic_id_225564] =\n                        (int8_t) 1;\n                } else {\n                    ((volatile __global\n                      int64_t *) incprefixes_mem_225546)[dynamic_id_225564] =\n                        acc_225592;\n                    mem_fence_global();\n                    ((volatile __global\n                      int8_t *) status_flags_mem_225542)[dynamic_id_225564] =\n                        (int8_t) 2;\n                }\n                \n                int8_t tmp_225607;\n                \n                tmp_225607 = ((volatile __global\n                               int8_t *) status_flags_mem_225542)[dynamic_id_225564 -\n                                                                  (int64_t) 1];\n                ((volatile __local int8_t *) local_mem_225557)[(int64_t) 0] =\n                    tmp_225607;\n            }\n            mem_fence_local();\n            \n            int8_t status_225608;\n            \n            status_225608 = ((__local int8_t *) local_mem_225557)[(int64_t) 0];\n            if (status_225608 == (int8_t) 2) {\n                if (local_tid_225549 == 0) {\n                    prefix_225605 = ((volatile __global\n                                      int64_t *) incprefixes_mem_225546)[dynamic_id_225564 -\n                                                                         (int64_t) 1];\n              ",
            "  }\n            } else {\n                int32_t readOffset_225609 = dynamic_id_225564 -\n                        sext_i32_i64(wave_sizze_225551);\n                \n                while (slt32(wave_sizze_225551 * -1, readOffset_225609)) {\n                    int32_t read_i_225610 = readOffset_225609 +\n                            local_tid_225549;\n                    int64_t aggr_225611 = (int64_t) 0;\n                    int8_t flag_225612 = (int8_t) 0;\n                    \n                    if (sle32(0, read_i_225610)) {\n                        if (sle64(blockOff_225565 -\n                                  (sext_i32_i64(read_i_225610 + 1) *\n                                   segscan_group_sizze_200635 * (int64_t) 11 -\n                                   (int64_t) 1), sgm_idx_225566)) {\n                            flag_225612 = ((volatile __global\n                                            int8_t *) status_flags_mem_225542)[sext_i32_i64(read_i_225610)];\n                            if (flag_225612 == (int8_t) 2) {\n                                aggr_225611 = ((volatile __global\n                                                int64_t *) incprefixes_mem_225546)[sext_i32_i64(read_i_225610)];\n                            } else {\n                                if (flag_225612 == (int8_t) 1) {\n                                    aggr_225611 = ((volatile __global\n                                                    int64_t *) aggregates_mem_225544)[sext_i32_i64(read_i_225610)];\n                                }\n                            }\n                        } else {\n                            flag_225612 = (int8_t) 2;\n                        }\n                    }\n                    ((__local\n                      int64_t *) local_mem_225557)[squot64(warp_byte_offset_225555,\n                                                           (int64_t) 8) +\n                                                   sext_i32_i64(local_tid_225549)] =\n                        aggr_2256",
            "11;\n                    ((__local\n                      int8_t *) local_mem_225557)[sext_i32_i64(local_tid_225549)] =\n                        flag_225612;\n                    flag_225612 = ((__local\n                                    int8_t *) local_mem_225557)[sext_i32_i64(wave_sizze_225551) -\n                                                                (int64_t) 1];\n                    if (slt8(flag_225612, (int8_t) 2)) {\n                        int8_t flg_x_225616;\n                        int8_t flg_y_225617;\n                        int64_t x_225613;\n                        int64_t x_225614;\n                        int32_t skip_threads_225618;\n                        \n                        // read input for in-block scan\n                        {\n                            flg_y_225617 = ((volatile __local\n                                             int8_t *) local_mem_225557)[sext_i32_i64(local_tid_225549)];\n                            x_225614 = ((volatile __local\n                                         int64_t *) local_mem_225557)[squot64(warp_byte_offset_225555,\n                                                                              (int64_t) 8) +\n                                                                      sext_i32_i64(local_tid_225549)];\n                            if ((local_tid_225549 - squot32(local_tid_225549,\n                                                            32) * 32) == 0) {\n                                x_225613 = x_225614;\n                                flg_x_225616 = flg_y_225617;\n                            }\n                        }\n                        // in-block scan (hopefully no barriers needed)\n                        {\n                            skip_threads_225618 = 1;\n                            while (slt32(skip_threads_225618, 32)) {\n                                if (sle32(skip_threads_225618,\n                                          local_tid_225549 -\n                                       ",
            "   squot32(local_tid_225549, 32) * 32)) {\n                                    // read operands\n                                    {\n                                        flg_x_225616 = ((volatile __local\n                                                         int8_t *) local_mem_225557)[sext_i32_i64(local_tid_225549) -\n                                                                                     sext_i32_i64(skip_threads_225618)];\n                                        x_225613 = ((volatile __local\n                                                     int64_t *) local_mem_225557)[squot64(warp_byte_offset_225555,\n                                                                                          (int64_t) 8) +\n                                                                                  (sext_i32_i64(local_tid_225549) -\n                                                                                   sext_i32_i64(skip_threads_225618))];\n                                    }\n                                    // perform operation\n                                    {\n                                        if (flg_y_225617 == (int8_t) 2 ||\n                                            flg_y_225617 == (int8_t) 0) {\n                                            flg_x_225616 = flg_y_225617;\n                                            x_225613 = x_225614;\n                                        } else {\n                                            int64_t defunc_1_op_res_225615 =\n                                                    add64(x_225613, x_225614);\n                                            \n                                            x_225613 = defunc_1_op_res_225615;\n                                        }\n                                    }\n                                    // write result\n                                    {\n                                        ((volatile __local\n                                          int8_t *)",
            " local_mem_225557)[sext_i32_i64(local_tid_225549)] =\n                                            flg_x_225616;\n                                        flg_y_225617 = flg_x_225616;\n                                        ((volatile __local\n                                          int64_t *) local_mem_225557)[squot64(warp_byte_offset_225555,\n                                                                               (int64_t) 8) +\n                                                                       sext_i32_i64(local_tid_225549)] =\n                                            x_225613;\n                                        x_225614 = x_225613;\n                                    }\n                                }\n                                skip_threads_225618 *= 2;\n                            }\n                        }\n                    }\n                    flag_225612 = ((__local\n                                    int8_t *) local_mem_225557)[sext_i32_i64(wave_sizze_225551) -\n                                                                (int64_t) 1];\n                    aggr_225611 = ((__local\n                                    int64_t *) local_mem_225557)[squot64(warp_byte_offset_225555,\n                                                                         (int64_t) 8) +\n                                                                 (sext_i32_i64(wave_sizze_225551) -\n                                                                  (int64_t) 1)];\n                    if (flag_225612 == (int8_t) 2) {\n                        readOffset_225609 = wave_sizze_225551 * -1;\n                    } else {\n                        if (flag_225612 == (int8_t) 1) {\n                            readOffset_225609 -= wave_sizze_225551;\n                        }\n                    }\n                    if (slt8((int8_t) 0, flag_225612)) {\n                        int64_t x_225619 = aggr_225611;\n                        int64_t x_225620 = prefix_225605;\n          ",
            "              int64_t defunc_1_op_res_225621 = add64(x_225619,\n                                                               x_225620);\n                        \n                        prefix_225605 = defunc_1_op_res_225621;\n                    }\n                    mem_fence_local();\n                }\n            }\n            if (local_tid_225549 == 0) {\n                if (boundary_225567 == sext_i64_i32(segscan_group_sizze_200635 *\n                    (int64_t) 11)) {\n                    int64_t x_225622 = prefix_225605;\n                    int64_t x_225623 = acc_225592;\n                    int64_t defunc_1_op_res_225624 = add64(x_225622, x_225623);\n                    \n                    ((volatile __global\n                      int64_t *) incprefixes_mem_225546)[dynamic_id_225564] =\n                        defunc_1_op_res_225624;\n                    mem_fence_global();\n                    ((volatile __global\n                      int8_t *) status_flags_mem_225542)[dynamic_id_225564] =\n                        (int8_t) 2;\n                }\n                ((__local\n                  int64_t *) local_mem_225557)[squot64(warp_byte_offset_225555,\n                                                       (int64_t) 8)] =\n                    prefix_225605;\n                acc_225592 = (int64_t) 0;\n            }\n        }\n        if (!(dynamic_id_225564 == (int64_t) 0)) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            prefix_225605 = ((__local\n                              int64_t *) local_mem_225557)[squot64(warp_byte_offset_225555,\n                                                                   (int64_t) 8)];\n            barrier(CLK_LOCAL_MEM_FENCE);\n        }\n    }\n    // Distribute results\n    {\n        int64_t x_225625;\n        int64_t x_225626;\n        int64_t x_225628 = prefix_225605;\n        int64_t x_225629 = acc_225592;\n        \n        if (slt32(local_tid_225549 * 11, boundary_225567) &&\n            !block_new_sgm_225606) {\n            int64_t defun",
            "c_1_op_res_225630 = add64(x_225628, x_225629);\n            \n            x_225625 = defunc_1_op_res_225630;\n        } else {\n            x_225625 = acc_225592;\n        }\n        \n        int32_t stopping_point_225631 = segsizze_compact_225568 -\n                srem32(local_tid_225549 * 11 - 1 + segsizze_compact_225568 -\n                       boundary_225567, segsizze_compact_225568);\n        \n        for (int64_t i_225632 = 0; i_225632 < (int64_t) 11; i_225632++) {\n            if (slt32(sext_i64_i32(i_225632), stopping_point_225631 - 1)) {\n                x_225626 = private_mem_225569[i_225632];\n                \n                int64_t defunc_1_op_res_225627 = add64(x_225625, x_225626);\n                \n                private_mem_225569[i_225632] = defunc_1_op_res_225627;\n            }\n        }\n    }\n    // Transpose scan output and Write it to global memory in coalesced fashion\n    {\n        for (int64_t i_225633 = 0; i_225633 < (int64_t) 11; i_225633++) {\n            int64_t sharedIdx_225634 = sext_i32_i64(local_tid_225549 * 11) +\n                    i_225633;\n            int64_t tmp_225635;\n            \n            tmp_225635 = private_mem_225569[i_225633];\n            ((__local int64_t *) local_mem_225557)[sharedIdx_225634] =\n                tmp_225635;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int64_t i_225636 = 0; i_225636 < (int64_t) 11; i_225636++) {\n            int64_t flat_idx_225637 = blockOff_225565 +\n                    segscan_group_sizze_200635 * i_225636 +\n                    sext_i32_i64(local_tid_225549);\n            int64_t slice_225638 = defunc_0_f_res_196740;\n            int64_t slice_225639 = n_p_196694 * slice_225638;\n            int64_t slice_225640 = m_196691 * slice_225639;\n            int64_t gtid_200639 = squot64(flat_idx_225637, slice_225639);\n            int64_t remnant_225641 = flat_idx_225637 - gtid_200639 *\n                    slice_225639;\n            int64_t gtid_200640 = squot64(remnant_225641, slice_225638);\n",
            "            int64_t remnant_225642 = remnant_225641 - gtid_200640 *\n                    slice_225638;\n            int64_t gtid_200641 = remnant_225642;\n            int64_t remnant_225643 = remnant_225642 - gtid_200641;\n            \n            if (slt64(flat_idx_225637, m_196691 * n_p_196694 *\n                      defunc_0_f_res_196740)) {\n                int64_t tmp_225644;\n                \n                tmp_225644 = ((__local\n                               int64_t *) local_mem_225557)[flat_idx_225637 -\n                                                            blockOff_225565];\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_225644;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    // If this is the last block, reset the dynamicId\n    {\n        if (dynamic_id_225564 == sdiv_up64(m_196691 * n_p_196694 *\n                                           defunc_0_f_res_196740,\n                                           segscan_group_sizze_200635 *\n                                           (int64_t) 11) - (int64_t) 1) {\n            ((__global int32_t *) mainziid_counter_mem_225540)[(int64_t) 0] = 0;\n        }\n    }\n    \n  error_0:\n    return;\n    #undef segscan_group_sizze_200635\n}\n__kernel void mainzisegscan_211766(__global int *global_failure,\n                                   int failure_is_an_option, __global\n                                   int64_t *global_failure_args,\n                                   uint local_mem_227245_backing_offset_0,\n                                   int64_t m_196691, int64_t n_p_196694,\n                                   float i64_res_196737, int64_t C_len_196743,\n                                   int64_",
            "t lifted_single_ma_l_arg_197247,\n                                   __global unsigned char *mem_223557, __global\n                                   unsigned char *ext_mem_223569, __global\n                                   unsigned char *mem_223574, __global\n                                   unsigned char *mainziid_counter_mem_227228,\n                                   __global\n                                   unsigned char *status_flags_mem_227230,\n                                   __global\n                                   unsigned char *aggregates_mem_227232,\n                                   __global\n                                   unsigned char *incprefixes_mem_227234)\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    volatile unsigned char *local_mem_227245_backing_0 =\n                           &shared_mem[local_mem_227245_backing_offset_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_227236;\n    int32_t local_tid_227237;\n    int64_t group_sizze_227240;\n    int32_t wave_sizze_227239;\n    int32_t group_tid_227238;\n    \n    global_tid_227236 = get_global_id(0);\n    local_tid_227237 = get_local_id(0);\n    group_sizze_227240 = get_local_size(0);\n    wave_sizze_227239 = LOCKSTEP_WIDTH;\n    group_tid_227238 = get_group_id(0);\n    \n    int32_t phys_tid_211766 = global_tid_227236;\n    int64_t byte_offsets_227241 = (int64_t) 0;\n    int64_t byte_offsets_227242 = segscan_group_sizze_211760 * (int64_t) 4;\n    int64_t warp_byte_offset_227243 = (int64_t) 32;\n    int64_t warp_byte_offset_227244 = (int64_t) 160;\n    \n    // Allocate reused shared memeory\n    { }\n    \n    __local unsigned char *local_mem_227245;\n    \n    local_",
            "mem_227245 = (__local unsigned char *) local_mem_227245_backing_0;\n    \n    int64_t trans_arr_len_227246 = (int64_t) 23 * segscan_group_sizze_211760;\n    int32_t dynamic_id_227252;\n    \n    if (local_tid_227237 == 0) {\n        dynamic_id_227252 = atomic_add_i32_global(&((volatile __global\n                                                     int *) mainziid_counter_mem_227228)[(int64_t) 0],\n                                                  (int) 1);\n        ((__local int32_t *) local_mem_227245)[(int64_t) 0] = dynamic_id_227252;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    dynamic_id_227252 = ((__local int32_t *) local_mem_227245)[(int64_t) 0];\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t blockOff_227253 = sext_i32_i64(dynamic_id_227252) * (int64_t) 23 *\n            segscan_group_sizze_211760;\n    int64_t sgm_idx_227254 = smod64(blockOff_227253,\n                                    lifted_single_ma_l_arg_197247);\n    int32_t boundary_227255 = sext_i64_i32(smin64((int64_t) 23 *\n                                                  segscan_group_sizze_211760,\n                                                  lifted_single_ma_l_arg_197247 -\n                                                  sgm_idx_227254));\n    int32_t segsizze_compact_227256 = sext_i64_i32(smin64((int64_t) 23 *\n                                                          segscan_group_sizze_211760,\n                                                          lifted_single_ma_l_arg_197247));\n    float private_mem_227257[(int64_t) 23];\n    \n    // Load and map\n    {\n        for (int64_t i_227259 = 0; i_227259 < (int64_t) 23; i_227259++) {\n            int64_t phys_tid_227260 = blockOff_227253 +\n                    sext_i32_i64(local_tid_227237) + i_227259 *\n                    segscan_group_sizze_211760;\n            int64_t slice_227261 = lifted_single_ma_l_arg_197247;\n            int64_t slice_227262 = m_196691 * slice_227261;\n            int64_t gtid_211764 = squot64(phys_tid_227260, slice_227261);\n          ",
            "  int64_t remnant_227263 = phys_tid_227260 - gtid_211764 *\n                    slice_227261;\n            int64_t gtid_211765 = remnant_227263;\n            int64_t remnant_227264 = remnant_227263 - gtid_211765;\n            \n            if (slt64(phys_tid_227260, m_196691 *\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 *) me",
            "m_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                private_mem_227257[i_227259] = defunc_0_f_res_211774;\n            } else {\n                private_mem_227257[i_227259] = 0.0F;\n            }\n        }\n    }\n    // Transpose scan inputs\n    {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int64_t i_2",
            "27265 = 0; i_227265 < (int64_t) 23; i_227265++) {\n            int64_t sharedIdx_227266 = sext_i32_i64(local_tid_227237) +\n                    i_227265 * segscan_group_sizze_211760;\n            float tmp_227267;\n            \n            tmp_227267 = private_mem_227257[i_227265];\n            ((__local float *) local_mem_227245)[sharedIdx_227266] = tmp_227267;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int32_t i_227268 = 0; i_227268 < 23; i_227268++) {\n            int32_t sharedIdx_227269 = local_tid_227237 * 23 + i_227268;\n            float tmp_227270;\n            \n            tmp_227270 = ((__local\n                           float *) local_mem_227245)[sext_i32_i64(sharedIdx_227269)];\n            private_mem_227257[sext_i32_i64(i_227268)] = tmp_227270;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    // Per thread scan\n    {\n        int32_t gidx_227271 = local_tid_227237 * 23 + 1;\n        \n        for (int64_t i_227272 = 0; i_227272 < (int64_t) 22; i_227272++) {\n            bool new_sgm_227273 = smod32(gidx_227271 + sext_i64_i32(i_227272) -\n                                         boundary_227255,\n                                         segsizze_compact_227256) == 0;\n            \n            if (!new_sgm_227273) {\n                float x_211767;\n                float x_211768;\n                \n                x_211767 = private_mem_227257[i_227272];\n                x_211768 = private_mem_227257[i_227272 + (int64_t) 1];\n                \n                float defunc_1_op_res_211769 = x_211767 + x_211768;\n                \n                private_mem_227257[i_227272 + (int64_t) 1] =\n                    defunc_1_op_res_211769;\n            }\n        }\n    }\n    // Publish results in shared memory\n    {\n        float tmp_227274;\n        \n        tmp_227274 = private_mem_227257[(int64_t) 22];\n        ((__local float *) local_mem_227245)[squot64(byte_offsets_227241,\n                                                     (int64_t) 4) +\n                ",
            "                             sext_i32_i64(local_tid_227237)] =\n            tmp_227274;\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    \n    float acc_227278;\n    \n    // Scan results (with warp scan)\n    {\n        float x_227275;\n        float x_227276;\n        float x_227279;\n        float x_227280;\n        bool ltid_in_bounds_227282 = slt64(sext_i32_i64(local_tid_227237),\n                                           segscan_group_sizze_211760);\n        int32_t skip_threads_227283;\n        \n        // read input for in-block scan\n        {\n            if (ltid_in_bounds_227282) {\n                x_227276 = ((volatile __local\n                             float *) local_mem_227245)[squot64(byte_offsets_227241,\n                                                                (int64_t) 4) +\n                                                        sext_i32_i64(local_tid_227237)];\n                if ((local_tid_227237 - squot32(local_tid_227237, 32) * 32) ==\n                    0) {\n                    x_227275 = x_227276;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_227283 = 1;\n            while (slt32(skip_threads_227283, 32)) {\n                bool thread_active_227284 = sle32(skip_threads_227283,\n                                                  local_tid_227237 -\n                                                  squot32(local_tid_227237,\n                                                          32) * 32) &&\n                     ltid_in_bounds_227282;\n                \n                if (thread_active_227284) {\n                    // read operands\n                    {\n                        x_227275 = ((volatile __local\n                                     float *) local_mem_227245)[squot64(byte_offsets_227241,\n                                                                        (int64_t) 4) +\n                                                                (sext_i32_i64(local_tid",
            "_227237) -\n                                                                 sext_i32_i64(skip_threads_227283))];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_227285 = slt32(smod32((local_tid_227237 + 1) *\n                                                        23 - 1 +\n                                                        segsizze_compact_227256 -\n                                                        boundary_227255,\n                                                        segsizze_compact_227256),\n                                                 (local_tid_227237 + 1) * 23 -\n                                                 1 - ((local_tid_227237 -\n                                                       skip_threads_227283 +\n                                                       1) * 23 - 1));\n                    \n                    if (thread_active_227284 && inactive_227285) {\n                        x_227275 = x_227276;\n                    }\n                    if (thread_active_227284) {\n                        if (!inactive_227285) {\n                            float defunc_1_op_res_227277 = x_227275 + x_227276;\n                            \n                            x_227275 = defunc_1_op_res_227277;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_227239, skip_threads_227283)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_227284) {\n                    // write result\n                    {\n                        ((volatile __local\n                          float *) local_mem_227245)[squot64(byte_offsets_227241,\n                                                             (int64_t) 4) +\n                                                     sext_i32_i64(local_tid_227237)] =\n                            x_227275;\n                        x_227276 = x_227275;\n          ",
            "          }\n                }\n                if (sle32(wave_sizze_227239, skip_threads_227283)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_227283 *= 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_227237 - squot32(local_tid_227237, 32) * 32) == 31 &&\n                ltid_in_bounds_227282) {\n                ((volatile __local\n                  float *) local_mem_227245)[squot64(byte_offsets_227241,\n                                                     (int64_t) 4) +\n                                             sext_i32_i64(squot32(local_tid_227237,\n                                                                  32))] =\n                    x_227275;\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_227286;\n            \n            // read input for in-block scan\n            {\n                if (squot32(local_tid_227237, 32) == 0 &&\n                    ltid_in_bounds_227282) {\n                    x_227280 = ((volatile __local\n                                 float *) local_mem_227245)[squot64(byte_offsets_227241,\n                                                                    (int64_t) 4) +\n                                                            sext_i32_i64(local_tid_227237)];\n                    if ((local_tid_227237 - squot32(local_tid_227237, 32) *\n                         32) == 0) {\n                        x_227279 = x_227280;\n                    }\n                }\n            }\n            // in-block scan (hopefully no barriers needed)\n            {\n                skip_threads_227286 = 1;\n                while (slt32(skip_threads_227286, 32)) {\n                    bool thread_active_227287 = sle32(skip_threads_227286,\n             ",
            "                                         local_tid_227237 -\n                                                      squot32(local_tid_227237,\n                                                              32) * 32) &&\n                         (squot32(local_tid_227237, 32) == 0 &&\n                          ltid_in_bounds_227282);\n                    \n                    if (thread_active_227287) {\n                        // read operands\n                        {\n                            x_227279 = ((volatile __local\n                                         float *) local_mem_227245)[squot64(byte_offsets_227241,\n                                                                            (int64_t) 4) +\n                                                                    (sext_i32_i64(local_tid_227237) -\n                                                                     sext_i32_i64(skip_threads_227286))];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_227288 = slt32(smod32((local_tid_227237 *\n                                                             32 + 32 - 1 + 1) *\n                                                            23 - 1 +\n                                                            segsizze_compact_227256 -\n                                                            boundary_227255,\n                                                            segsizze_compact_227256),\n                                                     (local_tid_227237 * 32 +\n                                                      32 - 1 + 1) * 23 - 1 -\n                                                     (((local_tid_227237 -\n                                                        skip_threads_227286) *\n                                                       32 + 32 - 1 + 1) * 23 -\n                                                      1));\n                        \n                    ",
            "    if (thread_active_227287 && inactive_227288) {\n                            x_227279 = x_227280;\n                        }\n                        if (thread_active_227287) {\n                            if (!inactive_227288) {\n                                float defunc_1_op_res_227281 = x_227279 +\n                                      x_227280;\n                                \n                                x_227279 = defunc_1_op_res_227281;\n                            }\n                        }\n                    }\n                    if (sle32(wave_sizze_227239, skip_threads_227286)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    if (thread_active_227287) {\n                        // write result\n                        {\n                            ((volatile __local\n                              float *) local_mem_227245)[squot64(byte_offsets_227241,\n                                                                 (int64_t) 4) +\n                                                         sext_i32_i64(local_tid_227237)] =\n                                x_227279;\n                            x_227280 = x_227279;\n                        }\n                    }\n                    if (sle32(wave_sizze_227239, skip_threads_227286)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    skip_threads_227286 *= 2;\n                }\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        bool no_carry_in_227289 = squot32(local_tid_227237, 32) == 0 ||\n             !ltid_in_bounds_227282;\n        \n        // carry-in for every block except the first\n        {\n            // read operands\n            {\n                if (!no_carry_in_227289) {\n                    x_227276 = x_227275;\n                    x_227275 = ((__local\n                                 float *) local_mem_227245)[squot64(byte_offsets_227241,\n                                          ",
            "                          (int64_t) 4) +\n                                                            (sext_i32_i64(squot32(local_tid_227237,\n                                                                                  32)) -\n                                                             (int64_t) 1)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_227290 = slt32(smod32((local_tid_227237 + 1) *\n                                                    23 - 1 +\n                                                    segsizze_compact_227256 -\n                                                    boundary_227255,\n                                                    segsizze_compact_227256),\n                                             (local_tid_227237 + 1) * 23 - 1 -\n                                             ((squot32(local_tid_227237, 32) *\n                                               32 - 1 + 1) * 23 - 1));\n                \n                if (!no_carry_in_227289) {\n                    if (inactive_227290) {\n                        x_227275 = x_227276;\n                    }\n                }\n                if (!no_carry_in_227289) {\n                    if (!inactive_227290) {\n                        float defunc_1_op_res_227277 = x_227275 + x_227276;\n                        \n                        x_227275 = defunc_1_op_res_227277;\n                    }\n                }\n            }\n            // write final result\n            {\n                if (!no_carry_in_227289) {\n                    ((__local\n                      float *) local_mem_227245)[squot64(byte_offsets_227241,\n                                                         (int64_t) 4) +\n                                                 sext_i32_i64(local_tid_227237)] =\n                        x_227275;\n                }\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // restore correct values for first block\n        {\n      ",
            "      if (squot32(local_tid_227237, 32) == 0 && ltid_in_bounds_227282) {\n                ((__local\n                  float *) local_mem_227245)[squot64(byte_offsets_227241,\n                                                     (int64_t) 4) +\n                                             sext_i32_i64(local_tid_227237)] =\n                    x_227276;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (local_tid_227237 == 0) {\n            acc_227278 = ((__local\n                           float *) local_mem_227245)[squot64(byte_offsets_227241,\n                                                              (int64_t) 4) +\n                                                      (segscan_group_sizze_211760 -\n                                                       (int64_t) 1)];\n        } else {\n            acc_227278 = ((__local\n                           float *) local_mem_227245)[squot64(byte_offsets_227241,\n                                                              (int64_t) 4) +\n                                                      (sext_i32_i64(local_tid_227237) -\n                                                       (int64_t) 1)];\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    \n    float prefix_227291 = 0.0F;\n    bool block_new_sgm_227292 = sgm_idx_227254 == (int64_t) 0;\n    \n    // Perform lookback\n    {\n        if (block_new_sgm_227292 && local_tid_227237 == 0) {\n            ((volatile __global\n              float *) incprefixes_mem_227234)[dynamic_id_227252] = acc_227278;\n            mem_fence_global();\n            ((volatile __global\n              int8_t *) status_flags_mem_227230)[dynamic_id_227252] =\n                (int8_t) 2;\n            acc_227278 = 0.0F;\n        }\n        if (!block_new_sgm_227292 && slt32(local_tid_227237,\n                                           wave_sizze_227239)) {\n            if (local_tid_227237 == 0) {\n                if (boundary_227255 == sext_i64_i32(segscan_gr",
            "oup_sizze_211760 *\n                    (int64_t) 23)) {\n                    ((volatile __global\n                      float *) aggregates_mem_227232)[dynamic_id_227252] =\n                        acc_227278;\n                    mem_fence_global();\n                    ((volatile __global\n                      int8_t *) status_flags_mem_227230)[dynamic_id_227252] =\n                        (int8_t) 1;\n                } else {\n                    ((volatile __global\n                      float *) incprefixes_mem_227234)[dynamic_id_227252] =\n                        acc_227278;\n                    mem_fence_global();\n                    ((volatile __global\n                      int8_t *) status_flags_mem_227230)[dynamic_id_227252] =\n                        (int8_t) 2;\n                }\n                \n                int8_t tmp_227293;\n                \n                tmp_227293 = ((volatile __global\n                               int8_t *) status_flags_mem_227230)[dynamic_id_227252 -\n                                                                  (int64_t) 1];\n                ((volatile __local int8_t *) local_mem_227245)[(int64_t) 0] =\n                    tmp_227293;\n            }\n            mem_fence_local();\n            \n            int8_t status_227294;\n            \n            status_227294 = ((__local int8_t *) local_mem_227245)[(int64_t) 0];\n            if (status_227294 == (int8_t) 2) {\n                if (local_tid_227237 == 0) {\n                    prefix_227291 = ((volatile __global\n                                      float *) incprefixes_mem_227234)[dynamic_id_227252 -\n                                                                       (int64_t) 1];\n                }\n            } else {\n                int32_t readOffset_227295 = dynamic_id_227252 -\n                        sext_i32_i64(wave_sizze_227239);\n                \n                while (slt32(wave_sizze_227239 * -1, readOffset_227295)) {\n                    int32_t read_i_227296 = readOffset_",
            "227295 +\n                            local_tid_227237;\n                    float aggr_227297 = 0.0F;\n                    int8_t flag_227298 = (int8_t) 0;\n                    \n                    if (sle32(0, read_i_227296)) {\n                        if (sle64(blockOff_227253 -\n                                  (sext_i32_i64(read_i_227296 + 1) *\n                                   segscan_group_sizze_211760 * (int64_t) 23 -\n                                   (int64_t) 1), sgm_idx_227254)) {\n                            flag_227298 = ((volatile __global\n                                            int8_t *) status_flags_mem_227230)[sext_i32_i64(read_i_227296)];\n                            if (flag_227298 == (int8_t) 2) {\n                                aggr_227297 = ((volatile __global\n                                                float *) incprefixes_mem_227234)[sext_i32_i64(read_i_227296)];\n                            } else {\n                                if (flag_227298 == (int8_t) 1) {\n                                    aggr_227297 = ((volatile __global\n                                                    float *) aggregates_mem_227232)[sext_i32_i64(read_i_227296)];\n                                }\n                            }\n                        } else {\n                            flag_227298 = (int8_t) 2;\n                        }\n                    }\n                    ((__local\n                      float *) local_mem_227245)[squot64(warp_byte_offset_227243,\n                                                         (int64_t) 4) +\n                                                 sext_i32_i64(local_tid_227237)] =\n                        aggr_227297;\n                    ((__local\n                      int8_t *) local_mem_227245)[sext_i32_i64(local_tid_227237)] =\n                        flag_227298;\n                    flag_227298 = ((__local\n                                    int8_t *) local_mem_227245)[sext_i32_i64(wave_sizze_227239) -\n               ",
            "                                                 (int64_t) 1];\n                    if (slt8(flag_227298, (int8_t) 2)) {\n                        int8_t flg_x_227302;\n                        int8_t flg_y_227303;\n                        float x_227299;\n                        float x_227300;\n                        int32_t skip_threads_227304;\n                        \n                        // read input for in-block scan\n                        {\n                            flg_y_227303 = ((volatile __local\n                                             int8_t *) local_mem_227245)[sext_i32_i64(local_tid_227237)];\n                            x_227300 = ((volatile __local\n                                         float *) local_mem_227245)[squot64(warp_byte_offset_227243,\n                                                                            (int64_t) 4) +\n                                                                    sext_i32_i64(local_tid_227237)];\n                            if ((local_tid_227237 - squot32(local_tid_227237,\n                                                            32) * 32) == 0) {\n                                x_227299 = x_227300;\n                                flg_x_227302 = flg_y_227303;\n                            }\n                        }\n                        // in-block scan (hopefully no barriers needed)\n                        {\n                            skip_threads_227304 = 1;\n                            while (slt32(skip_threads_227304, 32)) {\n                                if (sle32(skip_threads_227304,\n                                          local_tid_227237 -\n                                          squot32(local_tid_227237, 32) * 32)) {\n                                    // read operands\n                                    {\n                                        flg_x_227302 = ((volatile __local\n                                                         int8_t *) local_mem_227245)[sext_i32_i64(local_tid_227237)",
            " -\n                                                                                     sext_i32_i64(skip_threads_227304)];\n                                        x_227299 = ((volatile __local\n                                                     float *) local_mem_227245)[squot64(warp_byte_offset_227243,\n                                                                                        (int64_t) 4) +\n                                                                                (sext_i32_i64(local_tid_227237) -\n                                                                                 sext_i32_i64(skip_threads_227304))];\n                                    }\n                                    // perform operation\n                                    {\n                                        if (flg_y_227303 == (int8_t) 2 ||\n                                            flg_y_227303 == (int8_t) 0) {\n                                            flg_x_227302 = flg_y_227303;\n                                            x_227299 = x_227300;\n                                        } else {\n                                            float defunc_1_op_res_227301 =\n                                                  x_227299 + x_227300;\n                                            \n                                            x_227299 = defunc_1_op_res_227301;\n                                        }\n                                    }\n                                    // write result\n                                    {\n                                        ((volatile __local\n                                          int8_t *) local_mem_227245)[sext_i32_i64(local_tid_227237)] =\n                                            flg_x_227302;\n                                        flg_y_227303 = flg_x_227302;\n                                        ((volatile __local\n                                          float *) local_mem_227245)[squot64(warp_byte_offset_227243,",
            "\n                                                                             (int64_t) 4) +\n                                                                     sext_i32_i64(local_tid_227237)] =\n                                            x_227299;\n                                        x_227300 = x_227299;\n                                    }\n                                }\n                                skip_threads_227304 *= 2;\n                            }\n                        }\n                    }\n                    flag_227298 = ((__local\n                                    int8_t *) local_mem_227245)[sext_i32_i64(wave_sizze_227239) -\n                                                                (int64_t) 1];\n                    aggr_227297 = ((__local\n                                    float *) local_mem_227245)[squot64(warp_byte_offset_227243,\n                                                                       (int64_t) 4) +\n                                                               (sext_i32_i64(wave_sizze_227239) -\n                                                                (int64_t) 1)];\n                    if (flag_227298 == (int8_t) 2) {\n                        readOffset_227295 = wave_sizze_227239 * -1;\n                    } else {\n                        if (flag_227298 == (int8_t) 1) {\n                            readOffset_227295 -= wave_sizze_227239;\n                        }\n                    }\n                    if (slt8((int8_t) 0, flag_227298)) {\n                        float x_227305 = aggr_227297;\n                        float x_227306 = prefix_227291;\n                        float defunc_1_op_res_227307 = x_227305 + x_227306;\n                        \n                        prefix_227291 = defunc_1_op_res_227307;\n                    }\n                    mem_fence_local();\n                }\n            }\n            if (local_tid_227237 == 0) {\n                if (boundary_227255 == sext_i64_i32(segscan_group_siz",
            "ze_211760 *\n                    (int64_t) 23)) {\n                    float x_227308 = prefix_227291;\n                    float x_227309 = acc_227278;\n                    float defunc_1_op_res_227310 = x_227308 + x_227309;\n                    \n                    ((volatile __global\n                      float *) incprefixes_mem_227234)[dynamic_id_227252] =\n                        defunc_1_op_res_227310;\n                    mem_fence_global();\n                    ((volatile __global\n                      int8_t *) status_flags_mem_227230)[dynamic_id_227252] =\n                        (int8_t) 2;\n                }\n                ((__local\n                  float *) local_mem_227245)[squot64(warp_byte_offset_227243,\n                                                     (int64_t) 4)] =\n                    prefix_227291;\n                acc_227278 = 0.0F;\n            }\n        }\n        if (!(dynamic_id_227252 == (int64_t) 0)) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            prefix_227291 = ((__local\n                              float *) local_mem_227245)[squot64(warp_byte_offset_227243,\n                                                                 (int64_t) 4)];\n            barrier(CLK_LOCAL_MEM_FENCE);\n        }\n    }\n    // Distribute results\n    {\n        float x_227311;\n        float x_227312;\n        float x_227314 = prefix_227291;\n        float x_227315 = acc_227278;\n        \n        if (slt32(local_tid_227237 * 23, boundary_227255) &&\n            !block_new_sgm_227292) {\n            float defunc_1_op_res_227316 = x_227314 + x_227315;\n            \n            x_227311 = defunc_1_op_res_227316;\n        } else {\n            x_227311 = acc_227278;\n        }\n        \n        int32_t stopping_point_227317 = segsizze_compact_227256 -\n                srem32(local_tid_227237 * 23 - 1 + segsizze_compact_227256 -\n                       boundary_227255, segsizze_compact_227256);\n        \n        for (int64_t i_227318 = 0; i_227318 < (int64_t) 23; i_227318++) {\n    ",
            "        if (slt32(sext_i64_i32(i_227318), stopping_point_227317 - 1)) {\n                x_227312 = private_mem_227257[i_227318];\n                \n                float defunc_1_op_res_227313 = x_227311 + x_227312;\n                \n                private_mem_227257[i_227318] = defunc_1_op_res_227313;\n            }\n        }\n    }\n    // Transpose scan output and Write it to global memory in coalesced fashion\n    {\n        for (int64_t i_227319 = 0; i_227319 < (int64_t) 23; i_227319++) {\n            int64_t sharedIdx_227320 = sext_i32_i64(local_tid_227237 * 23) +\n                    i_227319;\n            float tmp_227321;\n            \n            tmp_227321 = private_mem_227257[i_227319];\n            ((__local float *) local_mem_227245)[sharedIdx_227320] = tmp_227321;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int64_t i_227322 = 0; i_227322 < (int64_t) 23; i_227322++) {\n            int64_t flat_idx_227323 = blockOff_227253 +\n                    segscan_group_sizze_211760 * i_227322 +\n                    sext_i32_i64(local_tid_227237);\n            int64_t slice_227324 = lifted_single_ma_l_arg_197247;\n            int64_t slice_227325 = m_196691 * slice_227324;\n            int64_t gtid_211764 = squot64(flat_idx_227323, slice_227324);\n            int64_t remnant_227326 = flat_idx_227323 - gtid_211764 *\n                    slice_227324;\n            int64_t gtid_211765 = remnant_227326;\n            int64_t remnant_227327 = remnant_227326 - gtid_211765;\n            \n            if (slt64(flat_idx_227323, m_196691 *\n                      lifted_single_ma_l_arg_197247)) {\n                float tmp_227328;\n                \n                tmp_227328 = ((__local\n                               float *) local_mem_227245)[flat_idx_227323 -\n                                                          blockOff_227253];\n                ((__global float *) mem_223574)[gtid_211764 *\n                                                lifted_single_ma_l_arg_197247 +\n         ",
            "                                       gtid_211765] = tmp_227328;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    // If this is the last block, reset the dynamicId\n    {\n        if (dynamic_id_227252 == sdiv_up64(m_196691 *\n                                           lifted_single_ma_l_arg_197247,\n                                           segscan_group_sizze_211760 *\n                                           (int64_t) 23) - (int64_t) 1) {\n            ((__global int32_t *) mainziid_counter_mem_227228)[(int64_t) 0] = 0;\n        }\n    }\n    \n  error_0:\n    return;\n    #undef segscan_group_sizze_211760\n}\n__kernel void mainzisegscan_211897(__global int *global_failure,\n                                   int failure_is_an_option, __global\n                                   int64_t *global_failure_args,\n                                   uint local_mem_227426_backing_offset_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                                   __global unsigned char *mem_223574, __global\n                                   unsigned char *ext_mem_223586, __global\n                                   unsigned char *mem_223591, __global\n                                   unsigned char *mainziid_counter_mem_227409,\n                                   __global\n                                   unsigned char *status_flags_mem_227411,\n                                   __global\n                                   unsigned char *aggregates_mem_227413,\n                                   __global\n                                   unsigned char *incprefixes_mem_227415)\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    volatile unsigned char *local_mem_227426_backing_0 =\n                           &shared_mem[local_mem_227426_backing_offset_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_227417;\n    int32_t local_tid_227418;\n    int64_t group_sizze_227421;\n    int32_t wave_sizze_227420;\n    int32_t group_tid_227419;\n    \n    global_tid_227417 = get_global_id(0);\n    local_tid_227418 = get_local_id(0);\n    group_sizze_227421 = get_local_size(0);\n    wave_sizze_227420 = LOCKSTEP_WIDTH;\n    group_tid_227419 = get_group_id(0);\n    \n    int32_t phys_tid_211897 = global_tid_227417;\n    int64_t byte_offsets_227422 = (int64_t) 0;\n    int64_t byte_offsets_227423 = segscan_group_sizze_211891 * (int64_t) 4;\n    int64_t warp_byte_offset_227424 = (int64_t) 32;\n    int64_t warp_byte_offset_227425 = (int64_t) 160;\n    \n    // Allocate reused shared memeory\n    { }\n    \n    __local unsigned char *local_mem_227426;\n    \n    local_mem_227426 = (__local unsigned char *) local_mem_227426_backing_0;\n    \n    int64_t trans_arr_len_227427 = (int64_t) 23 * segscan_group_sizze_211891;\n    int32_t dynamic_id_227433;\n    \n    if (local_tid_227418 == 0) {\n        dynamic_id_227433 = atomic_add_i32_global(&((volatile __global\n                                                     int *) mainziid_counter_mem_227409)[(int64_t) 0],\n                                                  (int) 1);\n        ((__local int32_t *) local_mem_227426)[(int64_t) 0] = dynamic_id_227433;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    dynamic_id_227433 = ((__local int32_t *) local_mem_227426)[(int64_t) 0];\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t blockOff_227434 = sext_i32_i64(dynamic_id_227433) * (int64_t) 23 *\n            segscan_group_sizze_211891;\n    int64_t sgm_idx_227435 = smod6",
            "4(blockOff_227434,\n                                    dyn_lifted_single_ma_l_arg_197257);\n    int32_t boundary_227436 = sext_i64_i32(smin64((int64_t) 23 *\n                                                  segscan_group_sizze_211891,\n                                                  dyn_lifted_single_ma_l_arg_197257 -\n                                                  sgm_idx_227435));\n    int32_t segsizze_compact_227437 = sext_i64_i32(smin64((int64_t) 23 *\n                                                          segscan_group_sizze_211891,\n                                                          dyn_lifted_single_ma_l_arg_197257));\n    float private_mem_227438[(int64_t) 23];\n    \n    // Load and map\n    {\n        for (int64_t i_227440 = 0; i_227440 < (int64_t) 23; i_227440++) {\n            int64_t phys_tid_227441 = blockOff_227434 +\n                    sext_i32_i64(local_tid_227418) + i_227440 *\n                    segscan_group_sizze_211891;\n            int64_t slice_227442 = dyn_lifted_single_ma_l_arg_197257;\n            int64_t slice_227443 = m_196691 * slice_227442;\n            int64_t gtid_211895 = squot64(phys_tid_227441, slice_227442);\n            int64_t remnant_227444 = phys_tid_227441 - gtid_211895 *\n                    slice_227442;\n            int64_t gtid_211896 = remnant_227444;\n            int64_t remnant_227445 = remnant_227444 - gtid_211896;\n            \n            if (slt64(phys_tid_227441, m_196691 *\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 = d",
            "efunc_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_197247);\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                private_mem_227438[i_227440] = defunc_0_f_res_211905;\n            } else {\n                private_mem_227438[i_227440] = 0.0F;\n            }\n        }\n    }\n    // Transpose scan inputs\n    {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int64_t i_227446 = 0; i_227446 < (int64_t) 23; i_227446++) {\n            int64_t sharedIdx_227447 = sext_i32_i64(local_tid_227418) +\n                    i_227446 * segscan_group_sizze_211891;\n            float tmp_227448;\n            \n            tmp_227448 = private_mem_227438[i_227446];\n            ((__local float *) local_mem_227426)[sharedIdx_227447] = tmp_227448;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int32_t i_227449 = 0; i_227449 < 23; i_227449++) {\n            int32_t sharedIdx_227450 = local_tid_227418 * 23 + i_227449;\n            float tm",
            "p_227451;\n            \n            tmp_227451 = ((__local\n                           float *) local_mem_227426)[sext_i32_i64(sharedIdx_227450)];\n            private_mem_227438[sext_i32_i64(i_227449)] = tmp_227451;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    // Per thread scan\n    {\n        int32_t gidx_227452 = local_tid_227418 * 23 + 1;\n        \n        for (int64_t i_227453 = 0; i_227453 < (int64_t) 22; i_227453++) {\n            bool new_sgm_227454 = smod32(gidx_227452 + sext_i64_i32(i_227453) -\n                                         boundary_227436,\n                                         segsizze_compact_227437) == 0;\n            \n            if (!new_sgm_227454) {\n                float x_211898;\n                float x_211899;\n                \n                x_211898 = private_mem_227438[i_227453];\n                x_211899 = private_mem_227438[i_227453 + (int64_t) 1];\n                \n                float defunc_1_op_res_211900 = x_211898 + x_211899;\n                \n                private_mem_227438[i_227453 + (int64_t) 1] =\n                    defunc_1_op_res_211900;\n            }\n        }\n    }\n    // Publish results in shared memory\n    {\n        float tmp_227455;\n        \n        tmp_227455 = private_mem_227438[(int64_t) 22];\n        ((__local float *) local_mem_227426)[squot64(byte_offsets_227422,\n                                                     (int64_t) 4) +\n                                             sext_i32_i64(local_tid_227418)] =\n            tmp_227455;\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    \n    float acc_227459;\n    \n    // Scan results (with warp scan)\n    {\n        float x_227456;\n        float x_227457;\n        float x_227460;\n        float x_227461;\n        bool ltid_in_bounds_227463 = slt64(sext_i32_i64(local_tid_227418),\n                                           segscan_group_sizze_211891);\n        int32_t skip_threads_227464;\n        \n        // read input for in-block scan\n        {\n            if (ltid",
            "_in_bounds_227463) {\n                x_227457 = ((volatile __local\n                             float *) local_mem_227426)[squot64(byte_offsets_227422,\n                                                                (int64_t) 4) +\n                                                        sext_i32_i64(local_tid_227418)];\n                if ((local_tid_227418 - squot32(local_tid_227418, 32) * 32) ==\n                    0) {\n                    x_227456 = x_227457;\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_227418 -\n                                                  squot32(local_tid_227418,\n                                                          32) * 32) &&\n                     ltid_in_bounds_227463;\n                \n                if (thread_active_227465) {\n                    // read operands\n                    {\n                        x_227456 = ((volatile __local\n                                     float *) local_mem_227426)[squot64(byte_offsets_227422,\n                                                                        (int64_t) 4) +\n                                                                (sext_i32_i64(local_tid_227418) -\n                                                                 sext_i32_i64(skip_threads_227464))];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_227466 = slt32(smod32((local_tid_227418 + 1) *\n                                                        23 - 1 +\n                                                        segsizze_compact_227437 -\n                                                        boundary_227436,\n                                                        ",
            "segsizze_compact_227437),\n                                                 (local_tid_227418 + 1) * 23 -\n                                                 1 - ((local_tid_227418 -\n                                                       skip_threads_227464 +\n                                                       1) * 23 - 1));\n                    \n                    if (thread_active_227465 && inactive_227466) {\n                        x_227456 = x_227457;\n                    }\n                    if (thread_active_227465) {\n                        if (!inactive_227466) {\n                            float defunc_1_op_res_227458 = x_227456 + x_227457;\n                            \n                            x_227456 = defunc_1_op_res_227458;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_227420, skip_threads_227464)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_227465) {\n                    // write result\n                    {\n                        ((volatile __local\n                          float *) local_mem_227426)[squot64(byte_offsets_227422,\n                                                             (int64_t) 4) +\n                                                     sext_i32_i64(local_tid_227418)] =\n                            x_227456;\n                        x_227457 = x_227456;\n                    }\n                }\n                if (sle32(wave_sizze_227420, 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_227418 - squot32(local_tid_227418, 32) * 32) == 31 &&\n                ltid_in_bounds_227463) {\n                ((volatile __local\n                  float *) local_mem_227426)[squot64(byte_o",
            "ffsets_227422,\n                                                     (int64_t) 4) +\n                                             sext_i32_i64(squot32(local_tid_227418,\n                                                                  32))] =\n                    x_227456;\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_227418, 32) == 0 &&\n                    ltid_in_bounds_227463) {\n                    x_227461 = ((volatile __local\n                                 float *) local_mem_227426)[squot64(byte_offsets_227422,\n                                                                    (int64_t) 4) +\n                                                            sext_i32_i64(local_tid_227418)];\n                    if ((local_tid_227418 - squot32(local_tid_227418, 32) *\n                         32) == 0) {\n                        x_227460 = x_227461;\n                    }\n                }\n            }\n            // in-block scan (hopefully no barriers needed)\n            {\n                skip_threads_227467 = 1;\n                while (slt32(skip_threads_227467, 32)) {\n                    bool thread_active_227468 = sle32(skip_threads_227467,\n                                                      local_tid_227418 -\n                                                      squot32(local_tid_227418,\n                                                              32) * 32) &&\n                         (squot32(local_tid_227418, 32) == 0 &&\n                          ltid_in_bounds_227463);\n                    \n                    if (thread_active_227468) {\n                        // read operands\n                        {\n                            x_227460 = ((volatile __local\n                                         f",
            "loat *) local_mem_227426)[squot64(byte_offsets_227422,\n                                                                            (int64_t) 4) +\n                                                                    (sext_i32_i64(local_tid_227418) -\n                                                                     sext_i32_i64(skip_threads_227467))];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_227469 = slt32(smod32((local_tid_227418 *\n                                                             32 + 32 - 1 + 1) *\n                                                            23 - 1 +\n                                                            segsizze_compact_227437 -\n                                                            boundary_227436,\n                                                            segsizze_compact_227437),\n                                                     (local_tid_227418 * 32 +\n                                                      32 - 1 + 1) * 23 - 1 -\n                                                     (((local_tid_227418 -\n                                                        skip_threads_227467) *\n                                                       32 + 32 - 1 + 1) * 23 -\n                                                      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 +\n                                      x_227461;\n                                \n                                x_227460 = defunc_1_op_res_227462;\n                            }\n                        }\n                    }\n                    if (sle32(wave_",
            "sizze_227420, skip_threads_227467)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    if (thread_active_227468) {\n                        // write result\n                        {\n                            ((volatile __local\n                              float *) local_mem_227426)[squot64(byte_offsets_227422,\n                                                                 (int64_t) 4) +\n                                                         sext_i32_i64(local_tid_227418)] =\n                                x_227460;\n                            x_227461 = x_227460;\n                        }\n                    }\n                    if (sle32(wave_sizze_227420, 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_227418, 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_227457 = x_227456;\n                    x_227456 = ((__local\n                                 float *) local_mem_227426)[squot64(byte_offsets_227422,\n                                                                    (int64_t) 4) +\n                                                            (sext_i32_i64(squot32(local_tid_227418,\n                                                                                  32)) -\n                                                             (int64_t) 1)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_227471 = slt32(smod32((local_tid_227418 + 1) *\n                                                    23 - 1 +\n                                          ",
            "          segsizze_compact_227437 -\n                                                    boundary_227436,\n                                                    segsizze_compact_227437),\n                                             (local_tid_227418 + 1) * 23 - 1 -\n                                             ((squot32(local_tid_227418, 32) *\n                                               32 - 1 + 1) * 23 - 1));\n                \n                if (!no_carry_in_227470) {\n                    if (inactive_227471) {\n                        x_227456 = x_227457;\n                    }\n                }\n                if (!no_carry_in_227470) {\n                    if (!inactive_227471) {\n                        float defunc_1_op_res_227458 = x_227456 + x_227457;\n                        \n                        x_227456 = defunc_1_op_res_227458;\n                    }\n                }\n            }\n            // write final result\n            {\n                if (!no_carry_in_227470) {\n                    ((__local\n                      float *) local_mem_227426)[squot64(byte_offsets_227422,\n                                                         (int64_t) 4) +\n                                                 sext_i32_i64(local_tid_227418)] =\n                        x_227456;\n                }\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // restore correct values for first block\n        {\n            if (squot32(local_tid_227418, 32) == 0 && ltid_in_bounds_227463) {\n                ((__local\n                  float *) local_mem_227426)[squot64(byte_offsets_227422,\n                                                     (int64_t) 4) +\n                                             sext_i32_i64(local_tid_227418)] =\n                    x_227457;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (local_tid_227418 == 0) {\n            acc_227459 = ((__local\n                           float *) local_m",
            "em_227426)[squot64(byte_offsets_227422,\n                                                              (int64_t) 4) +\n                                                      (segscan_group_sizze_211891 -\n                                                       (int64_t) 1)];\n        } else {\n            acc_227459 = ((__local\n                           float *) local_mem_227426)[squot64(byte_offsets_227422,\n                                                              (int64_t) 4) +\n                                                      (sext_i32_i64(local_tid_227418) -\n                                                       (int64_t) 1)];\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    \n    float prefix_227472 = 0.0F;\n    bool block_new_sgm_227473 = sgm_idx_227435 == (int64_t) 0;\n    \n    // Perform lookback\n    {\n        if (block_new_sgm_227473 && local_tid_227418 == 0) {\n            ((volatile __global\n              float *) incprefixes_mem_227415)[dynamic_id_227433] = acc_227459;\n            mem_fence_global();\n            ((volatile __global\n              int8_t *) status_flags_mem_227411)[dynamic_id_227433] =\n                (int8_t) 2;\n            acc_227459 = 0.0F;\n        }\n        if (!block_new_sgm_227473 && slt32(local_tid_227418,\n                                           wave_sizze_227420)) {\n            if (local_tid_227418 == 0) {\n                if (boundary_227436 == sext_i64_i32(segscan_group_sizze_211891 *\n                    (int64_t) 23)) {\n                    ((volatile __global\n                      float *) aggregates_mem_227413)[dynamic_id_227433] =\n                        acc_227459;\n                    mem_fence_global();\n                    ((volatile __global\n                      int8_t *) status_flags_mem_227411)[dynamic_id_227433] =\n                        (int8_t) 1;\n                } else {\n                    ((volatile __global\n                      float *) incprefixes_mem_227415)[dynamic_id_227433] =\n                       ",
            " acc_227459;\n                    mem_fence_global();\n                    ((volatile __global\n                      int8_t *) status_flags_mem_227411)[dynamic_id_227433] =\n                        (int8_t) 2;\n                }\n                \n                int8_t tmp_227474;\n                \n                tmp_227474 = ((volatile __global\n                               int8_t *) status_flags_mem_227411)[dynamic_id_227433 -\n                                                                  (int64_t) 1];\n                ((volatile __local int8_t *) local_mem_227426)[(int64_t) 0] =\n                    tmp_227474;\n            }\n            mem_fence_local();\n            \n            int8_t status_227475;\n            \n            status_227475 = ((__local int8_t *) local_mem_227426)[(int64_t) 0];\n            if (status_227475 == (int8_t) 2) {\n                if (local_tid_227418 == 0) {\n                    prefix_227472 = ((volatile __global\n                                      float *) incprefixes_mem_227415)[dynamic_id_227433 -\n                                                                       (int64_t) 1];\n                }\n            } else {\n                int32_t readOffset_227476 = dynamic_id_227433 -\n                        sext_i32_i64(wave_sizze_227420);\n                \n                while (slt32(wave_sizze_227420 * -1, readOffset_227476)) {\n                    int32_t read_i_227477 = readOffset_227476 +\n                            local_tid_227418;\n                    float aggr_227478 = 0.0F;\n                    int8_t flag_227479 = (int8_t) 0;\n                    \n                    if (sle32(0, read_i_227477)) {\n                        if (sle64(blockOff_227434 -\n                                  (sext_i32_i64(read_i_227477 + 1) *\n                                   segscan_group_sizze_211891 * (int64_t) 23 -\n                                   (int64_t) 1), sgm_idx_227435)) {\n                            flag_227479 = ((volatile __global\n         ",
            "                                   int8_t *) status_flags_mem_227411)[sext_i32_i64(read_i_227477)];\n                            if (flag_227479 == (int8_t) 2) {\n                                aggr_227478 = ((volatile __global\n                                                float *) incprefixes_mem_227415)[sext_i32_i64(read_i_227477)];\n                            } else {\n                                if (flag_227479 == (int8_t) 1) {\n                                    aggr_227478 = ((volatile __global\n                                                    float *) aggregates_mem_227413)[sext_i32_i64(read_i_227477)];\n                                }\n                            }\n                        } else {\n                            flag_227479 = (int8_t) 2;\n                        }\n                    }\n                    ((__local\n                      float *) local_mem_227426)[squot64(warp_byte_offset_227424,\n                                                         (int64_t) 4) +\n                                                 sext_i32_i64(local_tid_227418)] =\n                        aggr_227478;\n                    ((__local\n                      int8_t *) local_mem_227426)[sext_i32_i64(local_tid_227418)] =\n                        flag_227479;\n                    flag_227479 = ((__local\n                                    int8_t *) local_mem_227426)[sext_i32_i64(wave_sizze_227420) -\n                                                                (int64_t) 1];\n                    if (slt8(flag_227479, (int8_t) 2)) {\n                        int8_t flg_x_227483;\n                        int8_t flg_y_227484;\n                        float x_227480;\n                        float x_227481;\n                        int32_t skip_threads_227485;\n                        \n                        // read input for in-block scan\n                        {\n                            flg_y_227484 = ((volatile __local\n                                             int8_t *",
            ") local_mem_227426)[sext_i32_i64(local_tid_227418)];\n                            x_227481 = ((volatile __local\n                                         float *) local_mem_227426)[squot64(warp_byte_offset_227424,\n                                                                            (int64_t) 4) +\n                                                                    sext_i32_i64(local_tid_227418)];\n                            if ((local_tid_227418 - squot32(local_tid_227418,\n                                                            32) * 32) == 0) {\n                                x_227480 = x_227481;\n                                flg_x_227483 = flg_y_227484;\n                            }\n                        }\n                        // in-block scan (hopefully no barriers needed)\n                        {\n                            skip_threads_227485 = 1;\n                            while (slt32(skip_threads_227485, 32)) {\n                                if (sle32(skip_threads_227485,\n                                          local_tid_227418 -\n                                          squot32(local_tid_227418, 32) * 32)) {\n                                    // read operands\n                                    {\n                                        flg_x_227483 = ((volatile __local\n                                                         int8_t *) local_mem_227426)[sext_i32_i64(local_tid_227418) -\n                                                                                     sext_i32_i64(skip_threads_227485)];\n                                        x_227480 = ((volatile __local\n                                                     float *) local_mem_227426)[squot64(warp_byte_offset_227424,\n                                                                                        (int64_t) 4) +\n                                                                                (sext_i32_i64(local_tid_227418) -\n                                         ",
            "                                        sext_i32_i64(skip_threads_227485))];\n                                    }\n                                    // perform operation\n                                    {\n                                        if (flg_y_227484 == (int8_t) 2 ||\n                                            flg_y_227484 == (int8_t) 0) {\n                                            flg_x_227483 = flg_y_227484;\n                                            x_227480 = x_227481;\n                                        } else {\n                                            float defunc_1_op_res_227482 =\n                                                  x_227480 + x_227481;\n                                            \n                                            x_227480 = defunc_1_op_res_227482;\n                                        }\n                                    }\n                                    // write result\n                                    {\n                                        ((volatile __local\n                                          int8_t *) local_mem_227426)[sext_i32_i64(local_tid_227418)] =\n                                            flg_x_227483;\n                                        flg_y_227484 = flg_x_227483;\n                                        ((volatile __local\n                                          float *) local_mem_227426)[squot64(warp_byte_offset_227424,\n                                                                             (int64_t) 4) +\n                                                                     sext_i32_i64(local_tid_227418)] =\n                                            x_227480;\n                                        x_227481 = x_227480;\n                                    }\n                                }\n                                skip_threads_227485 *= 2;\n                            }\n                        }\n                    }\n                    flag_227479 = ((__local\n  ",
            "                                  int8_t *) local_mem_227426)[sext_i32_i64(wave_sizze_227420) -\n                                                                (int64_t) 1];\n                    aggr_227478 = ((__local\n                                    float *) local_mem_227426)[squot64(warp_byte_offset_227424,\n                                                                       (int64_t) 4) +\n                                                               (sext_i32_i64(wave_sizze_227420) -\n                                                                (int64_t) 1)];\n                    if (flag_227479 == (int8_t) 2) {\n                        readOffset_227476 = wave_sizze_227420 * -1;\n                    } else {\n                        if (flag_227479 == (int8_t) 1) {\n                            readOffset_227476 -= wave_sizze_227420;\n                        }\n                    }\n                    if (slt8((int8_t) 0, flag_227479)) {\n                        float x_227486 = aggr_227478;\n                        float x_227487 = prefix_227472;\n                        float defunc_1_op_res_227488 = x_227486 + x_227487;\n                        \n                        prefix_227472 = defunc_1_op_res_227488;\n                    }\n                    mem_fence_local();\n                }\n            }\n            if (local_tid_227418 == 0) {\n                if (boundary_227436 == sext_i64_i32(segscan_group_sizze_211891 *\n                    (int64_t) 23)) {\n                    float x_227489 = prefix_227472;\n                    float x_227490 = acc_227459;\n                    float defunc_1_op_res_227491 = x_227489 + x_227490;\n                    \n                    ((volatile __global\n                      float *) incprefixes_mem_227415)[dynamic_id_227433] =\n                        defunc_1_op_res_227491;\n                    mem_fence_global();\n                    ((volatile __global\n                      int8_t *) status_flags_mem_227411)[dynamic_id_227433] =\n",
            "                        (int8_t) 2;\n                }\n                ((__local\n                  float *) local_mem_227426)[squot64(warp_byte_offset_227424,\n                                                     (int64_t) 4)] =\n                    prefix_227472;\n                acc_227459 = 0.0F;\n            }\n        }\n        if (!(dynamic_id_227433 == (int64_t) 0)) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            prefix_227472 = ((__local\n                              float *) local_mem_227426)[squot64(warp_byte_offset_227424,\n                                                                 (int64_t) 4)];\n            barrier(CLK_LOCAL_MEM_FENCE);\n        }\n    }\n    // Distribute results\n    {\n        float x_227492;\n        float x_227493;\n        float x_227495 = prefix_227472;\n        float x_227496 = acc_227459;\n        \n        if (slt32(local_tid_227418 * 23, boundary_227436) &&\n            !block_new_sgm_227473) {\n            float defunc_1_op_res_227497 = x_227495 + x_227496;\n            \n            x_227492 = defunc_1_op_res_227497;\n        } else {\n            x_227492 = acc_227459;\n        }\n        \n        int32_t stopping_point_227498 = segsizze_compact_227437 -\n                srem32(local_tid_227418 * 23 - 1 + segsizze_compact_227437 -\n                       boundary_227436, segsizze_compact_227437);\n        \n        for (int64_t i_227499 = 0; i_227499 < (int64_t) 23; i_227499++) {\n            if (slt32(sext_i64_i32(i_227499), stopping_point_227498 - 1)) {\n                x_227493 = private_mem_227438[i_227499];\n                \n                float defunc_1_op_res_227494 = x_227492 + x_227493;\n                \n                private_mem_227438[i_227499] = defunc_1_op_res_227494;\n            }\n        }\n    }\n    // Transpose scan output and Write it to global memory in coalesced fashion\n    {\n        for (int64_t i_227500 = 0; i_227500 < (int64_t) 23; i_227500++) {\n            int64_t sharedIdx_227501 = sext_i32_i64(local_tid_227418 * 23",
            ") +\n                    i_227500;\n            float tmp_227502;\n            \n            tmp_227502 = private_mem_227438[i_227500];\n            ((__local float *) local_mem_227426)[sharedIdx_227501] = tmp_227502;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int64_t i_227503 = 0; i_227503 < (int64_t) 23; i_227503++) {\n            int64_t flat_idx_227504 = blockOff_227434 +\n                    segscan_group_sizze_211891 * i_227503 +\n                    sext_i32_i64(local_tid_227418);\n            int64_t slice_227505 = dyn_lifted_single_ma_l_arg_197257;\n            int64_t slice_227506 = m_196691 * slice_227505;\n            int64_t gtid_211895 = squot64(flat_idx_227504, slice_227505);\n            int64_t remnant_227507 = flat_idx_227504 - gtid_211895 *\n                    slice_227505;\n            int64_t gtid_211896 = remnant_227507;\n            int64_t remnant_227508 = remnant_227507 - gtid_211896;\n            \n            if (slt64(flat_idx_227504, m_196691 *\n                      dyn_lifted_single_ma_l_arg_197257)) {\n                float tmp_227509;\n                \n                tmp_227509 = ((__local\n                               float *) local_mem_227426)[flat_idx_227504 -\n                                                          blockOff_227434];\n                ((__global float *) mem_223591)[gtid_211895 *\n                                                dyn_lifted_single_ma_l_arg_197257 +\n                                                gtid_211896] = tmp_227509;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    // If this is the last block, reset the dynamicId\n    {\n        if (dynamic_id_227433 == sdiv_up64(m_196691 *\n                                           dyn_lifted_single_ma_l_arg_197257,\n                                           segscan_group_sizze_211891 *\n                                           (int64_t) 23) - (int64_t) 1) {\n            ((__global int32_t *) mainziid_counter_mem_227409)[(int64_t) 0] = 0;\n",
            "        }\n    }\n    \n  error_0:\n    return;\n    #undef segscan_group_sizze_211891\n}\n__kernel void mainzisegscan_212028(__global int *global_failure,\n                                   int failure_is_an_option, __global\n                                   int64_t *global_failure_args,\n                                   uint local_mem_227607_backing_offset_0,\n                                   int64_t m_196691, int64_t n_196692,\n                                   int64_t dyn_lifted_single_ma_l_arg_197257,\n                                   __global unsigned char *mem_223591, __global\n                                   unsigned char *ext_mem_223603, __global\n                                   unsigned char *mem_223608, __global\n                                   unsigned char *mainziid_counter_mem_227590,\n                                   __global\n                                   unsigned char *status_flags_mem_227592,\n                                   __global\n                                   unsigned char *aggregates_mem_227594,\n                                   __global\n                                   unsigned char *incprefixes_mem_227596)\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    volatile unsigned char *local_mem_227607_backing_0 =\n                           &shared_mem[local_mem_227607_backing_offset_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_227598;\n    int32_t local_tid_227599;\n    int64_t group_sizze_227602;\n    int32_t wave_sizze_227601;\n    int32_t group_tid_227600;\n    \n    global_tid_227598 = get_global_id(0);\n    local_tid_227599 = get_local_id(0);\n    group_sizze_227602 = get_local_size(0);\n   ",
            " wave_sizze_227601 = LOCKSTEP_WIDTH;\n    group_tid_227600 = get_group_id(0);\n    \n    int32_t phys_tid_212028 = global_tid_227598;\n    int64_t byte_offsets_227603 = (int64_t) 0;\n    int64_t byte_offsets_227604 = segscan_group_sizze_212022 * (int64_t) 4;\n    int64_t warp_byte_offset_227605 = (int64_t) 32;\n    int64_t warp_byte_offset_227606 = (int64_t) 160;\n    \n    // Allocate reused shared memeory\n    { }\n    \n    __local unsigned char *local_mem_227607;\n    \n    local_mem_227607 = (__local unsigned char *) local_mem_227607_backing_0;\n    \n    int64_t trans_arr_len_227608 = (int64_t) 23 * segscan_group_sizze_212022;\n    int32_t dynamic_id_227614;\n    \n    if (local_tid_227599 == 0) {\n        dynamic_id_227614 = atomic_add_i32_global(&((volatile __global\n                                                     int *) mainziid_counter_mem_227590)[(int64_t) 0],\n                                                  (int) 1);\n        ((__local int32_t *) local_mem_227607)[(int64_t) 0] = dynamic_id_227614;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    dynamic_id_227614 = ((__local int32_t *) local_mem_227607)[(int64_t) 0];\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t blockOff_227615 = sext_i32_i64(dynamic_id_227614) * (int64_t) 23 *\n            segscan_group_sizze_212022;\n    int64_t sgm_idx_227616 = smod64(blockOff_227615, n_196692);\n    int32_t boundary_227617 = sext_i64_i32(smin64((int64_t) 23 *\n                                                  segscan_group_sizze_212022,\n                                                  n_196692 - sgm_idx_227616));\n    int32_t segsizze_compact_227618 = sext_i64_i32(smin64((int64_t) 23 *\n                                                          segscan_group_sizze_212022,\n                                                          n_196692));\n    float private_mem_227619[(int64_t) 23];\n    \n    // Load and map\n    {\n        for (int64_t i_227621 = 0; i_227621 < (int64_t) 23; i_227621++) {\n            int64_t phys_tid_227622 = blockOff_22761",
            "5 +\n                    sext_i32_i64(local_tid_227599) + i_227621 *\n                    segscan_group_sizze_212022;\n            int64_t slice_227623 = n_196692;\n            int64_t slice_227624 = m_196691 * slice_227623;\n            int64_t gtid_212026 = squot64(phys_tid_227622, slice_227623);\n            int64_t remnant_227625 = phys_tid_227622 - gtid_212026 *\n                    slice_227623;\n            int64_t gtid_212027 = remnant_227625;\n            int64_t remnant_227626 = remnant_227625 - gtid_212027;\n            \n            if (slt64(phys_tid_227622, m_196691 * 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_21",
            "2044 - 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                private_mem_227619[i_227621] = defunc_0_f_res_212036;\n            } else {\n                private_mem_227619[i_227621] = 0.0F;\n            }\n        }\n    }\n    // Transpose scan inputs\n    {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int64_t i_227627 = 0; i_227627 < (int64_t) 23; i_227627++) {\n            int64_t sharedIdx_227628 = sext_i32_i64(local_tid_227599) +\n                    i_227627 * segscan_group_sizze_212022;\n            float tmp_227629;\n            \n            tmp_227629 = private_mem_227619[i_227627];\n            ((__local float *) local_mem_227607)[sharedIdx_227628] = tmp_227629;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int32_t i_227630 = 0; i_227630 < 23; i_227630++) {\n            int32_t sharedIdx_227631 = local_tid_227599 * 23 + i_227630;\n            float tmp_227632;\n            \n            tmp_227632 = ((__local\n                           float *) local_mem_227607)[sext_i32_i64(sharedIdx_227631)];\n            private_mem_227619[sext_i32_i64(i_227630)] = tmp_227632;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    // Per thread scan\n    {\n        int32_t gidx_227633 = local_tid_227599 * 23 + 1;\n        \n        for (int64_t i_227634 = 0; i_227634 < (int64_t) 22; i_227634++) {\n            bool new_sgm_227635 = smod32(gidx_227633 + sext_i64_i32(i_227634) -\n                                         boundary_227617,\n                                         segsizze_compact_227618) == 0;\n            \n            if (!new_sgm_227635) {\n                float x_212029;\n                float x_212030;\n                \n                x_212029 = private_mem_227619[i_227634];\n                x_212030 = private_mem_227619[i_227634 + (int64_t) 1];\n                \n                float defunc_1_op_res_212",
            "031 = x_212029 + x_212030;\n                \n                private_mem_227619[i_227634 + (int64_t) 1] =\n                    defunc_1_op_res_212031;\n            }\n        }\n    }\n    // Publish results in shared memory\n    {\n        float tmp_227636;\n        \n        tmp_227636 = private_mem_227619[(int64_t) 22];\n        ((__local float *) local_mem_227607)[squot64(byte_offsets_227603,\n                                                     (int64_t) 4) +\n                                             sext_i32_i64(local_tid_227599)] =\n            tmp_227636;\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    \n    float acc_227640;\n    \n    // Scan results (with warp scan)\n    {\n        float x_227637;\n        float x_227638;\n        float x_227641;\n        float x_227642;\n        bool ltid_in_bounds_227644 = slt64(sext_i32_i64(local_tid_227599),\n                                           segscan_group_sizze_212022);\n        int32_t skip_threads_227645;\n        \n        // read input for in-block scan\n        {\n            if (ltid_in_bounds_227644) {\n                x_227638 = ((volatile __local\n                             float *) local_mem_227607)[squot64(byte_offsets_227603,\n                                                                (int64_t) 4) +\n                                                        sext_i32_i64(local_tid_227599)];\n                if ((local_tid_227599 - squot32(local_tid_227599, 32) * 32) ==\n                    0) {\n                    x_227637 = x_227638;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_227645 = 1;\n            while (slt32(skip_threads_227645, 32)) {\n                bool thread_active_227646 = sle32(skip_threads_227645,\n                                                  local_tid_227599 -\n                                                  squot32(local_tid_227599,\n                                                          32) * 32) &&\n            ",
            "         ltid_in_bounds_227644;\n                \n                if (thread_active_227646) {\n                    // read operands\n                    {\n                        x_227637 = ((volatile __local\n                                     float *) local_mem_227607)[squot64(byte_offsets_227603,\n                                                                        (int64_t) 4) +\n                                                                (sext_i32_i64(local_tid_227599) -\n                                                                 sext_i32_i64(skip_threads_227645))];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_227647 = slt32(smod32((local_tid_227599 + 1) *\n                                                        23 - 1 +\n                                                        segsizze_compact_227618 -\n                                                        boundary_227617,\n                                                        segsizze_compact_227618),\n                                                 (local_tid_227599 + 1) * 23 -\n                                                 1 - ((local_tid_227599 -\n                                                       skip_threads_227645 +\n                                                       1) * 23 - 1));\n                    \n                    if (thread_active_227646 && inactive_227647) {\n                        x_227637 = x_227638;\n                    }\n                    if (thread_active_227646) {\n                        if (!inactive_227647) {\n                            float defunc_1_op_res_227639 = x_227637 + x_227638;\n                            \n                            x_227637 = defunc_1_op_res_227639;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_227601, skip_threads_227645)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n          ",
            "      if (thread_active_227646) {\n                    // write result\n                    {\n                        ((volatile __local\n                          float *) local_mem_227607)[squot64(byte_offsets_227603,\n                                                             (int64_t) 4) +\n                                                     sext_i32_i64(local_tid_227599)] =\n                            x_227637;\n                        x_227638 = x_227637;\n                    }\n                }\n                if (sle32(wave_sizze_227601, skip_threads_227645)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_227645 *= 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_227599 - squot32(local_tid_227599, 32) * 32) == 31 &&\n                ltid_in_bounds_227644) {\n                ((volatile __local\n                  float *) local_mem_227607)[squot64(byte_offsets_227603,\n                                                     (int64_t) 4) +\n                                             sext_i32_i64(squot32(local_tid_227599,\n                                                                  32))] =\n                    x_227637;\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_227648;\n            \n            // read input for in-block scan\n            {\n                if (squot32(local_tid_227599, 32) == 0 &&\n                    ltid_in_bounds_227644) {\n                    x_227642 = ((volatile __local\n                                 float *) local_mem_227607)[squot64(byte_offsets_227603,\n                                                                    (int64_t) 4) +\n                                                            sext_i32_i64(local_tid_227599)];",
            "\n                    if ((local_tid_227599 - squot32(local_tid_227599, 32) *\n                         32) == 0) {\n                        x_227641 = x_227642;\n                    }\n                }\n            }\n            // in-block scan (hopefully no barriers needed)\n            {\n                skip_threads_227648 = 1;\n                while (slt32(skip_threads_227648, 32)) {\n                    bool thread_active_227649 = sle32(skip_threads_227648,\n                                                      local_tid_227599 -\n                                                      squot32(local_tid_227599,\n                                                              32) * 32) &&\n                         (squot32(local_tid_227599, 32) == 0 &&\n                          ltid_in_bounds_227644);\n                    \n                    if (thread_active_227649) {\n                        // read operands\n                        {\n                            x_227641 = ((volatile __local\n                                         float *) local_mem_227607)[squot64(byte_offsets_227603,\n                                                                            (int64_t) 4) +\n                                                                    (sext_i32_i64(local_tid_227599) -\n                                                                     sext_i32_i64(skip_threads_227648))];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_227650 = slt32(smod32((local_tid_227599 *\n                                                             32 + 32 - 1 + 1) *\n                                                            23 - 1 +\n                                                            segsizze_compact_227618 -\n                                                            boundary_227617,\n                                                            segsizze_compact_227618),\n                   ",
            "                                  (local_tid_227599 * 32 +\n                                                      32 - 1 + 1) * 23 - 1 -\n                                                     (((local_tid_227599 -\n                                                        skip_threads_227648) *\n                                                       32 + 32 - 1 + 1) * 23 -\n                                                      1));\n                        \n                        if (thread_active_227649 && inactive_227650) {\n                            x_227641 = x_227642;\n                        }\n                        if (thread_active_227649) {\n                            if (!inactive_227650) {\n                                float defunc_1_op_res_227643 = x_227641 +\n                                      x_227642;\n                                \n                                x_227641 = defunc_1_op_res_227643;\n                            }\n                        }\n                    }\n                    if (sle32(wave_sizze_227601, skip_threads_227648)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    if (thread_active_227649) {\n                        // write result\n                        {\n                            ((volatile __local\n                              float *) local_mem_227607)[squot64(byte_offsets_227603,\n                                                                 (int64_t) 4) +\n                                                         sext_i32_i64(local_tid_227599)] =\n                                x_227641;\n                            x_227642 = x_227641;\n                        }\n                    }\n                    if (sle32(wave_sizze_227601, skip_threads_227648)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    skip_threads_227648 *= 2;\n                }\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n       ",
            " bool no_carry_in_227651 = squot32(local_tid_227599, 32) == 0 ||\n             !ltid_in_bounds_227644;\n        \n        // carry-in for every block except the first\n        {\n            // read operands\n            {\n                if (!no_carry_in_227651) {\n                    x_227638 = x_227637;\n                    x_227637 = ((__local\n                                 float *) local_mem_227607)[squot64(byte_offsets_227603,\n                                                                    (int64_t) 4) +\n                                                            (sext_i32_i64(squot32(local_tid_227599,\n                                                                                  32)) -\n                                                             (int64_t) 1)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_227652 = slt32(smod32((local_tid_227599 + 1) *\n                                                    23 - 1 +\n                                                    segsizze_compact_227618 -\n                                                    boundary_227617,\n                                                    segsizze_compact_227618),\n                                             (local_tid_227599 + 1) * 23 - 1 -\n                                             ((squot32(local_tid_227599, 32) *\n                                               32 - 1 + 1) * 23 - 1));\n                \n                if (!no_carry_in_227651) {\n                    if (inactive_227652) {\n                        x_227637 = x_227638;\n                    }\n                }\n                if (!no_carry_in_227651) {\n                    if (!inactive_227652) {\n                        float defunc_1_op_res_227639 = x_227637 + x_227638;\n                        \n                        x_227637 = defunc_1_op_res_227639;\n                    }\n                }\n            }\n            // write final result\n            {\n             ",
            "   if (!no_carry_in_227651) {\n                    ((__local\n                      float *) local_mem_227607)[squot64(byte_offsets_227603,\n                                                         (int64_t) 4) +\n                                                 sext_i32_i64(local_tid_227599)] =\n                        x_227637;\n                }\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // restore correct values for first block\n        {\n            if (squot32(local_tid_227599, 32) == 0 && ltid_in_bounds_227644) {\n                ((__local\n                  float *) local_mem_227607)[squot64(byte_offsets_227603,\n                                                     (int64_t) 4) +\n                                             sext_i32_i64(local_tid_227599)] =\n                    x_227638;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (local_tid_227599 == 0) {\n            acc_227640 = ((__local\n                           float *) local_mem_227607)[squot64(byte_offsets_227603,\n                                                              (int64_t) 4) +\n                                                      (segscan_group_sizze_212022 -\n                                                       (int64_t) 1)];\n        } else {\n            acc_227640 = ((__local\n                           float *) local_mem_227607)[squot64(byte_offsets_227603,\n                                                              (int64_t) 4) +\n                                                      (sext_i32_i64(local_tid_227599) -\n                                                       (int64_t) 1)];\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    \n    float prefix_227653 = 0.0F;\n    bool block_new_sgm_227654 = sgm_idx_227616 == (int64_t) 0;\n    \n    // Perform lookback\n    {\n        if (block_new_sgm_227654 && local_tid_227599 == 0) {\n            ((volatile __global\n              float *) incprefixes_mem_",
            "227596)[dynamic_id_227614] = acc_227640;\n            mem_fence_global();\n            ((volatile __global\n              int8_t *) status_flags_mem_227592)[dynamic_id_227614] =\n                (int8_t) 2;\n            acc_227640 = 0.0F;\n        }\n        if (!block_new_sgm_227654 && slt32(local_tid_227599,\n                                           wave_sizze_227601)) {\n            if (local_tid_227599 == 0) {\n                if (boundary_227617 == sext_i64_i32(segscan_group_sizze_212022 *\n                    (int64_t) 23)) {\n                    ((volatile __global\n                      float *) aggregates_mem_227594)[dynamic_id_227614] =\n                        acc_227640;\n                    mem_fence_global();\n                    ((volatile __global\n                      int8_t *) status_flags_mem_227592)[dynamic_id_227614] =\n                        (int8_t) 1;\n                } else {\n                    ((volatile __global\n                      float *) incprefixes_mem_227596)[dynamic_id_227614] =\n                        acc_227640;\n                    mem_fence_global();\n                    ((volatile __global\n                      int8_t *) status_flags_mem_227592)[dynamic_id_227614] =\n                        (int8_t) 2;\n                }\n                \n                int8_t tmp_227655;\n                \n                tmp_227655 = ((volatile __global\n                               int8_t *) status_flags_mem_227592)[dynamic_id_227614 -\n                                                                  (int64_t) 1];\n                ((volatile __local int8_t *) local_mem_227607)[(int64_t) 0] =\n                    tmp_227655;\n            }\n            mem_fence_local();\n            \n            int8_t status_227656;\n            \n            status_227656 = ((__local int8_t *) local_mem_227607)[(int64_t) 0];\n            if (status_227656 == (int8_t) 2) {\n                if (local_tid_227599 == 0) {\n                    prefix_227653 = ((volatile __global\n          ",
            "                            float *) incprefixes_mem_227596)[dynamic_id_227614 -\n                                                                       (int64_t) 1];\n                }\n            } else {\n                int32_t readOffset_227657 = dynamic_id_227614 -\n                        sext_i32_i64(wave_sizze_227601);\n                \n                while (slt32(wave_sizze_227601 * -1, readOffset_227657)) {\n                    int32_t read_i_227658 = readOffset_227657 +\n                            local_tid_227599;\n                    float aggr_227659 = 0.0F;\n                    int8_t flag_227660 = (int8_t) 0;\n                    \n                    if (sle32(0, read_i_227658)) {\n                        if (sle64(blockOff_227615 -\n                                  (sext_i32_i64(read_i_227658 + 1) *\n                                   segscan_group_sizze_212022 * (int64_t) 23 -\n                                   (int64_t) 1), sgm_idx_227616)) {\n                            flag_227660 = ((volatile __global\n                                            int8_t *) status_flags_mem_227592)[sext_i32_i64(read_i_227658)];\n                            if (flag_227660 == (int8_t) 2) {\n                                aggr_227659 = ((volatile __global\n                                                float *) incprefixes_mem_227596)[sext_i32_i64(read_i_227658)];\n                            } else {\n                                if (flag_227660 == (int8_t) 1) {\n                                    aggr_227659 = ((volatile __global\n                                                    float *) aggregates_mem_227594)[sext_i32_i64(read_i_227658)];\n                                }\n                            }\n                        } else {\n                            flag_227660 = (int8_t) 2;\n                        }\n                    }\n                    ((__local\n                      float *) local_mem_227607)[squot64(warp_byte_offset_227605,\n                           ",
            "                              (int64_t) 4) +\n                                                 sext_i32_i64(local_tid_227599)] =\n                        aggr_227659;\n                    ((__local\n                      int8_t *) local_mem_227607)[sext_i32_i64(local_tid_227599)] =\n                        flag_227660;\n                    flag_227660 = ((__local\n                                    int8_t *) local_mem_227607)[sext_i32_i64(wave_sizze_227601) -\n                                                                (int64_t) 1];\n                    if (slt8(flag_227660, (int8_t) 2)) {\n                        int8_t flg_x_227664;\n                        int8_t flg_y_227665;\n                        float x_227661;\n                        float x_227662;\n                        int32_t skip_threads_227666;\n                        \n                        // read input for in-block scan\n                        {\n                            flg_y_227665 = ((volatile __local\n                                             int8_t *) local_mem_227607)[sext_i32_i64(local_tid_227599)];\n                            x_227662 = ((volatile __local\n                                         float *) local_mem_227607)[squot64(warp_byte_offset_227605,\n                                                                            (int64_t) 4) +\n                                                                    sext_i32_i64(local_tid_227599)];\n                            if ((local_tid_227599 - squot32(local_tid_227599,\n                                                            32) * 32) == 0) {\n                                x_227661 = x_227662;\n                                flg_x_227664 = flg_y_227665;\n                            }\n                        }\n                        // in-block scan (hopefully no barriers needed)\n                        {\n                            skip_threads_227666 = 1;\n                            while (slt32(skip_threads_227666, 32)) {\n            ",
            "                    if (sle32(skip_threads_227666,\n                                          local_tid_227599 -\n                                          squot32(local_tid_227599, 32) * 32)) {\n                                    // read operands\n                                    {\n                                        flg_x_227664 = ((volatile __local\n                                                         int8_t *) local_mem_227607)[sext_i32_i64(local_tid_227599) -\n                                                                                     sext_i32_i64(skip_threads_227666)];\n                                        x_227661 = ((volatile __local\n                                                     float *) local_mem_227607)[squot64(warp_byte_offset_227605,\n                                                                                        (int64_t) 4) +\n                                                                                (sext_i32_i64(local_tid_227599) -\n                                                                                 sext_i32_i64(skip_threads_227666))];\n                                    }\n                                    // perform operation\n                                    {\n                                        if (flg_y_227665 == (int8_t) 2 ||\n                                            flg_y_227665 == (int8_t) 0) {\n                                            flg_x_227664 = flg_y_227665;\n                                            x_227661 = x_227662;\n                                        } else {\n                                            float defunc_1_op_res_227663 =\n                                                  x_227661 + x_227662;\n                                            \n                                            x_227661 = defunc_1_op_res_227663;\n                                        }\n                                    }\n                                    // write result\n               ",
            "                     {\n                                        ((volatile __local\n                                          int8_t *) local_mem_227607)[sext_i32_i64(local_tid_227599)] =\n                                            flg_x_227664;\n                                        flg_y_227665 = flg_x_227664;\n                                        ((volatile __local\n                                          float *) local_mem_227607)[squot64(warp_byte_offset_227605,\n                                                                             (int64_t) 4) +\n                                                                     sext_i32_i64(local_tid_227599)] =\n                                            x_227661;\n                                        x_227662 = x_227661;\n                                    }\n                                }\n                                skip_threads_227666 *= 2;\n                            }\n                        }\n                    }\n                    flag_227660 = ((__local\n                                    int8_t *) local_mem_227607)[sext_i32_i64(wave_sizze_227601) -\n                                                                (int64_t) 1];\n                    aggr_227659 = ((__local\n                                    float *) local_mem_227607)[squot64(warp_byte_offset_227605,\n                                                                       (int64_t) 4) +\n                                                               (sext_i32_i64(wave_sizze_227601) -\n                                                                (int64_t) 1)];\n                    if (flag_227660 == (int8_t) 2) {\n                        readOffset_227657 = wave_sizze_227601 * -1;\n                    } else {\n                        if (flag_227660 == (int8_t) 1) {\n                            readOffset_227657 -= wave_sizze_227601;\n                        }\n                    }\n                    if (slt8((int8_t) 0, flag_227660)) {\n     ",
            "                   float x_227667 = aggr_227659;\n                        float x_227668 = prefix_227653;\n                        float defunc_1_op_res_227669 = x_227667 + x_227668;\n                        \n                        prefix_227653 = defunc_1_op_res_227669;\n                    }\n                    mem_fence_local();\n                }\n            }\n            if (local_tid_227599 == 0) {\n                if (boundary_227617 == sext_i64_i32(segscan_group_sizze_212022 *\n                    (int64_t) 23)) {\n                    float x_227670 = prefix_227653;\n                    float x_227671 = acc_227640;\n                    float defunc_1_op_res_227672 = x_227670 + x_227671;\n                    \n                    ((volatile __global\n                      float *) incprefixes_mem_227596)[dynamic_id_227614] =\n                        defunc_1_op_res_227672;\n                    mem_fence_global();\n                    ((volatile __global\n                      int8_t *) status_flags_mem_227592)[dynamic_id_227614] =\n                        (int8_t) 2;\n                }\n                ((__local\n                  float *) local_mem_227607)[squot64(warp_byte_offset_227605,\n                                                     (int64_t) 4)] =\n                    prefix_227653;\n                acc_227640 = 0.0F;\n            }\n        }\n        if (!(dynamic_id_227614 == (int64_t) 0)) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            prefix_227653 = ((__local\n                              float *) local_mem_227607)[squot64(warp_byte_offset_227605,\n                                                                 (int64_t) 4)];\n            barrier(CLK_LOCAL_MEM_FENCE);\n        }\n    }\n    // Distribute results\n    {\n        float x_227673;\n        float x_227674;\n        float x_227676 = prefix_227653;\n        float x_227677 = acc_227640;\n        \n        if (slt32(local_tid_227599 * 23, boundary_227617) &&\n            !block_new_sgm_227654) {\n            float ",
            "defunc_1_op_res_227678 = x_227676 + x_227677;\n            \n            x_227673 = defunc_1_op_res_227678;\n        } else {\n            x_227673 = acc_227640;\n        }\n        \n        int32_t stopping_point_227679 = segsizze_compact_227618 -\n                srem32(local_tid_227599 * 23 - 1 + segsizze_compact_227618 -\n                       boundary_227617, segsizze_compact_227618);\n        \n        for (int64_t i_227680 = 0; i_227680 < (int64_t) 23; i_227680++) {\n            if (slt32(sext_i64_i32(i_227680), stopping_point_227679 - 1)) {\n                x_227674 = private_mem_227619[i_227680];\n                \n                float defunc_1_op_res_227675 = x_227673 + x_227674;\n                \n                private_mem_227619[i_227680] = defunc_1_op_res_227675;\n            }\n        }\n    }\n    // Transpose scan output and Write it to global memory in coalesced fashion\n    {\n        for (int64_t i_227681 = 0; i_227681 < (int64_t) 23; i_227681++) {\n            int64_t sharedIdx_227682 = sext_i32_i64(local_tid_227599 * 23) +\n                    i_227681;\n            float tmp_227683;\n            \n            tmp_227683 = private_mem_227619[i_227681];\n            ((__local float *) local_mem_227607)[sharedIdx_227682] = tmp_227683;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int64_t i_227684 = 0; i_227684 < (int64_t) 23; i_227684++) {\n            int64_t flat_idx_227685 = blockOff_227615 +\n                    segscan_group_sizze_212022 * i_227684 +\n                    sext_i32_i64(local_tid_227599);\n            int64_t slice_227686 = n_196692;\n            int64_t slice_227687 = m_196691 * slice_227686;\n            int64_t gtid_212026 = squot64(flat_idx_227685, slice_227686);\n            int64_t remnant_227688 = flat_idx_227685 - gtid_212026 *\n                    slice_227686;\n            int64_t gtid_212027 = remnant_227688;\n            int64_t remnant_227689 = remnant_227688 - gtid_212027;\n            \n            if (slt64(flat_idx_227685, m_196691",
            " * n_196692)) {\n                float tmp_227690;\n                \n                tmp_227690 = ((__local\n                               float *) local_mem_227607)[flat_idx_227685 -\n                                                          blockOff_227615];\n                ((__global float *) mem_223608)[gtid_212026 * n_196692 +\n                                                gtid_212027] = tmp_227690;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    // If this is the last block, reset the dynamicId\n    {\n        if (dynamic_id_227614 == sdiv_up64(m_196691 * n_196692,\n                                           segscan_group_sizze_212022 *\n                                           (int64_t) 23) - (int64_t) 1) {\n            ((__global int32_t *) mainziid_counter_mem_227590)[(int64_t) 0] = 0;\n        }\n    }\n    \n  error_0:\n    return;\n    #undef segscan_group_sizze_212022\n}\n__kernel void mainzisegscan_220969(__global int *global_failure,\n                                   uint local_mem_229652_backing_offset_0,\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                                   __global unsigned char *mem_param_224799,\n                                   __global 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, __global\n                                   unsigned char *mainziid_counter_mem_229617,\n                                   __global\n                  ",
            "                 unsigned char *status_flags_mem_229619,\n                                   __global\n                                   unsigned char *aggregates_mem_229621,\n                                   __global\n                                   unsigned char *incprefixes_mem_229623,\n                                   __global\n                                   unsigned char *aggregates_mem_229625,\n                                   __global\n                                   unsigned char *incprefixes_mem_229627,\n                                   __global\n                                   unsigned char *aggregates_mem_229629,\n                                   __global\n                                   unsigned char *incprefixes_mem_229631,\n                                   __global\n                                   unsigned char *aggregates_mem_229633,\n                                   __global\n                                   unsigned char *incprefixes_mem_229635)\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    volatile unsigned char *local_mem_229652_backing_0 =\n                           &shared_mem[local_mem_229652_backing_offset_0];\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229637;\n    int32_t local_tid_229638;\n    int64_t group_sizze_229641;\n    int32_t wave_sizze_229640;\n    int32_t group_tid_229639;\n    \n    global_tid_229637 = get_global_id(0);\n    local_tid_229638 = get_local_id(0);\n    group_sizze_229641 = get_local_size(0);\n    wave_sizze_229640 = LOCKSTEP_WIDTH;\n    group_tid_229639 = get_group_id(0);\n    \n    int32_t phys_tid_220969 = global_tid_229637;\n    int64_t byte_offsets_229642 = (int64_t) 0;\n    int64_t byte_offsets_229643 = segscan_group_sizze_220959 * (int",
            "64_t) 8;\n    int64_t byte_offsets_229644 = sdiv_up64(segscan_group_sizze_220959 *\n                                            (int64_t) 8, (int64_t) 8) *\n            (int64_t) 8 + segscan_group_sizze_220959 * (int64_t) 8;\n    int64_t byte_offsets_229645 =\n            sdiv_up64(sdiv_up64(segscan_group_sizze_220959 * (int64_t) 8,\n                                (int64_t) 8) * (int64_t) 8 +\n                      segscan_group_sizze_220959 * (int64_t) 8, (int64_t) 8) *\n            (int64_t) 8 + segscan_group_sizze_220959 * (int64_t) 8;\n    int64_t byte_offsets_229646 =\n            sdiv_up64(sdiv_up64(sdiv_up64(segscan_group_sizze_220959 *\n                                          (int64_t) 8, (int64_t) 8) *\n                                (int64_t) 8 + segscan_group_sizze_220959 *\n                                (int64_t) 8, (int64_t) 8) * (int64_t) 8 +\n                      segscan_group_sizze_220959 * (int64_t) 8, (int64_t) 8) *\n            (int64_t) 8 + segscan_group_sizze_220959 * (int64_t) 8;\n    int64_t warp_byte_offset_229647 = (int64_t) 32;\n    int64_t warp_byte_offset_229648 = (int64_t) 288;\n    int64_t warp_byte_offset_229649 = (int64_t) 544;\n    int64_t warp_byte_offset_229650 = (int64_t) 800;\n    int64_t warp_byte_offset_229651 = (int64_t) 1056;\n    \n    // Allocate reused shared memeory\n    { }\n    \n    __local unsigned char *local_mem_229652;\n    \n    local_mem_229652 = (__local unsigned char *) local_mem_229652_backing_0;\n    \n    int64_t trans_arr_len_229653 = (int64_t) 3 * segscan_group_sizze_220959;\n    int32_t dynamic_id_229668;\n    \n    if (local_tid_229638 == 0) {\n        dynamic_id_229668 = atomic_add_i32_global(&((volatile __global\n                                                     int *) mainziid_counter_mem_229617)[(int64_t) 0],\n                                                  (int) 1);\n        ((__local int32_t *) local_mem_229652)[(int64_t) 0] = dynamic_id_229668;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    dynamic_id_229668 = ((__local int",
            "32_t *) local_mem_229652)[(int64_t) 0];\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t blockOff_229669 = sext_i32_i64(dynamic_id_229668) * (int64_t) 3 *\n            segscan_group_sizze_220959;\n    int64_t sgm_idx_229670 = smod64(blockOff_229669, n_196692);\n    int32_t boundary_229671 = sext_i64_i32(smin64((int64_t) 3 *\n                                                  segscan_group_sizze_220959,\n                                                  n_196692 - sgm_idx_229670));\n    int32_t segsizze_compact_229672 = sext_i64_i32(smin64((int64_t) 3 *\n                                                          segscan_group_sizze_220959,\n                                                          n_196692));\n    int64_t private_mem_229673[(int64_t) 3];\n    int64_t private_mem_229675[(int64_t) 3];\n    int64_t private_mem_229677[(int64_t) 3];\n    int64_t private_mem_229679[(int64_t) 3];\n    \n    // Load and map\n    {\n        for (int64_t i_229681 = 0; i_229681 < (int64_t) 3; i_229681++) {\n            int64_t phys_tid_229682 = blockOff_229669 +\n                    sext_i32_i64(local_tid_229638) + i_229681 *\n                    segscan_group_sizze_220959;\n            int64_t slice_229683 = n_196692;\n            int64_t slice_229684 = m_196691 * slice_229683;\n            int64_t gtid_220967 = squot64(phys_tid_229682, slice_229683);\n            int64_t remnant_229685 = phys_tid_229682 - gtid_220967 *\n                    slice_229683;\n            int64_t gtid_220968 = remnant_229685;\n            int64_t remnant_229686 = remnant_229685 - gtid_220968;\n            \n            if (slt64(phys_tid_229682, m_196691 * 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_res_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                ((__global int32_t *) mem_224851)[gtid_220967 * n_196692 +\n                                                  gtid_220968] =\n                    defunc_0_f_res_221002;\n                private_mem_229673[i_229681] = defunc_0_f_res_221004;\n                private_mem_229675[i_229681] = defunc_0_f_res_221005;\n                private_mem_229677[i_229681] = defunc_0_f_res_221006;\n                private_mem_229679[i_229681] = defunc_0_f_res_221007;\n            } else {\n                private_mem_229673[i_229681] = (int64_t) 0;\n                private_mem_229675[i_229681] = (int64_t) 0;\n                private_mem_229677[i_229681] = (int64_t) 0;\n                private_mem_229679[i_229681] = (int64_t) 0;\n            }\n        }\n    }\n    // Transpose scan inputs\n    {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int64_t i_229687 = 0; i_229687 < (int64_t) 3; i_229687++) {\n            int64_t sharedIdx_229688 = sext_i32_i64(local_tid_229638) +\n                    i_229687 * segscan_group_sizze_220959;\n            int64_t tmp_229689;\n            \n            tmp_229689 = private_mem_229673[i_229687];\n            ((__local int64_t *) local_mem_229652)[sharedIdx_229688] =\n                tmp_229689;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int32_t i_229690 = 0; i_229690 < 3; i_229690++) {\n            int32_t sharedIdx_229691 = local_tid_229638 * 3 + i_229690;\n            int64_t tmp_229692;\n            \n            tmp_229692 = ((__local\n                           int64_t *) local_mem_229652)[sext_i32_i64(sharedIdx_229691)];\n            private_mem_229673[sext_i32_i64(i_229690)] = tmp_229692;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int64_t i_229693 = 0; i_229693 < (int64_t) 3; i_229693++) {\n            int64_t sharedIdx_229694 = sext_i32_i64(local_tid_229638) +\n                    ",
            "i_229693 * segscan_group_sizze_220959;\n            int64_t tmp_229695;\n            \n            tmp_229695 = private_mem_229675[i_229693];\n            ((__local int64_t *) local_mem_229652)[sharedIdx_229694] =\n                tmp_229695;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int32_t i_229696 = 0; i_229696 < 3; i_229696++) {\n            int32_t sharedIdx_229697 = local_tid_229638 * 3 + i_229696;\n            int64_t tmp_229698;\n            \n            tmp_229698 = ((__local\n                           int64_t *) local_mem_229652)[sext_i32_i64(sharedIdx_229697)];\n            private_mem_229675[sext_i32_i64(i_229696)] = tmp_229698;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int64_t i_229699 = 0; i_229699 < (int64_t) 3; i_229699++) {\n            int64_t sharedIdx_229700 = sext_i32_i64(local_tid_229638) +\n                    i_229699 * segscan_group_sizze_220959;\n            int64_t tmp_229701;\n            \n            tmp_229701 = private_mem_229677[i_229699];\n            ((__local int64_t *) local_mem_229652)[sharedIdx_229700] =\n                tmp_229701;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int32_t i_229702 = 0; i_229702 < 3; i_229702++) {\n            int32_t sharedIdx_229703 = local_tid_229638 * 3 + i_229702;\n            int64_t tmp_229704;\n            \n            tmp_229704 = ((__local\n                           int64_t *) local_mem_229652)[sext_i32_i64(sharedIdx_229703)];\n            private_mem_229677[sext_i32_i64(i_229702)] = tmp_229704;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int64_t i_229705 = 0; i_229705 < (int64_t) 3; i_229705++) {\n            int64_t sharedIdx_229706 = sext_i32_i64(local_tid_229638) +\n                    i_229705 * segscan_group_sizze_220959;\n            int64_t tmp_229707;\n            \n            tmp_229707 = private_mem_229679[i_229705];\n            ((__local int64_t *) local_mem_229652)[sharedIdx_229706] =\n                tmp_229707;\n        }\n        ",
            "barrier(CLK_LOCAL_MEM_FENCE);\n        for (int32_t i_229708 = 0; i_229708 < 3; i_229708++) {\n            int32_t sharedIdx_229709 = local_tid_229638 * 3 + i_229708;\n            int64_t tmp_229710;\n            \n            tmp_229710 = ((__local\n                           int64_t *) local_mem_229652)[sext_i32_i64(sharedIdx_229709)];\n            private_mem_229679[sext_i32_i64(i_229708)] = tmp_229710;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    // Per thread scan\n    {\n        int32_t gidx_229711 = local_tid_229638 * 3 + 1;\n        \n        for (int64_t i_229712 = 0; i_229712 < (int64_t) 2; i_229712++) {\n            bool new_sgm_229713 = smod32(gidx_229711 + sext_i64_i32(i_229712) -\n                                         boundary_229671,\n                                         segsizze_compact_229672) == 0;\n            \n            if (!new_sgm_229713) {\n                int64_t x_220970;\n                int64_t x_220974;\n                \n                x_220970 = private_mem_229673[i_229712];\n                x_220974 = private_mem_229673[i_229712 + (int64_t) 1];\n                \n                int64_t x_220971;\n                int64_t x_220975;\n                \n                x_220971 = private_mem_229675[i_229712];\n                x_220975 = private_mem_229675[i_229712 + (int64_t) 1];\n                \n                int64_t x_220972;\n                int64_t x_220976;\n                \n                x_220972 = private_mem_229677[i_229712];\n                x_220976 = private_mem_229677[i_229712 + (int64_t) 1];\n                \n                int64_t x_220973;\n                int64_t x_220977;\n                \n                x_220973 = private_mem_229679[i_229712];\n                x_220977 = private_mem_229679[i_229712 + (int64_t) 1];\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                private_mem_229673[i_229712 + (int64_t) 1] =\n                    defunc_1_op_res_220978;\n                private_mem_229675[i_229712 + (int64_t) 1] =\n                    defunc_1_op_res_220979;\n                private_mem_229677[i_229712 + (int64_t) 1] =\n                    defunc_1_op_res_220980;\n                private_mem_229679[i_229712 + (int64_t) 1] =\n                    defunc_1_op_res_220981;\n            }\n        }\n    }\n    // Publish results in shared memory\n    {\n        int64_t tmp_229714;\n        \n        tmp_229714 = private_mem_229673[(int64_t) 2];\n        ((__local int64_t *) local_mem_229652)[squot64(byte_offsets_229642,\n                                                       (int64_t) 8) +\n                                               sext_i32_i64(local_tid_229638)] =\n            tmp_229714;\n        \n        int64_t tmp_229715;\n        \n        tmp_229715 = private_mem_229675[(int64_t) 2];\n        ((__local int64_t *) local_mem_229652)[squot64(byte_offsets_229643,\n                                                       (int64_t) 8) +\n                                               sext_i32_i64(local_tid_229638)] =\n            tmp_229715;\n        \n        int64_t tmp_229716;\n        \n        tmp_229716 = private_mem_229677[(int64_t) 2];\n        ((__local int64_t *) local_mem_229652)[squot64(byte_offsets_229644,\n                                                       (int64_t) 8) +\n                                               sext_i32_i64(local_tid_229638)] =\n            tmp_229716;\n        \n        int64_t tmp_229717;\n        \n        tmp_229717 = private_mem_229679[(int64_t) 2];\n        ((__local int64_t *) local_mem_229652)[squot64(byte_offsets_229645,\n                                                       (int64_t) 8) +\n                                               sext_i32_i64(local_tid_229638)] =\n          ",
            "  tmp_229717;\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    \n    int64_t acc_229730;\n    int64_t acc_229731;\n    int64_t acc_229732;\n    int64_t acc_229733;\n    \n    // Scan results (with warp scan)\n    {\n        int64_t x_229718;\n        int64_t x_229719;\n        int64_t x_229720;\n        int64_t x_229721;\n        int64_t x_229722;\n        int64_t x_229723;\n        int64_t x_229724;\n        int64_t x_229725;\n        int64_t x_229734;\n        int64_t x_229735;\n        int64_t x_229736;\n        int64_t x_229737;\n        int64_t x_229738;\n        int64_t x_229739;\n        int64_t x_229740;\n        int64_t x_229741;\n        bool ltid_in_bounds_229746 = slt64(sext_i32_i64(local_tid_229638),\n                                           segscan_group_sizze_220959);\n        int32_t skip_threads_229747;\n        \n        // read input for in-block scan\n        {\n            if (ltid_in_bounds_229746) {\n                x_229722 = ((volatile __local\n                             int64_t *) local_mem_229652)[squot64(byte_offsets_229642,\n                                                                  (int64_t) 8) +\n                                                          sext_i32_i64(local_tid_229638)];\n                x_229723 = ((volatile __local\n                             int64_t *) local_mem_229652)[squot64(byte_offsets_229643,\n                                                                  (int64_t) 8) +\n                                                          sext_i32_i64(local_tid_229638)];\n                x_229724 = ((volatile __local\n                             int64_t *) local_mem_229652)[squot64(byte_offsets_229644,\n                                                                  (int64_t) 8) +\n                                                          sext_i32_i64(local_tid_229638)];\n                x_229725 = ((volatile __local\n                             int64_t *) local_mem_229652)[squot64(byte_offsets_229645,\n                                             ",
            "                     (int64_t) 8) +\n                                                          sext_i32_i64(local_tid_229638)];\n                if ((local_tid_229638 - squot32(local_tid_229638, 32) * 32) ==\n                    0) {\n                    x_229718 = x_229722;\n                    x_229719 = x_229723;\n                    x_229720 = x_229724;\n                    x_229721 = x_229725;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_229747 = 1;\n            while (slt32(skip_threads_229747, 32)) {\n                bool thread_active_229748 = sle32(skip_threads_229747,\n                                                  local_tid_229638 -\n                                                  squot32(local_tid_229638,\n                                                          32) * 32) &&\n                     ltid_in_bounds_229746;\n                \n                if (thread_active_229748) {\n                    // read operands\n                    {\n                        x_229718 = ((volatile __local\n                                     int64_t *) local_mem_229652)[squot64(byte_offsets_229642,\n                                                                          (int64_t) 8) +\n                                                                  (sext_i32_i64(local_tid_229638) -\n                                                                   sext_i32_i64(skip_threads_229747))];\n                        x_229719 = ((volatile __local\n                                     int64_t *) local_mem_229652)[squot64(byte_offsets_229643,\n                                                                          (int64_t) 8) +\n                                                                  (sext_i32_i64(local_tid_229638) -\n                                                                   sext_i32_i64(skip_threads_229747))];\n                        x_229720 = ((volatile __local\n                  ",
            "                   int64_t *) local_mem_229652)[squot64(byte_offsets_229644,\n                                                                          (int64_t) 8) +\n                                                                  (sext_i32_i64(local_tid_229638) -\n                                                                   sext_i32_i64(skip_threads_229747))];\n                        x_229721 = ((volatile __local\n                                     int64_t *) local_mem_229652)[squot64(byte_offsets_229645,\n                                                                          (int64_t) 8) +\n                                                                  (sext_i32_i64(local_tid_229638) -\n                                                                   sext_i32_i64(skip_threads_229747))];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_229749 = slt32(smod32((local_tid_229638 + 1) *\n                                                        3 - 1 +\n                                                        segsizze_compact_229672 -\n                                                        boundary_229671,\n                                                        segsizze_compact_229672),\n                                                 (local_tid_229638 + 1) * 3 -\n                                                 1 - ((local_tid_229638 -\n                                                       skip_threads_229747 +\n                                                       1) * 3 - 1));\n                    \n                    if (thread_active_229748 && inactive_229749) {\n                        x_229718 = x_229722;\n                        x_229719 = x_229723;\n                        x_229720 = x_229724;\n                        x_229721 = x_229725;\n                    }\n                    if (thread_active_229748) {\n                        if (!inactive_229749) {\n                           ",
            " int64_t defunc_1_op_res_229726 = add64(x_229718,\n                                                                   x_229722);\n                            int64_t defunc_1_op_res_229727 = add64(x_229719,\n                                                                   x_229723);\n                            int64_t defunc_1_op_res_229728 = add64(x_229720,\n                                                                   x_229724);\n                            int64_t defunc_1_op_res_229729 = add64(x_229721,\n                                                                   x_229725);\n                            \n                            x_229718 = defunc_1_op_res_229726;\n                            x_229719 = defunc_1_op_res_229727;\n                            x_229720 = defunc_1_op_res_229728;\n                            x_229721 = defunc_1_op_res_229729;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_229640, skip_threads_229747)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_229748) {\n                    // write result\n                    {\n                        ((volatile __local\n                          int64_t *) local_mem_229652)[squot64(byte_offsets_229642,\n                                                               (int64_t) 8) +\n                                                       sext_i32_i64(local_tid_229638)] =\n                            x_229718;\n                        x_229722 = x_229718;\n                        ((volatile __local\n                          int64_t *) local_mem_229652)[squot64(byte_offsets_229643,\n                                                               (int64_t) 8) +\n                                                       sext_i32_i64(local_tid_229638)] =\n                            x_229719;\n                        x_229723 = x_229719;\n                        ((volatile __local\n                        ",
            "  int64_t *) local_mem_229652)[squot64(byte_offsets_229644,\n                                                               (int64_t) 8) +\n                                                       sext_i32_i64(local_tid_229638)] =\n                            x_229720;\n                        x_229724 = x_229720;\n                        ((volatile __local\n                          int64_t *) local_mem_229652)[squot64(byte_offsets_229645,\n                                                               (int64_t) 8) +\n                                                       sext_i32_i64(local_tid_229638)] =\n                            x_229721;\n                        x_229725 = x_229721;\n                    }\n                }\n                if (sle32(wave_sizze_229640, skip_threads_229747)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_229747 *= 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_229638 - squot32(local_tid_229638, 32) * 32) == 31 &&\n                ltid_in_bounds_229746) {\n                ((volatile __local\n                  int64_t *) local_mem_229652)[squot64(byte_offsets_229642,\n                                                       (int64_t) 8) +\n                                               sext_i32_i64(squot32(local_tid_229638,\n                                                                    32))] =\n                    x_229718;\n                ((volatile __local\n                  int64_t *) local_mem_229652)[squot64(byte_offsets_229643,\n                                                       (int64_t) 8) +\n                                               sext_i32_i64(squot32(local_tid_229638,\n                                                                    32))] =\n                    x_229719;\n                ((volatile __local\n                  int64_t *) local_mem_229652)[squo",
            "t64(byte_offsets_229644,\n                                                       (int64_t) 8) +\n                                               sext_i32_i64(squot32(local_tid_229638,\n                                                                    32))] =\n                    x_229720;\n                ((volatile __local\n                  int64_t *) local_mem_229652)[squot64(byte_offsets_229645,\n                                                       (int64_t) 8) +\n                                               sext_i32_i64(squot32(local_tid_229638,\n                                                                    32))] =\n                    x_229721;\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_229750;\n            \n            // read input for in-block scan\n            {\n                if (squot32(local_tid_229638, 32) == 0 &&\n                    ltid_in_bounds_229746) {\n                    x_229738 = ((volatile __local\n                                 int64_t *) local_mem_229652)[squot64(byte_offsets_229642,\n                                                                      (int64_t) 8) +\n                                                              sext_i32_i64(local_tid_229638)];\n                    x_229739 = ((volatile __local\n                                 int64_t *) local_mem_229652)[squot64(byte_offsets_229643,\n                                                                      (int64_t) 8) +\n                                                              sext_i32_i64(local_tid_229638)];\n                    x_229740 = ((volatile __local\n                                 int64_t *) local_mem_229652)[squot64(byte_offsets_229644,\n                                                                      (int64_t) 8) +\n                                                              sext_i32_i64(local_tid_229638)];\n",
            "                    x_229741 = ((volatile __local\n                                 int64_t *) local_mem_229652)[squot64(byte_offsets_229645,\n                                                                      (int64_t) 8) +\n                                                              sext_i32_i64(local_tid_229638)];\n                    if ((local_tid_229638 - squot32(local_tid_229638, 32) *\n                         32) == 0) {\n                        x_229734 = x_229738;\n                        x_229735 = x_229739;\n                        x_229736 = x_229740;\n                        x_229737 = x_229741;\n                    }\n                }\n            }\n            // in-block scan (hopefully no barriers needed)\n            {\n                skip_threads_229750 = 1;\n                while (slt32(skip_threads_229750, 32)) {\n                    bool thread_active_229751 = sle32(skip_threads_229750,\n                                                      local_tid_229638 -\n                                                      squot32(local_tid_229638,\n                                                              32) * 32) &&\n                         (squot32(local_tid_229638, 32) == 0 &&\n                          ltid_in_bounds_229746);\n                    \n                    if (thread_active_229751) {\n                        // read operands\n                        {\n                            x_229734 = ((volatile __local\n                                         int64_t *) local_mem_229652)[squot64(byte_offsets_229642,\n                                                                              (int64_t) 8) +\n                                                                      (sext_i32_i64(local_tid_229638) -\n                                                                       sext_i32_i64(skip_threads_229750))];\n                            x_229735 = ((volatile __local\n                                         int64_t *) local_mem_229652)[squot64(byte_offs",
            "ets_229643,\n                                                                              (int64_t) 8) +\n                                                                      (sext_i32_i64(local_tid_229638) -\n                                                                       sext_i32_i64(skip_threads_229750))];\n                            x_229736 = ((volatile __local\n                                         int64_t *) local_mem_229652)[squot64(byte_offsets_229644,\n                                                                              (int64_t) 8) +\n                                                                      (sext_i32_i64(local_tid_229638) -\n                                                                       sext_i32_i64(skip_threads_229750))];\n                            x_229737 = ((volatile __local\n                                         int64_t *) local_mem_229652)[squot64(byte_offsets_229645,\n                                                                              (int64_t) 8) +\n                                                                      (sext_i32_i64(local_tid_229638) -\n                                                                       sext_i32_i64(skip_threads_229750))];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_229752 = slt32(smod32((local_tid_229638 *\n                                                             32 + 32 - 1 + 1) *\n                                                            3 - 1 +\n                                                            segsizze_compact_229672 -\n                                                            boundary_229671,\n                                                            segsizze_compact_229672),\n                                                     (local_tid_229638 * 32 +\n                                                      32 - 1 + 1) * 3 - 1 -\n                 ",
            "                                    (((local_tid_229638 -\n                                                        skip_threads_229750) *\n                                                       32 + 32 - 1 + 1) * 3 -\n                                                      1));\n                        \n                        if (thread_active_229751 && inactive_229752) {\n                            x_229734 = x_229738;\n                            x_229735 = x_229739;\n                            x_229736 = x_229740;\n                            x_229737 = x_229741;\n                        }\n                        if (thread_active_229751) {\n                            if (!inactive_229752) {\n                                int64_t defunc_1_op_res_229742 = add64(x_229734,\n                                                                       x_229738);\n                                int64_t defunc_1_op_res_229743 = add64(x_229735,\n                                                                       x_229739);\n                                int64_t defunc_1_op_res_229744 = add64(x_229736,\n                                                                       x_229740);\n                                int64_t defunc_1_op_res_229745 = add64(x_229737,\n                                                                       x_229741);\n                                \n                                x_229734 = defunc_1_op_res_229742;\n                                x_229735 = defunc_1_op_res_229743;\n                                x_229736 = defunc_1_op_res_229744;\n                                x_229737 = defunc_1_op_res_229745;\n                            }\n                        }\n                    }\n                    if (sle32(wave_sizze_229640, skip_threads_229750)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    if (thread_active_229751) {\n                        // write result\n                        {\n          ",
            "                  ((volatile __local\n                              int64_t *) local_mem_229652)[squot64(byte_offsets_229642,\n                                                                   (int64_t) 8) +\n                                                           sext_i32_i64(local_tid_229638)] =\n                                x_229734;\n                            x_229738 = x_229734;\n                            ((volatile __local\n                              int64_t *) local_mem_229652)[squot64(byte_offsets_229643,\n                                                                   (int64_t) 8) +\n                                                           sext_i32_i64(local_tid_229638)] =\n                                x_229735;\n                            x_229739 = x_229735;\n                            ((volatile __local\n                              int64_t *) local_mem_229652)[squot64(byte_offsets_229644,\n                                                                   (int64_t) 8) +\n                                                           sext_i32_i64(local_tid_229638)] =\n                                x_229736;\n                            x_229740 = x_229736;\n                            ((volatile __local\n                              int64_t *) local_mem_229652)[squot64(byte_offsets_229645,\n                                                                   (int64_t) 8) +\n                                                           sext_i32_i64(local_tid_229638)] =\n                                x_229737;\n                            x_229741 = x_229737;\n                        }\n                    }\n                    if (sle32(wave_sizze_229640, skip_threads_229750)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    skip_threads_229750 *= 2;\n                }\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        bool no_carry_in_229753 = squot32(local_tid_229638, 32) == 0 ||\n  ",
            "           !ltid_in_bounds_229746;\n        \n        // carry-in for every block except the first\n        {\n            // read operands\n            {\n                if (!no_carry_in_229753) {\n                    x_229722 = x_229718;\n                    x_229723 = x_229719;\n                    x_229724 = x_229720;\n                    x_229725 = x_229721;\n                    x_229718 = ((__local\n                                 int64_t *) local_mem_229652)[squot64(byte_offsets_229642,\n                                                                      (int64_t) 8) +\n                                                              (sext_i32_i64(squot32(local_tid_229638,\n                                                                                    32)) -\n                                                               (int64_t) 1)];\n                    x_229719 = ((__local\n                                 int64_t *) local_mem_229652)[squot64(byte_offsets_229643,\n                                                                      (int64_t) 8) +\n                                                              (sext_i32_i64(squot32(local_tid_229638,\n                                                                                    32)) -\n                                                               (int64_t) 1)];\n                    x_229720 = ((__local\n                                 int64_t *) local_mem_229652)[squot64(byte_offsets_229644,\n                                                                      (int64_t) 8) +\n                                                              (sext_i32_i64(squot32(local_tid_229638,\n                                                                                    32)) -\n                                                               (int64_t) 1)];\n                    x_229721 = ((__local\n                                 int64_t *) local_mem_229652)[squot64(byte_offsets_229645,\n                                               ",
            "                       (int64_t) 8) +\n                                                              (sext_i32_i64(squot32(local_tid_229638,\n                                                                                    32)) -\n                                                               (int64_t) 1)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_229754 = slt32(smod32((local_tid_229638 + 1) * 3 -\n                                                    1 +\n                                                    segsizze_compact_229672 -\n                                                    boundary_229671,\n                                                    segsizze_compact_229672),\n                                             (local_tid_229638 + 1) * 3 - 1 -\n                                             ((squot32(local_tid_229638, 32) *\n                                               32 - 1 + 1) * 3 - 1));\n                \n                if (!no_carry_in_229753) {\n                    if (inactive_229754) {\n                        x_229718 = x_229722;\n                        x_229719 = x_229723;\n                        x_229720 = x_229724;\n                        x_229721 = x_229725;\n                    }\n                }\n                if (!no_carry_in_229753) {\n                    if (!inactive_229754) {\n                        int64_t defunc_1_op_res_229726 = add64(x_229718,\n                                                               x_229722);\n                        int64_t defunc_1_op_res_229727 = add64(x_229719,\n                                                               x_229723);\n                        int64_t defunc_1_op_res_229728 = add64(x_229720,\n                                                               x_229724);\n                        int64_t defunc_1_op_res_229729 = add64(x_229721,\n                                                               x_229725);\n                        \n",
            "                        x_229718 = defunc_1_op_res_229726;\n                        x_229719 = defunc_1_op_res_229727;\n                        x_229720 = defunc_1_op_res_229728;\n                        x_229721 = defunc_1_op_res_229729;\n                    }\n                }\n            }\n            // write final result\n            {\n                if (!no_carry_in_229753) {\n                    ((__local\n                      int64_t *) local_mem_229652)[squot64(byte_offsets_229642,\n                                                           (int64_t) 8) +\n                                                   sext_i32_i64(local_tid_229638)] =\n                        x_229718;\n                    ((__local\n                      int64_t *) local_mem_229652)[squot64(byte_offsets_229643,\n                                                           (int64_t) 8) +\n                                                   sext_i32_i64(local_tid_229638)] =\n                        x_229719;\n                    ((__local\n                      int64_t *) local_mem_229652)[squot64(byte_offsets_229644,\n                                                           (int64_t) 8) +\n                                                   sext_i32_i64(local_tid_229638)] =\n                        x_229720;\n                    ((__local\n                      int64_t *) local_mem_229652)[squot64(byte_offsets_229645,\n                                                           (int64_t) 8) +\n                                                   sext_i32_i64(local_tid_229638)] =\n                        x_229721;\n                }\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // restore correct values for first block\n        {\n            if (squot32(local_tid_229638, 32) == 0 && ltid_in_bounds_229746) {\n                ((__local\n                  int64_t *) local_mem_229652)[squot64(byte_offsets_229642,\n                                                       (int64_t) 8) +\n                ",
            "                               sext_i32_i64(local_tid_229638)] =\n                    x_229722;\n                ((__local\n                  int64_t *) local_mem_229652)[squot64(byte_offsets_229643,\n                                                       (int64_t) 8) +\n                                               sext_i32_i64(local_tid_229638)] =\n                    x_229723;\n                ((__local\n                  int64_t *) local_mem_229652)[squot64(byte_offsets_229644,\n                                                       (int64_t) 8) +\n                                               sext_i32_i64(local_tid_229638)] =\n                    x_229724;\n                ((__local\n                  int64_t *) local_mem_229652)[squot64(byte_offsets_229645,\n                                                       (int64_t) 8) +\n                                               sext_i32_i64(local_tid_229638)] =\n                    x_229725;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (local_tid_229638 == 0) {\n            acc_229730 = ((__local\n                           int64_t *) local_mem_229652)[squot64(byte_offsets_229642,\n                                                                (int64_t) 8) +\n                                                        (segscan_group_sizze_220959 -\n                                                         (int64_t) 1)];\n            acc_229731 = ((__local\n                           int64_t *) local_mem_229652)[squot64(byte_offsets_229643,\n                                                                (int64_t) 8) +\n                                                        (segscan_group_sizze_220959 -\n                                                         (int64_t) 1)];\n            acc_229732 = ((__local\n                           int64_t *) local_mem_229652)[squot64(byte_offsets_229644,\n                                                                (int64_t) 8) +\n      ",
            "                                                  (segscan_group_sizze_220959 -\n                                                         (int64_t) 1)];\n            acc_229733 = ((__local\n                           int64_t *) local_mem_229652)[squot64(byte_offsets_229645,\n                                                                (int64_t) 8) +\n                                                        (segscan_group_sizze_220959 -\n                                                         (int64_t) 1)];\n        } else {\n            acc_229730 = ((__local\n                           int64_t *) local_mem_229652)[squot64(byte_offsets_229642,\n                                                                (int64_t) 8) +\n                                                        (sext_i32_i64(local_tid_229638) -\n                                                         (int64_t) 1)];\n            acc_229731 = ((__local\n                           int64_t *) local_mem_229652)[squot64(byte_offsets_229643,\n                                                                (int64_t) 8) +\n                                                        (sext_i32_i64(local_tid_229638) -\n                                                         (int64_t) 1)];\n            acc_229732 = ((__local\n                           int64_t *) local_mem_229652)[squot64(byte_offsets_229644,\n                                                                (int64_t) 8) +\n                                                        (sext_i32_i64(local_tid_229638) -\n                                                         (int64_t) 1)];\n            acc_229733 = ((__local\n                           int64_t *) local_mem_229652)[squot64(byte_offsets_229645,\n                                                                (int64_t) 8) +\n                                                        (sext_i32_i64(local_tid_229638) -\n                                                         (int64_t) 1)];\n        }\n        barrier(CLK_",
            "LOCAL_MEM_FENCE);\n    }\n    \n    int64_t prefix_229755 = (int64_t) 0;\n    int64_t prefix_229756 = (int64_t) 0;\n    int64_t prefix_229757 = (int64_t) 0;\n    int64_t prefix_229758 = (int64_t) 0;\n    bool block_new_sgm_229759 = sgm_idx_229670 == (int64_t) 0;\n    \n    // Perform lookback\n    {\n        if (block_new_sgm_229759 && local_tid_229638 == 0) {\n            ((volatile __global\n              int64_t *) incprefixes_mem_229623)[dynamic_id_229668] =\n                acc_229730;\n            ((volatile __global\n              int64_t *) incprefixes_mem_229627)[dynamic_id_229668] =\n                acc_229731;\n            ((volatile __global\n              int64_t *) incprefixes_mem_229631)[dynamic_id_229668] =\n                acc_229732;\n            ((volatile __global\n              int64_t *) incprefixes_mem_229635)[dynamic_id_229668] =\n                acc_229733;\n            mem_fence_global();\n            ((volatile __global\n              int8_t *) status_flags_mem_229619)[dynamic_id_229668] =\n                (int8_t) 2;\n            acc_229730 = (int64_t) 0;\n            acc_229731 = (int64_t) 0;\n            acc_229732 = (int64_t) 0;\n            acc_229733 = (int64_t) 0;\n        }\n        if (!block_new_sgm_229759 && slt32(local_tid_229638,\n                                           wave_sizze_229640)) {\n            if (local_tid_229638 == 0) {\n                if (boundary_229671 == sext_i64_i32(segscan_group_sizze_220959 *\n                    (int64_t) 3)) {\n                    ((volatile __global\n                      int64_t *) aggregates_mem_229621)[dynamic_id_229668] =\n                        acc_229730;\n                    ((volatile __global\n                      int64_t *) aggregates_mem_229625)[dynamic_id_229668] =\n                        acc_229731;\n                    ((volatile __global\n                      int64_t *) aggregates_mem_229629)[dynamic_id_229668] =\n                        acc_229732;\n                    ((volatile __global\n                     ",
            " int64_t *) aggregates_mem_229633)[dynamic_id_229668] =\n                        acc_229733;\n                    mem_fence_global();\n                    ((volatile __global\n                      int8_t *) status_flags_mem_229619)[dynamic_id_229668] =\n                        (int8_t) 1;\n                } else {\n                    ((volatile __global\n                      int64_t *) incprefixes_mem_229623)[dynamic_id_229668] =\n                        acc_229730;\n                    ((volatile __global\n                      int64_t *) incprefixes_mem_229627)[dynamic_id_229668] =\n                        acc_229731;\n                    ((volatile __global\n                      int64_t *) incprefixes_mem_229631)[dynamic_id_229668] =\n                        acc_229732;\n                    ((volatile __global\n                      int64_t *) incprefixes_mem_229635)[dynamic_id_229668] =\n                        acc_229733;\n                    mem_fence_global();\n                    ((volatile __global\n                      int8_t *) status_flags_mem_229619)[dynamic_id_229668] =\n                        (int8_t) 2;\n                }\n                \n                int8_t tmp_229760;\n                \n                tmp_229760 = ((volatile __global\n                               int8_t *) status_flags_mem_229619)[dynamic_id_229668 -\n                                                                  (int64_t) 1];\n                ((volatile __local int8_t *) local_mem_229652)[(int64_t) 0] =\n                    tmp_229760;\n            }\n            mem_fence_local();\n            \n            int8_t status_229761;\n            \n            status_229761 = ((__local int8_t *) local_mem_229652)[(int64_t) 0];\n            if (status_229761 == (int8_t) 2) {\n                if (local_tid_229638 == 0) {\n                    prefix_229755 = ((volatile __global\n                                      int64_t *) incprefixes_mem_229623)[dynamic_id_229668 -\n                                         ",
            "                                (int64_t) 1];\n                    prefix_229756 = ((volatile __global\n                                      int64_t *) incprefixes_mem_229627)[dynamic_id_229668 -\n                                                                         (int64_t) 1];\n                    prefix_229757 = ((volatile __global\n                                      int64_t *) incprefixes_mem_229631)[dynamic_id_229668 -\n                                                                         (int64_t) 1];\n                    prefix_229758 = ((volatile __global\n                                      int64_t *) incprefixes_mem_229635)[dynamic_id_229668 -\n                                                                         (int64_t) 1];\n                }\n            } else {\n                int32_t readOffset_229762 = dynamic_id_229668 -\n                        sext_i32_i64(wave_sizze_229640);\n                \n                while (slt32(wave_sizze_229640 * -1, readOffset_229762)) {\n                    int32_t read_i_229763 = readOffset_229762 +\n                            local_tid_229638;\n                    int64_t aggr_229764 = (int64_t) 0;\n                    int64_t aggr_229765 = (int64_t) 0;\n                    int64_t aggr_229766 = (int64_t) 0;\n                    int64_t aggr_229767 = (int64_t) 0;\n                    int8_t flag_229768 = (int8_t) 0;\n                    \n                    if (sle32(0, read_i_229763)) {\n                        if (sle64(blockOff_229669 -\n                                  (sext_i32_i64(read_i_229763 + 1) *\n                                   segscan_group_sizze_220959 * (int64_t) 3 -\n                                   (int64_t) 1), sgm_idx_229670)) {\n                            flag_229768 = ((volatile __global\n                                            int8_t *) status_flags_mem_229619)[sext_i32_i64(read_i_229763)];\n                            if (flag_229768 == (int8_t) 2) {\n                                aggr_229",
            "764 = ((volatile __global\n                                                int64_t *) incprefixes_mem_229623)[sext_i32_i64(read_i_229763)];\n                                aggr_229765 = ((volatile __global\n                                                int64_t *) incprefixes_mem_229627)[sext_i32_i64(read_i_229763)];\n                                aggr_229766 = ((volatile __global\n                                                int64_t *) incprefixes_mem_229631)[sext_i32_i64(read_i_229763)];\n                                aggr_229767 = ((volatile __global\n                                                int64_t *) incprefixes_mem_229635)[sext_i32_i64(read_i_229763)];\n                            } else {\n                                if (flag_229768 == (int8_t) 1) {\n                                    aggr_229764 = ((volatile __global\n                                                    int64_t *) aggregates_mem_229621)[sext_i32_i64(read_i_229763)];\n                                    aggr_229765 = ((volatile __global\n                                                    int64_t *) aggregates_mem_229625)[sext_i32_i64(read_i_229763)];\n                                    aggr_229766 = ((volatile __global\n                                                    int64_t *) aggregates_mem_229629)[sext_i32_i64(read_i_229763)];\n                                    aggr_229767 = ((volatile __global\n                                                    int64_t *) aggregates_mem_229633)[sext_i32_i64(read_i_229763)];\n                                }\n                            }\n                        } else {\n                            flag_229768 = (int8_t) 2;\n                        }\n                    }\n                    ((__local\n                      int64_t *) local_mem_229652)[squot64(warp_byte_offset_229647,\n                                                           (int64_t) 8) +\n                                                   sext_i32_i64(local_tid_229638)] =\n      ",
            "                  aggr_229764;\n                    ((__local\n                      int64_t *) local_mem_229652)[squot64(warp_byte_offset_229648,\n                                                           (int64_t) 8) +\n                                                   sext_i32_i64(local_tid_229638)] =\n                        aggr_229765;\n                    ((__local\n                      int64_t *) local_mem_229652)[squot64(warp_byte_offset_229649,\n                                                           (int64_t) 8) +\n                                                   sext_i32_i64(local_tid_229638)] =\n                        aggr_229766;\n                    ((__local\n                      int64_t *) local_mem_229652)[squot64(warp_byte_offset_229650,\n                                                           (int64_t) 8) +\n                                                   sext_i32_i64(local_tid_229638)] =\n                        aggr_229767;\n                    ((__local\n                      int8_t *) local_mem_229652)[sext_i32_i64(local_tid_229638)] =\n                        flag_229768;\n                    flag_229768 = ((__local\n                                    int8_t *) local_mem_229652)[sext_i32_i64(wave_sizze_229640) -\n                                                                (int64_t) 1];\n                    if (slt8(flag_229768, (int8_t) 2)) {\n                        int8_t flg_x_229781;\n                        int8_t flg_y_229782;\n                        int64_t x_229769;\n                        int64_t x_229770;\n                        int64_t x_229771;\n                        int64_t x_229772;\n                        int64_t x_229773;\n                        int64_t x_229774;\n                        int64_t x_229775;\n                        int64_t x_229776;\n                        int32_t skip_threads_229783;\n                        \n                        // read input for in-block scan\n                        {\n                         ",
            "   flg_y_229782 = ((volatile __local\n                                             int8_t *) local_mem_229652)[sext_i32_i64(local_tid_229638)];\n                            x_229773 = ((volatile __local\n                                         int64_t *) local_mem_229652)[squot64(warp_byte_offset_229647,\n                                                                              (int64_t) 8) +\n                                                                      sext_i32_i64(local_tid_229638)];\n                            x_229774 = ((volatile __local\n                                         int64_t *) local_mem_229652)[squot64(warp_byte_offset_229648,\n                                                                              (int64_t) 8) +\n                                                                      sext_i32_i64(local_tid_229638)];\n                            x_229775 = ((volatile __local\n                                         int64_t *) local_mem_229652)[squot64(warp_byte_offset_229649,\n                                                                              (int64_t) 8) +\n                                                                      sext_i32_i64(local_tid_229638)];\n                            x_229776 = ((volatile __local\n                                         int64_t *) local_mem_229652)[squot64(warp_byte_offset_229650,\n                                                                              (int64_t) 8) +\n                                                                      sext_i32_i64(local_tid_229638)];\n                            if ((local_tid_229638 - squot32(local_tid_229638,\n                                                            32) * 32) == 0) {\n                                x_229769 = x_229773;\n                                x_229770 = x_229774;\n                                x_229771 = x_229775;\n                                x_229772 = x_229776;\n                                flg_x_229781 = flg_y_229782;\n",
            "                            }\n                        }\n                        // in-block scan (hopefully no barriers needed)\n                        {\n                            skip_threads_229783 = 1;\n                            while (slt32(skip_threads_229783, 32)) {\n                                if (sle32(skip_threads_229783,\n                                          local_tid_229638 -\n                                          squot32(local_tid_229638, 32) * 32)) {\n                                    // read operands\n                                    {\n                                        flg_x_229781 = ((volatile __local\n                                                         int8_t *) local_mem_229652)[sext_i32_i64(local_tid_229638) -\n                                                                                     sext_i32_i64(skip_threads_229783)];\n                                        x_229769 = ((volatile __local\n                                                     int64_t *) local_mem_229652)[squot64(warp_byte_offset_229647,\n                                                                                          (int64_t) 8) +\n                                                                                  (sext_i32_i64(local_tid_229638) -\n                                                                                   sext_i32_i64(skip_threads_229783))];\n                                        x_229770 = ((volatile __local\n                                                     int64_t *) local_mem_229652)[squot64(warp_byte_offset_229648,\n                                                                                          (int64_t) 8) +\n                                                                                  (sext_i32_i64(local_tid_229638) -\n                                                                                   sext_i32_i64(skip_threads_229783))];\n                                        x_229771 = ((volatile _",
            "_local\n                                                     int64_t *) local_mem_229652)[squot64(warp_byte_offset_229649,\n                                                                                          (int64_t) 8) +\n                                                                                  (sext_i32_i64(local_tid_229638) -\n                                                                                   sext_i32_i64(skip_threads_229783))];\n                                        x_229772 = ((volatile __local\n                                                     int64_t *) local_mem_229652)[squot64(warp_byte_offset_229650,\n                                                                                          (int64_t) 8) +\n                                                                                  (sext_i32_i64(local_tid_229638) -\n                                                                                   sext_i32_i64(skip_threads_229783))];\n                                    }\n                                    // perform operation\n                                    {\n                                        if (flg_y_229782 == (int8_t) 2 ||\n                                            flg_y_229782 == (int8_t) 0) {\n                                            flg_x_229781 = flg_y_229782;\n                                            x_229769 = x_229773;\n                                            x_229770 = x_229774;\n                                            x_229771 = x_229775;\n                                            x_229772 = x_229776;\n                                        } else {\n                                            int64_t defunc_1_op_res_229777 =\n                                                    add64(x_229769, x_229773);\n                                            int64_t defunc_1_op_res_229778 =\n                                                    add64(x_229770, x_229774);\n                                    ",
            "        int64_t defunc_1_op_res_229779 =\n                                                    add64(x_229771, x_229775);\n                                            int64_t defunc_1_op_res_229780 =\n                                                    add64(x_229772, x_229776);\n                                            \n                                            x_229769 = defunc_1_op_res_229777;\n                                            x_229770 = defunc_1_op_res_229778;\n                                            x_229771 = defunc_1_op_res_229779;\n                                            x_229772 = defunc_1_op_res_229780;\n                                        }\n                                    }\n                                    // write result\n                                    {\n                                        ((volatile __local\n                                          int8_t *) local_mem_229652)[sext_i32_i64(local_tid_229638)] =\n                                            flg_x_229781;\n                                        flg_y_229782 = flg_x_229781;\n                                        ((volatile __local\n                                          int64_t *) local_mem_229652)[squot64(warp_byte_offset_229647,\n                                                                               (int64_t) 8) +\n                                                                       sext_i32_i64(local_tid_229638)] =\n                                            x_229769;\n                                        x_229773 = x_229769;\n                                        ((volatile __local\n                                          int64_t *) local_mem_229652)[squot64(warp_byte_offset_229648,\n                                                                               (int64_t) 8) +\n                                                                       sext_i32_i64(local_tid_229638)] =\n                                            x_229770;\n          ",
            "                              x_229774 = x_229770;\n                                        ((volatile __local\n                                          int64_t *) local_mem_229652)[squot64(warp_byte_offset_229649,\n                                                                               (int64_t) 8) +\n                                                                       sext_i32_i64(local_tid_229638)] =\n                                            x_229771;\n                                        x_229775 = x_229771;\n                                        ((volatile __local\n                                          int64_t *) local_mem_229652)[squot64(warp_byte_offset_229650,\n                                                                               (int64_t) 8) +\n                                                                       sext_i32_i64(local_tid_229638)] =\n                                            x_229772;\n                                        x_229776 = x_229772;\n                                    }\n                                }\n                                skip_threads_229783 *= 2;\n                            }\n                        }\n                    }\n                    flag_229768 = ((__local\n                                    int8_t *) local_mem_229652)[sext_i32_i64(wave_sizze_229640) -\n                                                                (int64_t) 1];\n                    aggr_229764 = ((__local\n                                    int64_t *) local_mem_229652)[squot64(warp_byte_offset_229647,\n                                                                         (int64_t) 8) +\n                                                                 (sext_i32_i64(wave_sizze_229640) -\n                                                                  (int64_t) 1)];\n                    aggr_229765 = ((__local\n                                    int64_t *) local_mem_229652)[squot64(warp_byte_offset_229648,\n              ",
            "                                                           (int64_t) 8) +\n                                                                 (sext_i32_i64(wave_sizze_229640) -\n                                                                  (int64_t) 1)];\n                    aggr_229766 = ((__local\n                                    int64_t *) local_mem_229652)[squot64(warp_byte_offset_229649,\n                                                                         (int64_t) 8) +\n                                                                 (sext_i32_i64(wave_sizze_229640) -\n                                                                  (int64_t) 1)];\n                    aggr_229767 = ((__local\n                                    int64_t *) local_mem_229652)[squot64(warp_byte_offset_229650,\n                                                                         (int64_t) 8) +\n                                                                 (sext_i32_i64(wave_sizze_229640) -\n                                                                  (int64_t) 1)];\n                    if (flag_229768 == (int8_t) 2) {\n                        readOffset_229762 = wave_sizze_229640 * -1;\n                    } else {\n                        if (flag_229768 == (int8_t) 1) {\n                            readOffset_229762 -= wave_sizze_229640;\n                        }\n                    }\n                    if (slt8((int8_t) 0, flag_229768)) {\n                        int64_t x_229784 = aggr_229764;\n                        int64_t x_229785 = aggr_229765;\n                        int64_t x_229786 = aggr_229766;\n                        int64_t x_229787 = aggr_229767;\n                        int64_t x_229788 = prefix_229755;\n                        int64_t x_229789 = prefix_229756;\n                        int64_t x_229790 = prefix_229757;\n                        int64_t x_229791 = prefix_229758;\n                        int64_t defunc_1_op_res_229792 = add64(x_229784,\n              ",
            "                                                 x_229788);\n                        int64_t defunc_1_op_res_229793 = add64(x_229785,\n                                                               x_229789);\n                        int64_t defunc_1_op_res_229794 = add64(x_229786,\n                                                               x_229790);\n                        int64_t defunc_1_op_res_229795 = add64(x_229787,\n                                                               x_229791);\n                        \n                        prefix_229755 = defunc_1_op_res_229792;\n                        prefix_229756 = defunc_1_op_res_229793;\n                        prefix_229757 = defunc_1_op_res_229794;\n                        prefix_229758 = defunc_1_op_res_229795;\n                    }\n                    mem_fence_local();\n                }\n            }\n            if (local_tid_229638 == 0) {\n                if (boundary_229671 == sext_i64_i32(segscan_group_sizze_220959 *\n                    (int64_t) 3)) {\n                    int64_t x_229796 = prefix_229755;\n                    int64_t x_229797 = prefix_229756;\n                    int64_t x_229798 = prefix_229757;\n                    int64_t x_229799 = prefix_229758;\n                    int64_t x_229800 = acc_229730;\n                    int64_t x_229801 = acc_229731;\n                    int64_t x_229802 = acc_229732;\n                    int64_t x_229803 = acc_229733;\n                    int64_t defunc_1_op_res_229804 = add64(x_229796, x_229800);\n                    int64_t defunc_1_op_res_229805 = add64(x_229797, x_229801);\n                    int64_t defunc_1_op_res_229806 = add64(x_229798, x_229802);\n                    int64_t defunc_1_op_res_229807 = add64(x_229799, x_229803);\n                    \n                    ((volatile __global\n                      int64_t *) incprefixes_mem_229623)[dynamic_id_229668] =\n                        defunc_1_op_res_229804;\n                    ((volatile __global\n",
            "                      int64_t *) incprefixes_mem_229627)[dynamic_id_229668] =\n                        defunc_1_op_res_229805;\n                    ((volatile __global\n                      int64_t *) incprefixes_mem_229631)[dynamic_id_229668] =\n                        defunc_1_op_res_229806;\n                    ((volatile __global\n                      int64_t *) incprefixes_mem_229635)[dynamic_id_229668] =\n                        defunc_1_op_res_229807;\n                    mem_fence_global();\n                    ((volatile __global\n                      int8_t *) status_flags_mem_229619)[dynamic_id_229668] =\n                        (int8_t) 2;\n                }\n                ((__local\n                  int64_t *) local_mem_229652)[squot64(warp_byte_offset_229647,\n                                                       (int64_t) 8)] =\n                    prefix_229755;\n                ((__local\n                  int64_t *) local_mem_229652)[squot64(warp_byte_offset_229648,\n                                                       (int64_t) 8)] =\n                    prefix_229756;\n                ((__local\n                  int64_t *) local_mem_229652)[squot64(warp_byte_offset_229649,\n                                                       (int64_t) 8)] =\n                    prefix_229757;\n                ((__local\n                  int64_t *) local_mem_229652)[squot64(warp_byte_offset_229650,\n                                                       (int64_t) 8)] =\n                    prefix_229758;\n                acc_229730 = (int64_t) 0;\n                acc_229731 = (int64_t) 0;\n                acc_229732 = (int64_t) 0;\n                acc_229733 = (int64_t) 0;\n            }\n        }\n        if (!(dynamic_id_229668 == (int64_t) 0)) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            prefix_229755 = ((__local\n                              int64_t *) local_mem_229652)[squot64(warp_byte_offset_229647,\n                                                                   ",
            "(int64_t) 8)];\n            prefix_229756 = ((__local\n                              int64_t *) local_mem_229652)[squot64(warp_byte_offset_229648,\n                                                                   (int64_t) 8)];\n            prefix_229757 = ((__local\n                              int64_t *) local_mem_229652)[squot64(warp_byte_offset_229649,\n                                                                   (int64_t) 8)];\n            prefix_229758 = ((__local\n                              int64_t *) local_mem_229652)[squot64(warp_byte_offset_229650,\n                                                                   (int64_t) 8)];\n            barrier(CLK_LOCAL_MEM_FENCE);\n        }\n    }\n    // Distribute results\n    {\n        int64_t x_229808;\n        int64_t x_229812;\n        int64_t x_229820 = prefix_229755;\n        int64_t x_229824 = acc_229730;\n        int64_t x_229809;\n        int64_t x_229813;\n        int64_t x_229821 = prefix_229756;\n        int64_t x_229825 = acc_229731;\n        int64_t x_229810;\n        int64_t x_229814;\n        int64_t x_229822 = prefix_229757;\n        int64_t x_229826 = acc_229732;\n        int64_t x_229811;\n        int64_t x_229815;\n        int64_t x_229823 = prefix_229758;\n        int64_t x_229827 = acc_229733;\n        \n        if (slt32(local_tid_229638 * 3, boundary_229671) &&\n            !block_new_sgm_229759) {\n            int64_t defunc_1_op_res_229828 = add64(x_229820, x_229824);\n            int64_t defunc_1_op_res_229829 = add64(x_229821, x_229825);\n            int64_t defunc_1_op_res_229830 = add64(x_229822, x_229826);\n            int64_t defunc_1_op_res_229831 = add64(x_229823, x_229827);\n            \n            x_229808 = defunc_1_op_res_229828;\n            x_229809 = defunc_1_op_res_229829;\n            x_229810 = defunc_1_op_res_229830;\n            x_229811 = defunc_1_op_res_229831;\n        } else {\n            x_229808 = acc_229730;\n            x_229809 = acc_229731;\n            x_229810 = acc_229732;\n          ",
            "  x_229811 = acc_229733;\n        }\n        \n        int32_t stopping_point_229832 = segsizze_compact_229672 -\n                srem32(local_tid_229638 * 3 - 1 + segsizze_compact_229672 -\n                       boundary_229671, segsizze_compact_229672);\n        \n        for (int64_t i_229833 = 0; i_229833 < (int64_t) 3; i_229833++) {\n            if (slt32(sext_i64_i32(i_229833), stopping_point_229832 - 1)) {\n                x_229812 = private_mem_229673[i_229833];\n                x_229813 = private_mem_229675[i_229833];\n                x_229814 = private_mem_229677[i_229833];\n                x_229815 = private_mem_229679[i_229833];\n                \n                int64_t defunc_1_op_res_229816 = add64(x_229808, x_229812);\n                int64_t defunc_1_op_res_229817 = add64(x_229809, x_229813);\n                int64_t defunc_1_op_res_229818 = add64(x_229810, x_229814);\n                int64_t defunc_1_op_res_229819 = add64(x_229811, x_229815);\n                \n                private_mem_229673[i_229833] = defunc_1_op_res_229816;\n                private_mem_229675[i_229833] = defunc_1_op_res_229817;\n                private_mem_229677[i_229833] = defunc_1_op_res_229818;\n                private_mem_229679[i_229833] = defunc_1_op_res_229819;\n            }\n        }\n    }\n    // Transpose scan output and Write it to global memory in coalesced fashion\n    {\n        for (int64_t i_229834 = 0; i_229834 < (int64_t) 3; i_229834++) {\n            int64_t sharedIdx_229835 = sext_i32_i64(local_tid_229638 * 3) +\n                    i_229834;\n            int64_t tmp_229836;\n            \n            tmp_229836 = private_mem_229673[i_229834];\n            ((__local int64_t *) local_mem_229652)[sharedIdx_229835] =\n                tmp_229836;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int64_t i_229837 = 0; i_229837 < (int64_t) 3; i_229837++) {\n            int64_t flat_idx_229838 = blockOff_229669 +\n                    segscan_group_sizze_220959 * i_229837 +\n         ",
            "           sext_i32_i64(local_tid_229638);\n            int64_t slice_229839 = n_196692;\n            int64_t slice_229840 = m_196691 * slice_229839;\n            int64_t gtid_220967 = squot64(flat_idx_229838, slice_229839);\n            int64_t remnant_229841 = flat_idx_229838 - gtid_220967 *\n                    slice_229839;\n            int64_t gtid_220968 = remnant_229841;\n            int64_t remnant_229842 = remnant_229841 - gtid_220968;\n            \n            if (slt64(flat_idx_229838, m_196691 * n_196692)) {\n                int64_t tmp_229843;\n                \n                tmp_229843 = ((__local\n                               int64_t *) local_mem_229652)[flat_idx_229838 -\n                                                            blockOff_229669];\n                ((__global int64_t *) mem_224835)[gtid_220967 * n_196692 +\n                                                  gtid_220968] = tmp_229843;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int64_t i_229844 = 0; i_229844 < (int64_t) 3; i_229844++) {\n            int64_t sharedIdx_229845 = sext_i32_i64(local_tid_229638 * 3) +\n                    i_229844;\n            int64_t tmp_229846;\n            \n            tmp_229846 = private_mem_229675[i_229844];\n            ((__local int64_t *) local_mem_229652)[sharedIdx_229845] =\n                tmp_229846;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int64_t i_229847 = 0; i_229847 < (int64_t) 3; i_229847++) {\n            int64_t flat_idx_229848 = blockOff_229669 +\n                    segscan_group_sizze_220959 * i_229847 +\n                    sext_i32_i64(local_tid_229638);\n            int64_t slice_229849 = n_196692;\n            int64_t slice_229850 = m_196691 * slice_229849;\n            int64_t gtid_220967 = squot64(flat_idx_229848, slice_229849);\n            int64_t remnant_229851 = flat_idx_229848 - gtid_220967 *\n                    slice_229849;\n            int64_t gtid_220968 = remnant_229851;\n            int64_t r",
            "emnant_229852 = remnant_229851 - gtid_220968;\n            \n            if (slt64(flat_idx_229848, m_196691 * n_196692)) {\n                int64_t tmp_229853;\n                \n                tmp_229853 = ((__local\n                               int64_t *) local_mem_229652)[flat_idx_229848 -\n                                                            blockOff_229669];\n                ((__global int64_t *) mem_224839)[gtid_220967 * n_196692 +\n                                                  gtid_220968] = tmp_229853;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int64_t i_229854 = 0; i_229854 < (int64_t) 3; i_229854++) {\n            int64_t sharedIdx_229855 = sext_i32_i64(local_tid_229638 * 3) +\n                    i_229854;\n            int64_t tmp_229856;\n            \n            tmp_229856 = private_mem_229677[i_229854];\n            ((__local int64_t *) local_mem_229652)[sharedIdx_229855] =\n                tmp_229856;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int64_t i_229857 = 0; i_229857 < (int64_t) 3; i_229857++) {\n            int64_t flat_idx_229858 = blockOff_229669 +\n                    segscan_group_sizze_220959 * i_229857 +\n                    sext_i32_i64(local_tid_229638);\n            int64_t slice_229859 = n_196692;\n            int64_t slice_229860 = m_196691 * slice_229859;\n            int64_t gtid_220967 = squot64(flat_idx_229858, slice_229859);\n            int64_t remnant_229861 = flat_idx_229858 - gtid_220967 *\n                    slice_229859;\n            int64_t gtid_220968 = remnant_229861;\n            int64_t remnant_229862 = remnant_229861 - gtid_220968;\n            \n            if (slt64(flat_idx_229858, m_196691 * n_196692)) {\n                int64_t tmp_229863;\n                \n                tmp_229863 = ((__local\n                               int64_t *) local_mem_229652)[flat_idx_229858 -\n                                                            blockOff_229669];\n                ((__global",
            " int64_t *) mem_224843)[gtid_220967 * n_196692 +\n                                                  gtid_220968] = tmp_229863;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int64_t i_229864 = 0; i_229864 < (int64_t) 3; i_229864++) {\n            int64_t sharedIdx_229865 = sext_i32_i64(local_tid_229638 * 3) +\n                    i_229864;\n            int64_t tmp_229866;\n            \n            tmp_229866 = private_mem_229679[i_229864];\n            ((__local int64_t *) local_mem_229652)[sharedIdx_229865] =\n                tmp_229866;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        for (int64_t i_229867 = 0; i_229867 < (int64_t) 3; i_229867++) {\n            int64_t flat_idx_229868 = blockOff_229669 +\n                    segscan_group_sizze_220959 * i_229867 +\n                    sext_i32_i64(local_tid_229638);\n            int64_t slice_229869 = n_196692;\n            int64_t slice_229870 = m_196691 * slice_229869;\n            int64_t gtid_220967 = squot64(flat_idx_229868, slice_229869);\n            int64_t remnant_229871 = flat_idx_229868 - gtid_220967 *\n                    slice_229869;\n            int64_t gtid_220968 = remnant_229871;\n            int64_t remnant_229872 = remnant_229871 - gtid_220968;\n            \n            if (slt64(flat_idx_229868, m_196691 * n_196692)) {\n                int64_t tmp_229873;\n                \n                tmp_229873 = ((__local\n                               int64_t *) local_mem_229652)[flat_idx_229868 -\n                                                            blockOff_229669];\n                ((__global int64_t *) mem_224847)[gtid_220967 * n_196692 +\n                                                  gtid_220968] = tmp_229873;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n    }\n    // If this is the last block, reset the dynamicId\n    {\n        if (dynamic_id_229668 == sdiv_up64(m_196691 * n_196692,\n                                           segscan_group_sizze_220959 *\n      ",
            "                                     (int64_t) 3) - (int64_t) 1) {\n            ((__global int32_t *) mainziid_counter_mem_229617)[(int64_t) 0] = 0;\n        }\n    }\n    \n  error_0:\n    return;\n    #undef segscan_group_sizze_220959\n}\n",
            NULL};
static const char *tuning_param_names[] =
                  {"builtin#replicate_f32.group_size_225900",
                   "builtin#replicate_i64.group_size_225441",
                   "builtin#replicate_i8.group_size_225336",
                   "main.group_size_225459", "main.group_size_225660",
                   "main.group_size_227697", "main.group_size_227896",
                   "main.group_size_228146", "main.group_size_228524",
                   "main.group_size_228746", "main.group_size_229019",
                   "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_225900",
                   "builtinzhreplicate_i64zigroup_sizze_225441",
                   "builtinzhreplicate_i8zigroup_sizze_225336",
                   "mainzigroup_sizze_225459", "mainzigroup_sizze_225660",
                   "mainzigroup_sizze_227697", "mainzigroup_sizze_227896",
                   "mainzigroup_sizze_228146", "mainzigroup_sizze_228524",
                   "mainzigroup_sizze_228746", "mainzigroup_sizze_229019",
                   "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", "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_225900;
    int64_t *builtinzhreplicate_i64zigroup_sizze_225441;
    int64_t *builtinzhreplicate_i8zigroup_sizze_225336;
    int64_t *mainzigroup_sizze_225459;
    int64_t *mainzigroup_sizze_225660;
    int64_t *mainzigroup_sizze_227697;
    int64_t *mainzigroup_sizze_227896;
    int64_t *mainzigroup_sizze_228146;
    int64_t *mainzigroup_sizze_228524;
    int64_t *mainzigroup_sizze_228746;
    int64_t *mainzigroup_sizze_229019;
    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 cuda_config cu_cfg;
    int profiling;
    int64_t tuning_params[194];
    int num_nvrtc_opts;
    const char **nvrtc_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->profiling = 0;
    cfg->num_nvrtc_opts = 0;
    cfg->nvrtc_opts = (const char **) malloc(sizeof(const char *));
    cfg->nvrtc_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] = 0;
    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] = 32;
    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;
    cfg->tuning_params[193] = 0;
    cuda_config_init(&cfg->cu_cfg, 194, 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->nvrtc_opts);
    free(cfg);
}
void futhark_context_config_add_nvrtc_option(struct futhark_context_config *cfg,
                                             const char *opt)
{
    cfg->nvrtc_opts[cfg->num_nvrtc_opts] = opt;
    cfg->num_nvrtc_opts++;
    cfg->nvrtc_opts = (const char **) realloc(cfg->nvrtc_opts,
                                              (cfg->num_nvrtc_opts + 1) *
                                              sizeof(const char *));
    cfg->nvrtc_opts[cfg->num_nvrtc_opts] = NULL;
}
void futhark_context_config_set_debugging(struct futhark_context_config *cfg,
                                          int flag)
{
    cfg->cu_cfg.logging = cfg->cu_cfg.debugging = flag;
}
void futhark_context_config_set_profiling(struct futhark_context_config *cfg,
                                          int flag)
{
    cfg->profiling = flag;
}
void futhark_context_config_set_logging(struct futhark_context_config *cfg,
                                        int flag)
{
    cfg->cu_cfg.logging = flag;
}
void futhark_context_config_set_device(struct futhark_context_config *cfg, const
                                       char *s)
{
    set_preferred_device(&cfg->cu_cfg, s);
}
void futhark_context_config_dump_program_to(struct futhark_context_config *cfg,
                                            const char *path)
{
    cfg->cu_cfg.dump_program_to = path;
}
void futhark_context_config_load_program_from(struct futhark_context_config *cfg,
                                              const char *path)
{
    cfg->cu_cfg.load_program_from = path;
}
void futhark_context_config_dump_ptx_to(struct futhark_context_config *cfg,
                                        const char *path)
{
    cfg->cu_cfg.dump_ptx_to = path;
}
void futhark_context_config_load_ptx_from(struct futhark_context_config *cfg,
                                          const char *path)
{
    cfg->cu_cfg.load_ptx_from = path;
}
void futhark_context_config_set_default_group_size(struct futhark_context_config *cfg,
                                                   int size)
{
    cfg->cu_cfg.default_block_size = size;
    cfg->cu_cfg.default_block_size_changed = 1;
}
void futhark_context_config_set_default_num_groups(struct futhark_context_config *cfg,
                                                   int num)
{
    cfg->cu_cfg.default_grid_size = num;
    cfg->cu_cfg.default_grid_size_changed = 1;
}
void futhark_context_config_set_default_tile_size(struct futhark_context_config *cfg,
                                                  int size)
{
    cfg->cu_cfg.default_tile_size = size;
    cfg->cu_cfg.default_tile_size_changed = 1;
}
void futhark_context_config_set_default_reg_tile_size(struct futhark_context_config *cfg,
                                                      int size)
{
    cfg->cu_cfg.default_reg_tile_size = size;
}
void futhark_context_config_set_default_threshold(struct futhark_context_config *cfg,
                                                  int size)
{
    cfg->cu_cfg.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 < 194; 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->cu_cfg.default_block_size = new_value;
        return 0;
    }
    if (strcmp(param_name, "default_num_groups") == 0) {
        cfg->cu_cfg.default_grid_size = new_value;
        return 0;
    }
    if (strcmp(param_name, "default_threshold") == 0) {
        cfg->cu_cfg.default_threshold = new_value;
        return 0;
    }
    if (strcmp(param_name, "default_tile_size") == 0) {
        cfg->cu_cfg.default_tile_size = new_value;
        return 0;
    }
    if (strcmp(param_name, "default_reg_tile_size") == 0) {
        cfg->cu_cfg.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 mainziid_counter_mem_225321;
    struct memblock_device mainziid_counter_mem_225540;
    struct memblock_device mainzicounter_mem_226114;
    struct memblock_device mainzicounter_mem_226202;
    struct memblock_device mainzicounter_mem_226463;
    struct memblock_device mainzicounter_mem_226571;
    struct memblock_device mainzicounter_mem_226876;
    struct memblock_device mainzicounter_mem_226996;
    struct memblock_device mainzicounter_mem_227191;
    struct memblock_device mainziid_counter_mem_227228;
    struct memblock_device mainzicounter_mem_227372;
    struct memblock_device mainziid_counter_mem_227409;
    struct memblock_device mainzicounter_mem_227553;
    struct memblock_device mainziid_counter_mem_227590;
    struct memblock_device mainzicounter_mem_227770;
    struct memblock_device mainzicounter_mem_227852;
    struct memblock_device mainzicounter_mem_227994;
    struct memblock_device mainzicounter_mem_228096;
    struct memblock_device mainzicounter_mem_228264;
    struct memblock_device mainzicounter_mem_228378;
    struct memblock_device mainzicounter_mem_228620;
    struct memblock_device mainzicounter_mem_228702;
    struct memblock_device mainzicounter_mem_228867;
    struct memblock_device mainzicounter_mem_228969;
    struct memblock_device mainzicounter_mem_229160;
    struct memblock_device mainzicounter_mem_229274;
    struct memblock_device mainziid_counter_mem_229617;
    struct memblock_device mainzicounter_mem_229931;
    CUfunction builtinzhreplicate_f32zireplicate_225897;
    int64_t builtinzhreplicate_f32zireplicate_225897_total_runtime;
    int builtinzhreplicate_f32zireplicate_225897_runs;
    CUfunction builtinzhreplicate_i64zireplicate_225438;
    int64_t builtinzhreplicate_i64zireplicate_225438_total_runtime;
    int builtinzhreplicate_i64zireplicate_225438_runs;
    CUfunction builtinzhreplicate_i8zireplicate_225333;
    int64_t builtinzhreplicate_i8zireplicate_225333_total_runtime;
    int builtinzhreplicate_i8zireplicate_225333_runs;
    CUfunction gpu_map_transpose_f32;
    int64_t gpu_map_transpose_f32_total_runtime;
    int gpu_map_transpose_f32_runs;
    CUfunction gpu_map_transpose_f32_low_height;
    int64_t gpu_map_transpose_f32_low_height_total_runtime;
    int gpu_map_transpose_f32_low_height_runs;
    CUfunction gpu_map_transpose_f32_low_width;
    int64_t gpu_map_transpose_f32_low_width_total_runtime;
    int gpu_map_transpose_f32_low_width_runs;
    CUfunction gpu_map_transpose_f32_small;
    int64_t gpu_map_transpose_f32_small_total_runtime;
    int gpu_map_transpose_f32_small_runs;
    CUfunction gpu_map_transpose_i64;
    int64_t gpu_map_transpose_i64_total_runtime;
    int gpu_map_transpose_i64_runs;
    CUfunction gpu_map_transpose_i64_low_height;
    int64_t gpu_map_transpose_i64_low_height_total_runtime;
    int gpu_map_transpose_i64_low_height_runs;
    CUfunction gpu_map_transpose_i64_low_width;
    int64_t gpu_map_transpose_i64_low_width_total_runtime;
    int gpu_map_transpose_i64_low_width_runs;
    CUfunction gpu_map_transpose_i64_small;
    int64_t gpu_map_transpose_i64_small_total_runtime;
    int gpu_map_transpose_i64_small_runs;
    CUfunction mainzicopy_225456;
    int64_t mainzicopy_225456_total_runtime;
    int mainzicopy_225456_runs;
    CUfunction mainzicopy_225657;
    int64_t mainzicopy_225657_total_runtime;
    int mainzicopy_225657_runs;
    CUfunction mainzicopy_227694;
    int64_t mainzicopy_227694_total_runtime;
    int mainzicopy_227694_runs;
    CUfunction mainzicopy_227893;
    int64_t mainzicopy_227893_total_runtime;
    int mainzicopy_227893_runs;
    CUfunction mainzicopy_228143;
    int64_t mainzicopy_228143_total_runtime;
    int mainzicopy_228143_runs;
    CUfunction mainzicopy_228521;
    int64_t mainzicopy_228521_total_runtime;
    int mainzicopy_228521_runs;
    CUfunction mainzicopy_228743;
    int64_t mainzicopy_228743_total_runtime;
    int mainzicopy_228743_runs;
    CUfunction mainzicopy_229016;
    int64_t mainzicopy_229016_total_runtime;
    int mainzicopy_229016_runs;
    CUfunction mainzisegmap_200128;
    int64_t mainzisegmap_200128_total_runtime;
    int mainzisegmap_200128_runs;
    CUfunction mainzisegmap_200253;
    int64_t mainzisegmap_200253_total_runtime;
    int mainzisegmap_200253_runs;
    CUfunction mainzisegmap_200688;
    int64_t mainzisegmap_200688_total_runtime;
    int mainzisegmap_200688_runs;
    CUfunction mainzisegmap_201901;
    int64_t mainzisegmap_201901_total_runtime;
    int mainzisegmap_201901_runs;
    CUfunction mainzisegmap_201915;
    int64_t mainzisegmap_201915_total_runtime;
    int mainzisegmap_201915_runs;
    CUfunction mainzisegmap_201939;
    int64_t mainzisegmap_201939_total_runtime;
    int mainzisegmap_201939_runs;
    CUfunction mainzisegmap_202549;
    int64_t mainzisegmap_202549_total_runtime;
    int mainzisegmap_202549_runs;
    CUfunction mainzisegmap_202561;
    int64_t mainzisegmap_202561_total_runtime;
    int mainzisegmap_202561_runs;
    CUfunction mainzisegmap_202582;
    int64_t mainzisegmap_202582_total_runtime;
    int mainzisegmap_202582_runs;
    CUfunction mainzisegmap_203175;
    int64_t mainzisegmap_203175_total_runtime;
    int mainzisegmap_203175_runs;
    CUfunction mainzisegmap_203187;
    int64_t mainzisegmap_203187_total_runtime;
    int mainzisegmap_203187_runs;
    CUfunction mainzisegmap_203208;
    int64_t mainzisegmap_203208_total_runtime;
    int mainzisegmap_203208_runs;
    CUfunction mainzisegmap_203350;
    int64_t mainzisegmap_203350_total_runtime;
    int mainzisegmap_203350_runs;
    CUfunction mainzisegmap_203495;
    int64_t mainzisegmap_203495_total_runtime;
    int mainzisegmap_203495_runs;
    CUfunction mainzisegmap_203625;
    int64_t mainzisegmap_203625_total_runtime;
    int mainzisegmap_203625_runs;
    CUfunction mainzisegmap_204765;
    int64_t mainzisegmap_204765_total_runtime;
    int mainzisegmap_204765_runs;
    CUfunction mainzisegmap_204973;
    int64_t mainzisegmap_204973_total_runtime;
    int mainzisegmap_204973_runs;
    CUfunction mainzisegmap_205062;
    int64_t mainzisegmap_205062_total_runtime;
    int mainzisegmap_205062_runs;
    CUfunction mainzisegmap_205134;
    int64_t mainzisegmap_205134_total_runtime;
    int mainzisegmap_205134_runs;
    CUfunction mainzisegmap_205348;
    int64_t mainzisegmap_205348_total_runtime;
    int mainzisegmap_205348_runs;
    CUfunction mainzisegmap_206802;
    int64_t mainzisegmap_206802_total_runtime;
    int mainzisegmap_206802_runs;
    CUfunction mainzisegmap_207077;
    int64_t mainzisegmap_207077_total_runtime;
    int mainzisegmap_207077_runs;
    CUfunction mainzisegmap_207194;
    int64_t mainzisegmap_207194_total_runtime;
    int mainzisegmap_207194_runs;
    CUfunction mainzisegmap_207278;
    int64_t mainzisegmap_207278_total_runtime;
    int mainzisegmap_207278_runs;
    CUfunction mainzisegmap_207553;
    int64_t mainzisegmap_207553_total_runtime;
    int mainzisegmap_207553_runs;
    CUfunction mainzisegmap_209345;
    int64_t mainzisegmap_209345_total_runtime;
    int mainzisegmap_209345_runs;
    CUfunction mainzisegmap_209690;
    int64_t mainzisegmap_209690_total_runtime;
    int mainzisegmap_209690_runs;
    CUfunction mainzisegmap_209839;
    int64_t mainzisegmap_209839_total_runtime;
    int mainzisegmap_209839_runs;
    CUfunction mainzisegmap_209935;
    int64_t mainzisegmap_209935_total_runtime;
    int mainzisegmap_209935_runs;
    CUfunction mainzisegmap_211496;
    int64_t mainzisegmap_211496_total_runtime;
    int mainzisegmap_211496_runs;
    CUfunction mainzisegmap_211645;
    int64_t mainzisegmap_211645_total_runtime;
    int mainzisegmap_211645_runs;
    CUfunction mainzisegmap_211681;
    int64_t mainzisegmap_211681_total_runtime;
    int mainzisegmap_211681_runs;
    CUfunction mainzisegmap_211812;
    int64_t mainzisegmap_211812_total_runtime;
    int mainzisegmap_211812_runs;
    CUfunction mainzisegmap_211943;
    int64_t mainzisegmap_211943_total_runtime;
    int mainzisegmap_211943_runs;
    CUfunction mainzisegmap_212132;
    int64_t mainzisegmap_212132_total_runtime;
    int mainzisegmap_212132_runs;
    CUfunction mainzisegmap_212517;
    int64_t mainzisegmap_212517_total_runtime;
    int mainzisegmap_212517_runs;
    CUfunction mainzisegmap_212634;
    int64_t mainzisegmap_212634_total_runtime;
    int mainzisegmap_212634_runs;
    CUfunction mainzisegmap_212795;
    int64_t mainzisegmap_212795_total_runtime;
    int mainzisegmap_212795_runs;
    CUfunction mainzisegmap_213316;
    int64_t mainzisegmap_213316_total_runtime;
    int mainzisegmap_213316_runs;
    CUfunction mainzisegmap_213473;
    int64_t mainzisegmap_213473_total_runtime;
    int mainzisegmap_213473_runs;
    CUfunction mainzisegmap_213692;
    int64_t mainzisegmap_213692_total_runtime;
    int mainzisegmap_213692_runs;
    CUfunction mainzisegmap_214361;
    int64_t mainzisegmap_214361_total_runtime;
    int mainzisegmap_214361_runs;
    CUfunction mainzisegmap_214562;
    int64_t mainzisegmap_214562_total_runtime;
    int mainzisegmap_214562_runs;
    CUfunction mainzisegmap_215432;
    int64_t mainzisegmap_215432_total_runtime;
    int mainzisegmap_215432_runs;
    CUfunction mainzisegmap_215527;
    int64_t mainzisegmap_215527_total_runtime;
    int mainzisegmap_215527_runs;
    CUfunction mainzisegmap_215634;
    int64_t mainzisegmap_215634_total_runtime;
    int mainzisegmap_215634_runs;
    CUfunction mainzisegmap_216150;
    int64_t mainzisegmap_216150_total_runtime;
    int mainzisegmap_216150_runs;
    CUfunction mainzisegmap_216167;
    int64_t mainzisegmap_216167_total_runtime;
    int mainzisegmap_216167_runs;
    CUfunction mainzisegmap_216195;
    int64_t mainzisegmap_216195_total_runtime;
    int mainzisegmap_216195_runs;
    CUfunction mainzisegmap_216319;
    int64_t mainzisegmap_216319_total_runtime;
    int mainzisegmap_216319_runs;
    CUfunction mainzisegmap_216506;
    int64_t mainzisegmap_216506_total_runtime;
    int mainzisegmap_216506_runs;
    CUfunction mainzisegmap_217156;
    int64_t mainzisegmap_217156_total_runtime;
    int mainzisegmap_217156_runs;
    CUfunction mainzisegmap_217173;
    int64_t mainzisegmap_217173_total_runtime;
    int mainzisegmap_217173_runs;
    CUfunction mainzisegmap_217203;
    int64_t mainzisegmap_217203_total_runtime;
    int mainzisegmap_217203_runs;
    CUfunction mainzisegmap_217367;
    int64_t mainzisegmap_217367_total_runtime;
    int mainzisegmap_217367_runs;
    CUfunction mainzisegmap_217612;
    int64_t mainzisegmap_217612_total_runtime;
    int mainzisegmap_217612_runs;
    CUfunction mainzisegmap_218410;
    int64_t mainzisegmap_218410_total_runtime;
    int mainzisegmap_218410_runs;
    CUfunction mainzisegmap_218427;
    int64_t mainzisegmap_218427_total_runtime;
    int mainzisegmap_218427_runs;
    CUfunction mainzisegmap_218457;
    int64_t mainzisegmap_218457_total_runtime;
    int mainzisegmap_218457_runs;
    CUfunction mainzisegmap_218665;
    int64_t mainzisegmap_218665_total_runtime;
    int mainzisegmap_218665_runs;
    CUfunction mainzisegmap_218956;
    int64_t mainzisegmap_218956_total_runtime;
    int mainzisegmap_218956_runs;
    CUfunction mainzisegmap_218973;
    int64_t mainzisegmap_218973_total_runtime;
    int mainzisegmap_218973_runs;
    CUfunction mainzisegmap_219268;
    int64_t mainzisegmap_219268_total_runtime;
    int mainzisegmap_219268_runs;
    CUfunction mainzisegmap_219285;
    int64_t mainzisegmap_219285_total_runtime;
    int mainzisegmap_219285_runs;
    CUfunction mainzisegmap_219672;
    int64_t mainzisegmap_219672_total_runtime;
    int mainzisegmap_219672_runs;
    CUfunction mainzisegmap_219689;
    int64_t mainzisegmap_219689_total_runtime;
    int mainzisegmap_219689_runs;
    CUfunction mainzisegmap_219977;
    int64_t mainzisegmap_219977_total_runtime;
    int mainzisegmap_219977_runs;
    CUfunction mainzisegmap_220194;
    int64_t mainzisegmap_220194_total_runtime;
    int mainzisegmap_220194_runs;
    CUfunction mainzisegmap_220215;
    int64_t mainzisegmap_220215_total_runtime;
    int mainzisegmap_220215_runs;
    CUfunction mainzisegmap_220339;
    int64_t mainzisegmap_220339_total_runtime;
    int mainzisegmap_220339_runs;
    CUfunction mainzisegmap_221037;
    int64_t mainzisegmap_221037_total_runtime;
    int mainzisegmap_221037_runs;
    CUfunction mainzisegmap_221092;
    int64_t mainzisegmap_221092_total_runtime;
    int mainzisegmap_221092_runs;
    CUfunction mainzisegmap_221154;
    int64_t mainzisegmap_221154_total_runtime;
    int mainzisegmap_221154_runs;
    CUfunction mainzisegmap_221240;
    int64_t mainzisegmap_221240_total_runtime;
    int mainzisegmap_221240_runs;
    CUfunction mainzisegmap_221310;
    int64_t mainzisegmap_221310_total_runtime;
    int mainzisegmap_221310_runs;
    CUfunction mainzisegmap_intragroup_199976;
    int64_t mainzisegmap_intragroup_199976_total_runtime;
    int mainzisegmap_intragroup_199976_runs;
    CUfunction mainzisegmap_intragroup_200331;
    int64_t mainzisegmap_intragroup_200331_total_runtime;
    int mainzisegmap_intragroup_200331_runs;
    CUfunction mainzisegmap_intragroup_200607;
    int64_t mainzisegmap_intragroup_200607_total_runtime;
    int mainzisegmap_intragroup_200607_runs;
    CUfunction mainzisegmap_intragroup_200860;
    int64_t mainzisegmap_intragroup_200860_total_runtime;
    int mainzisegmap_intragroup_200860_runs;
    CUfunction mainzisegmap_intragroup_201764;
    int64_t mainzisegmap_intragroup_201764_total_runtime;
    int mainzisegmap_intragroup_201764_runs;
    CUfunction mainzisegmap_intragroup_202165;
    int64_t mainzisegmap_intragroup_202165_total_runtime;
    int mainzisegmap_intragroup_202165_runs;
    CUfunction mainzisegmap_intragroup_202791;
    int64_t mainzisegmap_intragroup_202791_total_runtime;
    int mainzisegmap_intragroup_202791_runs;
    CUfunction mainzisegmap_intragroup_204851;
    int64_t mainzisegmap_intragroup_204851_total_runtime;
    int mainzisegmap_intragroup_204851_runs;
    CUfunction mainzisegmap_intragroup_206919;
    int64_t mainzisegmap_intragroup_206919_total_runtime;
    int mainzisegmap_intragroup_206919_runs;
    CUfunction mainzisegmap_intragroup_209494;
    int64_t mainzisegmap_intragroup_209494_total_runtime;
    int mainzisegmap_intragroup_209494_runs;
    CUfunction mainzisegmap_intragroup_210266;
    int64_t mainzisegmap_intragroup_210266_total_runtime;
    int mainzisegmap_intragroup_210266_runs;
    CUfunction mainzisegmap_intragroup_210587;
    int64_t mainzisegmap_intragroup_210587_total_runtime;
    int mainzisegmap_intragroup_210587_runs;
    CUfunction mainzisegmap_intragroup_211038;
    int64_t mainzisegmap_intragroup_211038_total_runtime;
    int mainzisegmap_intragroup_211038_runs;
    CUfunction mainzisegmap_intragroup_214752;
    int64_t mainzisegmap_intragroup_214752_total_runtime;
    int mainzisegmap_intragroup_214752_runs;
    CUfunction mainzisegmap_intragroup_214919;
    int64_t mainzisegmap_intragroup_214919_total_runtime;
    int mainzisegmap_intragroup_214919_runs;
    CUfunction mainzisegmap_intragroup_215176;
    int64_t mainzisegmap_intragroup_215176_total_runtime;
    int mainzisegmap_intragroup_215176_runs;
    CUfunction mainzisegmap_intragroup_219000;
    int64_t mainzisegmap_intragroup_219000_total_runtime;
    int mainzisegmap_intragroup_219000_runs;
    CUfunction mainzisegmap_intragroup_219313;
    int64_t mainzisegmap_intragroup_219313_total_runtime;
    int mainzisegmap_intragroup_219313_runs;
    CUfunction mainzisegmap_intragroup_219717;
    int64_t mainzisegmap_intragroup_219717_total_runtime;
    int mainzisegmap_intragroup_219717_runs;
    CUfunction mainzisegmap_intragroup_220067;
    int64_t mainzisegmap_intragroup_220067_total_runtime;
    int mainzisegmap_intragroup_220067_runs;
    CUfunction mainzisegmap_intragroup_220432;
    int64_t mainzisegmap_intragroup_220432_total_runtime;
    int mainzisegmap_intragroup_220432_runs;
    CUfunction mainzisegmap_intragroup_220872;
    int64_t mainzisegmap_intragroup_220872_total_runtime;
    int mainzisegmap_intragroup_220872_runs;
    CUfunction mainzisegred_large_205086;
    int64_t mainzisegred_large_205086_total_runtime;
    int mainzisegred_large_205086_runs;
    CUfunction mainzisegred_large_205160;
    int64_t mainzisegred_large_205160_total_runtime;
    int mainzisegred_large_205160_runs;
    CUfunction mainzisegred_large_207220;
    int64_t mainzisegred_large_207220_total_runtime;
    int mainzisegred_large_207220_runs;
    CUfunction mainzisegred_large_207314;
    int64_t mainzisegred_large_207314_total_runtime;
    int mainzisegred_large_207314_runs;
    CUfunction mainzisegred_large_209867;
    int64_t mainzisegred_large_209867_total_runtime;
    int mainzisegred_large_209867_runs;
    CUfunction mainzisegred_large_209990;
    int64_t mainzisegred_large_209990_total_runtime;
    int mainzisegred_large_209990_runs;
    CUfunction mainzisegred_large_211714;
    int64_t mainzisegred_large_211714_total_runtime;
    int mainzisegred_large_211714_runs;
    CUfunction mainzisegred_large_211845;
    int64_t mainzisegred_large_211845_total_runtime;
    int mainzisegred_large_211845_runs;
    CUfunction mainzisegred_large_211976;
    int64_t mainzisegred_large_211976_total_runtime;
    int mainzisegred_large_211976_runs;
    CUfunction mainzisegred_large_212598;
    int64_t mainzisegred_large_212598_total_runtime;
    int mainzisegred_large_212598_runs;
    CUfunction mainzisegred_large_212647;
    int64_t mainzisegred_large_212647_total_runtime;
    int mainzisegred_large_212647_runs;
    CUfunction mainzisegred_large_213427;
    int64_t mainzisegred_large_213427_total_runtime;
    int mainzisegred_large_213427_runs;
    CUfunction mainzisegred_large_213496;
    int64_t mainzisegred_large_213496_total_runtime;
    int mainzisegred_large_213496_runs;
    CUfunction mainzisegred_large_214506;
    int64_t mainzisegred_large_214506_total_runtime;
    int mainzisegred_large_214506_runs;
    CUfunction mainzisegred_large_214604;
    int64_t mainzisegred_large_214604_total_runtime;
    int mainzisegred_large_214604_runs;
    CUfunction mainzisegred_large_216280;
    int64_t mainzisegred_large_216280_total_runtime;
    int mainzisegred_large_216280_runs;
    CUfunction mainzisegred_large_216332;
    int64_t mainzisegred_large_216332_total_runtime;
    int mainzisegred_large_216332_runs;
    CUfunction mainzisegred_large_217318;
    int64_t mainzisegred_large_217318_total_runtime;
    int mainzisegred_large_217318_runs;
    CUfunction mainzisegred_large_217390;
    int64_t mainzisegred_large_217390_total_runtime;
    int mainzisegred_large_217390_runs;
    CUfunction mainzisegred_large_218606;
    int64_t mainzisegred_large_218606_total_runtime;
    int mainzisegred_large_218606_runs;
    CUfunction mainzisegred_large_218707;
    int64_t mainzisegred_large_218707_total_runtime;
    int mainzisegred_large_218707_runs;
    CUfunction mainzisegred_large_221141;
    int64_t mainzisegred_large_221141_total_runtime;
    int mainzisegred_large_221141_runs;
    CUfunction mainzisegred_small_205086;
    int64_t mainzisegred_small_205086_total_runtime;
    int mainzisegred_small_205086_runs;
    CUfunction mainzisegred_small_205160;
    int64_t mainzisegred_small_205160_total_runtime;
    int mainzisegred_small_205160_runs;
    CUfunction mainzisegred_small_207220;
    int64_t mainzisegred_small_207220_total_runtime;
    int mainzisegred_small_207220_runs;
    CUfunction mainzisegred_small_207314;
    int64_t mainzisegred_small_207314_total_runtime;
    int mainzisegred_small_207314_runs;
    CUfunction mainzisegred_small_209867;
    int64_t mainzisegred_small_209867_total_runtime;
    int mainzisegred_small_209867_runs;
    CUfunction mainzisegred_small_209990;
    int64_t mainzisegred_small_209990_total_runtime;
    int mainzisegred_small_209990_runs;
    CUfunction mainzisegred_small_211714;
    int64_t mainzisegred_small_211714_total_runtime;
    int mainzisegred_small_211714_runs;
    CUfunction mainzisegred_small_211845;
    int64_t mainzisegred_small_211845_total_runtime;
    int mainzisegred_small_211845_runs;
    CUfunction mainzisegred_small_211976;
    int64_t mainzisegred_small_211976_total_runtime;
    int mainzisegred_small_211976_runs;
    CUfunction mainzisegred_small_212598;
    int64_t mainzisegred_small_212598_total_runtime;
    int mainzisegred_small_212598_runs;
    CUfunction mainzisegred_small_212647;
    int64_t mainzisegred_small_212647_total_runtime;
    int mainzisegred_small_212647_runs;
    CUfunction mainzisegred_small_213427;
    int64_t mainzisegred_small_213427_total_runtime;
    int mainzisegred_small_213427_runs;
    CUfunction mainzisegred_small_213496;
    int64_t mainzisegred_small_213496_total_runtime;
    int mainzisegred_small_213496_runs;
    CUfunction mainzisegred_small_214506;
    int64_t mainzisegred_small_214506_total_runtime;
    int mainzisegred_small_214506_runs;
    CUfunction mainzisegred_small_214604;
    int64_t mainzisegred_small_214604_total_runtime;
    int mainzisegred_small_214604_runs;
    CUfunction mainzisegred_small_216280;
    int64_t mainzisegred_small_216280_total_runtime;
    int mainzisegred_small_216280_runs;
    CUfunction mainzisegred_small_216332;
    int64_t mainzisegred_small_216332_total_runtime;
    int mainzisegred_small_216332_runs;
    CUfunction mainzisegred_small_217318;
    int64_t mainzisegred_small_217318_total_runtime;
    int mainzisegred_small_217318_runs;
    CUfunction mainzisegred_small_217390;
    int64_t mainzisegred_small_217390_total_runtime;
    int mainzisegred_small_217390_runs;
    CUfunction mainzisegred_small_218606;
    int64_t mainzisegred_small_218606_total_runtime;
    int mainzisegred_small_218606_runs;
    CUfunction mainzisegred_small_218707;
    int64_t mainzisegred_small_218707_total_runtime;
    int mainzisegred_small_218707_runs;
    CUfunction mainzisegred_small_221141;
    int64_t mainzisegred_small_221141_total_runtime;
    int mainzisegred_small_221141_runs;
    CUfunction mainzisegscan_200090;
    int64_t mainzisegscan_200090_total_runtime;
    int mainzisegscan_200090_runs;
    CUfunction mainzisegscan_200642;
    int64_t mainzisegscan_200642_total_runtime;
    int mainzisegscan_200642_runs;
    CUfunction mainzisegscan_211766;
    int64_t mainzisegscan_211766_total_runtime;
    int mainzisegscan_211766_runs;
    CUfunction mainzisegscan_211897;
    int64_t mainzisegscan_211897_total_runtime;
    int mainzisegscan_211897_runs;
    CUfunction mainzisegscan_212028;
    int64_t mainzisegscan_212028_total_runtime;
    int mainzisegscan_212028_runs;
    CUfunction mainzisegscan_220969;
    int64_t mainzisegscan_220969_total_runtime;
    int mainzisegscan_220969_runs;
    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;
    CUdeviceptr global_failure;
    CUdeviceptr global_failure_args;
    struct cuda_context cuda;
    struct tuning_params tuning_params;
    int32_t failure_is_an_option;
    int total_runs;
    long total_runtime;
};
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;
    ctx->debugging = ctx->detail_memory = cfg->cu_cfg.debugging;
    ctx->profiling = cfg->profiling;
    ctx->profiling_paused = 0;
    ctx->logging = cfg->cu_cfg.logging;
    ctx->error = NULL;
    ctx->log = stderr;
    ctx->cuda.profiling_records_capacity = 200;
    ctx->cuda.profiling_records_used = 0;
    ctx->cuda.profiling_records = malloc(ctx->cuda.profiling_records_capacity *
        sizeof(struct profiling_record));
    ctx->cuda.cfg = cfg->cu_cfg;
    create_lock(&ctx->lock);
    ctx->failure_is_an_option = 0;
    ctx->total_runs = 0;
    ctx->total_runtime = 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->error = cuda_setup(&ctx->cuda, cuda_program, cfg->nvrtc_opts);
    if (ctx->error != NULL)
        return NULL;
    
    int32_t no_error = -1;
    
    CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->global_failure, sizeof(no_error)));
    CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->global_failure, &no_error,
                                    sizeof(no_error)));
    // The +1 is to avoid zero-byte allocations.
    CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->global_failure_args, sizeof(int64_t) *
                                  (4 + 1)));
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->builtinzhreplicate_f32zireplicate_225897,
                                           ctx->cuda.module,
                                           "builtinzhreplicate_f32zireplicate_225897"));
    ctx->builtinzhreplicate_f32zireplicate_225897_total_runtime = 0;
    ctx->builtinzhreplicate_f32zireplicate_225897_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->builtinzhreplicate_i64zireplicate_225438,
                                           ctx->cuda.module,
                                           "builtinzhreplicate_i64zireplicate_225438"));
    ctx->builtinzhreplicate_i64zireplicate_225438_total_runtime = 0;
    ctx->builtinzhreplicate_i64zireplicate_225438_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->builtinzhreplicate_i8zireplicate_225333,
                                           ctx->cuda.module,
                                           "builtinzhreplicate_i8zireplicate_225333"));
    ctx->builtinzhreplicate_i8zireplicate_225333_total_runtime = 0;
    ctx->builtinzhreplicate_i8zireplicate_225333_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->gpu_map_transpose_f32,
                                           ctx->cuda.module,
                                           "gpu_map_transpose_f32"));
    ctx->gpu_map_transpose_f32_total_runtime = 0;
    ctx->gpu_map_transpose_f32_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->gpu_map_transpose_f32_low_height,
                                           ctx->cuda.module,
                                           "gpu_map_transpose_f32_low_height"));
    ctx->gpu_map_transpose_f32_low_height_total_runtime = 0;
    ctx->gpu_map_transpose_f32_low_height_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->gpu_map_transpose_f32_low_width,
                                           ctx->cuda.module,
                                           "gpu_map_transpose_f32_low_width"));
    ctx->gpu_map_transpose_f32_low_width_total_runtime = 0;
    ctx->gpu_map_transpose_f32_low_width_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->gpu_map_transpose_f32_small,
                                           ctx->cuda.module,
                                           "gpu_map_transpose_f32_small"));
    ctx->gpu_map_transpose_f32_small_total_runtime = 0;
    ctx->gpu_map_transpose_f32_small_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->gpu_map_transpose_i64,
                                           ctx->cuda.module,
                                           "gpu_map_transpose_i64"));
    ctx->gpu_map_transpose_i64_total_runtime = 0;
    ctx->gpu_map_transpose_i64_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->gpu_map_transpose_i64_low_height,
                                           ctx->cuda.module,
                                           "gpu_map_transpose_i64_low_height"));
    ctx->gpu_map_transpose_i64_low_height_total_runtime = 0;
    ctx->gpu_map_transpose_i64_low_height_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->gpu_map_transpose_i64_low_width,
                                           ctx->cuda.module,
                                           "gpu_map_transpose_i64_low_width"));
    ctx->gpu_map_transpose_i64_low_width_total_runtime = 0;
    ctx->gpu_map_transpose_i64_low_width_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->gpu_map_transpose_i64_small,
                                           ctx->cuda.module,
                                           "gpu_map_transpose_i64_small"));
    ctx->gpu_map_transpose_i64_small_total_runtime = 0;
    ctx->gpu_map_transpose_i64_small_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzicopy_225456,
                                           ctx->cuda.module,
                                           "mainzicopy_225456"));
    ctx->mainzicopy_225456_total_runtime = 0;
    ctx->mainzicopy_225456_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzicopy_225657,
                                           ctx->cuda.module,
                                           "mainzicopy_225657"));
    ctx->mainzicopy_225657_total_runtime = 0;
    ctx->mainzicopy_225657_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzicopy_227694,
                                           ctx->cuda.module,
                                           "mainzicopy_227694"));
    ctx->mainzicopy_227694_total_runtime = 0;
    ctx->mainzicopy_227694_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzicopy_227893,
                                           ctx->cuda.module,
                                           "mainzicopy_227893"));
    ctx->mainzicopy_227893_total_runtime = 0;
    ctx->mainzicopy_227893_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzicopy_228143,
                                           ctx->cuda.module,
                                           "mainzicopy_228143"));
    ctx->mainzicopy_228143_total_runtime = 0;
    ctx->mainzicopy_228143_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzicopy_228521,
                                           ctx->cuda.module,
                                           "mainzicopy_228521"));
    ctx->mainzicopy_228521_total_runtime = 0;
    ctx->mainzicopy_228521_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzicopy_228743,
                                           ctx->cuda.module,
                                           "mainzicopy_228743"));
    ctx->mainzicopy_228743_total_runtime = 0;
    ctx->mainzicopy_228743_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzicopy_229016,
                                           ctx->cuda.module,
                                           "mainzicopy_229016"));
    ctx->mainzicopy_229016_total_runtime = 0;
    ctx->mainzicopy_229016_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_200128,
                                           ctx->cuda.module,
                                           "mainzisegmap_200128"));
    ctx->mainzisegmap_200128_total_runtime = 0;
    ctx->mainzisegmap_200128_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_200253,
                                           ctx->cuda.module,
                                           "mainzisegmap_200253"));
    ctx->mainzisegmap_200253_total_runtime = 0;
    ctx->mainzisegmap_200253_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_200688,
                                           ctx->cuda.module,
                                           "mainzisegmap_200688"));
    ctx->mainzisegmap_200688_total_runtime = 0;
    ctx->mainzisegmap_200688_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_201901,
                                           ctx->cuda.module,
                                           "mainzisegmap_201901"));
    ctx->mainzisegmap_201901_total_runtime = 0;
    ctx->mainzisegmap_201901_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_201915,
                                           ctx->cuda.module,
                                           "mainzisegmap_201915"));
    ctx->mainzisegmap_201915_total_runtime = 0;
    ctx->mainzisegmap_201915_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_201939,
                                           ctx->cuda.module,
                                           "mainzisegmap_201939"));
    ctx->mainzisegmap_201939_total_runtime = 0;
    ctx->mainzisegmap_201939_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_202549,
                                           ctx->cuda.module,
                                           "mainzisegmap_202549"));
    ctx->mainzisegmap_202549_total_runtime = 0;
    ctx->mainzisegmap_202549_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_202561,
                                           ctx->cuda.module,
                                           "mainzisegmap_202561"));
    ctx->mainzisegmap_202561_total_runtime = 0;
    ctx->mainzisegmap_202561_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_202582,
                                           ctx->cuda.module,
                                           "mainzisegmap_202582"));
    ctx->mainzisegmap_202582_total_runtime = 0;
    ctx->mainzisegmap_202582_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_203175,
                                           ctx->cuda.module,
                                           "mainzisegmap_203175"));
    ctx->mainzisegmap_203175_total_runtime = 0;
    ctx->mainzisegmap_203175_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_203187,
                                           ctx->cuda.module,
                                           "mainzisegmap_203187"));
    ctx->mainzisegmap_203187_total_runtime = 0;
    ctx->mainzisegmap_203187_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_203208,
                                           ctx->cuda.module,
                                           "mainzisegmap_203208"));
    ctx->mainzisegmap_203208_total_runtime = 0;
    ctx->mainzisegmap_203208_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_203350,
                                           ctx->cuda.module,
                                           "mainzisegmap_203350"));
    ctx->mainzisegmap_203350_total_runtime = 0;
    ctx->mainzisegmap_203350_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_203495,
                                           ctx->cuda.module,
                                           "mainzisegmap_203495"));
    ctx->mainzisegmap_203495_total_runtime = 0;
    ctx->mainzisegmap_203495_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_203625,
                                           ctx->cuda.module,
                                           "mainzisegmap_203625"));
    ctx->mainzisegmap_203625_total_runtime = 0;
    ctx->mainzisegmap_203625_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_204765,
                                           ctx->cuda.module,
                                           "mainzisegmap_204765"));
    ctx->mainzisegmap_204765_total_runtime = 0;
    ctx->mainzisegmap_204765_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_204973,
                                           ctx->cuda.module,
                                           "mainzisegmap_204973"));
    ctx->mainzisegmap_204973_total_runtime = 0;
    ctx->mainzisegmap_204973_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_205062,
                                           ctx->cuda.module,
                                           "mainzisegmap_205062"));
    ctx->mainzisegmap_205062_total_runtime = 0;
    ctx->mainzisegmap_205062_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_205134,
                                           ctx->cuda.module,
                                           "mainzisegmap_205134"));
    ctx->mainzisegmap_205134_total_runtime = 0;
    ctx->mainzisegmap_205134_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_205348,
                                           ctx->cuda.module,
                                           "mainzisegmap_205348"));
    ctx->mainzisegmap_205348_total_runtime = 0;
    ctx->mainzisegmap_205348_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_206802,
                                           ctx->cuda.module,
                                           "mainzisegmap_206802"));
    ctx->mainzisegmap_206802_total_runtime = 0;
    ctx->mainzisegmap_206802_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_207077,
                                           ctx->cuda.module,
                                           "mainzisegmap_207077"));
    ctx->mainzisegmap_207077_total_runtime = 0;
    ctx->mainzisegmap_207077_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_207194,
                                           ctx->cuda.module,
                                           "mainzisegmap_207194"));
    ctx->mainzisegmap_207194_total_runtime = 0;
    ctx->mainzisegmap_207194_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_207278,
                                           ctx->cuda.module,
                                           "mainzisegmap_207278"));
    ctx->mainzisegmap_207278_total_runtime = 0;
    ctx->mainzisegmap_207278_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_207553,
                                           ctx->cuda.module,
                                           "mainzisegmap_207553"));
    ctx->mainzisegmap_207553_total_runtime = 0;
    ctx->mainzisegmap_207553_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_209345,
                                           ctx->cuda.module,
                                           "mainzisegmap_209345"));
    ctx->mainzisegmap_209345_total_runtime = 0;
    ctx->mainzisegmap_209345_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_209690,
                                           ctx->cuda.module,
                                           "mainzisegmap_209690"));
    ctx->mainzisegmap_209690_total_runtime = 0;
    ctx->mainzisegmap_209690_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_209839,
                                           ctx->cuda.module,
                                           "mainzisegmap_209839"));
    ctx->mainzisegmap_209839_total_runtime = 0;
    ctx->mainzisegmap_209839_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_209935,
                                           ctx->cuda.module,
                                           "mainzisegmap_209935"));
    ctx->mainzisegmap_209935_total_runtime = 0;
    ctx->mainzisegmap_209935_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_211496,
                                           ctx->cuda.module,
                                           "mainzisegmap_211496"));
    ctx->mainzisegmap_211496_total_runtime = 0;
    ctx->mainzisegmap_211496_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_211645,
                                           ctx->cuda.module,
                                           "mainzisegmap_211645"));
    ctx->mainzisegmap_211645_total_runtime = 0;
    ctx->mainzisegmap_211645_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_211681,
                                           ctx->cuda.module,
                                           "mainzisegmap_211681"));
    ctx->mainzisegmap_211681_total_runtime = 0;
    ctx->mainzisegmap_211681_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_211812,
                                           ctx->cuda.module,
                                           "mainzisegmap_211812"));
    ctx->mainzisegmap_211812_total_runtime = 0;
    ctx->mainzisegmap_211812_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_211943,
                                           ctx->cuda.module,
                                           "mainzisegmap_211943"));
    ctx->mainzisegmap_211943_total_runtime = 0;
    ctx->mainzisegmap_211943_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_212132,
                                           ctx->cuda.module,
                                           "mainzisegmap_212132"));
    ctx->mainzisegmap_212132_total_runtime = 0;
    ctx->mainzisegmap_212132_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_212517,
                                           ctx->cuda.module,
                                           "mainzisegmap_212517"));
    ctx->mainzisegmap_212517_total_runtime = 0;
    ctx->mainzisegmap_212517_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_212634,
                                           ctx->cuda.module,
                                           "mainzisegmap_212634"));
    ctx->mainzisegmap_212634_total_runtime = 0;
    ctx->mainzisegmap_212634_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_212795,
                                           ctx->cuda.module,
                                           "mainzisegmap_212795"));
    ctx->mainzisegmap_212795_total_runtime = 0;
    ctx->mainzisegmap_212795_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_213316,
                                           ctx->cuda.module,
                                           "mainzisegmap_213316"));
    ctx->mainzisegmap_213316_total_runtime = 0;
    ctx->mainzisegmap_213316_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_213473,
                                           ctx->cuda.module,
                                           "mainzisegmap_213473"));
    ctx->mainzisegmap_213473_total_runtime = 0;
    ctx->mainzisegmap_213473_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_213692,
                                           ctx->cuda.module,
                                           "mainzisegmap_213692"));
    ctx->mainzisegmap_213692_total_runtime = 0;
    ctx->mainzisegmap_213692_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_214361,
                                           ctx->cuda.module,
                                           "mainzisegmap_214361"));
    ctx->mainzisegmap_214361_total_runtime = 0;
    ctx->mainzisegmap_214361_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_214562,
                                           ctx->cuda.module,
                                           "mainzisegmap_214562"));
    ctx->mainzisegmap_214562_total_runtime = 0;
    ctx->mainzisegmap_214562_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_215432,
                                           ctx->cuda.module,
                                           "mainzisegmap_215432"));
    ctx->mainzisegmap_215432_total_runtime = 0;
    ctx->mainzisegmap_215432_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_215527,
                                           ctx->cuda.module,
                                           "mainzisegmap_215527"));
    ctx->mainzisegmap_215527_total_runtime = 0;
    ctx->mainzisegmap_215527_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_215634,
                                           ctx->cuda.module,
                                           "mainzisegmap_215634"));
    ctx->mainzisegmap_215634_total_runtime = 0;
    ctx->mainzisegmap_215634_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_216150,
                                           ctx->cuda.module,
                                           "mainzisegmap_216150"));
    ctx->mainzisegmap_216150_total_runtime = 0;
    ctx->mainzisegmap_216150_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_216167,
                                           ctx->cuda.module,
                                           "mainzisegmap_216167"));
    ctx->mainzisegmap_216167_total_runtime = 0;
    ctx->mainzisegmap_216167_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_216195,
                                           ctx->cuda.module,
                                           "mainzisegmap_216195"));
    ctx->mainzisegmap_216195_total_runtime = 0;
    ctx->mainzisegmap_216195_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_216319,
                                           ctx->cuda.module,
                                           "mainzisegmap_216319"));
    ctx->mainzisegmap_216319_total_runtime = 0;
    ctx->mainzisegmap_216319_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_216506,
                                           ctx->cuda.module,
                                           "mainzisegmap_216506"));
    ctx->mainzisegmap_216506_total_runtime = 0;
    ctx->mainzisegmap_216506_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_217156,
                                           ctx->cuda.module,
                                           "mainzisegmap_217156"));
    ctx->mainzisegmap_217156_total_runtime = 0;
    ctx->mainzisegmap_217156_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_217173,
                                           ctx->cuda.module,
                                           "mainzisegmap_217173"));
    ctx->mainzisegmap_217173_total_runtime = 0;
    ctx->mainzisegmap_217173_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_217203,
                                           ctx->cuda.module,
                                           "mainzisegmap_217203"));
    ctx->mainzisegmap_217203_total_runtime = 0;
    ctx->mainzisegmap_217203_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_217367,
                                           ctx->cuda.module,
                                           "mainzisegmap_217367"));
    ctx->mainzisegmap_217367_total_runtime = 0;
    ctx->mainzisegmap_217367_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_217612,
                                           ctx->cuda.module,
                                           "mainzisegmap_217612"));
    ctx->mainzisegmap_217612_total_runtime = 0;
    ctx->mainzisegmap_217612_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_218410,
                                           ctx->cuda.module,
                                           "mainzisegmap_218410"));
    ctx->mainzisegmap_218410_total_runtime = 0;
    ctx->mainzisegmap_218410_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_218427,
                                           ctx->cuda.module,
                                           "mainzisegmap_218427"));
    ctx->mainzisegmap_218427_total_runtime = 0;
    ctx->mainzisegmap_218427_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_218457,
                                           ctx->cuda.module,
                                           "mainzisegmap_218457"));
    ctx->mainzisegmap_218457_total_runtime = 0;
    ctx->mainzisegmap_218457_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_218665,
                                           ctx->cuda.module,
                                           "mainzisegmap_218665"));
    ctx->mainzisegmap_218665_total_runtime = 0;
    ctx->mainzisegmap_218665_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_218956,
                                           ctx->cuda.module,
                                           "mainzisegmap_218956"));
    ctx->mainzisegmap_218956_total_runtime = 0;
    ctx->mainzisegmap_218956_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_218973,
                                           ctx->cuda.module,
                                           "mainzisegmap_218973"));
    ctx->mainzisegmap_218973_total_runtime = 0;
    ctx->mainzisegmap_218973_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_219268,
                                           ctx->cuda.module,
                                           "mainzisegmap_219268"));
    ctx->mainzisegmap_219268_total_runtime = 0;
    ctx->mainzisegmap_219268_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_219285,
                                           ctx->cuda.module,
                                           "mainzisegmap_219285"));
    ctx->mainzisegmap_219285_total_runtime = 0;
    ctx->mainzisegmap_219285_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_219672,
                                           ctx->cuda.module,
                                           "mainzisegmap_219672"));
    ctx->mainzisegmap_219672_total_runtime = 0;
    ctx->mainzisegmap_219672_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_219689,
                                           ctx->cuda.module,
                                           "mainzisegmap_219689"));
    ctx->mainzisegmap_219689_total_runtime = 0;
    ctx->mainzisegmap_219689_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_219977,
                                           ctx->cuda.module,
                                           "mainzisegmap_219977"));
    ctx->mainzisegmap_219977_total_runtime = 0;
    ctx->mainzisegmap_219977_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_220194,
                                           ctx->cuda.module,
                                           "mainzisegmap_220194"));
    ctx->mainzisegmap_220194_total_runtime = 0;
    ctx->mainzisegmap_220194_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_220215,
                                           ctx->cuda.module,
                                           "mainzisegmap_220215"));
    ctx->mainzisegmap_220215_total_runtime = 0;
    ctx->mainzisegmap_220215_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_220339,
                                           ctx->cuda.module,
                                           "mainzisegmap_220339"));
    ctx->mainzisegmap_220339_total_runtime = 0;
    ctx->mainzisegmap_220339_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_221037,
                                           ctx->cuda.module,
                                           "mainzisegmap_221037"));
    ctx->mainzisegmap_221037_total_runtime = 0;
    ctx->mainzisegmap_221037_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_221092,
                                           ctx->cuda.module,
                                           "mainzisegmap_221092"));
    ctx->mainzisegmap_221092_total_runtime = 0;
    ctx->mainzisegmap_221092_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_221154,
                                           ctx->cuda.module,
                                           "mainzisegmap_221154"));
    ctx->mainzisegmap_221154_total_runtime = 0;
    ctx->mainzisegmap_221154_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_221240,
                                           ctx->cuda.module,
                                           "mainzisegmap_221240"));
    ctx->mainzisegmap_221240_total_runtime = 0;
    ctx->mainzisegmap_221240_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_221310,
                                           ctx->cuda.module,
                                           "mainzisegmap_221310"));
    ctx->mainzisegmap_221310_total_runtime = 0;
    ctx->mainzisegmap_221310_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_intragroup_199976,
                                           ctx->cuda.module,
                                           "mainzisegmap_intragroup_199976"));
    ctx->mainzisegmap_intragroup_199976_total_runtime = 0;
    ctx->mainzisegmap_intragroup_199976_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_intragroup_200331,
                                           ctx->cuda.module,
                                           "mainzisegmap_intragroup_200331"));
    ctx->mainzisegmap_intragroup_200331_total_runtime = 0;
    ctx->mainzisegmap_intragroup_200331_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_intragroup_200607,
                                           ctx->cuda.module,
                                           "mainzisegmap_intragroup_200607"));
    ctx->mainzisegmap_intragroup_200607_total_runtime = 0;
    ctx->mainzisegmap_intragroup_200607_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_intragroup_200860,
                                           ctx->cuda.module,
                                           "mainzisegmap_intragroup_200860"));
    ctx->mainzisegmap_intragroup_200860_total_runtime = 0;
    ctx->mainzisegmap_intragroup_200860_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_intragroup_201764,
                                           ctx->cuda.module,
                                           "mainzisegmap_intragroup_201764"));
    ctx->mainzisegmap_intragroup_201764_total_runtime = 0;
    ctx->mainzisegmap_intragroup_201764_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_intragroup_202165,
                                           ctx->cuda.module,
                                           "mainzisegmap_intragroup_202165"));
    ctx->mainzisegmap_intragroup_202165_total_runtime = 0;
    ctx->mainzisegmap_intragroup_202165_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_intragroup_202791,
                                           ctx->cuda.module,
                                           "mainzisegmap_intragroup_202791"));
    ctx->mainzisegmap_intragroup_202791_total_runtime = 0;
    ctx->mainzisegmap_intragroup_202791_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_intragroup_204851,
                                           ctx->cuda.module,
                                           "mainzisegmap_intragroup_204851"));
    ctx->mainzisegmap_intragroup_204851_total_runtime = 0;
    ctx->mainzisegmap_intragroup_204851_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_intragroup_206919,
                                           ctx->cuda.module,
                                           "mainzisegmap_intragroup_206919"));
    ctx->mainzisegmap_intragroup_206919_total_runtime = 0;
    ctx->mainzisegmap_intragroup_206919_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_intragroup_209494,
                                           ctx->cuda.module,
                                           "mainzisegmap_intragroup_209494"));
    ctx->mainzisegmap_intragroup_209494_total_runtime = 0;
    ctx->mainzisegmap_intragroup_209494_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_intragroup_210266,
                                           ctx->cuda.module,
                                           "mainzisegmap_intragroup_210266"));
    ctx->mainzisegmap_intragroup_210266_total_runtime = 0;
    ctx->mainzisegmap_intragroup_210266_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_intragroup_210587,
                                           ctx->cuda.module,
                                           "mainzisegmap_intragroup_210587"));
    ctx->mainzisegmap_intragroup_210587_total_runtime = 0;
    ctx->mainzisegmap_intragroup_210587_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_intragroup_211038,
                                           ctx->cuda.module,
                                           "mainzisegmap_intragroup_211038"));
    ctx->mainzisegmap_intragroup_211038_total_runtime = 0;
    ctx->mainzisegmap_intragroup_211038_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_intragroup_214752,
                                           ctx->cuda.module,
                                           "mainzisegmap_intragroup_214752"));
    ctx->mainzisegmap_intragroup_214752_total_runtime = 0;
    ctx->mainzisegmap_intragroup_214752_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_intragroup_214919,
                                           ctx->cuda.module,
                                           "mainzisegmap_intragroup_214919"));
    ctx->mainzisegmap_intragroup_214919_total_runtime = 0;
    ctx->mainzisegmap_intragroup_214919_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_intragroup_215176,
                                           ctx->cuda.module,
                                           "mainzisegmap_intragroup_215176"));
    ctx->mainzisegmap_intragroup_215176_total_runtime = 0;
    ctx->mainzisegmap_intragroup_215176_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_intragroup_219000,
                                           ctx->cuda.module,
                                           "mainzisegmap_intragroup_219000"));
    ctx->mainzisegmap_intragroup_219000_total_runtime = 0;
    ctx->mainzisegmap_intragroup_219000_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_intragroup_219313,
                                           ctx->cuda.module,
                                           "mainzisegmap_intragroup_219313"));
    ctx->mainzisegmap_intragroup_219313_total_runtime = 0;
    ctx->mainzisegmap_intragroup_219313_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_intragroup_219717,
                                           ctx->cuda.module,
                                           "mainzisegmap_intragroup_219717"));
    ctx->mainzisegmap_intragroup_219717_total_runtime = 0;
    ctx->mainzisegmap_intragroup_219717_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_intragroup_220067,
                                           ctx->cuda.module,
                                           "mainzisegmap_intragroup_220067"));
    ctx->mainzisegmap_intragroup_220067_total_runtime = 0;
    ctx->mainzisegmap_intragroup_220067_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_intragroup_220432,
                                           ctx->cuda.module,
                                           "mainzisegmap_intragroup_220432"));
    ctx->mainzisegmap_intragroup_220432_total_runtime = 0;
    ctx->mainzisegmap_intragroup_220432_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegmap_intragroup_220872,
                                           ctx->cuda.module,
                                           "mainzisegmap_intragroup_220872"));
    ctx->mainzisegmap_intragroup_220872_total_runtime = 0;
    ctx->mainzisegmap_intragroup_220872_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_large_205086,
                                           ctx->cuda.module,
                                           "mainzisegred_large_205086"));
    ctx->mainzisegred_large_205086_total_runtime = 0;
    ctx->mainzisegred_large_205086_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_large_205160,
                                           ctx->cuda.module,
                                           "mainzisegred_large_205160"));
    ctx->mainzisegred_large_205160_total_runtime = 0;
    ctx->mainzisegred_large_205160_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_large_207220,
                                           ctx->cuda.module,
                                           "mainzisegred_large_207220"));
    ctx->mainzisegred_large_207220_total_runtime = 0;
    ctx->mainzisegred_large_207220_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_large_207314,
                                           ctx->cuda.module,
                                           "mainzisegred_large_207314"));
    ctx->mainzisegred_large_207314_total_runtime = 0;
    ctx->mainzisegred_large_207314_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_large_209867,
                                           ctx->cuda.module,
                                           "mainzisegred_large_209867"));
    ctx->mainzisegred_large_209867_total_runtime = 0;
    ctx->mainzisegred_large_209867_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_large_209990,
                                           ctx->cuda.module,
                                           "mainzisegred_large_209990"));
    ctx->mainzisegred_large_209990_total_runtime = 0;
    ctx->mainzisegred_large_209990_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_large_211714,
                                           ctx->cuda.module,
                                           "mainzisegred_large_211714"));
    ctx->mainzisegred_large_211714_total_runtime = 0;
    ctx->mainzisegred_large_211714_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_large_211845,
                                           ctx->cuda.module,
                                           "mainzisegred_large_211845"));
    ctx->mainzisegred_large_211845_total_runtime = 0;
    ctx->mainzisegred_large_211845_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_large_211976,
                                           ctx->cuda.module,
                                           "mainzisegred_large_211976"));
    ctx->mainzisegred_large_211976_total_runtime = 0;
    ctx->mainzisegred_large_211976_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_large_212598,
                                           ctx->cuda.module,
                                           "mainzisegred_large_212598"));
    ctx->mainzisegred_large_212598_total_runtime = 0;
    ctx->mainzisegred_large_212598_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_large_212647,
                                           ctx->cuda.module,
                                           "mainzisegred_large_212647"));
    ctx->mainzisegred_large_212647_total_runtime = 0;
    ctx->mainzisegred_large_212647_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_large_213427,
                                           ctx->cuda.module,
                                           "mainzisegred_large_213427"));
    ctx->mainzisegred_large_213427_total_runtime = 0;
    ctx->mainzisegred_large_213427_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_large_213496,
                                           ctx->cuda.module,
                                           "mainzisegred_large_213496"));
    ctx->mainzisegred_large_213496_total_runtime = 0;
    ctx->mainzisegred_large_213496_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_large_214506,
                                           ctx->cuda.module,
                                           "mainzisegred_large_214506"));
    ctx->mainzisegred_large_214506_total_runtime = 0;
    ctx->mainzisegred_large_214506_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_large_214604,
                                           ctx->cuda.module,
                                           "mainzisegred_large_214604"));
    ctx->mainzisegred_large_214604_total_runtime = 0;
    ctx->mainzisegred_large_214604_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_large_216280,
                                           ctx->cuda.module,
                                           "mainzisegred_large_216280"));
    ctx->mainzisegred_large_216280_total_runtime = 0;
    ctx->mainzisegred_large_216280_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_large_216332,
                                           ctx->cuda.module,
                                           "mainzisegred_large_216332"));
    ctx->mainzisegred_large_216332_total_runtime = 0;
    ctx->mainzisegred_large_216332_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_large_217318,
                                           ctx->cuda.module,
                                           "mainzisegred_large_217318"));
    ctx->mainzisegred_large_217318_total_runtime = 0;
    ctx->mainzisegred_large_217318_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_large_217390,
                                           ctx->cuda.module,
                                           "mainzisegred_large_217390"));
    ctx->mainzisegred_large_217390_total_runtime = 0;
    ctx->mainzisegred_large_217390_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_large_218606,
                                           ctx->cuda.module,
                                           "mainzisegred_large_218606"));
    ctx->mainzisegred_large_218606_total_runtime = 0;
    ctx->mainzisegred_large_218606_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_large_218707,
                                           ctx->cuda.module,
                                           "mainzisegred_large_218707"));
    ctx->mainzisegred_large_218707_total_runtime = 0;
    ctx->mainzisegred_large_218707_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_large_221141,
                                           ctx->cuda.module,
                                           "mainzisegred_large_221141"));
    ctx->mainzisegred_large_221141_total_runtime = 0;
    ctx->mainzisegred_large_221141_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_small_205086,
                                           ctx->cuda.module,
                                           "mainzisegred_small_205086"));
    ctx->mainzisegred_small_205086_total_runtime = 0;
    ctx->mainzisegred_small_205086_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_small_205160,
                                           ctx->cuda.module,
                                           "mainzisegred_small_205160"));
    ctx->mainzisegred_small_205160_total_runtime = 0;
    ctx->mainzisegred_small_205160_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_small_207220,
                                           ctx->cuda.module,
                                           "mainzisegred_small_207220"));
    ctx->mainzisegred_small_207220_total_runtime = 0;
    ctx->mainzisegred_small_207220_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_small_207314,
                                           ctx->cuda.module,
                                           "mainzisegred_small_207314"));
    ctx->mainzisegred_small_207314_total_runtime = 0;
    ctx->mainzisegred_small_207314_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_small_209867,
                                           ctx->cuda.module,
                                           "mainzisegred_small_209867"));
    ctx->mainzisegred_small_209867_total_runtime = 0;
    ctx->mainzisegred_small_209867_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_small_209990,
                                           ctx->cuda.module,
                                           "mainzisegred_small_209990"));
    ctx->mainzisegred_small_209990_total_runtime = 0;
    ctx->mainzisegred_small_209990_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_small_211714,
                                           ctx->cuda.module,
                                           "mainzisegred_small_211714"));
    ctx->mainzisegred_small_211714_total_runtime = 0;
    ctx->mainzisegred_small_211714_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_small_211845,
                                           ctx->cuda.module,
                                           "mainzisegred_small_211845"));
    ctx->mainzisegred_small_211845_total_runtime = 0;
    ctx->mainzisegred_small_211845_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_small_211976,
                                           ctx->cuda.module,
                                           "mainzisegred_small_211976"));
    ctx->mainzisegred_small_211976_total_runtime = 0;
    ctx->mainzisegred_small_211976_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_small_212598,
                                           ctx->cuda.module,
                                           "mainzisegred_small_212598"));
    ctx->mainzisegred_small_212598_total_runtime = 0;
    ctx->mainzisegred_small_212598_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_small_212647,
                                           ctx->cuda.module,
                                           "mainzisegred_small_212647"));
    ctx->mainzisegred_small_212647_total_runtime = 0;
    ctx->mainzisegred_small_212647_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_small_213427,
                                           ctx->cuda.module,
                                           "mainzisegred_small_213427"));
    ctx->mainzisegred_small_213427_total_runtime = 0;
    ctx->mainzisegred_small_213427_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_small_213496,
                                           ctx->cuda.module,
                                           "mainzisegred_small_213496"));
    ctx->mainzisegred_small_213496_total_runtime = 0;
    ctx->mainzisegred_small_213496_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_small_214506,
                                           ctx->cuda.module,
                                           "mainzisegred_small_214506"));
    ctx->mainzisegred_small_214506_total_runtime = 0;
    ctx->mainzisegred_small_214506_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_small_214604,
                                           ctx->cuda.module,
                                           "mainzisegred_small_214604"));
    ctx->mainzisegred_small_214604_total_runtime = 0;
    ctx->mainzisegred_small_214604_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_small_216280,
                                           ctx->cuda.module,
                                           "mainzisegred_small_216280"));
    ctx->mainzisegred_small_216280_total_runtime = 0;
    ctx->mainzisegred_small_216280_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_small_216332,
                                           ctx->cuda.module,
                                           "mainzisegred_small_216332"));
    ctx->mainzisegred_small_216332_total_runtime = 0;
    ctx->mainzisegred_small_216332_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_small_217318,
                                           ctx->cuda.module,
                                           "mainzisegred_small_217318"));
    ctx->mainzisegred_small_217318_total_runtime = 0;
    ctx->mainzisegred_small_217318_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_small_217390,
                                           ctx->cuda.module,
                                           "mainzisegred_small_217390"));
    ctx->mainzisegred_small_217390_total_runtime = 0;
    ctx->mainzisegred_small_217390_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_small_218606,
                                           ctx->cuda.module,
                                           "mainzisegred_small_218606"));
    ctx->mainzisegred_small_218606_total_runtime = 0;
    ctx->mainzisegred_small_218606_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_small_218707,
                                           ctx->cuda.module,
                                           "mainzisegred_small_218707"));
    ctx->mainzisegred_small_218707_total_runtime = 0;
    ctx->mainzisegred_small_218707_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegred_small_221141,
                                           ctx->cuda.module,
                                           "mainzisegred_small_221141"));
    ctx->mainzisegred_small_221141_total_runtime = 0;
    ctx->mainzisegred_small_221141_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegscan_200090,
                                           ctx->cuda.module,
                                           "mainzisegscan_200090"));
    ctx->mainzisegscan_200090_total_runtime = 0;
    ctx->mainzisegscan_200090_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegscan_200642,
                                           ctx->cuda.module,
                                           "mainzisegscan_200642"));
    ctx->mainzisegscan_200642_total_runtime = 0;
    ctx->mainzisegscan_200642_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegscan_211766,
                                           ctx->cuda.module,
                                           "mainzisegscan_211766"));
    ctx->mainzisegscan_211766_total_runtime = 0;
    ctx->mainzisegscan_211766_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegscan_211897,
                                           ctx->cuda.module,
                                           "mainzisegscan_211897"));
    ctx->mainzisegscan_211897_total_runtime = 0;
    ctx->mainzisegscan_211897_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegscan_212028,
                                           ctx->cuda.module,
                                           "mainzisegscan_212028"));
    ctx->mainzisegscan_212028_total_runtime = 0;
    ctx->mainzisegscan_212028_runs = 0;
    CUDA_SUCCEED_FATAL(cuModuleGetFunction(&ctx->mainzisegscan_220969,
                                           ctx->cuda.module,
                                           "mainzisegscan_220969"));
    ctx->mainzisegscan_220969_total_runtime = 0;
    ctx->mainzisegscan_220969_runs = 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->mainziid_counter_mem_225321.references = NULL;
        ctx->mainziid_counter_mem_225321.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainziid_counter_mem_225321.mem,
                                      (1 > 0 ? 1 : 1) * sizeof(int32_t)));
        if (1 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainziid_counter_mem_225321.mem,
                                            mainziid_counter_mem_realtype_230075,
                                            1 * sizeof(int32_t)));
    }
    {
        ctx->mainziid_counter_mem_225540.references = NULL;
        ctx->mainziid_counter_mem_225540.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainziid_counter_mem_225540.mem,
                                      (1 > 0 ? 1 : 1) * sizeof(int32_t)));
        if (1 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainziid_counter_mem_225540.mem,
                                            mainziid_counter_mem_realtype_230123,
                                            1 * sizeof(int32_t)));
    }
    {
        ctx->mainzicounter_mem_226114.references = NULL;
        ctx->mainzicounter_mem_226114.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainzicounter_mem_226114.mem,
                                      (10240 > 0 ? 10240 : 1) *
                                      sizeof(int32_t)));
        if (10240 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainzicounter_mem_226114.mem,
                                            mainzicounter_mem_realtype_230362,
                                            10240 * sizeof(int32_t)));
    }
    {
        ctx->mainzicounter_mem_226202.references = NULL;
        ctx->mainzicounter_mem_226202.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainzicounter_mem_226202.mem,
                                      (10240 > 0 ? 10240 : 1) *
                                      sizeof(int32_t)));
        if (10240 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainzicounter_mem_226202.mem,
                                            mainzicounter_mem_realtype_230399,
                                            10240 * sizeof(int32_t)));
    }
    {
        ctx->mainzicounter_mem_226463.references = NULL;
        ctx->mainzicounter_mem_226463.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainzicounter_mem_226463.mem,
                                      (10240 > 0 ? 10240 : 1) *
                                      sizeof(int32_t)));
        if (10240 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainzicounter_mem_226463.mem,
                                            mainzicounter_mem_realtype_230515,
                                            10240 * sizeof(int32_t)));
    }
    {
        ctx->mainzicounter_mem_226571.references = NULL;
        ctx->mainzicounter_mem_226571.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainzicounter_mem_226571.mem,
                                      (10240 > 0 ? 10240 : 1) *
                                      sizeof(int32_t)));
        if (10240 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainzicounter_mem_226571.mem,
                                            mainzicounter_mem_realtype_230569,
                                            10240 * sizeof(int32_t)));
    }
    {
        ctx->mainzicounter_mem_226876.references = NULL;
        ctx->mainzicounter_mem_226876.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainzicounter_mem_226876.mem,
                                      (10240 > 0 ? 10240 : 1) *
                                      sizeof(int32_t)));
        if (10240 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainzicounter_mem_226876.mem,
                                            mainzicounter_mem_realtype_230709,
                                            10240 * sizeof(int32_t)));
    }
    {
        ctx->mainzicounter_mem_226996.references = NULL;
        ctx->mainzicounter_mem_226996.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainzicounter_mem_226996.mem,
                                      (10240 > 0 ? 10240 : 1) *
                                      sizeof(int32_t)));
        if (10240 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainzicounter_mem_226996.mem,
                                            mainzicounter_mem_realtype_230777,
                                            10240 * sizeof(int32_t)));
    }
    {
        ctx->mainzicounter_mem_227191.references = NULL;
        ctx->mainzicounter_mem_227191.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainzicounter_mem_227191.mem,
                                      (10240 > 0 ? 10240 : 1) *
                                      sizeof(int32_t)));
        if (10240 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainzicounter_mem_227191.mem,
                                            mainzicounter_mem_realtype_230901,
                                            10240 * sizeof(int32_t)));
    }
    {
        ctx->mainziid_counter_mem_227228.references = NULL;
        ctx->mainziid_counter_mem_227228.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainziid_counter_mem_227228.mem,
                                      (1 > 0 ? 1 : 1) * sizeof(int32_t)));
        if (1 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainziid_counter_mem_227228.mem,
                                            mainziid_counter_mem_realtype_230913,
                                            1 * sizeof(int32_t)));
    }
    {
        ctx->mainzicounter_mem_227372.references = NULL;
        ctx->mainzicounter_mem_227372.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainzicounter_mem_227372.mem,
                                      (10240 > 0 ? 10240 : 1) *
                                      sizeof(int32_t)));
        if (10240 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainzicounter_mem_227372.mem,
                                            mainzicounter_mem_realtype_230938,
                                            10240 * sizeof(int32_t)));
    }
    {
        ctx->mainziid_counter_mem_227409.references = NULL;
        ctx->mainziid_counter_mem_227409.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainziid_counter_mem_227409.mem,
                                      (1 > 0 ? 1 : 1) * sizeof(int32_t)));
        if (1 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainziid_counter_mem_227409.mem,
                                            mainziid_counter_mem_realtype_230950,
                                            1 * sizeof(int32_t)));
    }
    {
        ctx->mainzicounter_mem_227553.references = NULL;
        ctx->mainzicounter_mem_227553.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainzicounter_mem_227553.mem,
                                      (10240 > 0 ? 10240 : 1) *
                                      sizeof(int32_t)));
        if (10240 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainzicounter_mem_227553.mem,
                                            mainzicounter_mem_realtype_230975,
                                            10240 * sizeof(int32_t)));
    }
    {
        ctx->mainziid_counter_mem_227590.references = NULL;
        ctx->mainziid_counter_mem_227590.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainziid_counter_mem_227590.mem,
                                      (1 > 0 ? 1 : 1) * sizeof(int32_t)));
        if (1 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainziid_counter_mem_227590.mem,
                                            mainziid_counter_mem_realtype_230987,
                                            1 * sizeof(int32_t)));
    }
    {
        ctx->mainzicounter_mem_227770.references = NULL;
        ctx->mainzicounter_mem_227770.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainzicounter_mem_227770.mem,
                                      (10240 > 0 ? 10240 : 1) *
                                      sizeof(int32_t)));
        if (10240 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainzicounter_mem_227770.mem,
                                            mainzicounter_mem_realtype_231031,
                                            10240 * sizeof(int32_t)));
    }
    {
        ctx->mainzicounter_mem_227852.references = NULL;
        ctx->mainzicounter_mem_227852.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainzicounter_mem_227852.mem,
                                      (10240 > 0 ? 10240 : 1) *
                                      sizeof(int32_t)));
        if (10240 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainzicounter_mem_227852.mem,
                                            mainzicounter_mem_realtype_231061,
                                            10240 * sizeof(int32_t)));
    }
    {
        ctx->mainzicounter_mem_227994.references = NULL;
        ctx->mainzicounter_mem_227994.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainzicounter_mem_227994.mem,
                                      (10240 > 0 ? 10240 : 1) *
                                      sizeof(int32_t)));
        if (10240 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainzicounter_mem_227994.mem,
                                            mainzicounter_mem_realtype_231117,
                                            10240 * sizeof(int32_t)));
    }
    {
        ctx->mainzicounter_mem_228096.references = NULL;
        ctx->mainzicounter_mem_228096.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainzicounter_mem_228096.mem,
                                      (10240 > 0 ? 10240 : 1) *
                                      sizeof(int32_t)));
        if (10240 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainzicounter_mem_228096.mem,
                                            mainzicounter_mem_realtype_231164,
                                            10240 * sizeof(int32_t)));
    }
    {
        ctx->mainzicounter_mem_228264.references = NULL;
        ctx->mainzicounter_mem_228264.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainzicounter_mem_228264.mem,
                                      (10240 > 0 ? 10240 : 1) *
                                      sizeof(int32_t)));
        if (10240 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainzicounter_mem_228264.mem,
                                            mainzicounter_mem_realtype_231232,
                                            10240 * sizeof(int32_t)));
    }
    {
        ctx->mainzicounter_mem_228378.references = NULL;
        ctx->mainzicounter_mem_228378.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainzicounter_mem_228378.mem,
                                      (10240 > 0 ? 10240 : 1) *
                                      sizeof(int32_t)));
        if (10240 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainzicounter_mem_228378.mem,
                                            mainzicounter_mem_realtype_231293,
                                            10240 * sizeof(int32_t)));
    }
    {
        ctx->mainzicounter_mem_228620.references = NULL;
        ctx->mainzicounter_mem_228620.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainzicounter_mem_228620.mem,
                                      (10240 > 0 ? 10240 : 1) *
                                      sizeof(int32_t)));
        if (10240 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainzicounter_mem_228620.mem,
                                            mainzicounter_mem_realtype_231451,
                                            10240 * sizeof(int32_t)));
    }
    {
        ctx->mainzicounter_mem_228702.references = NULL;
        ctx->mainzicounter_mem_228702.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainzicounter_mem_228702.mem,
                                      (10240 > 0 ? 10240 : 1) *
                                      sizeof(int32_t)));
        if (10240 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainzicounter_mem_228702.mem,
                                            mainzicounter_mem_realtype_231485,
                                            10240 * sizeof(int32_t)));
    }
    {
        ctx->mainzicounter_mem_228867.references = NULL;
        ctx->mainzicounter_mem_228867.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainzicounter_mem_228867.mem,
                                      (10240 > 0 ? 10240 : 1) *
                                      sizeof(int32_t)));
        if (10240 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainzicounter_mem_228867.mem,
                                            mainzicounter_mem_realtype_231566,
                                            10240 * sizeof(int32_t)));
    }
    {
        ctx->mainzicounter_mem_228969.references = NULL;
        ctx->mainzicounter_mem_228969.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainzicounter_mem_228969.mem,
                                      (10240 > 0 ? 10240 : 1) *
                                      sizeof(int32_t)));
        if (10240 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainzicounter_mem_228969.mem,
                                            mainzicounter_mem_realtype_231617,
                                            10240 * sizeof(int32_t)));
    }
    {
        ctx->mainzicounter_mem_229160.references = NULL;
        ctx->mainzicounter_mem_229160.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainzicounter_mem_229160.mem,
                                      (10240 > 0 ? 10240 : 1) *
                                      sizeof(int32_t)));
        if (10240 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainzicounter_mem_229160.mem,
                                            mainzicounter_mem_realtype_231710,
                                            10240 * sizeof(int32_t)));
    }
    {
        ctx->mainzicounter_mem_229274.references = NULL;
        ctx->mainzicounter_mem_229274.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainzicounter_mem_229274.mem,
                                      (10240 > 0 ? 10240 : 1) *
                                      sizeof(int32_t)));
        if (10240 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainzicounter_mem_229274.mem,
                                            mainzicounter_mem_realtype_231775,
                                            10240 * sizeof(int32_t)));
    }
    {
        ctx->mainziid_counter_mem_229617.references = NULL;
        ctx->mainziid_counter_mem_229617.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainziid_counter_mem_229617.mem,
                                      (1 > 0 ? 1 : 1) * sizeof(int32_t)));
        if (1 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainziid_counter_mem_229617.mem,
                                            mainziid_counter_mem_realtype_231997,
                                            1 * sizeof(int32_t)));
    }
    {
        ctx->mainzicounter_mem_229931.references = NULL;
        ctx->mainzicounter_mem_229931.size = 0;
        CUDA_SUCCEED_FATAL(cuMemAlloc(&ctx->mainzicounter_mem_229931.mem,
                                      (10240 > 0 ? 10240 : 1) *
                                      sizeof(int32_t)));
        if (10240 > 0)
            CUDA_SUCCEED_FATAL(cuMemcpyHtoD(ctx->mainzicounter_mem_229931.mem,
                                            mainzicounter_mem_realtype_232043,
                                            10240 * sizeof(int32_t)));
    }
    ctx->tuning_params.builtinzhreplicate_f32zigroup_sizze_225900 =
        &cfg->tuning_params[0];
    ctx->tuning_params.builtinzhreplicate_i64zigroup_sizze_225441 =
        &cfg->tuning_params[1];
    ctx->tuning_params.builtinzhreplicate_i8zigroup_sizze_225336 =
        &cfg->tuning_params[2];
    ctx->tuning_params.mainzigroup_sizze_225459 = &cfg->tuning_params[3];
    ctx->tuning_params.mainzigroup_sizze_225660 = &cfg->tuning_params[4];
    ctx->tuning_params.mainzigroup_sizze_227697 = &cfg->tuning_params[5];
    ctx->tuning_params.mainzigroup_sizze_227896 = &cfg->tuning_params[6];
    ctx->tuning_params.mainzigroup_sizze_228146 = &cfg->tuning_params[7];
    ctx->tuning_params.mainzigroup_sizze_228524 = &cfg->tuning_params[8];
    ctx->tuning_params.mainzigroup_sizze_228746 = &cfg->tuning_params[9];
    ctx->tuning_params.mainzigroup_sizze_229019 = &cfg->tuning_params[10];
    ctx->tuning_params.mainzisegmap_group_sizze_200008 =
        &cfg->tuning_params[11];
    ctx->tuning_params.mainzisegmap_group_sizze_200165 =
        &cfg->tuning_params[12];
    ctx->tuning_params.mainzisegmap_group_sizze_200433 =
        &cfg->tuning_params[13];
    ctx->tuning_params.mainzisegmap_group_sizze_201288 =
        &cfg->tuning_params[14];
    ctx->tuning_params.mainzisegmap_group_sizze_201527 =
        &cfg->tuning_params[15];
    ctx->tuning_params.mainzisegmap_group_sizze_201558 =
        &cfg->tuning_params[16];
    ctx->tuning_params.mainzisegmap_group_sizze_202290 =
        &cfg->tuning_params[17];
    ctx->tuning_params.mainzisegmap_group_sizze_202494 =
        &cfg->tuning_params[18];
    ctx->tuning_params.mainzisegmap_group_sizze_202520 =
        &cfg->tuning_params[19];
    ctx->tuning_params.mainzisegmap_group_sizze_202916 =
        &cfg->tuning_params[20];
    ctx->tuning_params.mainzisegmap_group_sizze_203120 =
        &cfg->tuning_params[21];
    ctx->tuning_params.mainzisegmap_group_sizze_203146 =
        &cfg->tuning_params[22];
    ctx->tuning_params.mainzisegmap_group_sizze_203319 =
        &cfg->tuning_params[23];
    ctx->tuning_params.mainzisegmap_group_sizze_203382 =
        &cfg->tuning_params[24];
    ctx->tuning_params.mainzisegmap_group_sizze_203524 =
        &cfg->tuning_params[25];
    ctx->tuning_params.mainzisegmap_group_sizze_203719 =
        &cfg->tuning_params[26];
    ctx->tuning_params.mainzisegmap_group_sizze_204054 =
        &cfg->tuning_params[27];
    ctx->tuning_params.mainzisegmap_group_sizze_204229 =
        &cfg->tuning_params[28];
    ctx->tuning_params.mainzisegmap_group_sizze_204315 =
        &cfg->tuning_params[29];
    ctx->tuning_params.mainzisegmap_group_sizze_205216 =
        &cfg->tuning_params[30];
    ctx->tuning_params.mainzisegmap_group_sizze_205472 =
        &cfg->tuning_params[31];
    ctx->tuning_params.mainzisegmap_group_sizze_205905 =
        &cfg->tuning_params[32];
    ctx->tuning_params.mainzisegmap_group_sizze_206137 =
        &cfg->tuning_params[33];
    ctx->tuning_params.mainzisegmap_group_sizze_206240 =
        &cfg->tuning_params[34];
    ctx->tuning_params.mainzisegmap_group_sizze_207389 =
        &cfg->tuning_params[35];
    ctx->tuning_params.mainzisegmap_group_sizze_207709 =
        &cfg->tuning_params[36];
    ctx->tuning_params.mainzisegmap_group_sizze_208250 =
        &cfg->tuning_params[37];
    ctx->tuning_params.mainzisegmap_group_sizze_208537 =
        &cfg->tuning_params[38];
    ctx->tuning_params.mainzisegmap_group_sizze_208667 =
        &cfg->tuning_params[39];
    ctx->tuning_params.mainzisegmap_group_sizze_211198 =
        &cfg->tuning_params[40];
    ctx->tuning_params.mainzisegmap_group_sizze_211594 =
        &cfg->tuning_params[41];
    ctx->tuning_params.mainzisegmap_group_sizze_211665 =
        &cfg->tuning_params[42];
    ctx->tuning_params.mainzisegmap_group_sizze_211796 =
        &cfg->tuning_params[43];
    ctx->tuning_params.mainzisegmap_group_sizze_211927 =
        &cfg->tuning_params[44];
    ctx->tuning_params.mainzisegmap_group_sizze_212058 =
        &cfg->tuning_params[45];
    ctx->tuning_params.mainzisegmap_group_sizze_212199 =
        &cfg->tuning_params[46];
    ctx->tuning_params.mainzisegmap_group_sizze_212330 =
        &cfg->tuning_params[47];
    ctx->tuning_params.mainzisegmap_group_sizze_212691 =
        &cfg->tuning_params[48];
    ctx->tuning_params.mainzisegmap_group_sizze_212891 =
        &cfg->tuning_params[49];
    ctx->tuning_params.mainzisegmap_group_sizze_213073 =
        &cfg->tuning_params[50];
    ctx->tuning_params.mainzisegmap_group_sizze_213556 =
        &cfg->tuning_params[51];
    ctx->tuning_params.mainzisegmap_group_sizze_213820 =
        &cfg->tuning_params[52];
    ctx->tuning_params.mainzisegmap_group_sizze_214051 =
        &cfg->tuning_params[53];
    ctx->tuning_params.mainzisegmap_group_sizze_215309 =
        &cfg->tuning_params[54];
    ctx->tuning_params.mainzisegmap_group_sizze_215496 =
        &cfg->tuning_params[55];
    ctx->tuning_params.mainzisegmap_group_sizze_215537 =
        &cfg->tuning_params[56];
    ctx->tuning_params.mainzisegmap_group_sizze_215726 =
        &cfg->tuning_params[57];
    ctx->tuning_params.mainzisegmap_group_sizze_215864 =
        &cfg->tuning_params[58];
    ctx->tuning_params.mainzisegmap_group_sizze_216063 =
        &cfg->tuning_params[59];
    ctx->tuning_params.mainzisegmap_group_sizze_216119 =
        &cfg->tuning_params[60];
    ctx->tuning_params.mainzisegmap_group_sizze_216379 =
        &cfg->tuning_params[61];
    ctx->tuning_params.mainzisegmap_group_sizze_216627 =
        &cfg->tuning_params[62];
    ctx->tuning_params.mainzisegmap_group_sizze_216816 =
        &cfg->tuning_params[63];
    ctx->tuning_params.mainzisegmap_group_sizze_217069 =
        &cfg->tuning_params[64];
    ctx->tuning_params.mainzisegmap_group_sizze_217125 =
        &cfg->tuning_params[65];
    ctx->tuning_params.mainzisegmap_group_sizze_217453 =
        &cfg->tuning_params[66];
    ctx->tuning_params.mainzisegmap_group_sizze_217765 =
        &cfg->tuning_params[67];
    ctx->tuning_params.mainzisegmap_group_sizze_218003 =
        &cfg->tuning_params[68];
    ctx->tuning_params.mainzisegmap_group_sizze_218323 =
        &cfg->tuning_params[69];
    ctx->tuning_params.mainzisegmap_group_sizze_218379 =
        &cfg->tuning_params[70];
    ctx->tuning_params.mainzisegmap_group_sizze_218869 =
        &cfg->tuning_params[71];
    ctx->tuning_params.mainzisegmap_group_sizze_218925 =
        &cfg->tuning_params[72];
    ctx->tuning_params.mainzisegmap_group_sizze_219181 =
        &cfg->tuning_params[73];
    ctx->tuning_params.mainzisegmap_group_sizze_219237 =
        &cfg->tuning_params[74];
    ctx->tuning_params.mainzisegmap_group_sizze_219585 =
        &cfg->tuning_params[75];
    ctx->tuning_params.mainzisegmap_group_sizze_219641 =
        &cfg->tuning_params[76];
    ctx->tuning_params.mainzisegmap_group_sizze_219854 =
        &cfg->tuning_params[77];
    ctx->tuning_params.mainzisegmap_group_sizze_220110 =
        &cfg->tuning_params[78];
    ctx->tuning_params.mainzisegmap_group_sizze_220153 =
        &cfg->tuning_params[79];
    ctx->tuning_params.mainzisegmap_group_sizze_220241 =
        &cfg->tuning_params[80];
    ctx->tuning_params.mainzisegmap_group_sizze_220642 =
        &cfg->tuning_params[81];
    ctx->tuning_params.mainzisegmap_group_sizze_221071 =
        &cfg->tuning_params[82];
    ctx->tuning_params.mainzisegmap_group_sizze_221106 =
        &cfg->tuning_params[83];
    ctx->tuning_params.mainzisegmap_group_sizze_221175 =
        &cfg->tuning_params[84];
    ctx->tuning_params.mainzisegmap_group_sizze_221275 =
        &cfg->tuning_params[85];
    ctx->tuning_params.mainzisegmap_num_groups_203526 = &cfg->tuning_params[86];
    ctx->tuning_params.mainzisegmap_num_groups_203721 = &cfg->tuning_params[87];
    ctx->tuning_params.mainzisegmap_num_groups_205218 = &cfg->tuning_params[88];
    ctx->tuning_params.mainzisegmap_num_groups_205474 = &cfg->tuning_params[89];
    ctx->tuning_params.mainzisegmap_num_groups_207391 = &cfg->tuning_params[90];
    ctx->tuning_params.mainzisegmap_num_groups_207711 = &cfg->tuning_params[91];
    ctx->tuning_params.mainzisegmap_num_groups_212060 = &cfg->tuning_params[92];
    ctx->tuning_params.mainzisegmap_num_groups_212693 = &cfg->tuning_params[93];
    ctx->tuning_params.mainzisegmap_num_groups_213558 = &cfg->tuning_params[94];
    ctx->tuning_params.mainzisegmap_num_groups_215539 = &cfg->tuning_params[95];
    ctx->tuning_params.mainzisegmap_num_groups_216381 = &cfg->tuning_params[96];
    ctx->tuning_params.mainzisegmap_num_groups_217455 = &cfg->tuning_params[97];
    ctx->tuning_params.mainzisegmap_num_groups_220243 = &cfg->tuning_params[98];
    ctx->tuning_params.mainzisegred_group_sizze_204157 =
        &cfg->tuning_params[99];
    ctx->tuning_params.mainzisegred_group_sizze_204259 =
        &cfg->tuning_params[100];
    ctx->tuning_params.mainzisegred_group_sizze_206043 =
        &cfg->tuning_params[101];
    ctx->tuning_params.mainzisegred_group_sizze_206176 =
        &cfg->tuning_params[102];
    ctx->tuning_params.mainzisegred_group_sizze_208426 =
        &cfg->tuning_params[103];
    ctx->tuning_params.mainzisegred_group_sizze_208595 =
        &cfg->tuning_params[104];
    ctx->tuning_params.mainzisegred_group_sizze_211691 =
        &cfg->tuning_params[105];
    ctx->tuning_params.mainzisegred_group_sizze_211822 =
        &cfg->tuning_params[106];
    ctx->tuning_params.mainzisegred_group_sizze_211953 =
        &cfg->tuning_params[107];
    ctx->tuning_params.mainzisegred_group_sizze_212276 =
        &cfg->tuning_params[108];
    ctx->tuning_params.mainzisegred_group_sizze_212343 =
        &cfg->tuning_params[109];
    ctx->tuning_params.mainzisegred_group_sizze_213001 =
        &cfg->tuning_params[110];
    ctx->tuning_params.mainzisegred_group_sizze_213095 =
        &cfg->tuning_params[111];
    ctx->tuning_params.mainzisegred_group_sizze_213966 =
        &cfg->tuning_params[112];
    ctx->tuning_params.mainzisegred_group_sizze_214092 =
        &cfg->tuning_params[113];
    ctx->tuning_params.mainzisegred_group_sizze_215807 =
        &cfg->tuning_params[114];
    ctx->tuning_params.mainzisegred_group_sizze_215877 =
        &cfg->tuning_params[115];
    ctx->tuning_params.mainzisegred_group_sizze_216741 =
        &cfg->tuning_params[116];
    ctx->tuning_params.mainzisegred_group_sizze_216838 =
        &cfg->tuning_params[117];
    ctx->tuning_params.mainzisegred_group_sizze_217915 =
        &cfg->tuning_params[118];
    ctx->tuning_params.mainzisegred_group_sizze_218044 =
        &cfg->tuning_params[119];
    ctx->tuning_params.mainzisegred_group_sizze_221118 =
        &cfg->tuning_params[120];
    ctx->tuning_params.mainzisegred_num_groups_204159 =
        &cfg->tuning_params[121];
    ctx->tuning_params.mainzisegred_num_groups_204261 =
        &cfg->tuning_params[122];
    ctx->tuning_params.mainzisegred_num_groups_206045 =
        &cfg->tuning_params[123];
    ctx->tuning_params.mainzisegred_num_groups_206178 =
        &cfg->tuning_params[124];
    ctx->tuning_params.mainzisegred_num_groups_208428 =
        &cfg->tuning_params[125];
    ctx->tuning_params.mainzisegred_num_groups_208597 =
        &cfg->tuning_params[126];
    ctx->tuning_params.mainzisegred_num_groups_211693 =
        &cfg->tuning_params[127];
    ctx->tuning_params.mainzisegred_num_groups_211824 =
        &cfg->tuning_params[128];
    ctx->tuning_params.mainzisegred_num_groups_211955 =
        &cfg->tuning_params[129];
    ctx->tuning_params.mainzisegred_num_groups_212278 =
        &cfg->tuning_params[130];
    ctx->tuning_params.mainzisegred_num_groups_212345 =
        &cfg->tuning_params[131];
    ctx->tuning_params.mainzisegred_num_groups_213003 =
        &cfg->tuning_params[132];
    ctx->tuning_params.mainzisegred_num_groups_213097 =
        &cfg->tuning_params[133];
    ctx->tuning_params.mainzisegred_num_groups_213968 =
        &cfg->tuning_params[134];
    ctx->tuning_params.mainzisegred_num_groups_214094 =
        &cfg->tuning_params[135];
    ctx->tuning_params.mainzisegred_num_groups_215809 =
        &cfg->tuning_params[136];
    ctx->tuning_params.mainzisegred_num_groups_215879 =
        &cfg->tuning_params[137];
    ctx->tuning_params.mainzisegred_num_groups_216743 =
        &cfg->tuning_params[138];
    ctx->tuning_params.mainzisegred_num_groups_216840 =
        &cfg->tuning_params[139];
    ctx->tuning_params.mainzisegred_num_groups_217917 =
        &cfg->tuning_params[140];
    ctx->tuning_params.mainzisegred_num_groups_218046 =
        &cfg->tuning_params[141];
    ctx->tuning_params.mainzisegred_num_groups_221120 =
        &cfg->tuning_params[142];
    ctx->tuning_params.mainzisegscan_group_sizze_200064 =
        &cfg->tuning_params[143];
    ctx->tuning_params.mainzisegscan_group_sizze_200502 =
        &cfg->tuning_params[144];
    ctx->tuning_params.mainzisegscan_group_sizze_211724 =
        &cfg->tuning_params[145];
    ctx->tuning_params.mainzisegscan_group_sizze_211855 =
        &cfg->tuning_params[146];
    ctx->tuning_params.mainzisegscan_group_sizze_211986 =
        &cfg->tuning_params[147];
    ctx->tuning_params.mainzisegscan_group_sizze_220690 =
        &cfg->tuning_params[148];
    ctx->tuning_params.mainzisegscan_num_groups_200066 =
        &cfg->tuning_params[149];
    ctx->tuning_params.mainzisegscan_num_groups_200504 =
        &cfg->tuning_params[150];
    ctx->tuning_params.mainzisegscan_num_groups_211726 =
        &cfg->tuning_params[151];
    ctx->tuning_params.mainzisegscan_num_groups_211857 =
        &cfg->tuning_params[152];
    ctx->tuning_params.mainzisegscan_num_groups_211988 =
        &cfg->tuning_params[153];
    ctx->tuning_params.mainzisegscan_num_groups_220692 =
        &cfg->tuning_params[154];
    ctx->tuning_params.mainzisuff_intra_par_0 = &cfg->tuning_params[155];
    ctx->tuning_params.mainzisuff_intra_par_1 = &cfg->tuning_params[156];
    ctx->tuning_params.mainzisuff_intra_par_13 = &cfg->tuning_params[157];
    ctx->tuning_params.mainzisuff_intra_par_17 = &cfg->tuning_params[158];
    ctx->tuning_params.mainzisuff_intra_par_2 = &cfg->tuning_params[159];
    ctx->tuning_params.mainzisuff_intra_par_3 = &cfg->tuning_params[160];
    ctx->tuning_params.mainzisuff_intra_par_34 = &cfg->tuning_params[161];
    ctx->tuning_params.mainzisuff_intra_par_36 = &cfg->tuning_params[162];
    ctx->tuning_params.mainzisuff_intra_par_37 = &cfg->tuning_params[163];
    ctx->tuning_params.mainzisuff_intra_par_4 = &cfg->tuning_params[164];
    ctx->tuning_params.mainzisuff_intra_par_5 = &cfg->tuning_params[165];
    ctx->tuning_params.mainzisuff_intra_par_6 = &cfg->tuning_params[166];
    ctx->tuning_params.mainzisuff_intra_par_9 = &cfg->tuning_params[167];
    ctx->tuning_params.mainzisuff_outer_par_10 = &cfg->tuning_params[168];
    ctx->tuning_params.mainzisuff_outer_par_11 = &cfg->tuning_params[169];
    ctx->tuning_params.mainzisuff_outer_par_12 = &cfg->tuning_params[170];
    ctx->tuning_params.mainzisuff_outer_par_14 = &cfg->tuning_params[171];
    ctx->tuning_params.mainzisuff_outer_par_15 = &cfg->tuning_params[172];
    ctx->tuning_params.mainzisuff_outer_par_16 = &cfg->tuning_params[173];
    ctx->tuning_params.mainzisuff_outer_par_18 = &cfg->tuning_params[174];
    ctx->tuning_params.mainzisuff_outer_par_19 = &cfg->tuning_params[175];
    ctx->tuning_params.mainzisuff_outer_par_20 = &cfg->tuning_params[176];
    ctx->tuning_params.mainzisuff_outer_par_21 = &cfg->tuning_params[177];
    ctx->tuning_params.mainzisuff_outer_par_22 = &cfg->tuning_params[178];
    ctx->tuning_params.mainzisuff_outer_par_23 = &cfg->tuning_params[179];
    ctx->tuning_params.mainzisuff_outer_par_24 = &cfg->tuning_params[180];
    ctx->tuning_params.mainzisuff_outer_par_25 = &cfg->tuning_params[181];
    ctx->tuning_params.mainzisuff_outer_par_26 = &cfg->tuning_params[182];
    ctx->tuning_params.mainzisuff_outer_par_27 = &cfg->tuning_params[183];
    ctx->tuning_params.mainzisuff_outer_par_28 = &cfg->tuning_params[184];
    ctx->tuning_params.mainzisuff_outer_par_29 = &cfg->tuning_params[185];
    ctx->tuning_params.mainzisuff_outer_par_30 = &cfg->tuning_params[186];
    ctx->tuning_params.mainzisuff_outer_par_31 = &cfg->tuning_params[187];
    ctx->tuning_params.mainzisuff_outer_par_32 = &cfg->tuning_params[188];
    ctx->tuning_params.mainzisuff_outer_par_33 = &cfg->tuning_params[189];
    ctx->tuning_params.mainzisuff_outer_par_35 = &cfg->tuning_params[190];
    ctx->tuning_params.mainzisuff_outer_par_38 = &cfg->tuning_params[191];
    ctx->tuning_params.mainzisuff_outer_par_7 = &cfg->tuning_params[192];
    ctx->tuning_params.mainzisuff_outer_par_8 = &cfg->tuning_params[193];
    init_constants(ctx);
    // Clear the free list of any deallocations that occurred while initialising constants.
    CUDA_SUCCEED_FATAL(cuda_free_all(&ctx->cuda));
    futhark_context_sync(ctx);
    return ctx;
}
void futhark_context_free(struct futhark_context *ctx)
{
    free_constants(ctx);
    cuda_cleanup(&ctx->cuda);
    free_lock(&ctx->lock);
    ctx->cfg->in_use = 0;
    free(ctx);
}
int futhark_context_sync(struct futhark_context *ctx)
{
    CUDA_SUCCEED_OR_RETURN(cuCtxPushCurrent(ctx->cuda.cu_ctx));
    CUDA_SUCCEED_OR_RETURN(cuCtxSynchronize());
    if (ctx->failure_is_an_option) {
        int32_t failure_idx;
        
        CUDA_SUCCEED_OR_RETURN(cuMemcpyDtoH(&failure_idx, ctx->global_failure,
                                            sizeof(int32_t)));
        ctx->failure_is_an_option = 0;
        if (failure_idx >= 0) {
            int32_t no_failure = -1;
            
            CUDA_SUCCEED_OR_RETURN(cuMemcpyHtoD(ctx->global_failure,
                                                &no_failure, sizeof(int32_t)));
            
            int64_t args[4 + 1];
            
            CUDA_SUCCEED_OR_RETURN(cuMemcpyDtoH(&args, ctx->global_failure_args,
                                                sizeof(args)));
            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;
        }
    }
    CUDA_SUCCEED_OR_RETURN(cuCtxPopCurrent(&ctx->cuda.cu_ctx));
    return 0;
}
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;
            CUDA_SUCCEED_OR_RETURN(cuda_free(&ctx->cuda, 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");
    CUDA_SUCCEED_OR_RETURN(cuda_alloc(&ctx->cuda, (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) {
        CUDA_SUCCEED_FATAL(cuda_tally_profiling_records(&ctx->cuda));
        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_225897 ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->builtinzhreplicate_f32zireplicate_225897_runs,
                    (long) ctx->builtinzhreplicate_f32zireplicate_225897_total_runtime /
                    (ctx->builtinzhreplicate_f32zireplicate_225897_runs !=
                     0 ? ctx->builtinzhreplicate_f32zireplicate_225897_runs : 1),
                    (long) ctx->builtinzhreplicate_f32zireplicate_225897_total_runtime);
        ctx->total_runtime +=
            ctx->builtinzhreplicate_f32zireplicate_225897_total_runtime;
        ctx->total_runs += ctx->builtinzhreplicate_f32zireplicate_225897_runs;
        str_builder(&builder,
                    "builtin#replicate_i64.replicate_225438 ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->builtinzhreplicate_i64zireplicate_225438_runs,
                    (long) ctx->builtinzhreplicate_i64zireplicate_225438_total_runtime /
                    (ctx->builtinzhreplicate_i64zireplicate_225438_runs !=
                     0 ? ctx->builtinzhreplicate_i64zireplicate_225438_runs : 1),
                    (long) ctx->builtinzhreplicate_i64zireplicate_225438_total_runtime);
        ctx->total_runtime +=
            ctx->builtinzhreplicate_i64zireplicate_225438_total_runtime;
        ctx->total_runs += ctx->builtinzhreplicate_i64zireplicate_225438_runs;
        str_builder(&builder,
                    "builtin#replicate_i8.replicate_225333  ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->builtinzhreplicate_i8zireplicate_225333_runs,
                    (long) ctx->builtinzhreplicate_i8zireplicate_225333_total_runtime /
                    (ctx->builtinzhreplicate_i8zireplicate_225333_runs !=
                     0 ? ctx->builtinzhreplicate_i8zireplicate_225333_runs : 1),
                    (long) ctx->builtinzhreplicate_i8zireplicate_225333_total_runtime);
        ctx->total_runtime +=
            ctx->builtinzhreplicate_i8zireplicate_225333_total_runtime;
        ctx->total_runs += ctx->builtinzhreplicate_i8zireplicate_225333_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_225456                       ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzicopy_225456_runs,
                    (long) ctx->mainzicopy_225456_total_runtime /
                    (ctx->mainzicopy_225456_runs !=
                     0 ? ctx->mainzicopy_225456_runs : 1),
                    (long) ctx->mainzicopy_225456_total_runtime);
        ctx->total_runtime += ctx->mainzicopy_225456_total_runtime;
        ctx->total_runs += ctx->mainzicopy_225456_runs;
        str_builder(&builder,
                    "main.copy_225657                       ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzicopy_225657_runs,
                    (long) ctx->mainzicopy_225657_total_runtime /
                    (ctx->mainzicopy_225657_runs !=
                     0 ? ctx->mainzicopy_225657_runs : 1),
                    (long) ctx->mainzicopy_225657_total_runtime);
        ctx->total_runtime += ctx->mainzicopy_225657_total_runtime;
        ctx->total_runs += ctx->mainzicopy_225657_runs;
        str_builder(&builder,
                    "main.copy_227694                       ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzicopy_227694_runs,
                    (long) ctx->mainzicopy_227694_total_runtime /
                    (ctx->mainzicopy_227694_runs !=
                     0 ? ctx->mainzicopy_227694_runs : 1),
                    (long) ctx->mainzicopy_227694_total_runtime);
        ctx->total_runtime += ctx->mainzicopy_227694_total_runtime;
        ctx->total_runs += ctx->mainzicopy_227694_runs;
        str_builder(&builder,
                    "main.copy_227893                       ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzicopy_227893_runs,
                    (long) ctx->mainzicopy_227893_total_runtime /
                    (ctx->mainzicopy_227893_runs !=
                     0 ? ctx->mainzicopy_227893_runs : 1),
                    (long) ctx->mainzicopy_227893_total_runtime);
        ctx->total_runtime += ctx->mainzicopy_227893_total_runtime;
        ctx->total_runs += ctx->mainzicopy_227893_runs;
        str_builder(&builder,
                    "main.copy_228143                       ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzicopy_228143_runs,
                    (long) ctx->mainzicopy_228143_total_runtime /
                    (ctx->mainzicopy_228143_runs !=
                     0 ? ctx->mainzicopy_228143_runs : 1),
                    (long) ctx->mainzicopy_228143_total_runtime);
        ctx->total_runtime += ctx->mainzicopy_228143_total_runtime;
        ctx->total_runs += ctx->mainzicopy_228143_runs;
        str_builder(&builder,
                    "main.copy_228521                       ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzicopy_228521_runs,
                    (long) ctx->mainzicopy_228521_total_runtime /
                    (ctx->mainzicopy_228521_runs !=
                     0 ? ctx->mainzicopy_228521_runs : 1),
                    (long) ctx->mainzicopy_228521_total_runtime);
        ctx->total_runtime += ctx->mainzicopy_228521_total_runtime;
        ctx->total_runs += ctx->mainzicopy_228521_runs;
        str_builder(&builder,
                    "main.copy_228743                       ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzicopy_228743_runs,
                    (long) ctx->mainzicopy_228743_total_runtime /
                    (ctx->mainzicopy_228743_runs !=
                     0 ? ctx->mainzicopy_228743_runs : 1),
                    (long) ctx->mainzicopy_228743_total_runtime);
        ctx->total_runtime += ctx->mainzicopy_228743_total_runtime;
        ctx->total_runs += ctx->mainzicopy_228743_runs;
        str_builder(&builder,
                    "main.copy_229016                       ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzicopy_229016_runs,
                    (long) ctx->mainzicopy_229016_total_runtime /
                    (ctx->mainzicopy_229016_runs !=
                     0 ? ctx->mainzicopy_229016_runs : 1),
                    (long) ctx->mainzicopy_229016_total_runtime);
        ctx->total_runtime += ctx->mainzicopy_229016_total_runtime;
        ctx->total_runs += ctx->mainzicopy_229016_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,
                    "main.segscan_200090                    ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegscan_200090_runs,
                    (long) ctx->mainzisegscan_200090_total_runtime /
                    (ctx->mainzisegscan_200090_runs !=
                     0 ? ctx->mainzisegscan_200090_runs : 1),
                    (long) ctx->mainzisegscan_200090_total_runtime);
        ctx->total_runtime += ctx->mainzisegscan_200090_total_runtime;
        ctx->total_runs += ctx->mainzisegscan_200090_runs;
        str_builder(&builder,
                    "main.segscan_200642                    ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegscan_200642_runs,
                    (long) ctx->mainzisegscan_200642_total_runtime /
                    (ctx->mainzisegscan_200642_runs !=
                     0 ? ctx->mainzisegscan_200642_runs : 1),
                    (long) ctx->mainzisegscan_200642_total_runtime);
        ctx->total_runtime += ctx->mainzisegscan_200642_total_runtime;
        ctx->total_runs += ctx->mainzisegscan_200642_runs;
        str_builder(&builder,
                    "main.segscan_211766                    ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegscan_211766_runs,
                    (long) ctx->mainzisegscan_211766_total_runtime /
                    (ctx->mainzisegscan_211766_runs !=
                     0 ? ctx->mainzisegscan_211766_runs : 1),
                    (long) ctx->mainzisegscan_211766_total_runtime);
        ctx->total_runtime += ctx->mainzisegscan_211766_total_runtime;
        ctx->total_runs += ctx->mainzisegscan_211766_runs;
        str_builder(&builder,
                    "main.segscan_211897                    ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegscan_211897_runs,
                    (long) ctx->mainzisegscan_211897_total_runtime /
                    (ctx->mainzisegscan_211897_runs !=
                     0 ? ctx->mainzisegscan_211897_runs : 1),
                    (long) ctx->mainzisegscan_211897_total_runtime);
        ctx->total_runtime += ctx->mainzisegscan_211897_total_runtime;
        ctx->total_runs += ctx->mainzisegscan_211897_runs;
        str_builder(&builder,
                    "main.segscan_212028                    ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegscan_212028_runs,
                    (long) ctx->mainzisegscan_212028_total_runtime /
                    (ctx->mainzisegscan_212028_runs !=
                     0 ? ctx->mainzisegscan_212028_runs : 1),
                    (long) ctx->mainzisegscan_212028_total_runtime);
        ctx->total_runtime += ctx->mainzisegscan_212028_total_runtime;
        ctx->total_runs += ctx->mainzisegscan_212028_runs;
        str_builder(&builder,
                    "main.segscan_220969                    ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegscan_220969_runs,
                    (long) ctx->mainzisegscan_220969_total_runtime /
                    (ctx->mainzisegscan_220969_runs !=
                     0 ? ctx->mainzisegscan_220969_runs : 1),
                    (long) ctx->mainzisegscan_220969_total_runtime);
        ctx->total_runtime += ctx->mainzisegscan_220969_total_runtime;
        ctx->total_runs += ctx->mainzisegscan_220969_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);
    CUDA_SUCCEED_FATAL(cuCtxPushCurrent(ctx->cuda.cu_ctx));
    ctx->peak_mem_usage_device = 0;
    ctx->peak_mem_usage_default = 0;
    if (ctx->error == NULL)
        CUDA_SUCCEED_NONFATAL(cuda_free_all(&ctx->cuda));
    CUDA_SUCCEED_FATAL(cuCtxPopCurrent(&ctx->cuda.cu_ctx));
    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_225893,
                                         int32_t num_elems_225894,
                                         float val_225895);
static int futrts_builtinzhreplicate_i64(struct futhark_context *ctx,
                                         struct memblock_device mem_225434,
                                         int32_t num_elems_225435,
                                         int64_t val_225436);
static int futrts_builtinzhreplicate_i8(struct futhark_context *ctx,
                                        struct memblock_device mem_225329,
                                        int32_t num_elems_225330,
                                        int8_t val_225331);
static int futrts_entry_main(struct futhark_context *ctx,
                             struct memblock_device *mem_out_p_230062,
                             struct memblock_device *mem_out_p_230063,
                             struct memblock_device *mem_out_p_230064,
                             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);
    CUDA_SUCCEED_FATAL(cuCtxPushCurrent(ctx->cuda.cu_ctx));
    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;
    {
        cudaEvent_t *pevents = NULL;
        
        if (ctx->profiling && !ctx->profiling_paused) {
            pevents = cuda_get_events(&ctx->cuda, &ctx->copy_host_to_dev_runs,
                                      &ctx->copy_host_to_dev_total_runtime);
            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
        }
        CUDA_SUCCEED_OR_RETURN(cuMemcpyHtoD(arr->mem.mem + 0, data + 0,
                                            (size_t) (dim0 * dim1) * 4));
        if (pevents != NULL)
            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
    }
    CUDA_SUCCEED_FATAL(cuCtxPopCurrent(&ctx->cuda.cu_ctx));
    lock_unlock(&ctx->lock);
    return arr;
}
struct futhark_f32_2d *futhark_new_raw_f32_2d(struct futhark_context *ctx, const
                                              CUdeviceptr 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);
    CUDA_SUCCEED_FATAL(cuCtxPushCurrent(ctx->cuda.cu_ctx));
    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;
    {
        cudaEvent_t *pevents = NULL;
        
        if (ctx->profiling && !ctx->profiling_paused) {
            pevents = cuda_get_events(&ctx->cuda, &ctx->copy_dev_to_dev_runs,
                                      &ctx->copy_dev_to_dev_total_runtime);
            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
        }
        CUDA_SUCCEED_OR_RETURN(cuMemcpy(arr->mem.mem + 0, data + offset,
                                        (size_t) (dim0 * dim1) * 4));
        if (pevents != NULL)
            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
    }
    CUDA_SUCCEED_FATAL(cuCtxPopCurrent(&ctx->cuda.cu_ctx));
    lock_unlock(&ctx->lock);
    return arr;
}
int futhark_free_f32_2d(struct futhark_context *ctx, struct futhark_f32_2d *arr)
{
    lock_lock(&ctx->lock);
    CUDA_SUCCEED_FATAL(cuCtxPushCurrent(ctx->cuda.cu_ctx));
    if (memblock_unref_device(ctx, &arr->mem, "arr->mem") != 0)
        return 1;
    CUDA_SUCCEED_FATAL(cuCtxPopCurrent(&ctx->cuda.cu_ctx));
    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);
    CUDA_SUCCEED_FATAL(cuCtxPushCurrent(ctx->cuda.cu_ctx));
    {
        cudaEvent_t *pevents = NULL;
        
        if (ctx->profiling && !ctx->profiling_paused) {
            pevents = cuda_get_events(&ctx->cuda, &ctx->copy_dev_to_host_runs,
                                      &ctx->copy_dev_to_host_total_runtime);
            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
        }
        CUDA_SUCCEED_OR_RETURN(cuMemcpyDtoH(data + 0, arr->mem.mem + 0,
                                            (size_t) (arr->shape[0] *
                                                      arr->shape[1]) * 4));
        if (pevents != NULL)
            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
    }
    CUDA_SUCCEED_FATAL(cuCtxPopCurrent(&ctx->cuda.cu_ctx));
    lock_unlock(&ctx->lock);
    return 0;
}
CUdeviceptr 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)) {
            {
                cudaEvent_t *pevents = NULL;
                
                if (ctx->profiling && !ctx->profiling_paused) {
                    pevents = cuda_get_events(&ctx->cuda,
                                              &ctx->copy_dev_to_dev_runs,
                                              &ctx->copy_dev_to_dev_total_runtime);
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                }
                CUDA_SUCCEED_OR_RETURN(cuMemcpy(destmem_0.mem +
                                                sext_i32_i64(destoffset_1),
                                                srcmem_2.mem +
                                                sext_i32_i64(srcoffset_3),
                                                sext_i32_i64(x_elems_5 *
                                                y_elems_6 * 4)));
                if (pevents != NULL)
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
            }
        } else {
            if (sle32(x_elems_5, 8) && slt32(16, y_elems_6)) {
                unsigned int shared_sizze_229997 = (int64_t) 1088;
                CUdeviceptr kernel_arg_229999 = destmem_0.mem;
                CUdeviceptr kernel_arg_230000 = srcmem_2.mem;
                unsigned int shared_offset_229998 = 0;
                
                if ((((((1 && sdiv_up32(x_elems_5, 16) != 0) &&
                        sdiv_up32(sdiv_up32(y_elems_6, muly_8), 16) != 0) &&
                       num_arrays_4 != 0) && 16 != 0) && 16 != 0) && 1 != 0) {
                    int perm[3] = {0, 1, 2};
                    
                    if (sdiv_up32(sdiv_up32(y_elems_6, muly_8), 16) >= 1 <<
                        16) {
                        perm[1] = perm[0];
                        perm[0] = 1;
                    }
                    if (num_arrays_4 >= 1 << 16) {
                        perm[2] = perm[0];
                        perm[0] = 2;
                    }
                    
                    size_t grid[3];
                    
                    grid[perm[0]] = sdiv_up32(x_elems_5, 16);
                    grid[perm[1]] = sdiv_up32(sdiv_up32(y_elems_6, muly_8), 16);
                    grid[perm[2]] = num_arrays_4;
                    
                    void *kernel_args_229994[] = {&perm[0], &perm[1], &perm[2],
                                                  &shared_offset_229998,
                                                  &destoffset_1, &srcoffset_3,
                                                  &num_arrays_4, &x_elems_5,
                                                  &y_elems_6, &mulx_7, &muly_8,
                                                  &kernel_arg_229999,
                                                  &kernel_arg_230000};
                    int64_t time_start_229995 = 0, time_end_229996 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                "gpu_map_transpose_f32_low_width",
                                (long) sdiv_up32(x_elems_5, 16),
                                (long) sdiv_up32(sdiv_up32(y_elems_6, muly_8),
                                                 16), (long) num_arrays_4,
                                (long) 16, (long) 16, (long) 1, (int) (0 +
                                                                       (shared_sizze_229997 +
                                                                        (8 -
                                                                         shared_sizze_229997 %
                                                                         8) %
                                                                        8)));
                        time_start_229995 = get_wall_time();
                    }
                    
                    cudaEvent_t *pevents = NULL;
                    
                    if (ctx->profiling && !ctx->profiling_paused) {
                        pevents = cuda_get_events(&ctx->cuda,
                                                  &ctx->gpu_map_transpose_f32_low_width_runs,
                                                  &ctx->gpu_map_transpose_f32_low_width_total_runtime);
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                    }
                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->gpu_map_transpose_f32_low_width,
                                                          grid[0], grid[1],
                                                          grid[2], 16, 16, 1,
                                                          0 +
                                                          (shared_sizze_229997 +
                                                           (8 -
                                                            shared_sizze_229997 %
                                                            8) % 8), NULL,
                                                          kernel_args_229994,
                                                          NULL));
                    if (pevents != NULL)
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                    if (ctx->debugging) {
                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                        time_end_229996 = get_wall_time();
                        fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                "gpu_map_transpose_f32_low_width",
                                time_end_229996 - time_start_229995);
                    }
                }
            } else {
                if (sle32(y_elems_6, 8) && slt32(16, x_elems_5)) {
                    unsigned int shared_sizze_230004 = (int64_t) 1088;
                    CUdeviceptr kernel_arg_230006 = destmem_0.mem;
                    CUdeviceptr kernel_arg_230007 = srcmem_2.mem;
                    unsigned int shared_offset_230005 = 0;
                    
                    if ((((((1 && sdiv_up32(sdiv_up32(x_elems_5, mulx_7), 16) !=
                             0) && sdiv_up32(y_elems_6, 16) != 0) &&
                           num_arrays_4 != 0) && 16 != 0) && 16 != 0) && 1 !=
                        0) {
                        int perm[3] = {0, 1, 2};
                        
                        if (sdiv_up32(y_elems_6, 16) >= 1 << 16) {
                            perm[1] = perm[0];
                            perm[0] = 1;
                        }
                        if (num_arrays_4 >= 1 << 16) {
                            perm[2] = perm[0];
                            perm[0] = 2;
                        }
                        
                        size_t grid[3];
                        
                        grid[perm[0]] = sdiv_up32(sdiv_up32(x_elems_5, mulx_7),
                                                  16);
                        grid[perm[1]] = sdiv_up32(y_elems_6, 16);
                        grid[perm[2]] = num_arrays_4;
                        
                        void *kernel_args_230001[] = {&perm[0], &perm[1],
                                                      &perm[2],
                                                      &shared_offset_230005,
                                                      &destoffset_1,
                                                      &srcoffset_3,
                                                      &num_arrays_4, &x_elems_5,
                                                      &y_elems_6, &mulx_7,
                                                      &muly_8,
                                                      &kernel_arg_230006,
                                                      &kernel_arg_230007};
                        int64_t time_start_230002 = 0, time_end_230003 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                    "gpu_map_transpose_f32_low_height",
                                    (long) sdiv_up32(sdiv_up32(x_elems_5,
                                                               mulx_7), 16),
                                    (long) sdiv_up32(y_elems_6, 16),
                                    (long) num_arrays_4, (long) 16, (long) 16,
                                    (long) 1, (int) (0 + (shared_sizze_230004 +
                                                          (8 -
                                                           shared_sizze_230004 %
                                                           8) % 8)));
                            time_start_230002 = get_wall_time();
                        }
                        
                        cudaEvent_t *pevents = NULL;
                        
                        if (ctx->profiling && !ctx->profiling_paused) {
                            pevents = cuda_get_events(&ctx->cuda,
                                                      &ctx->gpu_map_transpose_f32_low_height_runs,
                                                      &ctx->gpu_map_transpose_f32_low_height_total_runtime);
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                        }
                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->gpu_map_transpose_f32_low_height,
                                                              grid[0], grid[1],
                                                              grid[2], 16, 16,
                                                              1, 0 +
                                                              (shared_sizze_230004 +
                                                               (8 -
                                                                shared_sizze_230004 %
                                                                8) % 8), NULL,
                                                              kernel_args_230001,
                                                              NULL));
                        if (pevents != NULL)
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                        if (ctx->debugging) {
                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                            time_end_230003 = get_wall_time();
                            fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                    "gpu_map_transpose_f32_low_height",
                                    time_end_230003 - time_start_230002);
                        }
                    }
                } else {
                    if (sle32(x_elems_5, 8) && sle32(y_elems_6, 8)) {
                        unsigned int shared_sizze_230011 = (int64_t) 1;
                        CUdeviceptr kernel_arg_230013 = destmem_0.mem;
                        CUdeviceptr kernel_arg_230014 = srcmem_2.mem;
                        unsigned int shared_offset_230012 = 0;
                        
                        if ((((((1 && sdiv_up32(num_arrays_4 * x_elems_5 *
                                                y_elems_6, 256) != 0) && 1 !=
                                0) && 1 != 0) && 256 != 0) && 1 != 0) && 1 !=
                            0) {
                            int perm[3] = {0, 1, 2};
                            
                            if (1 >= 1 << 16) {
                                perm[1] = perm[0];
                                perm[0] = 1;
                            }
                            if (1 >= 1 << 16) {
                                perm[2] = perm[0];
                                perm[0] = 2;
                            }
                            
                            size_t grid[3];
                            
                            grid[perm[0]] = sdiv_up32(num_arrays_4 * x_elems_5 *
                                                      y_elems_6, 256);
                            grid[perm[1]] = 1;
                            grid[perm[2]] = 1;
                            
                            void *kernel_args_230008[] = {&shared_offset_230012,
                                                          &destoffset_1,
                                                          &srcoffset_3,
                                                          &num_arrays_4,
                                                          &x_elems_5,
                                                          &y_elems_6, &mulx_7,
                                                          &muly_8,
                                                          &kernel_arg_230013,
                                                          &kernel_arg_230014};
                            int64_t time_start_230009 = 0, time_end_230010 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                        "gpu_map_transpose_f32_small",
                                        (long) sdiv_up32(num_arrays_4 *
                                                         x_elems_5 * y_elems_6,
                                                         256), (long) 1,
                                        (long) 1, (long) 256, (long) 1,
                                        (long) 1, (int) (0 +
                                                         (shared_sizze_230011 +
                                                          (8 -
                                                           shared_sizze_230011 %
                                                           8) % 8)));
                                time_start_230009 = get_wall_time();
                            }
                            
                            cudaEvent_t *pevents = NULL;
                            
                            if (ctx->profiling && !ctx->profiling_paused) {
                                pevents = cuda_get_events(&ctx->cuda,
                                                          &ctx->gpu_map_transpose_f32_small_runs,
                                                          &ctx->gpu_map_transpose_f32_small_total_runtime);
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                   0));
                            }
                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->gpu_map_transpose_f32_small,
                                                                  grid[0],
                                                                  grid[1],
                                                                  grid[2], 256,
                                                                  1, 1, 0 +
                                                                  (shared_sizze_230011 +
                                                                   (8 -
                                                                    shared_sizze_230011 %
                                                                    8) % 8),
                                                                  NULL,
                                                                  kernel_args_230008,
                                                                  NULL));
                            if (pevents != NULL)
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                   0));
                            if (ctx->debugging) {
                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                time_end_230010 = get_wall_time();
                                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                        "gpu_map_transpose_f32_small",
                                        time_end_230010 - time_start_230009);
                            }
                        }
                    } else {
                        unsigned int shared_sizze_230018 = (int64_t) 4224;
                        CUdeviceptr kernel_arg_230020 = destmem_0.mem;
                        CUdeviceptr kernel_arg_230021 = srcmem_2.mem;
                        unsigned int shared_offset_230019 = 0;
                        
                        if ((((((1 && sdiv_up32(x_elems_5, 32) != 0) &&
                                sdiv_up32(y_elems_6, 32) != 0) &&
                               num_arrays_4 != 0) && 32 != 0) && 8 != 0) && 1 !=
                            0) {
                            int perm[3] = {0, 1, 2};
                            
                            if (sdiv_up32(y_elems_6, 32) >= 1 << 16) {
                                perm[1] = perm[0];
                                perm[0] = 1;
                            }
                            if (num_arrays_4 >= 1 << 16) {
                                perm[2] = perm[0];
                                perm[0] = 2;
                            }
                            
                            size_t grid[3];
                            
                            grid[perm[0]] = sdiv_up32(x_elems_5, 32);
                            grid[perm[1]] = sdiv_up32(y_elems_6, 32);
                            grid[perm[2]] = num_arrays_4;
                            
                            void *kernel_args_230015[] = {&perm[0], &perm[1],
                                                          &perm[2],
                                                          &shared_offset_230019,
                                                          &destoffset_1,
                                                          &srcoffset_3,
                                                          &num_arrays_4,
                                                          &x_elems_5,
                                                          &y_elems_6, &mulx_7,
                                                          &muly_8,
                                                          &kernel_arg_230020,
                                                          &kernel_arg_230021};
                            int64_t time_start_230016 = 0, time_end_230017 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                        "gpu_map_transpose_f32",
                                        (long) sdiv_up32(x_elems_5, 32),
                                        (long) sdiv_up32(y_elems_6, 32),
                                        (long) num_arrays_4, (long) 32,
                                        (long) 8, (long) 1, (int) (0 +
                                                                   (shared_sizze_230018 +
                                                                    (8 -
                                                                     shared_sizze_230018 %
                                                                     8) % 8)));
                                time_start_230016 = get_wall_time();
                            }
                            
                            cudaEvent_t *pevents = NULL;
                            
                            if (ctx->profiling && !ctx->profiling_paused) {
                                pevents = cuda_get_events(&ctx->cuda,
                                                          &ctx->gpu_map_transpose_f32_runs,
                                                          &ctx->gpu_map_transpose_f32_total_runtime);
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                   0));
                            }
                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->gpu_map_transpose_f32,
                                                                  grid[0],
                                                                  grid[1],
                                                                  grid[2], 32,
                                                                  8, 1, 0 +
                                                                  (shared_sizze_230018 +
                                                                   (8 -
                                                                    shared_sizze_230018 %
                                                                    8) % 8),
                                                                  NULL,
                                                                  kernel_args_230015,
                                                                  NULL));
                            if (pevents != NULL)
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                   0));
                            if (ctx->debugging) {
                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                time_end_230017 = get_wall_time();
                                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                        "gpu_map_transpose_f32",
                                        time_end_230017 - time_start_230016);
                            }
                        }
                    }
                }
            }
        }
    }
    
  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)) {
            {
                cudaEvent_t *pevents = NULL;
                
                if (ctx->profiling && !ctx->profiling_paused) {
                    pevents = cuda_get_events(&ctx->cuda,
                                              &ctx->copy_dev_to_dev_runs,
                                              &ctx->copy_dev_to_dev_total_runtime);
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                }
                CUDA_SUCCEED_OR_RETURN(cuMemcpy(destmem_0.mem +
                                                sext_i32_i64(destoffset_1),
                                                srcmem_2.mem +
                                                sext_i32_i64(srcoffset_3),
                                                sext_i32_i64(x_elems_5 *
                                                y_elems_6 * 8)));
                if (pevents != NULL)
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
            }
        } else {
            if (sle32(x_elems_5, 8) && slt32(16, y_elems_6)) {
                unsigned int shared_sizze_230025 = (int64_t) 2176;
                CUdeviceptr kernel_arg_230027 = destmem_0.mem;
                CUdeviceptr kernel_arg_230028 = srcmem_2.mem;
                unsigned int shared_offset_230026 = 0;
                
                if ((((((1 && sdiv_up32(x_elems_5, 16) != 0) &&
                        sdiv_up32(sdiv_up32(y_elems_6, muly_8), 16) != 0) &&
                       num_arrays_4 != 0) && 16 != 0) && 16 != 0) && 1 != 0) {
                    int perm[3] = {0, 1, 2};
                    
                    if (sdiv_up32(sdiv_up32(y_elems_6, muly_8), 16) >= 1 <<
                        16) {
                        perm[1] = perm[0];
                        perm[0] = 1;
                    }
                    if (num_arrays_4 >= 1 << 16) {
                        perm[2] = perm[0];
                        perm[0] = 2;
                    }
                    
                    size_t grid[3];
                    
                    grid[perm[0]] = sdiv_up32(x_elems_5, 16);
                    grid[perm[1]] = sdiv_up32(sdiv_up32(y_elems_6, muly_8), 16);
                    grid[perm[2]] = num_arrays_4;
                    
                    void *kernel_args_230022[] = {&perm[0], &perm[1], &perm[2],
                                                  &shared_offset_230026,
                                                  &destoffset_1, &srcoffset_3,
                                                  &num_arrays_4, &x_elems_5,
                                                  &y_elems_6, &mulx_7, &muly_8,
                                                  &kernel_arg_230027,
                                                  &kernel_arg_230028};
                    int64_t time_start_230023 = 0, time_end_230024 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                "gpu_map_transpose_i64_low_width",
                                (long) sdiv_up32(x_elems_5, 16),
                                (long) sdiv_up32(sdiv_up32(y_elems_6, muly_8),
                                                 16), (long) num_arrays_4,
                                (long) 16, (long) 16, (long) 1, (int) (0 +
                                                                       (shared_sizze_230025 +
                                                                        (8 -
                                                                         shared_sizze_230025 %
                                                                         8) %
                                                                        8)));
                        time_start_230023 = get_wall_time();
                    }
                    
                    cudaEvent_t *pevents = NULL;
                    
                    if (ctx->profiling && !ctx->profiling_paused) {
                        pevents = cuda_get_events(&ctx->cuda,
                                                  &ctx->gpu_map_transpose_i64_low_width_runs,
                                                  &ctx->gpu_map_transpose_i64_low_width_total_runtime);
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                    }
                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->gpu_map_transpose_i64_low_width,
                                                          grid[0], grid[1],
                                                          grid[2], 16, 16, 1,
                                                          0 +
                                                          (shared_sizze_230025 +
                                                           (8 -
                                                            shared_sizze_230025 %
                                                            8) % 8), NULL,
                                                          kernel_args_230022,
                                                          NULL));
                    if (pevents != NULL)
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                    if (ctx->debugging) {
                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                        time_end_230024 = get_wall_time();
                        fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                "gpu_map_transpose_i64_low_width",
                                time_end_230024 - time_start_230023);
                    }
                }
            } else {
                if (sle32(y_elems_6, 8) && slt32(16, x_elems_5)) {
                    unsigned int shared_sizze_230032 = (int64_t) 2176;
                    CUdeviceptr kernel_arg_230034 = destmem_0.mem;
                    CUdeviceptr kernel_arg_230035 = srcmem_2.mem;
                    unsigned int shared_offset_230033 = 0;
                    
                    if ((((((1 && sdiv_up32(sdiv_up32(x_elems_5, mulx_7), 16) !=
                             0) && sdiv_up32(y_elems_6, 16) != 0) &&
                           num_arrays_4 != 0) && 16 != 0) && 16 != 0) && 1 !=
                        0) {
                        int perm[3] = {0, 1, 2};
                        
                        if (sdiv_up32(y_elems_6, 16) >= 1 << 16) {
                            perm[1] = perm[0];
                            perm[0] = 1;
                        }
                        if (num_arrays_4 >= 1 << 16) {
                            perm[2] = perm[0];
                            perm[0] = 2;
                        }
                        
                        size_t grid[3];
                        
                        grid[perm[0]] = sdiv_up32(sdiv_up32(x_elems_5, mulx_7),
                                                  16);
                        grid[perm[1]] = sdiv_up32(y_elems_6, 16);
                        grid[perm[2]] = num_arrays_4;
                        
                        void *kernel_args_230029[] = {&perm[0], &perm[1],
                                                      &perm[2],
                                                      &shared_offset_230033,
                                                      &destoffset_1,
                                                      &srcoffset_3,
                                                      &num_arrays_4, &x_elems_5,
                                                      &y_elems_6, &mulx_7,
                                                      &muly_8,
                                                      &kernel_arg_230034,
                                                      &kernel_arg_230035};
                        int64_t time_start_230030 = 0, time_end_230031 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                    "gpu_map_transpose_i64_low_height",
                                    (long) sdiv_up32(sdiv_up32(x_elems_5,
                                                               mulx_7), 16),
                                    (long) sdiv_up32(y_elems_6, 16),
                                    (long) num_arrays_4, (long) 16, (long) 16,
                                    (long) 1, (int) (0 + (shared_sizze_230032 +
                                                          (8 -
                                                           shared_sizze_230032 %
                                                           8) % 8)));
                            time_start_230030 = get_wall_time();
                        }
                        
                        cudaEvent_t *pevents = NULL;
                        
                        if (ctx->profiling && !ctx->profiling_paused) {
                            pevents = cuda_get_events(&ctx->cuda,
                                                      &ctx->gpu_map_transpose_i64_low_height_runs,
                                                      &ctx->gpu_map_transpose_i64_low_height_total_runtime);
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                        }
                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->gpu_map_transpose_i64_low_height,
                                                              grid[0], grid[1],
                                                              grid[2], 16, 16,
                                                              1, 0 +
                                                              (shared_sizze_230032 +
                                                               (8 -
                                                                shared_sizze_230032 %
                                                                8) % 8), NULL,
                                                              kernel_args_230029,
                                                              NULL));
                        if (pevents != NULL)
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                        if (ctx->debugging) {
                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                            time_end_230031 = get_wall_time();
                            fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                    "gpu_map_transpose_i64_low_height",
                                    time_end_230031 - time_start_230030);
                        }
                    }
                } else {
                    if (sle32(x_elems_5, 8) && sle32(y_elems_6, 8)) {
                        unsigned int shared_sizze_230039 = (int64_t) 1;
                        CUdeviceptr kernel_arg_230041 = destmem_0.mem;
                        CUdeviceptr kernel_arg_230042 = srcmem_2.mem;
                        unsigned int shared_offset_230040 = 0;
                        
                        if ((((((1 && sdiv_up32(num_arrays_4 * x_elems_5 *
                                                y_elems_6, 256) != 0) && 1 !=
                                0) && 1 != 0) && 256 != 0) && 1 != 0) && 1 !=
                            0) {
                            int perm[3] = {0, 1, 2};
                            
                            if (1 >= 1 << 16) {
                                perm[1] = perm[0];
                                perm[0] = 1;
                            }
                            if (1 >= 1 << 16) {
                                perm[2] = perm[0];
                                perm[0] = 2;
                            }
                            
                            size_t grid[3];
                            
                            grid[perm[0]] = sdiv_up32(num_arrays_4 * x_elems_5 *
                                                      y_elems_6, 256);
                            grid[perm[1]] = 1;
                            grid[perm[2]] = 1;
                            
                            void *kernel_args_230036[] = {&shared_offset_230040,
                                                          &destoffset_1,
                                                          &srcoffset_3,
                                                          &num_arrays_4,
                                                          &x_elems_5,
                                                          &y_elems_6, &mulx_7,
                                                          &muly_8,
                                                          &kernel_arg_230041,
                                                          &kernel_arg_230042};
                            int64_t time_start_230037 = 0, time_end_230038 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                        "gpu_map_transpose_i64_small",
                                        (long) sdiv_up32(num_arrays_4 *
                                                         x_elems_5 * y_elems_6,
                                                         256), (long) 1,
                                        (long) 1, (long) 256, (long) 1,
                                        (long) 1, (int) (0 +
                                                         (shared_sizze_230039 +
                                                          (8 -
                                                           shared_sizze_230039 %
                                                           8) % 8)));
                                time_start_230037 = get_wall_time();
                            }
                            
                            cudaEvent_t *pevents = NULL;
                            
                            if (ctx->profiling && !ctx->profiling_paused) {
                                pevents = cuda_get_events(&ctx->cuda,
                                                          &ctx->gpu_map_transpose_i64_small_runs,
                                                          &ctx->gpu_map_transpose_i64_small_total_runtime);
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                   0));
                            }
                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->gpu_map_transpose_i64_small,
                                                                  grid[0],
                                                                  grid[1],
                                                                  grid[2], 256,
                                                                  1, 1, 0 +
                                                                  (shared_sizze_230039 +
                                                                   (8 -
                                                                    shared_sizze_230039 %
                                                                    8) % 8),
                                                                  NULL,
                                                                  kernel_args_230036,
                                                                  NULL));
                            if (pevents != NULL)
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                   0));
                            if (ctx->debugging) {
                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                time_end_230038 = get_wall_time();
                                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                        "gpu_map_transpose_i64_small",
                                        time_end_230038 - time_start_230037);
                            }
                        }
                    } else {
                        unsigned int shared_sizze_230046 = (int64_t) 8448;
                        CUdeviceptr kernel_arg_230048 = destmem_0.mem;
                        CUdeviceptr kernel_arg_230049 = srcmem_2.mem;
                        unsigned int shared_offset_230047 = 0;
                        
                        if ((((((1 && sdiv_up32(x_elems_5, 32) != 0) &&
                                sdiv_up32(y_elems_6, 32) != 0) &&
                               num_arrays_4 != 0) && 32 != 0) && 8 != 0) && 1 !=
                            0) {
                            int perm[3] = {0, 1, 2};
                            
                            if (sdiv_up32(y_elems_6, 32) >= 1 << 16) {
                                perm[1] = perm[0];
                                perm[0] = 1;
                            }
                            if (num_arrays_4 >= 1 << 16) {
                                perm[2] = perm[0];
                                perm[0] = 2;
                            }
                            
                            size_t grid[3];
                            
                            grid[perm[0]] = sdiv_up32(x_elems_5, 32);
                            grid[perm[1]] = sdiv_up32(y_elems_6, 32);
                            grid[perm[2]] = num_arrays_4;
                            
                            void *kernel_args_230043[] = {&perm[0], &perm[1],
                                                          &perm[2],
                                                          &shared_offset_230047,
                                                          &destoffset_1,
                                                          &srcoffset_3,
                                                          &num_arrays_4,
                                                          &x_elems_5,
                                                          &y_elems_6, &mulx_7,
                                                          &muly_8,
                                                          &kernel_arg_230048,
                                                          &kernel_arg_230049};
                            int64_t time_start_230044 = 0, time_end_230045 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                        "gpu_map_transpose_i64",
                                        (long) sdiv_up32(x_elems_5, 32),
                                        (long) sdiv_up32(y_elems_6, 32),
                                        (long) num_arrays_4, (long) 32,
                                        (long) 8, (long) 1, (int) (0 +
                                                                   (shared_sizze_230046 +
                                                                    (8 -
                                                                     shared_sizze_230046 %
                                                                     8) % 8)));
                                time_start_230044 = get_wall_time();
                            }
                            
                            cudaEvent_t *pevents = NULL;
                            
                            if (ctx->profiling && !ctx->profiling_paused) {
                                pevents = cuda_get_events(&ctx->cuda,
                                                          &ctx->gpu_map_transpose_i64_runs,
                                                          &ctx->gpu_map_transpose_i64_total_runtime);
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                   0));
                            }
                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->gpu_map_transpose_i64,
                                                                  grid[0],
                                                                  grid[1],
                                                                  grid[2], 32,
                                                                  8, 1, 0 +
                                                                  (shared_sizze_230046 +
                                                                   (8 -
                                                                    shared_sizze_230046 %
                                                                    8) % 8),
                                                                  NULL,
                                                                  kernel_args_230043,
                                                                  NULL));
                            if (pevents != NULL)
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                   0));
                            if (ctx->debugging) {
                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                time_end_230045 = get_wall_time();
                                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                        "gpu_map_transpose_i64",
                                        time_end_230045 - time_start_230044);
                            }
                        }
                    }
                }
            }
        }
    }
    
  cleanup:
    { }
    return err;
}
static int futrts_builtinzhreplicate_f32(struct futhark_context *ctx,
                                         struct memblock_device mem_225893,
                                         int32_t num_elems_225894,
                                         float val_225895)
{
    (void) ctx;
    
    int err = 0;
    int64_t group_sizze_225900;
    
    group_sizze_225900 =
        *ctx->tuning_params.builtinzhreplicate_f32zigroup_sizze_225900;
    
    int64_t num_groups_225901 = sdiv_up64(num_elems_225894, group_sizze_225900);
    CUdeviceptr kernel_arg_230053 = mem_225893.mem;
    
    if ((((((1 && num_groups_225901 != 0) && 1 != 0) && 1 != 0) &&
          group_sizze_225900 != 0) && 1 != 0) && 1 != 0) {
        int perm[3] = {0, 1, 2};
        
        if (1 >= 1 << 16) {
            perm[1] = perm[0];
            perm[0] = 1;
        }
        if (1 >= 1 << 16) {
            perm[2] = perm[0];
            perm[0] = 2;
        }
        
        size_t grid[3];
        
        grid[perm[0]] = num_groups_225901;
        grid[perm[1]] = 1;
        grid[perm[2]] = 1;
        
        void *kernel_args_230050[] = {&num_elems_225894, &val_225895,
                                      &kernel_arg_230053};
        int64_t time_start_230051 = 0, time_end_230052 = 0;
        
        if (ctx->debugging) {
            fprintf(ctx->log,
                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                    "builtin#replicate_f32.replicate_225897",
                    (long) num_groups_225901, (long) 1, (long) 1,
                    (long) group_sizze_225900, (long) 1, (long) 1, (int) 0);
            time_start_230051 = get_wall_time();
        }
        
        cudaEvent_t *pevents = NULL;
        
        if (ctx->profiling && !ctx->profiling_paused) {
            pevents = cuda_get_events(&ctx->cuda,
                                      &ctx->builtinzhreplicate_f32zireplicate_225897_runs,
                                      &ctx->builtinzhreplicate_f32zireplicate_225897_total_runtime);
            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
        }
        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->builtinzhreplicate_f32zireplicate_225897,
                                              grid[0], grid[1], grid[2],
                                              group_sizze_225900, 1, 1, 0, NULL,
                                              kernel_args_230050, NULL));
        if (pevents != NULL)
            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
        if (ctx->debugging) {
            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
            time_end_230052 = get_wall_time();
            fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                    "builtin#replicate_f32.replicate_225897", time_end_230052 -
                    time_start_230051);
        }
    }
    
  cleanup:
    { }
    return err;
}
static int futrts_builtinzhreplicate_i64(struct futhark_context *ctx,
                                         struct memblock_device mem_225434,
                                         int32_t num_elems_225435,
                                         int64_t val_225436)
{
    (void) ctx;
    
    int err = 0;
    int64_t group_sizze_225441;
    
    group_sizze_225441 =
        *ctx->tuning_params.builtinzhreplicate_i64zigroup_sizze_225441;
    
    int64_t num_groups_225442 = sdiv_up64(num_elems_225435, group_sizze_225441);
    CUdeviceptr kernel_arg_230057 = mem_225434.mem;
    
    if ((((((1 && num_groups_225442 != 0) && 1 != 0) && 1 != 0) &&
          group_sizze_225441 != 0) && 1 != 0) && 1 != 0) {
        int perm[3] = {0, 1, 2};
        
        if (1 >= 1 << 16) {
            perm[1] = perm[0];
            perm[0] = 1;
        }
        if (1 >= 1 << 16) {
            perm[2] = perm[0];
            perm[0] = 2;
        }
        
        size_t grid[3];
        
        grid[perm[0]] = num_groups_225442;
        grid[perm[1]] = 1;
        grid[perm[2]] = 1;
        
        void *kernel_args_230054[] = {&num_elems_225435, &val_225436,
                                      &kernel_arg_230057};
        int64_t time_start_230055 = 0, time_end_230056 = 0;
        
        if (ctx->debugging) {
            fprintf(ctx->log,
                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                    "builtin#replicate_i64.replicate_225438",
                    (long) num_groups_225442, (long) 1, (long) 1,
                    (long) group_sizze_225441, (long) 1, (long) 1, (int) 0);
            time_start_230055 = get_wall_time();
        }
        
        cudaEvent_t *pevents = NULL;
        
        if (ctx->profiling && !ctx->profiling_paused) {
            pevents = cuda_get_events(&ctx->cuda,
                                      &ctx->builtinzhreplicate_i64zireplicate_225438_runs,
                                      &ctx->builtinzhreplicate_i64zireplicate_225438_total_runtime);
            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
        }
        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->builtinzhreplicate_i64zireplicate_225438,
                                              grid[0], grid[1], grid[2],
                                              group_sizze_225441, 1, 1, 0, NULL,
                                              kernel_args_230054, NULL));
        if (pevents != NULL)
            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
        if (ctx->debugging) {
            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
            time_end_230056 = get_wall_time();
            fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                    "builtin#replicate_i64.replicate_225438", time_end_230056 -
                    time_start_230055);
        }
    }
    
  cleanup:
    { }
    return err;
}
static int futrts_builtinzhreplicate_i8(struct futhark_context *ctx,
                                        struct memblock_device mem_225329,
                                        int32_t num_elems_225330,
                                        int8_t val_225331)
{
    (void) ctx;
    
    int err = 0;
    int64_t group_sizze_225336;
    
    group_sizze_225336 =
        *ctx->tuning_params.builtinzhreplicate_i8zigroup_sizze_225336;
    
    int64_t num_groups_225337 = sdiv_up64(num_elems_225330, group_sizze_225336);
    CUdeviceptr kernel_arg_230061 = mem_225329.mem;
    
    if ((((((1 && num_groups_225337 != 0) && 1 != 0) && 1 != 0) &&
          group_sizze_225336 != 0) && 1 != 0) && 1 != 0) {
        int perm[3] = {0, 1, 2};
        
        if (1 >= 1 << 16) {
            perm[1] = perm[0];
            perm[0] = 1;
        }
        if (1 >= 1 << 16) {
            perm[2] = perm[0];
            perm[0] = 2;
        }
        
        size_t grid[3];
        
        grid[perm[0]] = num_groups_225337;
        grid[perm[1]] = 1;
        grid[perm[2]] = 1;
        
        void *kernel_args_230058[] = {&num_elems_225330, &val_225331,
                                      &kernel_arg_230061};
        int64_t time_start_230059 = 0, time_end_230060 = 0;
        
        if (ctx->debugging) {
            fprintf(ctx->log,
                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                    "builtin#replicate_i8.replicate_225333",
                    (long) num_groups_225337, (long) 1, (long) 1,
                    (long) group_sizze_225336, (long) 1, (long) 1, (int) 0);
            time_start_230059 = get_wall_time();
        }
        
        cudaEvent_t *pevents = NULL;
        
        if (ctx->profiling && !ctx->profiling_paused) {
            pevents = cuda_get_events(&ctx->cuda,
                                      &ctx->builtinzhreplicate_i8zireplicate_225333_runs,
                                      &ctx->builtinzhreplicate_i8zireplicate_225333_total_runtime);
            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
        }
        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->builtinzhreplicate_i8zireplicate_225333,
                                              grid[0], grid[1], grid[2],
                                              group_sizze_225336, 1, 1, 0, NULL,
                                              kernel_args_230058, NULL));
        if (pevents != NULL)
            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
        if (ctx->debugging) {
            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
            time_end_230060 = get_wall_time();
            fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                    "builtin#replicate_i8.replicate_225333", time_end_230060 -
                    time_start_230059);
        }
    }
    
  cleanup:
    { }
    return err;
}
static int futrts_entry_main(struct futhark_context *ctx,
                             struct memblock_device *mem_out_p_230062,
                             struct memblock_device *mem_out_p_230063,
                             struct memblock_device *mem_out_p_230064,
                             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->cuda.max_block_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_225465;
    
    local_memory_capacity_225465 = ctx->cuda.max_shared_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_225465)) &&
        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");
        
        unsigned int shared_sizze_230068 = bytes_222229;
        unsigned int shared_sizze_230070 = bytes_222229;
        CUdeviceptr kernel_arg_230072 = Y_mem_222225.mem;
        CUdeviceptr kernel_arg_230073 = mem_222238.mem;
        CUdeviceptr kernel_arg_230074 = mem_222241.mem;
        unsigned int shared_offset_230069 = 0;
        unsigned int shared_offset_230071 = 0 + (shared_sizze_230068 + (8 -
                                                                        shared_sizze_230068 %
                                                                        8) % 8);
        
        if ((((((1 && m_196691 != 0) && 1 != 0) && 1 != 0) && n_196692 != 0) &&
             1 != 0) && 1 != 0) {
            int perm[3] = {0, 1, 2};
            
            if (1 >= 1 << 16) {
                perm[1] = perm[0];
                perm[0] = 1;
            }
            if (1 >= 1 << 16) {
                perm[2] = perm[0];
                perm[0] = 2;
            }
            
            size_t grid[3];
            
            grid[perm[0]] = m_196691;
            grid[perm[1]] = 1;
            grid[perm[2]] = 1;
            
            void *kernel_args_230065[] = {&ctx->global_failure,
                                          &shared_offset_230069,
                                          &shared_offset_230071, &m_196691,
                                          &n_196692, &i_196779,
                                          &kernel_arg_230072,
                                          &kernel_arg_230073,
                                          &kernel_arg_230074};
            int64_t time_start_230066 = 0, time_end_230067 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                        "main.segmap_intragroup_199976", (long) m_196691,
                        (long) 1, (long) 1, (long) n_196692, (long) 1, (long) 1,
                        (int) (0 + (shared_sizze_230068 + (8 -
                                                           shared_sizze_230068 %
                                                           8) % 8) +
                               (shared_sizze_230070 + (8 - shared_sizze_230070 %
                                                       8) % 8)));
                time_start_230066 = get_wall_time();
            }
            
            cudaEvent_t *pevents = NULL;
            
            if (ctx->profiling && !ctx->profiling_paused) {
                pevents = cuda_get_events(&ctx->cuda,
                                          &ctx->mainzisegmap_intragroup_199976_runs,
                                          &ctx->mainzisegmap_intragroup_199976_total_runtime);
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
            }
            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_intragroup_199976,
                                                  grid[0], grid[1], grid[2],
                                                  n_196692, 1, 1, 0 +
                                                  (shared_sizze_230068 + (8 -
                                                                          shared_sizze_230068 %
                                                                          8) %
                                                   8) + (shared_sizze_230070 +
                                                         (8 -
                                                          shared_sizze_230070 %
                                                          8) % 8), NULL,
                                                  kernel_args_230065, NULL));
            if (pevents != NULL)
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
            if (ctx->debugging) {
                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                time_end_230067 = get_wall_time();
                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                        "main.segmap_intragroup_199976", time_end_230067 -
                        time_start_230066);
            }
        }
        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");
            if (ctx->debugging)
                fprintf(ctx->log, "%s: %llu%c",
                        "SegScan: number of elements processed sequentially per thread is m:",
                        (long long) 11, '\n');
            if (ctx->debugging)
                fprintf(ctx->log, "%s: %llu%c",
                        "SegScan: memory constraints is: ", (long long) 11,
                        '\n');
            if (ctx->debugging)
                fprintf(ctx->log, "%s: %llu%c",
                        "SegScan: register constraints is: ", (long long) 15,
                        '\n');
            if (ctx->debugging)
                fprintf(ctx->log, "%s: %llu%c", "SegScan: sumT' is: ",
                        (long long) 2, '\n');
            
            int64_t numThreads_225319 = sdiv_up64(m_196691 * n_196692,
                                                  segscan_group_sizze_200084 *
                                                  (int64_t) 11) *
                    segscan_group_sizze_200084;
            int64_t numGroups_225320 = sdiv_up64(m_196691 * n_196692,
                                                 segscan_group_sizze_200084 *
                                                 (int64_t) 11);
            struct memblock_device mainziid_counter_mem_225321 =
                                   ctx->mainziid_counter_mem_225321;
            struct memblock_device status_flags_mem_225323;
            
            status_flags_mem_225323.references = NULL;
            if (memblock_alloc_device(ctx, &status_flags_mem_225323,
                                      numGroups_225320,
                                      "status_flags_mem_225323")) {
                err = 1;
                goto cleanup;
            }
            
            struct memblock_device aggregates_mem_225325;
            
            aggregates_mem_225325.references = NULL;
            if (memblock_alloc_device(ctx, &aggregates_mem_225325, (int64_t) 8 *
                                      numGroups_225320,
                                      "aggregates_mem_225325")) {
                err = 1;
                goto cleanup;
            }
            
            struct memblock_device incprefixes_mem_225327;
            
            incprefixes_mem_225327.references = NULL;
            if (memblock_alloc_device(ctx, &incprefixes_mem_225327,
                                      (int64_t) 8 * numGroups_225320,
                                      "incprefixes_mem_225327")) {
                err = 1;
                goto cleanup;
            }
            if (futrts_builtinzhreplicate_i8(ctx, status_flags_mem_225323,
                                             numGroups_225320, (int8_t) 0) !=
                0) {
                if (memblock_unref_device(ctx, &incprefixes_mem_225327,
                                          "incprefixes_mem_225327") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &aggregates_mem_225325,
                                          "aggregates_mem_225325") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &status_flags_mem_225323,
                                          "status_flags_mem_225323") != 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;
            }
            
            unsigned int shared_sizze_230079 = smax64(smax64((int64_t) 288,
                                                             (int64_t) 8 *
                                                             segscan_group_sizze_200084),
                                                      (int64_t) 11 *
                                                      segscan_group_sizze_200084 *
                                                      (int64_t) 8);
            CUdeviceptr kernel_arg_230081 = Y_mem_222225.mem;
            CUdeviceptr kernel_arg_230082 = mem_222246.mem;
            CUdeviceptr kernel_arg_230083 = mainziid_counter_mem_225321.mem;
            CUdeviceptr kernel_arg_230084 = status_flags_mem_225323.mem;
            CUdeviceptr kernel_arg_230085 = aggregates_mem_225325.mem;
            CUdeviceptr kernel_arg_230086 = incprefixes_mem_225327.mem;
            unsigned int shared_offset_230080 = 0;
            
            if ((((((1 && sdiv_up64(m_196691 * n_196692,
                                    segscan_group_sizze_200084 *
                                    (int64_t) 11) != 0) && 1 != 0) && 1 != 0) &&
                  segscan_group_sizze_200084 != 0) && 1 != 0) && 1 != 0) {
                int perm[3] = {0, 1, 2};
                
                if (1 >= 1 << 16) {
                    perm[1] = perm[0];
                    perm[0] = 1;
                }
                if (1 >= 1 << 16) {
                    perm[2] = perm[0];
                    perm[0] = 2;
                }
                
                size_t grid[3];
                
                grid[perm[0]] = sdiv_up64(m_196691 * n_196692,
                                          segscan_group_sizze_200084 *
                                          (int64_t) 11);
                grid[perm[1]] = 1;
                grid[perm[2]] = 1;
                
                void *kernel_args_230076[] = {&ctx->global_failure,
                                              &shared_offset_230080, &m_196691,
                                              &n_196692, &kernel_arg_230081,
                                              &kernel_arg_230082,
                                              &kernel_arg_230083,
                                              &kernel_arg_230084,
                                              &kernel_arg_230085,
                                              &kernel_arg_230086};
                int64_t time_start_230077 = 0, time_end_230078 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                            "main.segscan_200090", (long) sdiv_up64(m_196691 *
                                                                    n_196692,
                                                                    segscan_group_sizze_200084 *
                                                                    (int64_t) 11),
                            (long) 1, (long) 1,
                            (long) segscan_group_sizze_200084, (long) 1,
                            (long) 1, (int) (0 + (shared_sizze_230079 + (8 -
                                                                         shared_sizze_230079 %
                                                                         8) %
                                                  8)));
                    time_start_230077 = get_wall_time();
                }
                
                cudaEvent_t *pevents = NULL;
                
                if (ctx->profiling && !ctx->profiling_paused) {
                    pevents = cuda_get_events(&ctx->cuda,
                                              &ctx->mainzisegscan_200090_runs,
                                              &ctx->mainzisegscan_200090_total_runtime);
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                }
                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegscan_200090,
                                                      grid[0], grid[1], grid[2],
                                                      segscan_group_sizze_200084,
                                                      1, 1, 0 +
                                                      (shared_sizze_230079 +
                                                       (8 -
                                                        shared_sizze_230079 %
                                                        8) % 8), NULL,
                                                      kernel_args_230076,
                                                      NULL));
                if (pevents != NULL)
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                if (ctx->debugging) {
                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                    time_end_230078 = get_wall_time();
                    fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                            "main.segscan_200090", time_end_230078 -
                            time_start_230077);
                }
            }
            if (memblock_unref_device(ctx, &incprefixes_mem_225327,
                                      "incprefixes_mem_225327") != 0)
                return 1;
            if (memblock_unref_device(ctx, &aggregates_mem_225325,
                                      "aggregates_mem_225325") != 0)
                return 1;
            if (memblock_unref_device(ctx, &status_flags_mem_225323,
                                      "status_flags_mem_225323") != 0)
                return 1;
        }
        
        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");
        
        CUdeviceptr kernel_arg_230090 = Y_mem_222225.mem;
        CUdeviceptr kernel_arg_230091 = mem_222246.mem;
        CUdeviceptr kernel_arg_230092 = mem_222250.mem;
        
        if ((((((1 && segmap_usable_groups_200124 != 0) && 1 != 0) && 1 != 0) &&
              segmap_group_sizze_200123 != 0) && 1 != 0) && 1 != 0) {
            int perm[3] = {0, 1, 2};
            
            if (1 >= 1 << 16) {
                perm[1] = perm[0];
                perm[0] = 1;
            }
            if (1 >= 1 << 16) {
                perm[2] = perm[0];
                perm[0] = 2;
            }
            
            size_t grid[3];
            
            grid[perm[0]] = segmap_usable_groups_200124;
            grid[perm[1]] = 1;
            grid[perm[2]] = 1;
            
            void *kernel_args_230087[] = {&ctx->global_failure, &m_196691,
                                          &n_196692, &kernel_arg_230090,
                                          &kernel_arg_230091,
                                          &kernel_arg_230092};
            int64_t time_start_230088 = 0, time_end_230089 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                        "main.segmap_200128",
                        (long) segmap_usable_groups_200124, (long) 1, (long) 1,
                        (long) segmap_group_sizze_200123, (long) 1, (long) 1,
                        (int) 0);
                time_start_230088 = get_wall_time();
            }
            
            cudaEvent_t *pevents = NULL;
            
            if (ctx->profiling && !ctx->profiling_paused) {
                pevents = cuda_get_events(&ctx->cuda,
                                          &ctx->mainzisegmap_200128_runs,
                                          &ctx->mainzisegmap_200128_total_runtime);
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
            }
            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_200128,
                                                  grid[0], grid[1], grid[2],
                                                  segmap_group_sizze_200123, 1,
                                                  1, 0, NULL,
                                                  kernel_args_230087, NULL));
            if (pevents != NULL)
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
            if (ctx->debugging) {
                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                time_end_230089 = get_wall_time();
                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                        "main.segmap_200128", time_end_230089 -
                        time_start_230088);
            }
        }
        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_225459;
        
        group_sizze_225459 = *ctx->tuning_params.mainzigroup_sizze_225459;
        
        int64_t num_groups_225460 = sdiv_up64(m_196691, group_sizze_225459);
        CUdeviceptr kernel_arg_230096 = mem_222246.mem;
        CUdeviceptr kernel_arg_230097 = mem_222254.mem;
        
        if ((((((1 && num_groups_225460 != 0) && 1 != 0) && 1 != 0) &&
              group_sizze_225459 != 0) && 1 != 0) && 1 != 0) {
            int perm[3] = {0, 1, 2};
            
            if (1 >= 1 << 16) {
                perm[1] = perm[0];
                perm[0] = 1;
            }
            if (1 >= 1 << 16) {
                perm[2] = perm[0];
                perm[0] = 2;
            }
            
            size_t grid[3];
            
            grid[perm[0]] = num_groups_225460;
            grid[perm[1]] = 1;
            grid[perm[2]] = 1;
            
            void *kernel_args_230093[] = {&m_196691, &n_196692, &i_196779,
                                          &kernel_arg_230096,
                                          &kernel_arg_230097};
            int64_t time_start_230094 = 0, time_end_230095 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                        "main.copy_225456", (long) num_groups_225460, (long) 1,
                        (long) 1, (long) group_sizze_225459, (long) 1, (long) 1,
                        (int) 0);
                time_start_230094 = get_wall_time();
            }
            
            cudaEvent_t *pevents = NULL;
            
            if (ctx->profiling && !ctx->profiling_paused) {
                pevents = cuda_get_events(&ctx->cuda,
                                          &ctx->mainzicopy_225456_runs,
                                          &ctx->mainzicopy_225456_total_runtime);
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
            }
            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzicopy_225456,
                                                  grid[0], grid[1], grid[2],
                                                  group_sizze_225459, 1, 1, 0,
                                                  NULL, kernel_args_230093,
                                                  NULL));
            if (pevents != NULL)
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
            if (ctx->debugging) {
                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                time_end_230095 = get_wall_time();
                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                        "main.copy_225456", time_end_230095 -
                        time_start_230094);
            }
        }
        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");
    
    CUdeviceptr kernel_arg_230101 = Y_mem_222225.mem;
    CUdeviceptr kernel_arg_230102 = mem_222263.mem;
    
    if ((((((1 && segmap_usable_groups_200248 != 0) && 1 != 0) && 1 != 0) &&
          segmap_group_sizze_200247 != 0) && 1 != 0) && 1 != 0) {
        int perm[3] = {0, 1, 2};
        
        if (1 >= 1 << 16) {
            perm[1] = perm[0];
            perm[0] = 1;
        }
        if (1 >= 1 << 16) {
            perm[2] = perm[0];
            perm[0] = 2;
        }
        
        size_t grid[3];
        
        grid[perm[0]] = segmap_usable_groups_200248;
        grid[perm[1]] = 1;
        grid[perm[2]] = 1;
        
        void *kernel_args_230098[] = {&ctx->global_failure,
                                      &ctx->failure_is_an_option,
                                      &ctx->global_failure_args, &m_196691,
                                      &n_196692, &n_p_196694,
                                      &defunc_0_f_res_196740, &i_196779,
                                      &kernel_arg_230101, &kernel_arg_230102};
        int64_t time_start_230099 = 0, time_end_230100 = 0;
        
        if (ctx->debugging) {
            fprintf(ctx->log,
                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                    "main.segmap_200253", (long) segmap_usable_groups_200248,
                    (long) 1, (long) 1, (long) segmap_group_sizze_200247,
                    (long) 1, (long) 1, (int) 0);
            time_start_230099 = get_wall_time();
        }
        
        cudaEvent_t *pevents = NULL;
        
        if (ctx->profiling && !ctx->profiling_paused) {
            pevents = cuda_get_events(&ctx->cuda,
                                      &ctx->mainzisegmap_200253_runs,
                                      &ctx->mainzisegmap_200253_total_runtime);
            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
        }
        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_200253, grid[0],
                                              grid[1], grid[2],
                                              segmap_group_sizze_200247, 1, 1,
                                              0, NULL, kernel_args_230098,
                                              NULL));
        if (pevents != NULL)
            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
        if (ctx->debugging) {
            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
            time_end_230100 = get_wall_time();
            fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                    "main.segmap_200253", time_end_230100 - time_start_230099);
        }
    }
    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_225478;
    
    max_num_groups_225478 = *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_225478))));
    
    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_225670;
    
    local_memory_capacity_225670 = ctx->cuda.max_shared_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_225670)) &&
        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");
        
        unsigned int shared_sizze_230106 = bytes_222268;
        unsigned int shared_sizze_230108 = bytes_222268;
        CUdeviceptr kernel_arg_230110 = mem_222263.mem;
        CUdeviceptr kernel_arg_230111 = mem_222279.mem;
        CUdeviceptr kernel_arg_230112 = mem_222283.mem;
        unsigned int shared_offset_230107 = 0;
        unsigned int shared_offset_230109 = 0 + (shared_sizze_230106 + (8 -
                                                                        shared_sizze_230106 %
                                                                        8) % 8);
        
        if ((((((1 && m_196691 != 0) && 1 != 0) && 1 != 0) &&
              computed_group_sizze_200270 != 0) && 1 != 0) && 1 != 0) {
            int perm[3] = {0, 1, 2};
            
            if (1 >= 1 << 16) {
                perm[1] = perm[0];
                perm[0] = 1;
            }
            if (1 >= 1 << 16) {
                perm[2] = perm[0];
                perm[0] = 2;
            }
            
            size_t grid[3];
            
            grid[perm[0]] = m_196691;
            grid[perm[1]] = 1;
            grid[perm[2]] = 1;
            
            void *kernel_args_230103[] = {&ctx->global_failure,
                                          &shared_offset_230107,
                                          &shared_offset_230109, &m_196691,
                                          &n_p_196694, &defunc_0_f_res_196740,
                                          &i_196831,
                                          &computed_group_sizze_200270,
                                          &kernel_arg_230110,
                                          &kernel_arg_230111,
                                          &kernel_arg_230112};
            int64_t time_start_230104 = 0, time_end_230105 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                        "main.segmap_intragroup_200331", (long) m_196691,
                        (long) 1, (long) 1, (long) computed_group_sizze_200270,
                        (long) 1, (long) 1, (int) (0 + (shared_sizze_230106 +
                                                        (8 -
                                                         shared_sizze_230106 %
                                                         8) % 8) +
                                                   (shared_sizze_230108 + (8 -
                                                                           shared_sizze_230108 %
                                                                           8) %
                                                    8)));
                time_start_230104 = get_wall_time();
            }
            
            cudaEvent_t *pevents = NULL;
            
            if (ctx->profiling && !ctx->profiling_paused) {
                pevents = cuda_get_events(&ctx->cuda,
                                          &ctx->mainzisegmap_intragroup_200331_runs,
                                          &ctx->mainzisegmap_intragroup_200331_total_runtime);
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
            }
            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_intragroup_200331,
                                                  grid[0], grid[1], grid[2],
                                                  computed_group_sizze_200270,
                                                  1, 1, 0 +
                                                  (shared_sizze_230106 + (8 -
                                                                          shared_sizze_230106 %
                                                                          8) %
                                                   8) + (shared_sizze_230108 +
                                                         (8 -
                                                          shared_sizze_230108 %
                                                          8) % 8), NULL,
                                                  kernel_args_230103, NULL));
            if (pevents != NULL)
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
            if (ctx->debugging) {
                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                time_end_230105 = get_wall_time();
                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                        "main.segmap_intragroup_200331", time_end_230105 -
                        time_start_230104);
            }
        }
        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_225669;
        
        local_memory_capacity_225669 = ctx->cuda.max_shared_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_225669)) &&
            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");
            
            unsigned int shared_sizze_230116 = bytes_222287;
            unsigned int shared_sizze_230118 = bytes_222287;
            CUdeviceptr kernel_arg_230120 = mem_222263.mem;
            CUdeviceptr kernel_arg_230121 = mem_222297.mem;
            CUdeviceptr kernel_arg_230122 = mem_222301.mem;
            unsigned int shared_offset_230117 = 0;
            unsigned int shared_offset_230119 = 0 + (shared_sizze_230116 + (8 -
                                                                            shared_sizze_230116 %
                                                                            8) %
                                                     8);
            
            if ((((((1 && binop_x_222259 != 0) && 1 != 0) && 1 != 0) &&
                  defunc_0_f_res_196740 != 0) && 1 != 0) && 1 != 0) {
                int perm[3] = {0, 1, 2};
                
                if (1 >= 1 << 16) {
                    perm[1] = perm[0];
                    perm[0] = 1;
                }
                if (1 >= 1 << 16) {
                    perm[2] = perm[0];
                    perm[0] = 2;
                }
                
                size_t grid[3];
                
                grid[perm[0]] = binop_x_222259;
                grid[perm[1]] = 1;
                grid[perm[2]] = 1;
                
                void *kernel_args_230113[] = {&ctx->global_failure,
                                              &shared_offset_230117,
                                              &shared_offset_230119, &m_196691,
                                              &n_p_196694,
                                              &defunc_0_f_res_196740, &i_196831,
                                              &kernel_arg_230120,
                                              &kernel_arg_230121,
                                              &kernel_arg_230122};
                int64_t time_start_230114 = 0, time_end_230115 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                            "main.segmap_intragroup_200607",
                            (long) binop_x_222259, (long) 1, (long) 1,
                            (long) defunc_0_f_res_196740, (long) 1, (long) 1,
                            (int) (0 + (shared_sizze_230116 + (8 -
                                                               shared_sizze_230116 %
                                                               8) % 8) +
                                   (shared_sizze_230118 + (8 -
                                                           shared_sizze_230118 %
                                                           8) % 8)));
                    time_start_230114 = get_wall_time();
                }
                
                cudaEvent_t *pevents = NULL;
                
                if (ctx->profiling && !ctx->profiling_paused) {
                    pevents = cuda_get_events(&ctx->cuda,
                                              &ctx->mainzisegmap_intragroup_200607_runs,
                                              &ctx->mainzisegmap_intragroup_200607_total_runtime);
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                }
                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_intragroup_200607,
                                                      grid[0], grid[1], grid[2],
                                                      defunc_0_f_res_196740, 1,
                                                      1, 0 +
                                                      (shared_sizze_230116 +
                                                       (8 -
                                                        shared_sizze_230116 %
                                                        8) % 8) +
                                                      (shared_sizze_230118 +
                                                       (8 -
                                                        shared_sizze_230118 %
                                                        8) % 8), NULL,
                                                      kernel_args_230113,
                                                      NULL));
                if (pevents != NULL)
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                if (ctx->debugging) {
                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                    time_end_230115 = get_wall_time();
                    fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                            "main.segmap_intragroup_200607", time_end_230115 -
                            time_start_230114);
                }
            }
            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");
                if (ctx->debugging)
                    fprintf(ctx->log, "%s: %llu%c",
                            "SegScan: number of elements processed sequentially per thread is m:",
                            (long long) 11, '\n');
                if (ctx->debugging)
                    fprintf(ctx->log, "%s: %llu%c",
                            "SegScan: memory constraints is: ", (long long) 11,
                            '\n');
                if (ctx->debugging)
                    fprintf(ctx->log, "%s: %llu%c",
                            "SegScan: register constraints is: ",
                            (long long) 15, '\n');
                if (ctx->debugging)
                    fprintf(ctx->log, "%s: %llu%c", "SegScan: sumT' is: ",
                            (long long) 2, '\n');
                
                int64_t numThreads_225538 = sdiv_up64(m_196691 * n_p_196694 *
                                                      defunc_0_f_res_196740,
                                                      segscan_group_sizze_200635 *
                                                      (int64_t) 11) *
                        segscan_group_sizze_200635;
                int64_t numGroups_225539 = sdiv_up64(m_196691 * n_p_196694 *
                                                     defunc_0_f_res_196740,
                                                     segscan_group_sizze_200635 *
                                                     (int64_t) 11);
                struct memblock_device mainziid_counter_mem_225540 =
                                       ctx->mainziid_counter_mem_225540;
                struct memblock_device status_flags_mem_225542;
                
                status_flags_mem_225542.references = NULL;
                if (memblock_alloc_device(ctx, &status_flags_mem_225542,
                                          numGroups_225539,
                                          "status_flags_mem_225542")) {
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device aggregates_mem_225544;
                
                aggregates_mem_225544.references = NULL;
                if (memblock_alloc_device(ctx, &aggregates_mem_225544,
                                          (int64_t) 8 * numGroups_225539,
                                          "aggregates_mem_225544")) {
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device incprefixes_mem_225546;
                
                incprefixes_mem_225546.references = NULL;
                if (memblock_alloc_device(ctx, &incprefixes_mem_225546,
                                          (int64_t) 8 * numGroups_225539,
                                          "incprefixes_mem_225546")) {
                    err = 1;
                    goto cleanup;
                }
                if (futrts_builtinzhreplicate_i8(ctx, status_flags_mem_225542,
                                                 numGroups_225539,
                                                 (int8_t) 0) != 0) {
                    if (memblock_unref_device(ctx, &incprefixes_mem_225546,
                                              "incprefixes_mem_225546") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &aggregates_mem_225544,
                                              "aggregates_mem_225544") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &status_flags_mem_225542,
                                              "status_flags_mem_225542") != 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;
                }
                
                unsigned int shared_sizze_230127 = smax64(smax64((int64_t) 288,
                                                                 (int64_t) 8 *
                                                                 segscan_group_sizze_200635),
                                                          (int64_t) 11 *
                                                          segscan_group_sizze_200635 *
                                                          (int64_t) 8);
                CUdeviceptr kernel_arg_230129 = mem_222263.mem;
                CUdeviceptr kernel_arg_230130 = mem_222307.mem;
                CUdeviceptr kernel_arg_230131 = mainziid_counter_mem_225540.mem;
                CUdeviceptr kernel_arg_230132 = status_flags_mem_225542.mem;
                CUdeviceptr kernel_arg_230133 = aggregates_mem_225544.mem;
                CUdeviceptr kernel_arg_230134 = incprefixes_mem_225546.mem;
                unsigned int shared_offset_230128 = 0;
                
                if ((((((1 && sdiv_up64(m_196691 * n_p_196694 *
                                        defunc_0_f_res_196740,
                                        segscan_group_sizze_200635 *
                                        (int64_t) 11) != 0) && 1 != 0) && 1 !=
                       0) && segscan_group_sizze_200635 != 0) && 1 != 0) && 1 !=
                    0) {
                    int perm[3] = {0, 1, 2};
                    
                    if (1 >= 1 << 16) {
                        perm[1] = perm[0];
                        perm[0] = 1;
                    }
                    if (1 >= 1 << 16) {
                        perm[2] = perm[0];
                        perm[0] = 2;
                    }
                    
                    size_t grid[3];
                    
                    grid[perm[0]] = sdiv_up64(m_196691 * n_p_196694 *
                                              defunc_0_f_res_196740,
                                              segscan_group_sizze_200635 *
                                              (int64_t) 11);
                    grid[perm[1]] = 1;
                    grid[perm[2]] = 1;
                    
                    void *kernel_args_230124[] = {&ctx->global_failure,
                                                  &shared_offset_230128,
                                                  &m_196691, &n_p_196694,
                                                  &defunc_0_f_res_196740,
                                                  &kernel_arg_230129,
                                                  &kernel_arg_230130,
                                                  &kernel_arg_230131,
                                                  &kernel_arg_230132,
                                                  &kernel_arg_230133,
                                                  &kernel_arg_230134};
                    int64_t time_start_230125 = 0, time_end_230126 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                "main.segscan_200642",
                                (long) sdiv_up64(m_196691 * n_p_196694 *
                                                 defunc_0_f_res_196740,
                                                 segscan_group_sizze_200635 *
                                                 (int64_t) 11), (long) 1,
                                (long) 1, (long) segscan_group_sizze_200635,
                                (long) 1, (long) 1, (int) (0 +
                                                           (shared_sizze_230127 +
                                                            (8 -
                                                             shared_sizze_230127 %
                                                             8) % 8)));
                        time_start_230125 = get_wall_time();
                    }
                    
                    cudaEvent_t *pevents = NULL;
                    
                    if (ctx->profiling && !ctx->profiling_paused) {
                        pevents = cuda_get_events(&ctx->cuda,
                                                  &ctx->mainzisegscan_200642_runs,
                                                  &ctx->mainzisegscan_200642_total_runtime);
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                    }
                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegscan_200642,
                                                          grid[0], grid[1],
                                                          grid[2],
                                                          segscan_group_sizze_200635,
                                                          1, 1, 0 +
                                                          (shared_sizze_230127 +
                                                           (8 -
                                                            shared_sizze_230127 %
                                                            8) % 8), NULL,
                                                          kernel_args_230124,
                                                          NULL));
                    if (pevents != NULL)
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                    if (ctx->debugging) {
                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                        time_end_230126 = get_wall_time();
                        fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                "main.segscan_200642", time_end_230126 -
                                time_start_230125);
                    }
                }
                if (memblock_unref_device(ctx, &incprefixes_mem_225546,
                                          "incprefixes_mem_225546") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &aggregates_mem_225544,
                                          "aggregates_mem_225544") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &status_flags_mem_225542,
                                          "status_flags_mem_225542") != 0)
                    return 1;
            }
            
            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");
            
            CUdeviceptr kernel_arg_230138 = mem_222263.mem;
            CUdeviceptr kernel_arg_230139 = mem_222307.mem;
            CUdeviceptr kernel_arg_230140 = mem_222312.mem;
            
            if ((((((1 && segmap_usable_groups_200683 != 0) && 1 != 0) && 1 !=
                   0) && segmap_group_sizze_200682 != 0) && 1 != 0) && 1 != 0) {
                int perm[3] = {0, 1, 2};
                
                if (1 >= 1 << 16) {
                    perm[1] = perm[0];
                    perm[0] = 1;
                }
                if (1 >= 1 << 16) {
                    perm[2] = perm[0];
                    perm[0] = 2;
                }
                
                size_t grid[3];
                
                grid[perm[0]] = segmap_usable_groups_200683;
                grid[perm[1]] = 1;
                grid[perm[2]] = 1;
                
                void *kernel_args_230135[] = {&ctx->global_failure, &m_196691,
                                              &n_p_196694,
                                              &defunc_0_f_res_196740,
                                              &kernel_arg_230138,
                                              &kernel_arg_230139,
                                              &kernel_arg_230140};
                int64_t time_start_230136 = 0, time_end_230137 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                            "main.segmap_200688",
                            (long) segmap_usable_groups_200683, (long) 1,
                            (long) 1, (long) segmap_group_sizze_200682,
                            (long) 1, (long) 1, (int) 0);
                    time_start_230136 = get_wall_time();
                }
                
                cudaEvent_t *pevents = NULL;
                
                if (ctx->profiling && !ctx->profiling_paused) {
                    pevents = cuda_get_events(&ctx->cuda,
                                              &ctx->mainzisegmap_200688_runs,
                                              &ctx->mainzisegmap_200688_total_runtime);
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                }
                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_200688,
                                                      grid[0], grid[1], grid[2],
                                                      segmap_group_sizze_200682,
                                                      1, 1, 0, NULL,
                                                      kernel_args_230135,
                                                      NULL));
                if (pevents != NULL)
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                if (ctx->debugging) {
                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                    time_end_230137 = get_wall_time();
                    fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                            "main.segmap_200688", time_end_230137 -
                            time_start_230136);
                }
            }
            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_225660;
            
            group_sizze_225660 = *ctx->tuning_params.mainzigroup_sizze_225660;
            
            int64_t num_groups_225661 = sdiv_up64(m_196691 * n_p_196694,
                                                  group_sizze_225660);
            CUdeviceptr kernel_arg_230144 = mem_222307.mem;
            CUdeviceptr kernel_arg_230145 = mem_222317.mem;
            
            if ((((((1 && num_groups_225661 != 0) && 1 != 0) && 1 != 0) &&
                  group_sizze_225660 != 0) && 1 != 0) && 1 != 0) {
                int perm[3] = {0, 1, 2};
                
                if (1 >= 1 << 16) {
                    perm[1] = perm[0];
                    perm[0] = 1;
                }
                if (1 >= 1 << 16) {
                    perm[2] = perm[0];
                    perm[0] = 2;
                }
                
                size_t grid[3];
                
                grid[perm[0]] = num_groups_225661;
                grid[perm[1]] = 1;
                grid[perm[2]] = 1;
                
                void *kernel_args_230141[] = {&m_196691, &n_p_196694,
                                              &defunc_0_f_res_196740, &i_196831,
                                              &kernel_arg_230144,
                                              &kernel_arg_230145};
                int64_t time_start_230142 = 0, time_end_230143 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                            "main.copy_225657", (long) num_groups_225661,
                            (long) 1, (long) 1, (long) group_sizze_225660,
                            (long) 1, (long) 1, (int) 0);
                    time_start_230142 = get_wall_time();
                }
                
                cudaEvent_t *pevents = NULL;
                
                if (ctx->profiling && !ctx->profiling_paused) {
                    pevents = cuda_get_events(&ctx->cuda,
                                              &ctx->mainzicopy_225657_runs,
                                              &ctx->mainzicopy_225657_total_runtime);
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                }
                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzicopy_225657,
                                                      grid[0], grid[1], grid[2],
                                                      group_sizze_225660, 1, 1,
                                                      0, NULL,
                                                      kernel_args_230141,
                                                      NULL));
                if (pevents != NULL)
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                if (ctx->debugging) {
                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                    time_end_230143 = get_wall_time();
                    fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                            "main.copy_225657", time_end_230143 -
                            time_start_230142);
                }
            }
            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_225772;
    
    local_memory_capacity_225772 = ctx->cuda.max_shared_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_225772)) &&
        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");
        
        unsigned int shared_sizze_230149 = bytes_222268;
        unsigned int shared_sizze_230151 = bytes_222331;
        unsigned int shared_sizze_230153 = bytes_222331;
        unsigned int shared_sizze_230155 = bytes_222331;
        unsigned int shared_sizze_230157 = bytes_222340;
        unsigned int shared_sizze_230159 = bytes_222345;
        unsigned int shared_sizze_230161 = bytes_222349;
        CUdeviceptr kernel_arg_230163 = ext_mem_222321.mem;
        CUdeviceptr kernel_arg_230164 = ext_mem_222322.mem;
        CUdeviceptr kernel_arg_230165 = mem_222355.mem;
        CUdeviceptr kernel_arg_230166 = mem_222360.mem;
        unsigned int shared_offset_230150 = 0;
        unsigned int shared_offset_230152 = 0 + (shared_sizze_230149 + (8 -
                                                                        shared_sizze_230149 %
                                                                        8) % 8);
        unsigned int shared_offset_230154 = 0 + (shared_sizze_230149 + (8 -
                                                                        shared_sizze_230149 %
                                                                        8) %
                                                 8) + (shared_sizze_230151 +
                                                       (8 -
                                                        shared_sizze_230151 %
                                                        8) % 8);
        unsigned int shared_offset_230156 = 0 + (shared_sizze_230149 + (8 -
                                                                        shared_sizze_230149 %
                                                                        8) %
                                                 8) + (shared_sizze_230151 +
                                                       (8 -
                                                        shared_sizze_230151 %
                                                        8) % 8) +
                     (shared_sizze_230153 + (8 - shared_sizze_230153 % 8) % 8);
        unsigned int shared_offset_230158 = 0 + (shared_sizze_230149 + (8 -
                                                                        shared_sizze_230149 %
                                                                        8) %
                                                 8) + (shared_sizze_230151 +
                                                       (8 -
                                                        shared_sizze_230151 %
                                                        8) % 8) +
                     (shared_sizze_230153 + (8 - shared_sizze_230153 % 8) % 8) +
                     (shared_sizze_230155 + (8 - shared_sizze_230155 % 8) % 8);
        unsigned int shared_offset_230160 = 0 + (shared_sizze_230149 + (8 -
                                                                        shared_sizze_230149 %
                                                                        8) %
                                                 8) + (shared_sizze_230151 +
                                                       (8 -
                                                        shared_sizze_230151 %
                                                        8) % 8) +
                     (shared_sizze_230153 + (8 - shared_sizze_230153 % 8) % 8) +
                     (shared_sizze_230155 + (8 - shared_sizze_230155 % 8) % 8) +
                     (shared_sizze_230157 + (8 - shared_sizze_230157 % 8) % 8);
        unsigned int shared_offset_230162 = 0 + (shared_sizze_230149 + (8 -
                                                                        shared_sizze_230149 %
                                                                        8) %
                                                 8) + (shared_sizze_230151 +
                                                       (8 -
                                                        shared_sizze_230151 %
                                                        8) % 8) +
                     (shared_sizze_230153 + (8 - shared_sizze_230153 % 8) % 8) +
                     (shared_sizze_230155 + (8 - shared_sizze_230155 % 8) % 8) +
                     (shared_sizze_230157 + (8 - shared_sizze_230157 % 8) % 8) +
                     (shared_sizze_230159 + (8 - shared_sizze_230159 % 8) % 8);
        
        if ((((((1 && m_196691 != 0) && 1 != 0) && 1 != 0) &&
              computed_group_sizze_200702 != 0) && 1 != 0) && 1 != 0) {
            int perm[3] = {0, 1, 2};
            
            if (1 >= 1 << 16) {
                perm[1] = perm[0];
                perm[0] = 1;
            }
            if (1 >= 1 << 16) {
                perm[2] = perm[0];
                perm[0] = 2;
            }
            
            size_t grid[3];
            
            grid[perm[0]] = m_196691;
            grid[perm[1]] = 1;
            grid[perm[2]] = 1;
            
            void *kernel_args_230146[] = {&ctx->global_failure,
                                          &ctx->failure_is_an_option,
                                          &ctx->global_failure_args,
                                          &shared_offset_230150,
                                          &shared_offset_230152,
                                          &shared_offset_230154,
                                          &shared_offset_230156,
                                          &shared_offset_230158,
                                          &shared_offset_230160,
                                          &shared_offset_230162, &m_196691,
                                          &n_p_196694, &q_s_196695,
                                          &jump_s_196701,
                                          &defunc_0_f_res_196740,
                                          &pad_css_len_196741, &s_n_m_196745,
                                          &i_196831, &x_196832, &min_res_196862,
                                          &loop_cond_196867, &i64_res_196868,
                                          &computed_group_sizze_200702,
                                          &kernel_arg_230163,
                                          &kernel_arg_230164,
                                          &kernel_arg_230165,
                                          &kernel_arg_230166};
            int64_t time_start_230147 = 0, time_end_230148 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                        "main.segmap_intragroup_200860", (long) m_196691,
                        (long) 1, (long) 1, (long) computed_group_sizze_200702,
                        (long) 1, (long) 1, (int) (0 + (shared_sizze_230149 +
                                                        (8 -
                                                         shared_sizze_230149 %
                                                         8) % 8) +
                                                   (shared_sizze_230151 + (8 -
                                                                           shared_sizze_230151 %
                                                                           8) %
                                                    8) + (shared_sizze_230153 +
                                                          (8 -
                                                           shared_sizze_230153 %
                                                           8) % 8) +
                                                   (shared_sizze_230155 + (8 -
                                                                           shared_sizze_230155 %
                                                                           8) %
                                                    8) + (shared_sizze_230157 +
                                                          (8 -
                                                           shared_sizze_230157 %
                                                           8) % 8) +
                                                   (shared_sizze_230159 + (8 -
                                                                           shared_sizze_230159 %
                                                                           8) %
                                                    8) + (shared_sizze_230161 +
                                                          (8 -
                                                           shared_sizze_230161 %
                                                           8) % 8)));
                time_start_230147 = get_wall_time();
            }
            
            cudaEvent_t *pevents = NULL;
            
            if (ctx->profiling && !ctx->profiling_paused) {
                pevents = cuda_get_events(&ctx->cuda,
                                          &ctx->mainzisegmap_intragroup_200860_runs,
                                          &ctx->mainzisegmap_intragroup_200860_total_runtime);
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
            }
            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_intragroup_200860,
                                                  grid[0], grid[1], grid[2],
                                                  computed_group_sizze_200702,
                                                  1, 1, 0 +
                                                  (shared_sizze_230149 + (8 -
                                                                          shared_sizze_230149 %
                                                                          8) %
                                                   8) + (shared_sizze_230151 +
                                                         (8 -
                                                          shared_sizze_230151 %
                                                          8) % 8) +
                                                  (shared_sizze_230153 + (8 -
                                                                          shared_sizze_230153 %
                                                                          8) %
                                                   8) + (shared_sizze_230155 +
                                                         (8 -
                                                          shared_sizze_230155 %
                                                          8) % 8) +
                                                  (shared_sizze_230157 + (8 -
                                                                          shared_sizze_230157 %
                                                                          8) %
                                                   8) + (shared_sizze_230159 +
                                                         (8 -
                                                          shared_sizze_230159 %
                                                          8) % 8) +
                                                  (shared_sizze_230161 + (8 -
                                                                          shared_sizze_230161 %
                                                                          8) %
                                                   8), NULL, kernel_args_230146,
                                                  NULL));
            if (pevents != NULL)
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
            if (ctx->debugging) {
                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                time_end_230148 = get_wall_time();
                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                        "main.segmap_intragroup_200860", time_end_230148 -
                        time_start_230147);
            }
        }
        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_225771;
        
        local_memory_capacity_225771 = ctx->cuda.max_shared_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_225771)) &&
            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");
            
            unsigned int shared_sizze_230170 = bytes_222287;
            unsigned int shared_sizze_230172 = bytes_222368;
            unsigned int shared_sizze_230174 = bytes_222371;
            CUdeviceptr kernel_arg_230176 = ext_mem_222321.mem;
            CUdeviceptr kernel_arg_230177 = ext_mem_222322.mem;
            CUdeviceptr kernel_arg_230178 = mem_222377.mem;
            CUdeviceptr kernel_arg_230179 = mem_222382.mem;
            unsigned int shared_offset_230171 = 0;
            unsigned int shared_offset_230173 = 0 + (shared_sizze_230170 + (8 -
                                                                            shared_sizze_230170 %
                                                                            8) %
                                                     8);
            unsigned int shared_offset_230175 = 0 + (shared_sizze_230170 + (8 -
                                                                            shared_sizze_230170 %
                                                                            8) %
                                                     8) + (shared_sizze_230172 +
                                                           (8 -
                                                            shared_sizze_230172 %
                                                            8) % 8);
            
            if ((((((1 && binop_x_222259 != 0) && 1 != 0) && 1 != 0) &&
                  computed_group_sizze_201750 != 0) && 1 != 0) && 1 != 0) {
                int perm[3] = {0, 1, 2};
                
                if (1 >= 1 << 16) {
                    perm[1] = perm[0];
                    perm[0] = 1;
                }
                if (1 >= 1 << 16) {
                    perm[2] = perm[0];
                    perm[0] = 2;
                }
                
                size_t grid[3];
                
                grid[perm[0]] = binop_x_222259;
                grid[perm[1]] = 1;
                grid[perm[2]] = 1;
                
                void *kernel_args_230167[] = {&ctx->global_failure,
                                              &ctx->failure_is_an_option,
                                              &ctx->global_failure_args,
                                              &shared_offset_230171,
                                              &shared_offset_230173,
                                              &shared_offset_230175, &m_196691,
                                              &n_p_196694, &q_s_196695,
                                              &jump_s_196701,
                                              &defunc_0_f_res_196740,
                                              &pad_css_len_196741,
                                              &s_n_m_196745, &i_196831,
                                              &x_196832, &min_res_196862,
                                              &loop_cond_196867,
                                              &i64_res_196868,
                                              &computed_group_sizze_201750,
                                              &kernel_arg_230176,
                                              &kernel_arg_230177,
                                              &kernel_arg_230178,
                                              &kernel_arg_230179};
                int64_t time_start_230168 = 0, time_end_230169 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                            "main.segmap_intragroup_201764",
                            (long) binop_x_222259, (long) 1, (long) 1,
                            (long) computed_group_sizze_201750, (long) 1,
                            (long) 1, (int) (0 + (shared_sizze_230170 + (8 -
                                                                         shared_sizze_230170 %
                                                                         8) %
                                                  8) + (shared_sizze_230172 +
                                                        (8 -
                                                         shared_sizze_230172 %
                                                         8) % 8) +
                                             (shared_sizze_230174 + (8 -
                                                                     shared_sizze_230174 %
                                                                     8) % 8)));
                    time_start_230168 = get_wall_time();
                }
                
                cudaEvent_t *pevents = NULL;
                
                if (ctx->profiling && !ctx->profiling_paused) {
                    pevents = cuda_get_events(&ctx->cuda,
                                              &ctx->mainzisegmap_intragroup_201764_runs,
                                              &ctx->mainzisegmap_intragroup_201764_total_runtime);
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                }
                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_intragroup_201764,
                                                      grid[0], grid[1], grid[2],
                                                      computed_group_sizze_201750,
                                                      1, 1, 0 +
                                                      (shared_sizze_230170 +
                                                       (8 -
                                                        shared_sizze_230170 %
                                                        8) % 8) +
                                                      (shared_sizze_230172 +
                                                       (8 -
                                                        shared_sizze_230172 %
                                                        8) % 8) +
                                                      (shared_sizze_230174 +
                                                       (8 -
                                                        shared_sizze_230174 %
                                                        8) % 8), NULL,
                                                      kernel_args_230167,
                                                      NULL));
                if (pevents != NULL)
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                if (ctx->debugging) {
                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                    time_end_230169 = get_wall_time();
                    fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                            "main.segmap_intragroup_201764", time_end_230169 -
                            time_start_230168);
                }
            }
            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");
            
            CUdeviceptr kernel_arg_230183 = ext_mem_222322.mem;
            CUdeviceptr kernel_arg_230184 = mem_222388.mem;
            
            if ((((((1 && segmap_usable_groups_201896 != 0) && 1 != 0) && 1 !=
                   0) && segmap_group_sizze_201895 != 0) && 1 != 0) && 1 != 0) {
                int perm[3] = {0, 1, 2};
                
                if (1 >= 1 << 16) {
                    perm[1] = perm[0];
                    perm[0] = 1;
                }
                if (1 >= 1 << 16) {
                    perm[2] = perm[0];
                    perm[0] = 2;
                }
                
                size_t grid[3];
                
                grid[perm[0]] = segmap_usable_groups_201896;
                grid[perm[1]] = 1;
                grid[perm[2]] = 1;
                
                void *kernel_args_230180[] = {&ctx->global_failure, &m_196691,
                                              &n_p_196694,
                                              &defunc_0_f_res_196740,
                                              &kernel_arg_230183,
                                              &kernel_arg_230184};
                int64_t time_start_230181 = 0, time_end_230182 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                            "main.segmap_201901",
                            (long) segmap_usable_groups_201896, (long) 1,
                            (long) 1, (long) segmap_group_sizze_201895,
                            (long) 1, (long) 1, (int) 0);
                    time_start_230181 = get_wall_time();
                }
                
                cudaEvent_t *pevents = NULL;
                
                if (ctx->profiling && !ctx->profiling_paused) {
                    pevents = cuda_get_events(&ctx->cuda,
                                              &ctx->mainzisegmap_201901_runs,
                                              &ctx->mainzisegmap_201901_total_runtime);
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                }
                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_201901,
                                                      grid[0], grid[1], grid[2],
                                                      segmap_group_sizze_201895,
                                                      1, 1, 0, NULL,
                                                      kernel_args_230180,
                                                      NULL));
                if (pevents != NULL)
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                if (ctx->debugging) {
                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                    time_end_230182 = get_wall_time();
                    fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                            "main.segmap_201901", time_end_230182 -
                            time_start_230181);
                }
            }
            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");
            
            CUdeviceptr kernel_arg_230188 = ext_mem_222321.mem;
            CUdeviceptr kernel_arg_230189 = mem_222393.mem;
            CUdeviceptr kernel_arg_230190 = mem_222397.mem;
            CUdeviceptr kernel_arg_230191 = mem_222401.mem;
            CUdeviceptr kernel_arg_230192 = mem_222405.mem;
            
            if ((((((1 && segmap_usable_groups_201908 != 0) && 1 != 0) && 1 !=
                   0) && segmap_group_sizze_201907 != 0) && 1 != 0) && 1 != 0) {
                int perm[3] = {0, 1, 2};
                
                if (1 >= 1 << 16) {
                    perm[1] = perm[0];
                    perm[0] = 1;
                }
                if (1 >= 1 << 16) {
                    perm[2] = perm[0];
                    perm[0] = 2;
                }
                
                size_t grid[3];
                
                grid[perm[0]] = segmap_usable_groups_201908;
                grid[perm[1]] = 1;
                grid[perm[2]] = 1;
                
                void *kernel_args_230185[] = {&ctx->global_failure, &m_196691,
                                              &n_p_196694, &q_s_196695,
                                              &min_res_196862, &i64_res_196868,
                                              &kernel_arg_230188,
                                              &kernel_arg_230189,
                                              &kernel_arg_230190,
                                              &kernel_arg_230191,
                                              &kernel_arg_230192};
                int64_t time_start_230186 = 0, time_end_230187 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                            "main.segmap_201915",
                            (long) segmap_usable_groups_201908, (long) 1,
                            (long) 1, (long) segmap_group_sizze_201907,
                            (long) 1, (long) 1, (int) 0);
                    time_start_230186 = get_wall_time();
                }
                
                cudaEvent_t *pevents = NULL;
                
                if (ctx->profiling && !ctx->profiling_paused) {
                    pevents = cuda_get_events(&ctx->cuda,
                                              &ctx->mainzisegmap_201915_runs,
                                              &ctx->mainzisegmap_201915_total_runtime);
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                }
                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_201915,
                                                      grid[0], grid[1], grid[2],
                                                      segmap_group_sizze_201907,
                                                      1, 1, 0, NULL,
                                                      kernel_args_230185,
                                                      NULL));
                if (pevents != NULL)
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                if (ctx->debugging) {
                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                    time_end_230187 = get_wall_time();
                    fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                            "main.segmap_201915", time_end_230187 -
                            time_start_230186);
                }
            }
            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");
            
            CUdeviceptr kernel_arg_230196 = mem_222388.mem;
            CUdeviceptr kernel_arg_230197 = mem_222393.mem;
            CUdeviceptr kernel_arg_230198 = mem_222397.mem;
            CUdeviceptr kernel_arg_230199 = mem_222401.mem;
            CUdeviceptr kernel_arg_230200 = mem_222405.mem;
            CUdeviceptr kernel_arg_230201 = mem_222411.mem;
            CUdeviceptr kernel_arg_230202 = mem_222416.mem;
            
            if ((((((1 && segmap_usable_groups_201933 != 0) && 1 != 0) && 1 !=
                   0) && segmap_group_sizze_201932 != 0) && 1 != 0) && 1 != 0) {
                int perm[3] = {0, 1, 2};
                
                if (1 >= 1 << 16) {
                    perm[1] = perm[0];
                    perm[0] = 1;
                }
                if (1 >= 1 << 16) {
                    perm[2] = perm[0];
                    perm[0] = 2;
                }
                
                size_t grid[3];
                
                grid[perm[0]] = segmap_usable_groups_201933;
                grid[perm[1]] = 1;
                grid[perm[2]] = 1;
                
                void *kernel_args_230193[] = {&ctx->global_failure,
                                              &ctx->failure_is_an_option,
                                              &ctx->global_failure_args,
                                              &m_196691, &n_p_196694,
                                              &jump_s_196701,
                                              &defunc_0_f_res_196740,
                                              &pad_css_len_196741,
                                              &s_n_m_196745, &i_196831,
                                              &x_196832, &min_res_196862,
                                              &loop_cond_196867,
                                              &kernel_arg_230196,
                                              &kernel_arg_230197,
                                              &kernel_arg_230198,
                                              &kernel_arg_230199,
                                              &kernel_arg_230200,
                                              &kernel_arg_230201,
                                              &kernel_arg_230202};
                int64_t time_start_230194 = 0, time_end_230195 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                            "main.segmap_201939",
                            (long) segmap_usable_groups_201933, (long) 1,
                            (long) 1, (long) segmap_group_sizze_201932,
                            (long) 1, (long) 1, (int) 0);
                    time_start_230194 = get_wall_time();
                }
                
                cudaEvent_t *pevents = NULL;
                
                if (ctx->profiling && !ctx->profiling_paused) {
                    pevents = cuda_get_events(&ctx->cuda,
                                              &ctx->mainzisegmap_201939_runs,
                                              &ctx->mainzisegmap_201939_total_runtime);
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                }
                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_201939,
                                                      grid[0], grid[1], grid[2],
                                                      segmap_group_sizze_201932,
                                                      1, 1, 0, NULL,
                                                      kernel_args_230193,
                                                      NULL));
                if (pevents != NULL)
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                if (ctx->debugging) {
                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                    time_end_230195 = get_wall_time();
                    fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                            "main.segmap_201939", time_end_230195 -
                            time_start_230194);
                }
            }
            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_225832;
    
    local_memory_capacity_225832 = ctx->cuda.max_shared_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_225832)) &&
        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");
        
        unsigned int shared_sizze_230206 = bytes_222229;
        unsigned int shared_sizze_230208 = bytes_222428;
        unsigned int shared_sizze_230210 = bytes_222431;
        CUdeviceptr kernel_arg_230212 = ext_mem_222256.mem;
        CUdeviceptr kernel_arg_230213 = ext_mem_222257.mem;
        CUdeviceptr kernel_arg_230214 = mem_222436.mem;
        CUdeviceptr kernel_arg_230215 = mem_222440.mem;
        unsigned int shared_offset_230207 = 0;
        unsigned int shared_offset_230209 = 0 + (shared_sizze_230206 + (8 -
                                                                        shared_sizze_230206 %
                                                                        8) % 8);
        unsigned int shared_offset_230211 = 0 + (shared_sizze_230206 + (8 -
                                                                        shared_sizze_230206 %
                                                                        8) %
                                                 8) + (shared_sizze_230208 +
                                                       (8 -
                                                        shared_sizze_230208 %
                                                        8) % 8);
        
        if ((((((1 && m_196691 != 0) && 1 != 0) && 1 != 0) &&
              computed_group_sizze_202056 != 0) && 1 != 0) && 1 != 0) {
            int perm[3] = {0, 1, 2};
            
            if (1 >= 1 << 16) {
                perm[1] = perm[0];
                perm[0] = 1;
            }
            if (1 >= 1 << 16) {
                perm[2] = perm[0];
                perm[0] = 2;
            }
            
            size_t grid[3];
            
            grid[perm[0]] = m_196691;
            grid[perm[1]] = 1;
            grid[perm[2]] = 1;
            
            void *kernel_args_230203[] = {&ctx->global_failure,
                                          &ctx->failure_is_an_option,
                                          &ctx->global_failure_args,
                                          &shared_offset_230207,
                                          &shared_offset_230209,
                                          &shared_offset_230211, &m_196691,
                                          &n_196692, &q_l_196697,
                                          &jump_l_196703, &l_n_m_196752,
                                          &i_196779, &x_196780, &min_res_196994,
                                          &loop_cond_196999, &i64_res_197000,
                                          &computed_group_sizze_202056,
                                          &kernel_arg_230212,
                                          &kernel_arg_230213,
                                          &kernel_arg_230214,
                                          &kernel_arg_230215};
            int64_t time_start_230204 = 0, time_end_230205 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                        "main.segmap_intragroup_202165", (long) m_196691,
                        (long) 1, (long) 1, (long) computed_group_sizze_202056,
                        (long) 1, (long) 1, (int) (0 + (shared_sizze_230206 +
                                                        (8 -
                                                         shared_sizze_230206 %
                                                         8) % 8) +
                                                   (shared_sizze_230208 + (8 -
                                                                           shared_sizze_230208 %
                                                                           8) %
                                                    8) + (shared_sizze_230210 +
                                                          (8 -
                                                           shared_sizze_230210 %
                                                           8) % 8)));
                time_start_230204 = get_wall_time();
            }
            
            cudaEvent_t *pevents = NULL;
            
            if (ctx->profiling && !ctx->profiling_paused) {
                pevents = cuda_get_events(&ctx->cuda,
                                          &ctx->mainzisegmap_intragroup_202165_runs,
                                          &ctx->mainzisegmap_intragroup_202165_total_runtime);
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
            }
            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_intragroup_202165,
                                                  grid[0], grid[1], grid[2],
                                                  computed_group_sizze_202056,
                                                  1, 1, 0 +
                                                  (shared_sizze_230206 + (8 -
                                                                          shared_sizze_230206 %
                                                                          8) %
                                                   8) + (shared_sizze_230208 +
                                                         (8 -
                                                          shared_sizze_230208 %
                                                          8) % 8) +
                                                  (shared_sizze_230210 + (8 -
                                                                          shared_sizze_230210 %
                                                                          8) %
                                                   8), NULL, kernel_args_230203,
                                                  NULL));
            if (pevents != NULL)
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
            if (ctx->debugging) {
                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                time_end_230205 = get_wall_time();
                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                        "main.segmap_intragroup_202165", time_end_230205 -
                        time_start_230204);
            }
        }
        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");
        
        CUdeviceptr kernel_arg_230219 = ext_mem_222257.mem;
        CUdeviceptr kernel_arg_230220 = mem_222445.mem;
        
        if ((((((1 && segmap_usable_groups_202545 != 0) && 1 != 0) && 1 != 0) &&
              segmap_group_sizze_202544 != 0) && 1 != 0) && 1 != 0) {
            int perm[3] = {0, 1, 2};
            
            if (1 >= 1 << 16) {
                perm[1] = perm[0];
                perm[0] = 1;
            }
            if (1 >= 1 << 16) {
                perm[2] = perm[0];
                perm[0] = 2;
            }
            
            size_t grid[3];
            
            grid[perm[0]] = segmap_usable_groups_202545;
            grid[perm[1]] = 1;
            grid[perm[2]] = 1;
            
            void *kernel_args_230216[] = {&ctx->global_failure, &m_196691,
                                          &n_196692, &kernel_arg_230219,
                                          &kernel_arg_230220};
            int64_t time_start_230217 = 0, time_end_230218 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                        "main.segmap_202549",
                        (long) segmap_usable_groups_202545, (long) 1, (long) 1,
                        (long) segmap_group_sizze_202544, (long) 1, (long) 1,
                        (int) 0);
                time_start_230217 = get_wall_time();
            }
            
            cudaEvent_t *pevents = NULL;
            
            if (ctx->profiling && !ctx->profiling_paused) {
                pevents = cuda_get_events(&ctx->cuda,
                                          &ctx->mainzisegmap_202549_runs,
                                          &ctx->mainzisegmap_202549_total_runtime);
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
            }
            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_202549,
                                                  grid[0], grid[1], grid[2],
                                                  segmap_group_sizze_202544, 1,
                                                  1, 0, NULL,
                                                  kernel_args_230216, NULL));
            if (pevents != NULL)
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
            if (ctx->debugging) {
                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                time_end_230218 = get_wall_time();
                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                        "main.segmap_202549", time_end_230218 -
                        time_start_230217);
            }
        }
        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");
        
        CUdeviceptr kernel_arg_230224 = ext_mem_222256.mem;
        CUdeviceptr kernel_arg_230225 = mem_222449.mem;
        CUdeviceptr kernel_arg_230226 = mem_222452.mem;
        CUdeviceptr kernel_arg_230227 = mem_222455.mem;
        CUdeviceptr kernel_arg_230228 = mem_222458.mem;
        
        if ((((((1 && segmap_usable_groups_202555 != 0) && 1 != 0) && 1 != 0) &&
              segmap_group_sizze_202554 != 0) && 1 != 0) && 1 != 0) {
            int perm[3] = {0, 1, 2};
            
            if (1 >= 1 << 16) {
                perm[1] = perm[0];
                perm[0] = 1;
            }
            if (1 >= 1 << 16) {
                perm[2] = perm[0];
                perm[0] = 2;
            }
            
            size_t grid[3];
            
            grid[perm[0]] = segmap_usable_groups_202555;
            grid[perm[1]] = 1;
            grid[perm[2]] = 1;
            
            void *kernel_args_230221[] = {&ctx->global_failure, &m_196691,
                                          &q_l_196697, &min_res_196994,
                                          &i64_res_197000, &kernel_arg_230224,
                                          &kernel_arg_230225,
                                          &kernel_arg_230226,
                                          &kernel_arg_230227,
                                          &kernel_arg_230228};
            int64_t time_start_230222 = 0, time_end_230223 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                        "main.segmap_202561",
                        (long) segmap_usable_groups_202555, (long) 1, (long) 1,
                        (long) segmap_group_sizze_202554, (long) 1, (long) 1,
                        (int) 0);
                time_start_230222 = get_wall_time();
            }
            
            cudaEvent_t *pevents = NULL;
            
            if (ctx->profiling && !ctx->profiling_paused) {
                pevents = cuda_get_events(&ctx->cuda,
                                          &ctx->mainzisegmap_202561_runs,
                                          &ctx->mainzisegmap_202561_total_runtime);
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
            }
            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_202561,
                                                  grid[0], grid[1], grid[2],
                                                  segmap_group_sizze_202554, 1,
                                                  1, 0, NULL,
                                                  kernel_args_230221, NULL));
            if (pevents != NULL)
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
            if (ctx->debugging) {
                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                time_end_230223 = get_wall_time();
                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                        "main.segmap_202561", time_end_230223 -
                        time_start_230222);
            }
        }
        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");
        
        CUdeviceptr kernel_arg_230232 = ext_mem_222257.mem;
        CUdeviceptr kernel_arg_230233 = mem_222445.mem;
        CUdeviceptr kernel_arg_230234 = mem_222449.mem;
        CUdeviceptr kernel_arg_230235 = mem_222452.mem;
        CUdeviceptr kernel_arg_230236 = mem_222455.mem;
        CUdeviceptr kernel_arg_230237 = mem_222458.mem;
        CUdeviceptr kernel_arg_230238 = mem_222463.mem;
        CUdeviceptr kernel_arg_230239 = mem_222467.mem;
        
        if ((((((1 && segmap_usable_groups_202577 != 0) && 1 != 0) && 1 != 0) &&
              segmap_group_sizze_202576 != 0) && 1 != 0) && 1 != 0) {
            int perm[3] = {0, 1, 2};
            
            if (1 >= 1 << 16) {
                perm[1] = perm[0];
                perm[0] = 1;
            }
            if (1 >= 1 << 16) {
                perm[2] = perm[0];
                perm[0] = 2;
            }
            
            size_t grid[3];
            
            grid[perm[0]] = segmap_usable_groups_202577;
            grid[perm[1]] = 1;
            grid[perm[2]] = 1;
            
            void *kernel_args_230229[] = {&ctx->global_failure,
                                          &ctx->failure_is_an_option,
                                          &ctx->global_failure_args, &m_196691,
                                          &n_196692, &jump_l_196703,
                                          &l_n_m_196752, &i_196779, &x_196780,
                                          &min_res_196994, &loop_cond_196999,
                                          &kernel_arg_230232,
                                          &kernel_arg_230233,
                                          &kernel_arg_230234,
                                          &kernel_arg_230235,
                                          &kernel_arg_230236,
                                          &kernel_arg_230237,
                                          &kernel_arg_230238,
                                          &kernel_arg_230239};
            int64_t time_start_230230 = 0, time_end_230231 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                        "main.segmap_202582",
                        (long) segmap_usable_groups_202577, (long) 1, (long) 1,
                        (long) segmap_group_sizze_202576, (long) 1, (long) 1,
                        (int) 0);
                time_start_230230 = get_wall_time();
            }
            
            cudaEvent_t *pevents = NULL;
            
            if (ctx->profiling && !ctx->profiling_paused) {
                pevents = cuda_get_events(&ctx->cuda,
                                          &ctx->mainzisegmap_202582_runs,
                                          &ctx->mainzisegmap_202582_total_runtime);
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
            }
            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_202582,
                                                  grid[0], grid[1], grid[2],
                                                  segmap_group_sizze_202576, 1,
                                                  1, 0, NULL,
                                                  kernel_args_230229, NULL));
            if (pevents != NULL)
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
            if (ctx->debugging) {
                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                time_end_230231 = get_wall_time();
                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                        "main.segmap_202582", time_end_230231 -
                        time_start_230230);
            }
        }
        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_225892;
    
    local_memory_capacity_225892 = ctx->cuda.max_shared_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_225892)) &&
        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");
        
        unsigned int shared_sizze_230243 = bytes_222229;
        unsigned int shared_sizze_230245 = bytes_222477;
        unsigned int shared_sizze_230247 = bytes_222480;
        CUdeviceptr kernel_arg_230249 = ext_mem_222256.mem;
        CUdeviceptr kernel_arg_230250 = ext_mem_222257.mem;
        CUdeviceptr kernel_arg_230251 = mem_222485.mem;
        CUdeviceptr kernel_arg_230252 = mem_222489.mem;
        unsigned int shared_offset_230244 = 0;
        unsigned int shared_offset_230246 = 0 + (shared_sizze_230243 + (8 -
                                                                        shared_sizze_230243 %
                                                                        8) % 8);
        unsigned int shared_offset_230248 = 0 + (shared_sizze_230243 + (8 -
                                                                        shared_sizze_230243 %
                                                                        8) %
                                                 8) + (shared_sizze_230245 +
                                                       (8 -
                                                        shared_sizze_230245 %
                                                        8) % 8);
        
        if ((((((1 && m_196691 != 0) && 1 != 0) && 1 != 0) &&
              computed_group_sizze_202682 != 0) && 1 != 0) && 1 != 0) {
            int perm[3] = {0, 1, 2};
            
            if (1 >= 1 << 16) {
                perm[1] = perm[0];
                perm[0] = 1;
            }
            if (1 >= 1 << 16) {
                perm[2] = perm[0];
                perm[0] = 2;
            }
            
            size_t grid[3];
            
            grid[perm[0]] = m_196691;
            grid[perm[1]] = 1;
            grid[perm[2]] = 1;
            
            void *kernel_args_230240[] = {&ctx->global_failure,
                                          &ctx->failure_is_an_option,
                                          &ctx->global_failure_args,
                                          &shared_offset_230244,
                                          &shared_offset_230246,
                                          &shared_offset_230248, &m_196691,
                                          &n_196692, &q_t_196696,
                                          &jump_t_196702, &t_n_m_196759,
                                          &i_196779, &x_196780, &min_res_197106,
                                          &loop_cond_197111, &i64_res_197112,
                                          &computed_group_sizze_202682,
                                          &kernel_arg_230249,
                                          &kernel_arg_230250,
                                          &kernel_arg_230251,
                                          &kernel_arg_230252};
            int64_t time_start_230241 = 0, time_end_230242 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                        "main.segmap_intragroup_202791", (long) m_196691,
                        (long) 1, (long) 1, (long) computed_group_sizze_202682,
                        (long) 1, (long) 1, (int) (0 + (shared_sizze_230243 +
                                                        (8 -
                                                         shared_sizze_230243 %
                                                         8) % 8) +
                                                   (shared_sizze_230245 + (8 -
                                                                           shared_sizze_230245 %
                                                                           8) %
                                                    8) + (shared_sizze_230247 +
                                                          (8 -
                                                           shared_sizze_230247 %
                                                           8) % 8)));
                time_start_230241 = get_wall_time();
            }
            
            cudaEvent_t *pevents = NULL;
            
            if (ctx->profiling && !ctx->profiling_paused) {
                pevents = cuda_get_events(&ctx->cuda,
                                          &ctx->mainzisegmap_intragroup_202791_runs,
                                          &ctx->mainzisegmap_intragroup_202791_total_runtime);
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
            }
            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_intragroup_202791,
                                                  grid[0], grid[1], grid[2],
                                                  computed_group_sizze_202682,
                                                  1, 1, 0 +
                                                  (shared_sizze_230243 + (8 -
                                                                          shared_sizze_230243 %
                                                                          8) %
                                                   8) + (shared_sizze_230245 +
                                                         (8 -
                                                          shared_sizze_230245 %
                                                          8) % 8) +
                                                  (shared_sizze_230247 + (8 -
                                                                          shared_sizze_230247 %
                                                                          8) %
                                                   8), NULL, kernel_args_230240,
                                                  NULL));
            if (pevents != NULL)
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
            if (ctx->debugging) {
                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                time_end_230242 = get_wall_time();
                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                        "main.segmap_intragroup_202791", time_end_230242 -
                        time_start_230241);
            }
        }
        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");
        
        CUdeviceptr kernel_arg_230256 = ext_mem_222257.mem;
        CUdeviceptr kernel_arg_230257 = mem_222494.mem;
        
        if ((((((1 && segmap_usable_groups_203171 != 0) && 1 != 0) && 1 != 0) &&
              segmap_group_sizze_203170 != 0) && 1 != 0) && 1 != 0) {
            int perm[3] = {0, 1, 2};
            
            if (1 >= 1 << 16) {
                perm[1] = perm[0];
                perm[0] = 1;
            }
            if (1 >= 1 << 16) {
                perm[2] = perm[0];
                perm[0] = 2;
            }
            
            size_t grid[3];
            
            grid[perm[0]] = segmap_usable_groups_203171;
            grid[perm[1]] = 1;
            grid[perm[2]] = 1;
            
            void *kernel_args_230253[] = {&ctx->global_failure, &m_196691,
                                          &n_196692, &kernel_arg_230256,
                                          &kernel_arg_230257};
            int64_t time_start_230254 = 0, time_end_230255 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                        "main.segmap_203175",
                        (long) segmap_usable_groups_203171, (long) 1, (long) 1,
                        (long) segmap_group_sizze_203170, (long) 1, (long) 1,
                        (int) 0);
                time_start_230254 = get_wall_time();
            }
            
            cudaEvent_t *pevents = NULL;
            
            if (ctx->profiling && !ctx->profiling_paused) {
                pevents = cuda_get_events(&ctx->cuda,
                                          &ctx->mainzisegmap_203175_runs,
                                          &ctx->mainzisegmap_203175_total_runtime);
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
            }
            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_203175,
                                                  grid[0], grid[1], grid[2],
                                                  segmap_group_sizze_203170, 1,
                                                  1, 0, NULL,
                                                  kernel_args_230253, NULL));
            if (pevents != NULL)
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
            if (ctx->debugging) {
                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                time_end_230255 = get_wall_time();
                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                        "main.segmap_203175", time_end_230255 -
                        time_start_230254);
            }
        }
        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");
        
        CUdeviceptr kernel_arg_230261 = ext_mem_222256.mem;
        CUdeviceptr kernel_arg_230262 = mem_222498.mem;
        CUdeviceptr kernel_arg_230263 = mem_222501.mem;
        CUdeviceptr kernel_arg_230264 = mem_222504.mem;
        CUdeviceptr kernel_arg_230265 = mem_222507.mem;
        
        if ((((((1 && segmap_usable_groups_203181 != 0) && 1 != 0) && 1 != 0) &&
              segmap_group_sizze_203180 != 0) && 1 != 0) && 1 != 0) {
            int perm[3] = {0, 1, 2};
            
            if (1 >= 1 << 16) {
                perm[1] = perm[0];
                perm[0] = 1;
            }
            if (1 >= 1 << 16) {
                perm[2] = perm[0];
                perm[0] = 2;
            }
            
            size_t grid[3];
            
            grid[perm[0]] = segmap_usable_groups_203181;
            grid[perm[1]] = 1;
            grid[perm[2]] = 1;
            
            void *kernel_args_230258[] = {&ctx->global_failure, &m_196691,
                                          &q_t_196696, &min_res_197106,
                                          &i64_res_197112, &kernel_arg_230261,
                                          &kernel_arg_230262,
                                          &kernel_arg_230263,
                                          &kernel_arg_230264,
                                          &kernel_arg_230265};
            int64_t time_start_230259 = 0, time_end_230260 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                        "main.segmap_203187",
                        (long) segmap_usable_groups_203181, (long) 1, (long) 1,
                        (long) segmap_group_sizze_203180, (long) 1, (long) 1,
                        (int) 0);
                time_start_230259 = get_wall_time();
            }
            
            cudaEvent_t *pevents = NULL;
            
            if (ctx->profiling && !ctx->profiling_paused) {
                pevents = cuda_get_events(&ctx->cuda,
                                          &ctx->mainzisegmap_203187_runs,
                                          &ctx->mainzisegmap_203187_total_runtime);
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
            }
            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_203187,
                                                  grid[0], grid[1], grid[2],
                                                  segmap_group_sizze_203180, 1,
                                                  1, 0, NULL,
                                                  kernel_args_230258, NULL));
            if (pevents != NULL)
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
            if (ctx->debugging) {
                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                time_end_230260 = get_wall_time();
                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                        "main.segmap_203187", time_end_230260 -
                        time_start_230259);
            }
        }
        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");
        
        CUdeviceptr kernel_arg_230269 = ext_mem_222257.mem;
        CUdeviceptr kernel_arg_230270 = mem_222494.mem;
        CUdeviceptr kernel_arg_230271 = mem_222498.mem;
        CUdeviceptr kernel_arg_230272 = mem_222501.mem;
        CUdeviceptr kernel_arg_230273 = mem_222504.mem;
        CUdeviceptr kernel_arg_230274 = mem_222507.mem;
        CUdeviceptr kernel_arg_230275 = mem_222512.mem;
        CUdeviceptr kernel_arg_230276 = mem_222516.mem;
        
        if ((((((1 && segmap_usable_groups_203203 != 0) && 1 != 0) && 1 != 0) &&
              segmap_group_sizze_203202 != 0) && 1 != 0) && 1 != 0) {
            int perm[3] = {0, 1, 2};
            
            if (1 >= 1 << 16) {
                perm[1] = perm[0];
                perm[0] = 1;
            }
            if (1 >= 1 << 16) {
                perm[2] = perm[0];
                perm[0] = 2;
            }
            
            size_t grid[3];
            
            grid[perm[0]] = segmap_usable_groups_203203;
            grid[perm[1]] = 1;
            grid[perm[2]] = 1;
            
            void *kernel_args_230266[] = {&ctx->global_failure,
                                          &ctx->failure_is_an_option,
                                          &ctx->global_failure_args, &m_196691,
                                          &n_196692, &jump_t_196702,
                                          &t_n_m_196759, &i_196779, &x_196780,
                                          &min_res_197106, &loop_cond_197111,
                                          &kernel_arg_230269,
                                          &kernel_arg_230270,
                                          &kernel_arg_230271,
                                          &kernel_arg_230272,
                                          &kernel_arg_230273,
                                          &kernel_arg_230274,
                                          &kernel_arg_230275,
                                          &kernel_arg_230276};
            int64_t time_start_230267 = 0, time_end_230268 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                        "main.segmap_203208",
                        (long) segmap_usable_groups_203203, (long) 1, (long) 1,
                        (long) segmap_group_sizze_203202, (long) 1, (long) 1,
                        (int) 0);
                time_start_230267 = get_wall_time();
            }
            
            cudaEvent_t *pevents = NULL;
            
            if (ctx->profiling && !ctx->profiling_paused) {
                pevents = cuda_get_events(&ctx->cuda,
                                          &ctx->mainzisegmap_203208_runs,
                                          &ctx->mainzisegmap_203208_total_runtime);
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
            }
            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_203208,
                                                  grid[0], grid[1], grid[2],
                                                  segmap_group_sizze_203202, 1,
                                                  1, 0, NULL,
                                                  kernel_args_230266, NULL));
            if (pevents != NULL)
                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
            if (ctx->debugging) {
                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                time_end_230268 = get_wall_time();
                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                        "main.segmap_203208", time_end_230268 -
                        time_start_230267);
            }
        }
        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_225905;
    
    max_num_groups_225905 = *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_225905))));
    
    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_225906;
    
    max_num_groups_225906 = *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_225906))));
    
    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_225907;
    
    max_num_groups_225907 = *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_225907))));
    
    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_225908;
    
    max_num_groups_225908 = *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_225908))));
    
    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_225909;
    
    max_num_groups_225909 = *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_225909))));
    
    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_225910;
    
    max_num_groups_225910 = *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_225910))));
    
    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");
            
            CUdeviceptr kernel_arg_230280 = Y_mem_222225.mem;
            CUdeviceptr kernel_arg_230281 = mem_param_222572.mem;
            CUdeviceptr kernel_arg_230282 = mem_222577.mem;
            
            if ((((((1 && segmap_usable_groups_203346 != 0) && 1 != 0) && 1 !=
                   0) && segmap_group_sizze_203345 != 0) && 1 != 0) && 1 != 0) {
                int perm[3] = {0, 1, 2};
                
                if (1 >= 1 << 16) {
                    perm[1] = perm[0];
                    perm[0] = 1;
                }
                if (1 >= 1 << 16) {
                    perm[2] = perm[0];
                    perm[0] = 2;
                }
                
                size_t grid[3];
                
                grid[perm[0]] = segmap_usable_groups_203346;
                grid[perm[1]] = 1;
                grid[perm[2]] = 1;
                
                void *kernel_args_230277[] = {&ctx->global_failure, &m_196691,
                                              &n_196692, &ctx_param_ext_222568,
                                              &kernel_arg_230280,
                                              &kernel_arg_230281,
                                              &kernel_arg_230282};
                int64_t time_start_230278 = 0, time_end_230279 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                            "main.segmap_203350",
                            (long) segmap_usable_groups_203346, (long) 1,
                            (long) 1, (long) segmap_group_sizze_203345,
                            (long) 1, (long) 1, (int) 0);
                    time_start_230278 = get_wall_time();
                }
                
                cudaEvent_t *pevents = NULL;
                
                if (ctx->profiling && !ctx->profiling_paused) {
                    pevents = cuda_get_events(&ctx->cuda,
                                              &ctx->mainzisegmap_203350_runs,
                                              &ctx->mainzisegmap_203350_total_runtime);
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                }
                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_203350,
                                                      grid[0], grid[1], grid[2],
                                                      segmap_group_sizze_203345,
                                                      1, 1, 0, NULL,
                                                      kernel_args_230277,
                                                      NULL));
                if (pevents != NULL)
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                if (ctx->debugging) {
                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                    time_end_230279 = get_wall_time();
                    fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                            "main.segmap_203350", time_end_230279 -
                            time_start_230278);
                }
            }
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "");
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "\n# SegMap");
            
            CUdeviceptr kernel_arg_230286 = ext_mem_222322.mem;
            CUdeviceptr kernel_arg_230287 = mem_param_222550.mem;
            CUdeviceptr kernel_arg_230288 = mem_222577.mem;
            CUdeviceptr kernel_arg_230289 = mem_222583.mem;
            CUdeviceptr kernel_arg_230290 = mem_222588.mem;
            
            if ((((((1 && segmap_usable_groups_203489 != 0) && 1 != 0) && 1 !=
                   0) && segmap_group_sizze_203488 != 0) && 1 != 0) && 1 != 0) {
                int perm[3] = {0, 1, 2};
                
                if (1 >= 1 << 16) {
                    perm[1] = perm[0];
                    perm[0] = 1;
                }
                if (1 >= 1 << 16) {
                    perm[2] = perm[0];
                    perm[0] = 2;
                }
                
                size_t grid[3];
                
                grid[perm[0]] = segmap_usable_groups_203489;
                grid[perm[1]] = 1;
                grid[perm[2]] = 1;
                
                void *kernel_args_230283[] = {&ctx->global_failure,
                                              &ctx->failure_is_an_option,
                                              &ctx->global_failure_args,
                                              &m_196691, &n_196692, &n_p_196694,
                                              &defunc_0_f_res_196740, &i_196779,
                                              &ctx_param_ext_222545,
                                              &ctx_param_ext_222546,
                                              &ctx_param_ext_222548,
                                              &kernel_arg_230286,
                                              &kernel_arg_230287,
                                              &kernel_arg_230288,
                                              &kernel_arg_230289,
                                              &kernel_arg_230290};
                int64_t time_start_230284 = 0, time_end_230285 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                            "main.segmap_203495",
                            (long) segmap_usable_groups_203489, (long) 1,
                            (long) 1, (long) segmap_group_sizze_203488,
                            (long) 1, (long) 1, (int) 0);
                    time_start_230284 = get_wall_time();
                }
                
                cudaEvent_t *pevents = NULL;
                
                if (ctx->profiling && !ctx->profiling_paused) {
                    pevents = cuda_get_events(&ctx->cuda,
                                              &ctx->mainzisegmap_203495_runs,
                                              &ctx->mainzisegmap_203495_total_runtime);
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                }
                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_203495,
                                                      grid[0], grid[1], grid[2],
                                                      segmap_group_sizze_203488,
                                                      1, 1, 0, NULL,
                                                      kernel_args_230283,
                                                      NULL));
                if (pevents != NULL)
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                if (ctx->debugging) {
                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                    time_end_230285 = get_wall_time();
                    fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                            "main.segmap_203495", time_end_230285 -
                            time_start_230284);
                }
            }
            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_225954;
                    
                    max_num_groups_225954 =
                        *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_225954))));
                    
                    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_225955;
                    
                    max_num_groups_225955 =
                        *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_225955))));
                    
                    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_225956;
                    
                    max_num_groups_225956 =
                        *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_225956))));
                    
                    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_225957;
                    
                    max_num_groups_225957 =
                        *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_225957))));
                    
                    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_226243;
                    
                    local_memory_capacity_226243 = ctx->cuda.max_shared_memory;
                    if (sle64((int64_t) 0,
                              sext_i32_i64(local_memory_capacity_226243)) &&
                        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");
                        
                        CUdeviceptr kernel_arg_230294 = mem_222597.mem;
                        CUdeviceptr kernel_arg_230295 = mem_222600.mem;
                        CUdeviceptr kernel_arg_230296 = mem_222604.mem;
                        CUdeviceptr kernel_arg_230297 = mem_222608.mem;
                        CUdeviceptr kernel_arg_230298 = mem_222612.mem;
                        CUdeviceptr kernel_arg_230299 = mem_222616.mem;
                        CUdeviceptr kernel_arg_230300 = mem_222665.mem;
                        CUdeviceptr kernel_arg_230301 = color_225033.mem;
                        
                        if ((((((1 && num_groups_203621 != 0) && 1 != 0) && 1 !=
                               0) && segmap_group_sizze_203620 != 0) && 1 !=
                             0) && 1 != 0) {
                            int perm[3] = {0, 1, 2};
                            
                            if (1 >= 1 << 16) {
                                perm[1] = perm[0];
                                perm[0] = 1;
                            }
                            if (1 >= 1 << 16) {
                                perm[2] = perm[0];
                                perm[0] = 2;
                            }
                            
                            size_t grid[3];
                            
                            grid[perm[0]] = num_groups_203621;
                            grid[perm[1]] = 1;
                            grid[perm[2]] = 1;
                            
                            void *kernel_args_230291[] = {&ctx->global_failure,
                                                          &m_196691,
                                                          &n_p_196694,
                                                          &q_s_196695,
                                                          &jump_s_196701,
                                                          &defunc_0_f_res_196740,
                                                          &pad_css_len_196741,
                                                          &s_n_m_196745,
                                                          &num_groups_203621,
                                                          &num_threads_225153,
                                                          &kernel_arg_230294,
                                                          &kernel_arg_230295,
                                                          &kernel_arg_230296,
                                                          &kernel_arg_230297,
                                                          &kernel_arg_230298,
                                                          &kernel_arg_230299,
                                                          &kernel_arg_230300,
                                                          &kernel_arg_230301};
                            int64_t time_start_230292 = 0, time_end_230293 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                        "main.segmap_203625",
                                        (long) num_groups_203621, (long) 1,
                                        (long) 1,
                                        (long) segmap_group_sizze_203620,
                                        (long) 1, (long) 1, (int) 0);
                                time_start_230292 = get_wall_time();
                            }
                            
                            cudaEvent_t *pevents = NULL;
                            
                            if (ctx->profiling && !ctx->profiling_paused) {
                                pevents = cuda_get_events(&ctx->cuda,
                                                          &ctx->mainzisegmap_203625_runs,
                                                          &ctx->mainzisegmap_203625_total_runtime);
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                   0));
                            }
                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_203625,
                                                                  grid[0],
                                                                  grid[1],
                                                                  grid[2],
                                                                  segmap_group_sizze_203620,
                                                                  1, 1, 0, NULL,
                                                                  kernel_args_230291,
                                                                  NULL));
                            if (pevents != NULL)
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                   0));
                            if (ctx->debugging) {
                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                time_end_230293 = get_wall_time();
                                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                        "main.segmap_203625", time_end_230293 -
                                        time_start_230292);
                            }
                        }
                        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_226242;
                        
                        local_memory_capacity_226242 =
                            ctx->cuda.max_shared_memory;
                        if (sle64((int64_t) 0,
                                  sext_i32_i64(local_memory_capacity_226242)) &&
                            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");
                            
                            CUdeviceptr kernel_arg_230305 = ext_mem_222321.mem;
                            CUdeviceptr kernel_arg_230306 = mem_222669.mem;
                            CUdeviceptr kernel_arg_230307 = mem_222673.mem;
                            CUdeviceptr kernel_arg_230308 = mem_222677.mem;
                            CUdeviceptr kernel_arg_230309 = mem_222681.mem;
                            CUdeviceptr kernel_arg_230310 = mem_222685.mem;
                            CUdeviceptr kernel_arg_230311 = mem_222705.mem;
                            CUdeviceptr kernel_arg_230312 = color_225034.mem;
                            
                            if ((((((1 && num_groups_204745 != 0) && 1 != 0) &&
                                   1 != 0) && segmap_group_sizze_204744 != 0) &&
                                 1 != 0) && 1 != 0) {
                                int perm[3] = {0, 1, 2};
                                
                                if (1 >= 1 << 16) {
                                    perm[1] = perm[0];
                                    perm[0] = 1;
                                }
                                if (1 >= 1 << 16) {
                                    perm[2] = perm[0];
                                    perm[0] = 2;
                                }
                                
                                size_t grid[3];
                                
                                grid[perm[0]] = num_groups_204745;
                                grid[perm[1]] = 1;
                                grid[perm[2]] = 1;
                                
                                void *kernel_args_230302[] =
                                     {&ctx->global_failure, &m_196691,
                                      &n_p_196694, &q_s_196695, &jump_s_196701,
                                      &defunc_0_f_res_196740,
                                      &pad_css_len_196741, &s_n_m_196745,
                                      &num_groups_204745, &num_threads_225155,
                                      &kernel_arg_230305, &kernel_arg_230306,
                                      &kernel_arg_230307, &kernel_arg_230308,
                                      &kernel_arg_230309, &kernel_arg_230310,
                                      &kernel_arg_230311, &kernel_arg_230312};
                                int64_t time_start_230303 = 0, time_end_230304 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                            "main.segmap_204765",
                                            (long) num_groups_204745, (long) 1,
                                            (long) 1,
                                            (long) segmap_group_sizze_204744,
                                            (long) 1, (long) 1, (int) 0);
                                    time_start_230303 = get_wall_time();
                                }
                                
                                cudaEvent_t *pevents = NULL;
                                
                                if (ctx->profiling && !ctx->profiling_paused) {
                                    pevents = cuda_get_events(&ctx->cuda,
                                                              &ctx->mainzisegmap_204765_runs,
                                                              &ctx->mainzisegmap_204765_total_runtime);
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                       0));
                                }
                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_204765,
                                                                      grid[0],
                                                                      grid[1],
                                                                      grid[2],
                                                                      segmap_group_sizze_204744,
                                                                      1, 1, 0,
                                                                      NULL,
                                                                      kernel_args_230302,
                                                                      NULL));
                                if (pevents != NULL)
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                       0));
                                if (ctx->debugging) {
                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                    time_end_230304 = get_wall_time();
                                    fprintf(ctx->log,
                                            "Kernel %s runtime: %ldus\n",
                                            "main.segmap_204765",
                                            time_end_230304 -
                                            time_start_230303);
                                }
                            }
                            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_226241;
                            
                            local_memory_capacity_226241 =
                                ctx->cuda.max_shared_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_226241)) &&
                                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");
                                
                                unsigned int shared_sizze_230316 = (int64_t) 4 *
                                             (s_n_m_196745 * q_s_196695);
                                unsigned int shared_sizze_230318 = (int64_t) 4 *
                                             (s_n_m_196745 * q_s_196695);
                                unsigned int shared_sizze_230320 = bytes_222711;
                                unsigned int shared_sizze_230322 = bytes_222368;
                                unsigned int shared_sizze_230324 = bytes_222371;
                                unsigned int shared_sizze_230326 = bytes_222368;
                                CUdeviceptr kernel_arg_230328 =
                                            ext_mem_222321.mem;
                                CUdeviceptr kernel_arg_230329 =
                                            ext_mem_222322.mem;
                                CUdeviceptr kernel_arg_230330 =
                                            ext_mem_222419.mem;
                                CUdeviceptr kernel_arg_230331 =
                                            ext_mem_222420.mem;
                                CUdeviceptr kernel_arg_230332 = mem_222583.mem;
                                CUdeviceptr kernel_arg_230333 = mem_222588.mem;
                                CUdeviceptr kernel_arg_230334 = mem_222732.mem;
                                unsigned int shared_offset_230317 = 0;
                                unsigned int shared_offset_230319 = 0 +
                                             (shared_sizze_230316 + (8 -
                                                                     shared_sizze_230316 %
                                                                     8) % 8);
                                unsigned int shared_offset_230321 = 0 +
                                             (shared_sizze_230316 + (8 -
                                                                     shared_sizze_230316 %
                                                                     8) % 8) +
                                             (shared_sizze_230318 + (8 -
                                                                     shared_sizze_230318 %
                                                                     8) % 8);
                                unsigned int shared_offset_230323 = 0 +
                                             (shared_sizze_230316 + (8 -
                                                                     shared_sizze_230316 %
                                                                     8) % 8) +
                                             (shared_sizze_230318 + (8 -
                                                                     shared_sizze_230318 %
                                                                     8) % 8) +
                                             (shared_sizze_230320 + (8 -
                                                                     shared_sizze_230320 %
                                                                     8) % 8);
                                unsigned int shared_offset_230325 = 0 +
                                             (shared_sizze_230316 + (8 -
                                                                     shared_sizze_230316 %
                                                                     8) % 8) +
                                             (shared_sizze_230318 + (8 -
                                                                     shared_sizze_230318 %
                                                                     8) % 8) +
                                             (shared_sizze_230320 + (8 -
                                                                     shared_sizze_230320 %
                                                                     8) % 8) +
                                             (shared_sizze_230322 + (8 -
                                                                     shared_sizze_230322 %
                                                                     8) % 8);
                                unsigned int shared_offset_230327 = 0 +
                                             (shared_sizze_230316 + (8 -
                                                                     shared_sizze_230316 %
                                                                     8) % 8) +
                                             (shared_sizze_230318 + (8 -
                                                                     shared_sizze_230318 %
                                                                     8) % 8) +
                                             (shared_sizze_230320 + (8 -
                                                                     shared_sizze_230320 %
                                                                     8) % 8) +
                                             (shared_sizze_230322 + (8 -
                                                                     shared_sizze_230322 %
                                                                     8) % 8) +
                                             (shared_sizze_230324 + (8 -
                                                                     shared_sizze_230324 %
                                                                     8) % 8);
                                
                                if ((((((1 && binop_x_222259 != 0) && 1 != 0) &&
                                       1 != 0) && computed_group_sizze_204753 !=
                                      0) && 1 != 0) && 1 != 0) {
                                    int perm[3] = {0, 1, 2};
                                    
                                    if (1 >= 1 << 16) {
                                        perm[1] = perm[0];
                                        perm[0] = 1;
                                    }
                                    if (1 >= 1 << 16) {
                                        perm[2] = perm[0];
                                        perm[0] = 2;
                                    }
                                    
                                    size_t grid[3];
                                    
                                    grid[perm[0]] = binop_x_222259;
                                    grid[perm[1]] = 1;
                                    grid[perm[2]] = 1;
                                    
                                    void *kernel_args_230313[] =
                                         {&ctx->global_failure,
                                          &shared_offset_230317,
                                          &shared_offset_230319,
                                          &shared_offset_230321,
                                          &shared_offset_230323,
                                          &shared_offset_230325,
                                          &shared_offset_230327, &m_196691,
                                          &n_p_196694, &q_s_196695,
                                          &jump_s_196701,
                                          &defunc_0_f_res_196740,
                                          &pad_css_len_196741, &s_n_m_196745,
                                          &computed_group_sizze_204753,
                                          &kernel_arg_230328,
                                          &kernel_arg_230329,
                                          &kernel_arg_230330,
                                          &kernel_arg_230331,
                                          &kernel_arg_230332,
                                          &kernel_arg_230333,
                                          &kernel_arg_230334};
                                    int64_t time_start_230314 = 0,
                                            time_end_230315 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                "main.segmap_intragroup_204851",
                                                (long) binop_x_222259, (long) 1,
                                                (long) 1,
                                                (long) computed_group_sizze_204753,
                                                (long) 1, (long) 1, (int) (0 +
                                                                           (shared_sizze_230316 +
                                                                            (8 -
                                                                             shared_sizze_230316 %
                                                                             8) %
                                                                            8) +
                                                                           (shared_sizze_230318 +
                                                                            (8 -
                                                                             shared_sizze_230318 %
                                                                             8) %
                                                                            8) +
                                                                           (shared_sizze_230320 +
                                                                            (8 -
                                                                             shared_sizze_230320 %
                                                                             8) %
                                                                            8) +
                                                                           (shared_sizze_230322 +
                                                                            (8 -
                                                                             shared_sizze_230322 %
                                                                             8) %
                                                                            8) +
                                                                           (shared_sizze_230324 +
                                                                            (8 -
                                                                             shared_sizze_230324 %
                                                                             8) %
                                                                            8) +
                                                                           (shared_sizze_230326 +
                                                                            (8 -
                                                                             shared_sizze_230326 %
                                                                             8) %
                                                                            8)));
                                        time_start_230314 = get_wall_time();
                                    }
                                    
                                    cudaEvent_t *pevents = NULL;
                                    
                                    if (ctx->profiling &&
                                        !ctx->profiling_paused) {
                                        pevents = cuda_get_events(&ctx->cuda,
                                                                  &ctx->mainzisegmap_intragroup_204851_runs,
                                                                  &ctx->mainzisegmap_intragroup_204851_total_runtime);
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                           0));
                                    }
                                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_intragroup_204851,
                                                                          grid[0],
                                                                          grid[1],
                                                                          grid[2],
                                                                          computed_group_sizze_204753,
                                                                          1, 1,
                                                                          0 +
                                                                          (shared_sizze_230316 +
                                                                           (8 -
                                                                            shared_sizze_230316 %
                                                                            8) %
                                                                           8) +
                                                                          (shared_sizze_230318 +
                                                                           (8 -
                                                                            shared_sizze_230318 %
                                                                            8) %
                                                                           8) +
                                                                          (shared_sizze_230320 +
                                                                           (8 -
                                                                            shared_sizze_230320 %
                                                                            8) %
                                                                           8) +
                                                                          (shared_sizze_230322 +
                                                                           (8 -
                                                                            shared_sizze_230322 %
                                                                            8) %
                                                                           8) +
                                                                          (shared_sizze_230324 +
                                                                           (8 -
                                                                            shared_sizze_230324 %
                                                                            8) %
                                                                           8) +
                                                                          (shared_sizze_230326 +
                                                                           (8 -
                                                                            shared_sizze_230326 %
                                                                            8) %
                                                                           8),
                                                                          NULL,
                                                                          kernel_args_230313,
                                                                          NULL));
                                    if (pevents != NULL)
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                           0));
                                    if (ctx->debugging) {
                                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                        time_end_230315 = get_wall_time();
                                        fprintf(ctx->log,
                                                "Kernel %s runtime: %ldus\n",
                                                "main.segmap_intragroup_204851",
                                                time_end_230315 -
                                                time_start_230314);
                                    }
                                }
                                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_226240;
                                
                                local_memory_capacity_226240 =
                                    ctx->cuda.max_shared_memory;
                                if (sle64((int64_t) 0,
                                          sext_i32_i64(local_memory_capacity_226240)) &&
                                    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");
                                    
                                    CUdeviceptr kernel_arg_230338 =
                                                ext_mem_222321.mem;
                                    CUdeviceptr kernel_arg_230339 =
                                                ext_mem_222322.mem;
                                    CUdeviceptr kernel_arg_230340 =
                                                ext_mem_222419.mem;
                                    CUdeviceptr kernel_arg_230341 =
                                                ext_mem_222420.mem;
                                    CUdeviceptr kernel_arg_230342 =
                                                mem_222583.mem;
                                    CUdeviceptr kernel_arg_230343 =
                                                mem_222588.mem;
                                    CUdeviceptr kernel_arg_230344 =
                                                mem_222738.mem;
                                    
                                    if ((((((1 && segmap_usable_groups_204963 !=
                                             0) && 1 != 0) && 1 != 0) &&
                                          segmap_group_sizze_204962 != 0) &&
                                         1 != 0) && 1 != 0) {
                                        int perm[3] = {0, 1, 2};
                                        
                                        if (1 >= 1 << 16) {
                                            perm[1] = perm[0];
                                            perm[0] = 1;
                                        }
                                        if (1 >= 1 << 16) {
                                            perm[2] = perm[0];
                                            perm[0] = 2;
                                        }
                                        
                                        size_t grid[3];
                                        
                                        grid[perm[0]] =
                                            segmap_usable_groups_204963;
                                        grid[perm[1]] = 1;
                                        grid[perm[2]] = 1;
                                        
                                        void *kernel_args_230335[] =
                                             {&ctx->global_failure, &m_196691,
                                              &n_p_196694, &q_s_196695,
                                              &jump_s_196701,
                                              &defunc_0_f_res_196740,
                                              &pad_css_len_196741,
                                              &s_n_m_196745, &kernel_arg_230338,
                                              &kernel_arg_230339,
                                              &kernel_arg_230340,
                                              &kernel_arg_230341,
                                              &kernel_arg_230342,
                                              &kernel_arg_230343,
                                              &kernel_arg_230344};
                                        int64_t time_start_230336 = 0,
                                                time_end_230337 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                    "main.segmap_204973",
                                                    (long) segmap_usable_groups_204963,
                                                    (long) 1, (long) 1,
                                                    (long) segmap_group_sizze_204962,
                                                    (long) 1, (long) 1,
                                                    (int) 0);
                                            time_start_230336 = get_wall_time();
                                        }
                                        
                                        cudaEvent_t *pevents = NULL;
                                        
                                        if (ctx->profiling &&
                                            !ctx->profiling_paused) {
                                            pevents =
                                                cuda_get_events(&ctx->cuda,
                                                                &ctx->mainzisegmap_204973_runs,
                                                                &ctx->mainzisegmap_204973_total_runtime);
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                               0));
                                        }
                                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_204973,
                                                                              grid[0],
                                                                              grid[1],
                                                                              grid[2],
                                                                              segmap_group_sizze_204962,
                                                                              1,
                                                                              1,
                                                                              0,
                                                                              NULL,
                                                                              kernel_args_230335,
                                                                              NULL));
                                        if (pevents != NULL)
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                               0));
                                        if (ctx->debugging) {
                                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                            time_end_230337 = get_wall_time();
                                            fprintf(ctx->log,
                                                    "Kernel %s runtime: %ldus\n",
                                                    "main.segmap_204973",
                                                    time_end_230337 -
                                                    time_start_230336);
                                        }
                                    }
                                    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");
                                    
                                    CUdeviceptr kernel_arg_230348 =
                                                mem_222744.mem;
                                    CUdeviceptr kernel_arg_230349 =
                                                mem_222748.mem;
                                    
                                    if ((((((1 && segmap_usable_groups_205056 !=
                                             0) && 1 != 0) && 1 != 0) &&
                                          segmap_group_sizze_205055 != 0) &&
                                         1 != 0) && 1 != 0) {
                                        int perm[3] = {0, 1, 2};
                                        
                                        if (1 >= 1 << 16) {
                                            perm[1] = perm[0];
                                            perm[0] = 1;
                                        }
                                        if (1 >= 1 << 16) {
                                            perm[2] = perm[0];
                                            perm[0] = 2;
                                        }
                                        
                                        size_t grid[3];
                                        
                                        grid[perm[0]] =
                                            segmap_usable_groups_205056;
                                        grid[perm[1]] = 1;
                                        grid[perm[2]] = 1;
                                        
                                        void *kernel_args_230345[] =
                                             {&ctx->global_failure, &m_196691,
                                              &n_p_196694, &jump_s_196701,
                                              &defunc_0_f_res_196740,
                                              &pad_css_len_196741,
                                              &s_n_m_196745, &kernel_arg_230348,
                                              &kernel_arg_230349};
                                        int64_t time_start_230346 = 0,
                                                time_end_230347 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                    "main.segmap_205062",
                                                    (long) segmap_usable_groups_205056,
                                                    (long) 1, (long) 1,
                                                    (long) segmap_group_sizze_205055,
                                                    (long) 1, (long) 1,
                                                    (int) 0);
                                            time_start_230346 = get_wall_time();
                                        }
                                        
                                        cudaEvent_t *pevents = NULL;
                                        
                                        if (ctx->profiling &&
                                            !ctx->profiling_paused) {
                                            pevents =
                                                cuda_get_events(&ctx->cuda,
                                                                &ctx->mainzisegmap_205062_runs,
                                                                &ctx->mainzisegmap_205062_total_runtime);
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                               0));
                                        }
                                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_205062,
                                                                              grid[0],
                                                                              grid[1],
                                                                              grid[2],
                                                                              segmap_group_sizze_205055,
                                                                              1,
                                                                              1,
                                                                              0,
                                                                              NULL,
                                                                              kernel_args_230345,
                                                                              NULL));
                                        if (pevents != NULL)
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                               0));
                                        if (ctx->debugging) {
                                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                            time_end_230347 = get_wall_time();
                                            fprintf(ctx->log,
                                                    "Kernel %s runtime: %ldus\n",
                                                    "main.segmap_205062",
                                                    time_end_230347 -
                                                    time_start_230346);
                                        }
                                    }
                                    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_226076 =
                                                smax64((int64_t) 1, q_s_196695);
                                        int64_t num_threads_226077 =
                                                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_226076),
                                                    '\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_226076))),
                                                    '\n');
                                        
                                        unsigned int shared_sizze_230353 =
                                                     (int64_t) 4 *
                                                     segred_group_sizze_205078;
                                        CUdeviceptr kernel_arg_230355 =
                                                    ext_mem_222321.mem;
                                        CUdeviceptr kernel_arg_230356 =
                                                    ext_mem_222322.mem;
                                        CUdeviceptr kernel_arg_230357 =
                                                    ext_mem_222419.mem;
                                        CUdeviceptr kernel_arg_230358 =
                                                    ext_mem_222420.mem;
                                        CUdeviceptr kernel_arg_230359 =
                                                    mem_222588.mem;
                                        CUdeviceptr kernel_arg_230360 =
                                                    mem_222744.mem;
                                        CUdeviceptr kernel_arg_230361 =
                                                    mem_222754.mem;
                                        unsigned int shared_offset_230354 = 0;
                                        
                                        if ((((((1 && num_groups_205079 != 0) &&
                                                1 != 0) && 1 != 0) &&
                                              segred_group_sizze_205078 != 0) &&
                                             1 != 0) && 1 != 0) {
                                            int perm[3] = {0, 1, 2};
                                            
                                            if (1 >= 1 << 16) {
                                                perm[1] = perm[0];
                                                perm[0] = 1;
                                            }
                                            if (1 >= 1 << 16) {
                                                perm[2] = perm[0];
                                                perm[0] = 2;
                                            }
                                            
                                            size_t grid[3];
                                            
                                            grid[perm[0]] = num_groups_205079;
                                            grid[perm[1]] = 1;
                                            grid[perm[2]] = 1;
                                            
                                            void *kernel_args_230350[] =
                                                 {&ctx->global_failure,
                                                  &shared_offset_230354,
                                                  &m_196691, &n_p_196694,
                                                  &q_s_196695,
                                                  &defunc_0_f_res_196740,
                                                  &s_n_m_196745,
                                                  &num_groups_205079,
                                                  &segment_sizze_nonzzero_226076,
                                                  &kernel_arg_230355,
                                                  &kernel_arg_230356,
                                                  &kernel_arg_230357,
                                                  &kernel_arg_230358,
                                                  &kernel_arg_230359,
                                                  &kernel_arg_230360,
                                                  &kernel_arg_230361};
                                            int64_t time_start_230351 = 0,
                                                    time_end_230352 = 0;
                                            
                                            if (ctx->debugging) {
                                                fprintf(ctx->log,
                                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                        "main.segred_small_205086",
                                                        (long) num_groups_205079,
                                                        (long) 1, (long) 1,
                                                        (long) segred_group_sizze_205078,
                                                        (long) 1, (long) 1,
                                                        (int) (0 +
                                                               (shared_sizze_230353 +
                                                                (8 -
                                                                 shared_sizze_230353 %
                                                                 8) % 8)));
                                                time_start_230351 =
                                                    get_wall_time();
                                            }
                                            
                                            cudaEvent_t *pevents = NULL;
                                            
                                            if (ctx->profiling &&
                                                !ctx->profiling_paused) {
                                                pevents =
                                                    cuda_get_events(&ctx->cuda,
                                                                    &ctx->mainzisegred_small_205086_runs,
                                                                    &ctx->mainzisegred_small_205086_total_runtime);
                                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                                   0));
                                            }
                                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_small_205086,
                                                                                  grid[0],
                                                                                  grid[1],
                                                                                  grid[2],
                                                                                  segred_group_sizze_205078,
                                                                                  1,
                                                                                  1,
                                                                                  0 +
                                                                                  (shared_sizze_230353 +
                                                                                   (8 -
                                                                                    shared_sizze_230353 %
                                                                                    8) %
                                                                                   8),
                                                                                  NULL,
                                                                                  kernel_args_230350,
                                                                                  NULL));
                                            if (pevents != NULL)
                                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                                   0));
                                            if (ctx->debugging) {
                                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                                time_end_230352 =
                                                    get_wall_time();
                                                fprintf(ctx->log,
                                                        "Kernel %s runtime: %ldus\n",
                                                        "main.segred_small_205086",
                                                        time_end_230352 -
                                                        time_start_230351);
                                            }
                                        }
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n", "");
                                    } else {
                                        int64_t groups_per_segment_226107 =
                                                sdiv_up64(num_groups_205079,
                                                          smax64((int64_t) 1,
                                                                 m_196691 *
                                                                 n_p_196694 *
                                                                 s_n_m_196745));
                                        int64_t elements_per_thread_226108 =
                                                sdiv_up64(q_s_196695,
                                                          segred_group_sizze_205078 *
                                                          groups_per_segment_226107);
                                        int64_t virt_num_groups_226109 =
                                                groups_per_segment_226107 *
                                                (m_196691 * n_p_196694 *
                                                 s_n_m_196745);
                                        int64_t num_threads_226110 =
                                                num_groups_205079 *
                                                segred_group_sizze_205078;
                                        int64_t threads_per_segment_226111 =
                                                groups_per_segment_226107 *
                                                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_226109,
                                                    '\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_226108,
                                                    '\n');
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "groups_per_segment",
                                                    (long long) groups_per_segment_226107,
                                                    '\n');
                                        
                                        struct memblock_device
                                        segred_tmp_mem_226112;
                                        
                                        segred_tmp_mem_226112.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &segred_tmp_mem_226112,
                                                                  (int64_t) 4 *
                                                                  virt_num_groups_226109,
                                                                  "segred_tmp_mem_226112")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device
                                        mainzicounter_mem_226114 =
                                        ctx->mainzicounter_mem_226114;
                                        unsigned int shared_sizze_230366 = 1;
                                        unsigned int shared_sizze_230368 =
                                                     (int64_t) 4 *
                                                     segred_group_sizze_205078;
                                        CUdeviceptr kernel_arg_230370 =
                                                    ext_mem_222321.mem;
                                        CUdeviceptr kernel_arg_230371 =
                                                    ext_mem_222322.mem;
                                        CUdeviceptr kernel_arg_230372 =
                                                    ext_mem_222419.mem;
                                        CUdeviceptr kernel_arg_230373 =
                                                    ext_mem_222420.mem;
                                        CUdeviceptr kernel_arg_230374 =
                                                    mem_222588.mem;
                                        CUdeviceptr kernel_arg_230375 =
                                                    mem_222744.mem;
                                        CUdeviceptr kernel_arg_230376 =
                                                    mem_222754.mem;
                                        CUdeviceptr kernel_arg_230377 =
                                                    segred_tmp_mem_226112.mem;
                                        CUdeviceptr kernel_arg_230378 =
                                                    mainzicounter_mem_226114.mem;
                                        unsigned int shared_offset_230367 = 0;
                                        unsigned int shared_offset_230369 = 0 +
                                                     (shared_sizze_230366 + (8 -
                                                                             shared_sizze_230366 %
                                                                             8) %
                                                      8);
                                        
                                        if ((((((1 && num_groups_205079 != 0) &&
                                                1 != 0) && 1 != 0) &&
                                              segred_group_sizze_205078 != 0) &&
                                             1 != 0) && 1 != 0) {
                                            int perm[3] = {0, 1, 2};
                                            
                                            if (1 >= 1 << 16) {
                                                perm[1] = perm[0];
                                                perm[0] = 1;
                                            }
                                            if (1 >= 1 << 16) {
                                                perm[2] = perm[0];
                                                perm[0] = 2;
                                            }
                                            
                                            size_t grid[3];
                                            
                                            grid[perm[0]] = num_groups_205079;
                                            grid[perm[1]] = 1;
                                            grid[perm[2]] = 1;
                                            
                                            void *kernel_args_230363[] =
                                                 {&ctx->global_failure,
                                                  &shared_offset_230367,
                                                  &shared_offset_230369,
                                                  &m_196691, &n_p_196694,
                                                  &q_s_196695,
                                                  &defunc_0_f_res_196740,
                                                  &s_n_m_196745,
                                                  &num_groups_205079,
                                                  &groups_per_segment_226107,
                                                  &elements_per_thread_226108,
                                                  &virt_num_groups_226109,
                                                  &threads_per_segment_226111,
                                                  &kernel_arg_230370,
                                                  &kernel_arg_230371,
                                                  &kernel_arg_230372,
                                                  &kernel_arg_230373,
                                                  &kernel_arg_230374,
                                                  &kernel_arg_230375,
                                                  &kernel_arg_230376,
                                                  &kernel_arg_230377,
                                                  &kernel_arg_230378};
                                            int64_t time_start_230364 = 0,
                                                    time_end_230365 = 0;
                                            
                                            if (ctx->debugging) {
                                                fprintf(ctx->log,
                                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                        "main.segred_large_205086",
                                                        (long) num_groups_205079,
                                                        (long) 1, (long) 1,
                                                        (long) segred_group_sizze_205078,
                                                        (long) 1, (long) 1,
                                                        (int) (0 +
                                                               (shared_sizze_230366 +
                                                                (8 -
                                                                 shared_sizze_230366 %
                                                                 8) % 8) +
                                                               (shared_sizze_230368 +
                                                                (8 -
                                                                 shared_sizze_230368 %
                                                                 8) % 8)));
                                                time_start_230364 =
                                                    get_wall_time();
                                            }
                                            
                                            cudaEvent_t *pevents = NULL;
                                            
                                            if (ctx->profiling &&
                                                !ctx->profiling_paused) {
                                                pevents =
                                                    cuda_get_events(&ctx->cuda,
                                                                    &ctx->mainzisegred_large_205086_runs,
                                                                    &ctx->mainzisegred_large_205086_total_runtime);
                                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                                   0));
                                            }
                                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_large_205086,
                                                                                  grid[0],
                                                                                  grid[1],
                                                                                  grid[2],
                                                                                  segred_group_sizze_205078,
                                                                                  1,
                                                                                  1,
                                                                                  0 +
                                                                                  (shared_sizze_230366 +
                                                                                   (8 -
                                                                                    shared_sizze_230366 %
                                                                                    8) %
                                                                                   8) +
                                                                                  (shared_sizze_230368 +
                                                                                   (8 -
                                                                                    shared_sizze_230368 %
                                                                                    8) %
                                                                                   8),
                                                                                  NULL,
                                                                                  kernel_args_230363,
                                                                                  NULL));
                                            if (pevents != NULL)
                                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                                   0));
                                            if (ctx->debugging) {
                                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                                time_end_230365 =
                                                    get_wall_time();
                                                fprintf(ctx->log,
                                                        "Kernel %s runtime: %ldus\n",
                                                        "main.segred_large_205086",
                                                        time_end_230365 -
                                                        time_start_230364);
                                            }
                                        }
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n", "");
                                        if (memblock_unref_device(ctx,
                                                                  &segred_tmp_mem_226112,
                                                                  "segred_tmp_mem_226112") !=
                                            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");
                                    
                                    CUdeviceptr kernel_arg_230382 =
                                                mem_222754.mem;
                                    CUdeviceptr kernel_arg_230383 =
                                                mem_222760.mem;
                                    CUdeviceptr kernel_arg_230384 =
                                                mem_222765.mem;
                                    
                                    if ((((((1 && segmap_usable_groups_205128 !=
                                             0) && 1 != 0) && 1 != 0) &&
                                          segmap_group_sizze_205127 != 0) &&
                                         1 != 0) && 1 != 0) {
                                        int perm[3] = {0, 1, 2};
                                        
                                        if (1 >= 1 << 16) {
                                            perm[1] = perm[0];
                                            perm[0] = 1;
                                        }
                                        if (1 >= 1 << 16) {
                                            perm[2] = perm[0];
                                            perm[0] = 2;
                                        }
                                        
                                        size_t grid[3];
                                        
                                        grid[perm[0]] =
                                            segmap_usable_groups_205128;
                                        grid[perm[1]] = 1;
                                        grid[perm[2]] = 1;
                                        
                                        void *kernel_args_230379[] =
                                             {&ctx->global_failure, &m_196691,
                                              &n_p_196694, &jump_s_196701,
                                              &defunc_0_f_res_196740,
                                              &pad_css_len_196741,
                                              &s_n_m_196745, &kernel_arg_230382,
                                              &kernel_arg_230383,
                                              &kernel_arg_230384};
                                        int64_t time_start_230380 = 0,
                                                time_end_230381 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                    "main.segmap_205134",
                                                    (long) segmap_usable_groups_205128,
                                                    (long) 1, (long) 1,
                                                    (long) segmap_group_sizze_205127,
                                                    (long) 1, (long) 1,
                                                    (int) 0);
                                            time_start_230380 = get_wall_time();
                                        }
                                        
                                        cudaEvent_t *pevents = NULL;
                                        
                                        if (ctx->profiling &&
                                            !ctx->profiling_paused) {
                                            pevents =
                                                cuda_get_events(&ctx->cuda,
                                                                &ctx->mainzisegmap_205134_runs,
                                                                &ctx->mainzisegmap_205134_total_runtime);
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                               0));
                                        }
                                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_205134,
                                                                              grid[0],
                                                                              grid[1],
                                                                              grid[2],
                                                                              segmap_group_sizze_205127,
                                                                              1,
                                                                              1,
                                                                              0,
                                                                              NULL,
                                                                              kernel_args_230379,
                                                                              NULL));
                                        if (pevents != NULL)
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                               0));
                                        if (ctx->debugging) {
                                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                            time_end_230381 = get_wall_time();
                                            fprintf(ctx->log,
                                                    "Kernel %s runtime: %ldus\n",
                                                    "main.segmap_205134",
                                                    time_end_230381 -
                                                    time_start_230380);
                                        }
                                    }
                                    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_226164 =
                                                smax64((int64_t) 1, q_s_196695);
                                        int64_t num_threads_226165 =
                                                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_226164),
                                                    '\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_226164))),
                                                    '\n');
                                        
                                        unsigned int shared_sizze_230388 =
                                                     (int64_t) 4 *
                                                     segred_group_sizze_205152;
                                        CUdeviceptr kernel_arg_230390 =
                                                    ext_mem_222321.mem;
                                        CUdeviceptr kernel_arg_230391 =
                                                    ext_mem_222322.mem;
                                        CUdeviceptr kernel_arg_230392 =
                                                    ext_mem_222419.mem;
                                        CUdeviceptr kernel_arg_230393 =
                                                    ext_mem_222420.mem;
                                        CUdeviceptr kernel_arg_230394 =
                                                    mem_222583.mem;
                                        CUdeviceptr kernel_arg_230395 =
                                                    mem_222588.mem;
                                        CUdeviceptr kernel_arg_230396 =
                                                    mem_222760.mem;
                                        CUdeviceptr kernel_arg_230397 =
                                                    mem_222765.mem;
                                        CUdeviceptr kernel_arg_230398 =
                                                    mem_222771.mem;
                                        unsigned int shared_offset_230389 = 0;
                                        
                                        if ((((((1 && num_groups_205153 != 0) &&
                                                1 != 0) && 1 != 0) &&
                                              segred_group_sizze_205152 != 0) &&
                                             1 != 0) && 1 != 0) {
                                            int perm[3] = {0, 1, 2};
                                            
                                            if (1 >= 1 << 16) {
                                                perm[1] = perm[0];
                                                perm[0] = 1;
                                            }
                                            if (1 >= 1 << 16) {
                                                perm[2] = perm[0];
                                                perm[0] = 2;
                                            }
                                            
                                            size_t grid[3];
                                            
                                            grid[perm[0]] = num_groups_205153;
                                            grid[perm[1]] = 1;
                                            grid[perm[2]] = 1;
                                            
                                            void *kernel_args_230385[] =
                                                 {&ctx->global_failure,
                                                  &shared_offset_230389,
                                                  &m_196691, &n_p_196694,
                                                  &q_s_196695,
                                                  &defunc_0_f_res_196740,
                                                  &s_n_m_196745,
                                                  &num_groups_205153,
                                                  &segment_sizze_nonzzero_226164,
                                                  &kernel_arg_230390,
                                                  &kernel_arg_230391,
                                                  &kernel_arg_230392,
                                                  &kernel_arg_230393,
                                                  &kernel_arg_230394,
                                                  &kernel_arg_230395,
                                                  &kernel_arg_230396,
                                                  &kernel_arg_230397,
                                                  &kernel_arg_230398};
                                            int64_t time_start_230386 = 0,
                                                    time_end_230387 = 0;
                                            
                                            if (ctx->debugging) {
                                                fprintf(ctx->log,
                                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                        "main.segred_small_205160",
                                                        (long) num_groups_205153,
                                                        (long) 1, (long) 1,
                                                        (long) segred_group_sizze_205152,
                                                        (long) 1, (long) 1,
                                                        (int) (0 +
                                                               (shared_sizze_230388 +
                                                                (8 -
                                                                 shared_sizze_230388 %
                                                                 8) % 8)));
                                                time_start_230386 =
                                                    get_wall_time();
                                            }
                                            
                                            cudaEvent_t *pevents = NULL;
                                            
                                            if (ctx->profiling &&
                                                !ctx->profiling_paused) {
                                                pevents =
                                                    cuda_get_events(&ctx->cuda,
                                                                    &ctx->mainzisegred_small_205160_runs,
                                                                    &ctx->mainzisegred_small_205160_total_runtime);
                                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                                   0));
                                            }
                                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_small_205160,
                                                                                  grid[0],
                                                                                  grid[1],
                                                                                  grid[2],
                                                                                  segred_group_sizze_205152,
                                                                                  1,
                                                                                  1,
                                                                                  0 +
                                                                                  (shared_sizze_230388 +
                                                                                   (8 -
                                                                                    shared_sizze_230388 %
                                                                                    8) %
                                                                                   8),
                                                                                  NULL,
                                                                                  kernel_args_230385,
                                                                                  NULL));
                                            if (pevents != NULL)
                                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                                   0));
                                            if (ctx->debugging) {
                                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                                time_end_230387 =
                                                    get_wall_time();
                                                fprintf(ctx->log,
                                                        "Kernel %s runtime: %ldus\n",
                                                        "main.segred_small_205160",
                                                        time_end_230387 -
                                                        time_start_230386);
                                            }
                                        }
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n", "");
                                    } else {
                                        int64_t groups_per_segment_226195 =
                                                sdiv_up64(num_groups_205153,
                                                          smax64((int64_t) 1,
                                                                 m_196691 *
                                                                 n_p_196694 *
                                                                 s_n_m_196745));
                                        int64_t elements_per_thread_226196 =
                                                sdiv_up64(q_s_196695,
                                                          segred_group_sizze_205152 *
                                                          groups_per_segment_226195);
                                        int64_t virt_num_groups_226197 =
                                                groups_per_segment_226195 *
                                                (m_196691 * n_p_196694 *
                                                 s_n_m_196745);
                                        int64_t num_threads_226198 =
                                                num_groups_205153 *
                                                segred_group_sizze_205152;
                                        int64_t threads_per_segment_226199 =
                                                groups_per_segment_226195 *
                                                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_226197,
                                                    '\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_226196,
                                                    '\n');
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "groups_per_segment",
                                                    (long long) groups_per_segment_226195,
                                                    '\n');
                                        
                                        struct memblock_device
                                        segred_tmp_mem_226200;
                                        
                                        segred_tmp_mem_226200.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &segred_tmp_mem_226200,
                                                                  (int64_t) 4 *
                                                                  virt_num_groups_226197,
                                                                  "segred_tmp_mem_226200")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device
                                        mainzicounter_mem_226202 =
                                        ctx->mainzicounter_mem_226202;
                                        unsigned int shared_sizze_230403 = 1;
                                        unsigned int shared_sizze_230405 =
                                                     (int64_t) 4 *
                                                     segred_group_sizze_205152;
                                        CUdeviceptr kernel_arg_230407 =
                                                    ext_mem_222321.mem;
                                        CUdeviceptr kernel_arg_230408 =
                                                    ext_mem_222322.mem;
                                        CUdeviceptr kernel_arg_230409 =
                                                    ext_mem_222419.mem;
                                        CUdeviceptr kernel_arg_230410 =
                                                    ext_mem_222420.mem;
                                        CUdeviceptr kernel_arg_230411 =
                                                    mem_222583.mem;
                                        CUdeviceptr kernel_arg_230412 =
                                                    mem_222588.mem;
                                        CUdeviceptr kernel_arg_230413 =
                                                    mem_222760.mem;
                                        CUdeviceptr kernel_arg_230414 =
                                                    mem_222765.mem;
                                        CUdeviceptr kernel_arg_230415 =
                                                    mem_222771.mem;
                                        CUdeviceptr kernel_arg_230416 =
                                                    segred_tmp_mem_226200.mem;
                                        CUdeviceptr kernel_arg_230417 =
                                                    mainzicounter_mem_226202.mem;
                                        unsigned int shared_offset_230404 = 0;
                                        unsigned int shared_offset_230406 = 0 +
                                                     (shared_sizze_230403 + (8 -
                                                                             shared_sizze_230403 %
                                                                             8) %
                                                      8);
                                        
                                        if ((((((1 && num_groups_205153 != 0) &&
                                                1 != 0) && 1 != 0) &&
                                              segred_group_sizze_205152 != 0) &&
                                             1 != 0) && 1 != 0) {
                                            int perm[3] = {0, 1, 2};
                                            
                                            if (1 >= 1 << 16) {
                                                perm[1] = perm[0];
                                                perm[0] = 1;
                                            }
                                            if (1 >= 1 << 16) {
                                                perm[2] = perm[0];
                                                perm[0] = 2;
                                            }
                                            
                                            size_t grid[3];
                                            
                                            grid[perm[0]] = num_groups_205153;
                                            grid[perm[1]] = 1;
                                            grid[perm[2]] = 1;
                                            
                                            void *kernel_args_230400[] =
                                                 {&ctx->global_failure,
                                                  &shared_offset_230404,
                                                  &shared_offset_230406,
                                                  &m_196691, &n_p_196694,
                                                  &q_s_196695,
                                                  &defunc_0_f_res_196740,
                                                  &s_n_m_196745,
                                                  &num_groups_205153,
                                                  &groups_per_segment_226195,
                                                  &elements_per_thread_226196,
                                                  &virt_num_groups_226197,
                                                  &threads_per_segment_226199,
                                                  &kernel_arg_230407,
                                                  &kernel_arg_230408,
                                                  &kernel_arg_230409,
                                                  &kernel_arg_230410,
                                                  &kernel_arg_230411,
                                                  &kernel_arg_230412,
                                                  &kernel_arg_230413,
                                                  &kernel_arg_230414,
                                                  &kernel_arg_230415,
                                                  &kernel_arg_230416,
                                                  &kernel_arg_230417};
                                            int64_t time_start_230401 = 0,
                                                    time_end_230402 = 0;
                                            
                                            if (ctx->debugging) {
                                                fprintf(ctx->log,
                                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                        "main.segred_large_205160",
                                                        (long) num_groups_205153,
                                                        (long) 1, (long) 1,
                                                        (long) segred_group_sizze_205152,
                                                        (long) 1, (long) 1,
                                                        (int) (0 +
                                                               (shared_sizze_230403 +
                                                                (8 -
                                                                 shared_sizze_230403 %
                                                                 8) % 8) +
                                                               (shared_sizze_230405 +
                                                                (8 -
                                                                 shared_sizze_230405 %
                                                                 8) % 8)));
                                                time_start_230401 =
                                                    get_wall_time();
                                            }
                                            
                                            cudaEvent_t *pevents = NULL;
                                            
                                            if (ctx->profiling &&
                                                !ctx->profiling_paused) {
                                                pevents =
                                                    cuda_get_events(&ctx->cuda,
                                                                    &ctx->mainzisegred_large_205160_runs,
                                                                    &ctx->mainzisegred_large_205160_total_runtime);
                                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                                   0));
                                            }
                                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_large_205160,
                                                                                  grid[0],
                                                                                  grid[1],
                                                                                  grid[2],
                                                                                  segred_group_sizze_205152,
                                                                                  1,
                                                                                  1,
                                                                                  0 +
                                                                                  (shared_sizze_230403 +
                                                                                   (8 -
                                                                                    shared_sizze_230403 %
                                                                                    8) %
                                                                                   8) +
                                                                                  (shared_sizze_230405 +
                                                                                   (8 -
                                                                                    shared_sizze_230405 %
                                                                                    8) %
                                                                                   8),
                                                                                  NULL,
                                                                                  kernel_args_230400,
                                                                                  NULL));
                                            if (pevents != NULL)
                                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                                   0));
                                            if (ctx->debugging) {
                                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                                time_end_230402 =
                                                    get_wall_time();
                                                fprintf(ctx->log,
                                                        "Kernel %s runtime: %ldus\n",
                                                        "main.segred_large_205160",
                                                        time_end_230402 -
                                                        time_start_230401);
                                            }
                                        }
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n", "");
                                        if (memblock_unref_device(ctx,
                                                                  &segred_tmp_mem_226200,
                                                                  "segred_tmp_mem_226200") !=
                                            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_226244;
                        
                        max_num_groups_226244 =
                            *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_226244))));
                        
                        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_226245;
                        
                        max_num_groups_226245 =
                            *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_226245))));
                        
                        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_226246;
                        
                        max_num_groups_226246 =
                            *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_226246))));
                        
                        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_226247;
                        
                        max_num_groups_226247 =
                            *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_226247))));
                        
                        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_226618;
                        
                        local_memory_capacity_226618 =
                            ctx->cuda.max_shared_memory;
                        if (sle64((int64_t) 0,
                                  sext_i32_i64(local_memory_capacity_226618)) &&
                            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");
                            
                            CUdeviceptr kernel_arg_230421 = mem_222791.mem;
                            CUdeviceptr kernel_arg_230422 = mem_222794.mem;
                            CUdeviceptr kernel_arg_230423 = mem_222798.mem;
                            CUdeviceptr kernel_arg_230424 = mem_222802.mem;
                            CUdeviceptr kernel_arg_230425 = mem_222806.mem;
                            CUdeviceptr kernel_arg_230426 = mem_222810.mem;
                            CUdeviceptr kernel_arg_230427 = mem_222903.mem;
                            CUdeviceptr kernel_arg_230428 = mem_222907.mem;
                            CUdeviceptr kernel_arg_230429 = color_225039.mem;
                            CUdeviceptr kernel_arg_230430 = color_225040.mem;
                            
                            if ((((((1 && num_groups_205343 != 0) && 1 != 0) &&
                                   1 != 0) && segmap_group_sizze_205342 != 0) &&
                                 1 != 0) && 1 != 0) {
                                int perm[3] = {0, 1, 2};
                                
                                if (1 >= 1 << 16) {
                                    perm[1] = perm[0];
                                    perm[0] = 1;
                                }
                                if (1 >= 1 << 16) {
                                    perm[2] = perm[0];
                                    perm[0] = 2;
                                }
                                
                                size_t grid[3];
                                
                                grid[perm[0]] = num_groups_205343;
                                grid[perm[1]] = 1;
                                grid[perm[2]] = 1;
                                
                                void *kernel_args_230418[] =
                                     {&ctx->global_failure, &m_196691,
                                      &n_p_196694, &q_s_196695, &jump_s_196701,
                                      &defunc_0_f_res_196740,
                                      &pad_css_len_196741, &s_n_m_196745,
                                      &num_groups_205343, &num_threads_225163,
                                      &kernel_arg_230421, &kernel_arg_230422,
                                      &kernel_arg_230423, &kernel_arg_230424,
                                      &kernel_arg_230425, &kernel_arg_230426,
                                      &kernel_arg_230427, &kernel_arg_230428,
                                      &kernel_arg_230429, &kernel_arg_230430};
                                int64_t time_start_230419 = 0, time_end_230420 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                            "main.segmap_205348",
                                            (long) num_groups_205343, (long) 1,
                                            (long) 1,
                                            (long) segmap_group_sizze_205342,
                                            (long) 1, (long) 1, (int) 0);
                                    time_start_230419 = get_wall_time();
                                }
                                
                                cudaEvent_t *pevents = NULL;
                                
                                if (ctx->profiling && !ctx->profiling_paused) {
                                    pevents = cuda_get_events(&ctx->cuda,
                                                              &ctx->mainzisegmap_205348_runs,
                                                              &ctx->mainzisegmap_205348_total_runtime);
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                       0));
                                }
                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_205348,
                                                                      grid[0],
                                                                      grid[1],
                                                                      grid[2],
                                                                      segmap_group_sizze_205342,
                                                                      1, 1, 0,
                                                                      NULL,
                                                                      kernel_args_230418,
                                                                      NULL));
                                if (pevents != NULL)
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                       0));
                                if (ctx->debugging) {
                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                    time_end_230420 = get_wall_time();
                                    fprintf(ctx->log,
                                            "Kernel %s runtime: %ldus\n",
                                            "main.segmap_205348",
                                            time_end_230420 -
                                            time_start_230419);
                                }
                            }
                            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_226617;
                            
                            local_memory_capacity_226617 =
                                ctx->cuda.max_shared_memory;
                            if (sle64((int64_t) 0,
                                      sext_i32_i64(local_memory_capacity_226617)) &&
                                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");
                                
                                CUdeviceptr kernel_arg_230434 =
                                            ext_mem_222321.mem;
                                CUdeviceptr kernel_arg_230435 = mem_222911.mem;
                                CUdeviceptr kernel_arg_230436 = mem_222915.mem;
                                CUdeviceptr kernel_arg_230437 = mem_222919.mem;
                                CUdeviceptr kernel_arg_230438 = mem_222923.mem;
                                CUdeviceptr kernel_arg_230439 = mem_222927.mem;
                                CUdeviceptr kernel_arg_230440 = mem_222962.mem;
                                CUdeviceptr kernel_arg_230441 = mem_222966.mem;
                                CUdeviceptr kernel_arg_230442 =
                                            color_225041.mem;
                                CUdeviceptr kernel_arg_230443 =
                                            color_225042.mem;
                                
                                if ((((((1 && num_groups_206780 != 0) && 1 !=
                                        0) && 1 != 0) &&
                                      segmap_group_sizze_206779 != 0) && 1 !=
                                     0) && 1 != 0) {
                                    int perm[3] = {0, 1, 2};
                                    
                                    if (1 >= 1 << 16) {
                                        perm[1] = perm[0];
                                        perm[0] = 1;
                                    }
                                    if (1 >= 1 << 16) {
                                        perm[2] = perm[0];
                                        perm[0] = 2;
                                    }
                                    
                                    size_t grid[3];
                                    
                                    grid[perm[0]] = num_groups_206780;
                                    grid[perm[1]] = 1;
                                    grid[perm[2]] = 1;
                                    
                                    void *kernel_args_230431[] =
                                         {&ctx->global_failure, &m_196691,
                                          &n_p_196694, &q_s_196695,
                                          &jump_s_196701,
                                          &defunc_0_f_res_196740,
                                          &pad_css_len_196741, &s_n_m_196745,
                                          &num_groups_206780,
                                          &num_threads_225166,
                                          &kernel_arg_230434,
                                          &kernel_arg_230435,
                                          &kernel_arg_230436,
                                          &kernel_arg_230437,
                                          &kernel_arg_230438,
                                          &kernel_arg_230439,
                                          &kernel_arg_230440,
                                          &kernel_arg_230441,
                                          &kernel_arg_230442,
                                          &kernel_arg_230443};
                                    int64_t time_start_230432 = 0,
                                            time_end_230433 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                "main.segmap_206802",
                                                (long) num_groups_206780,
                                                (long) 1, (long) 1,
                                                (long) segmap_group_sizze_206779,
                                                (long) 1, (long) 1, (int) 0);
                                        time_start_230432 = get_wall_time();
                                    }
                                    
                                    cudaEvent_t *pevents = NULL;
                                    
                                    if (ctx->profiling &&
                                        !ctx->profiling_paused) {
                                        pevents = cuda_get_events(&ctx->cuda,
                                                                  &ctx->mainzisegmap_206802_runs,
                                                                  &ctx->mainzisegmap_206802_total_runtime);
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                           0));
                                    }
                                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_206802,
                                                                          grid[0],
                                                                          grid[1],
                                                                          grid[2],
                                                                          segmap_group_sizze_206779,
                                                                          1, 1,
                                                                          0,
                                                                          NULL,
                                                                          kernel_args_230431,
                                                                          NULL));
                                    if (pevents != NULL)
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                           0));
                                    if (ctx->debugging) {
                                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                        time_end_230433 = get_wall_time();
                                        fprintf(ctx->log,
                                                "Kernel %s runtime: %ldus\n",
                                                "main.segmap_206802",
                                                time_end_230433 -
                                                time_start_230432);
                                    }
                                }
                                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_226616;
                                
                                local_memory_capacity_226616 =
                                    ctx->cuda.max_shared_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_226616)) &&
                                    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");
                                    
                                    unsigned int shared_sizze_230447 =
                                                 (int64_t) 4 * (s_n_m_196745 *
                                                                q_s_196695);
                                    unsigned int shared_sizze_230449 =
                                                 (int64_t) 4 * (s_n_m_196745 *
                                                                q_s_196695);
                                    unsigned int shared_sizze_230451 =
                                                 (int64_t) 4 * (s_n_m_196745 *
                                                                q_s_196695);
                                    unsigned int shared_sizze_230453 =
                                                 (int64_t) 4 * (s_n_m_196745 *
                                                                q_s_196695);
                                    unsigned int shared_sizze_230455 =
                                                 (int64_t) 4 * (s_n_m_196745 *
                                                                q_s_196695);
                                    unsigned int shared_sizze_230457 =
                                                 bytes_222972;
                                    unsigned int shared_sizze_230459 =
                                                 bytes_222368;
                                    unsigned int shared_sizze_230461 =
                                                 bytes_222368;
                                    unsigned int shared_sizze_230463 =
                                                 bytes_222368;
                                    unsigned int shared_sizze_230465 =
                                                 bytes_222368;
                                    unsigned int shared_sizze_230467 =
                                                 bytes_222371;
                                    unsigned int shared_sizze_230469 =
                                                 bytes_222368;
                                    unsigned int shared_sizze_230471 =
                                                 bytes_222368;
                                    CUdeviceptr kernel_arg_230473 =
                                                ext_mem_222321.mem;
                                    CUdeviceptr kernel_arg_230474 =
                                                ext_mem_222322.mem;
                                    CUdeviceptr kernel_arg_230475 =
                                                ext_mem_222419.mem;
                                    CUdeviceptr kernel_arg_230476 =
                                                ext_mem_222420.mem;
                                    CUdeviceptr kernel_arg_230477 =
                                                mem_222583.mem;
                                    CUdeviceptr kernel_arg_230478 =
                                                mem_222588.mem;
                                    CUdeviceptr kernel_arg_230479 =
                                                mem_223008.mem;
                                    CUdeviceptr kernel_arg_230480 =
                                                mem_223013.mem;
                                    unsigned int shared_offset_230448 = 0;
                                    unsigned int shared_offset_230450 = 0 +
                                                 (shared_sizze_230447 + (8 -
                                                                         shared_sizze_230447 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_230452 = 0 +
                                                 (shared_sizze_230447 + (8 -
                                                                         shared_sizze_230447 %
                                                                         8) %
                                                  8) + (shared_sizze_230449 +
                                                        (8 -
                                                         shared_sizze_230449 %
                                                         8) % 8);
                                    unsigned int shared_offset_230454 = 0 +
                                                 (shared_sizze_230447 + (8 -
                                                                         shared_sizze_230447 %
                                                                         8) %
                                                  8) + (shared_sizze_230449 +
                                                        (8 -
                                                         shared_sizze_230449 %
                                                         8) % 8) +
                                                 (shared_sizze_230451 + (8 -
                                                                         shared_sizze_230451 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_230456 = 0 +
                                                 (shared_sizze_230447 + (8 -
                                                                         shared_sizze_230447 %
                                                                         8) %
                                                  8) + (shared_sizze_230449 +
                                                        (8 -
                                                         shared_sizze_230449 %
                                                         8) % 8) +
                                                 (shared_sizze_230451 + (8 -
                                                                         shared_sizze_230451 %
                                                                         8) %
                                                  8) + (shared_sizze_230453 +
                                                        (8 -
                                                         shared_sizze_230453 %
                                                         8) % 8);
                                    unsigned int shared_offset_230458 = 0 +
                                                 (shared_sizze_230447 + (8 -
                                                                         shared_sizze_230447 %
                                                                         8) %
                                                  8) + (shared_sizze_230449 +
                                                        (8 -
                                                         shared_sizze_230449 %
                                                         8) % 8) +
                                                 (shared_sizze_230451 + (8 -
                                                                         shared_sizze_230451 %
                                                                         8) %
                                                  8) + (shared_sizze_230453 +
                                                        (8 -
                                                         shared_sizze_230453 %
                                                         8) % 8) +
                                                 (shared_sizze_230455 + (8 -
                                                                         shared_sizze_230455 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_230460 = 0 +
                                                 (shared_sizze_230447 + (8 -
                                                                         shared_sizze_230447 %
                                                                         8) %
                                                  8) + (shared_sizze_230449 +
                                                        (8 -
                                                         shared_sizze_230449 %
                                                         8) % 8) +
                                                 (shared_sizze_230451 + (8 -
                                                                         shared_sizze_230451 %
                                                                         8) %
                                                  8) + (shared_sizze_230453 +
                                                        (8 -
                                                         shared_sizze_230453 %
                                                         8) % 8) +
                                                 (shared_sizze_230455 + (8 -
                                                                         shared_sizze_230455 %
                                                                         8) %
                                                  8) + (shared_sizze_230457 +
                                                        (8 -
                                                         shared_sizze_230457 %
                                                         8) % 8);
                                    unsigned int shared_offset_230462 = 0 +
                                                 (shared_sizze_230447 + (8 -
                                                                         shared_sizze_230447 %
                                                                         8) %
                                                  8) + (shared_sizze_230449 +
                                                        (8 -
                                                         shared_sizze_230449 %
                                                         8) % 8) +
                                                 (shared_sizze_230451 + (8 -
                                                                         shared_sizze_230451 %
                                                                         8) %
                                                  8) + (shared_sizze_230453 +
                                                        (8 -
                                                         shared_sizze_230453 %
                                                         8) % 8) +
                                                 (shared_sizze_230455 + (8 -
                                                                         shared_sizze_230455 %
                                                                         8) %
                                                  8) + (shared_sizze_230457 +
                                                        (8 -
                                                         shared_sizze_230457 %
                                                         8) % 8) +
                                                 (shared_sizze_230459 + (8 -
                                                                         shared_sizze_230459 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_230464 = 0 +
                                                 (shared_sizze_230447 + (8 -
                                                                         shared_sizze_230447 %
                                                                         8) %
                                                  8) + (shared_sizze_230449 +
                                                        (8 -
                                                         shared_sizze_230449 %
                                                         8) % 8) +
                                                 (shared_sizze_230451 + (8 -
                                                                         shared_sizze_230451 %
                                                                         8) %
                                                  8) + (shared_sizze_230453 +
                                                        (8 -
                                                         shared_sizze_230453 %
                                                         8) % 8) +
                                                 (shared_sizze_230455 + (8 -
                                                                         shared_sizze_230455 %
                                                                         8) %
                                                  8) + (shared_sizze_230457 +
                                                        (8 -
                                                         shared_sizze_230457 %
                                                         8) % 8) +
                                                 (shared_sizze_230459 + (8 -
                                                                         shared_sizze_230459 %
                                                                         8) %
                                                  8) + (shared_sizze_230461 +
                                                        (8 -
                                                         shared_sizze_230461 %
                                                         8) % 8);
                                    unsigned int shared_offset_230466 = 0 +
                                                 (shared_sizze_230447 + (8 -
                                                                         shared_sizze_230447 %
                                                                         8) %
                                                  8) + (shared_sizze_230449 +
                                                        (8 -
                                                         shared_sizze_230449 %
                                                         8) % 8) +
                                                 (shared_sizze_230451 + (8 -
                                                                         shared_sizze_230451 %
                                                                         8) %
                                                  8) + (shared_sizze_230453 +
                                                        (8 -
                                                         shared_sizze_230453 %
                                                         8) % 8) +
                                                 (shared_sizze_230455 + (8 -
                                                                         shared_sizze_230455 %
                                                                         8) %
                                                  8) + (shared_sizze_230457 +
                                                        (8 -
                                                         shared_sizze_230457 %
                                                         8) % 8) +
                                                 (shared_sizze_230459 + (8 -
                                                                         shared_sizze_230459 %
                                                                         8) %
                                                  8) + (shared_sizze_230461 +
                                                        (8 -
                                                         shared_sizze_230461 %
                                                         8) % 8) +
                                                 (shared_sizze_230463 + (8 -
                                                                         shared_sizze_230463 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_230468 = 0 +
                                                 (shared_sizze_230447 + (8 -
                                                                         shared_sizze_230447 %
                                                                         8) %
                                                  8) + (shared_sizze_230449 +
                                                        (8 -
                                                         shared_sizze_230449 %
                                                         8) % 8) +
                                                 (shared_sizze_230451 + (8 -
                                                                         shared_sizze_230451 %
                                                                         8) %
                                                  8) + (shared_sizze_230453 +
                                                        (8 -
                                                         shared_sizze_230453 %
                                                         8) % 8) +
                                                 (shared_sizze_230455 + (8 -
                                                                         shared_sizze_230455 %
                                                                         8) %
                                                  8) + (shared_sizze_230457 +
                                                        (8 -
                                                         shared_sizze_230457 %
                                                         8) % 8) +
                                                 (shared_sizze_230459 + (8 -
                                                                         shared_sizze_230459 %
                                                                         8) %
                                                  8) + (shared_sizze_230461 +
                                                        (8 -
                                                         shared_sizze_230461 %
                                                         8) % 8) +
                                                 (shared_sizze_230463 + (8 -
                                                                         shared_sizze_230463 %
                                                                         8) %
                                                  8) + (shared_sizze_230465 +
                                                        (8 -
                                                         shared_sizze_230465 %
                                                         8) % 8);
                                    unsigned int shared_offset_230470 = 0 +
                                                 (shared_sizze_230447 + (8 -
                                                                         shared_sizze_230447 %
                                                                         8) %
                                                  8) + (shared_sizze_230449 +
                                                        (8 -
                                                         shared_sizze_230449 %
                                                         8) % 8) +
                                                 (shared_sizze_230451 + (8 -
                                                                         shared_sizze_230451 %
                                                                         8) %
                                                  8) + (shared_sizze_230453 +
                                                        (8 -
                                                         shared_sizze_230453 %
                                                         8) % 8) +
                                                 (shared_sizze_230455 + (8 -
                                                                         shared_sizze_230455 %
                                                                         8) %
                                                  8) + (shared_sizze_230457 +
                                                        (8 -
                                                         shared_sizze_230457 %
                                                         8) % 8) +
                                                 (shared_sizze_230459 + (8 -
                                                                         shared_sizze_230459 %
                                                                         8) %
                                                  8) + (shared_sizze_230461 +
                                                        (8 -
                                                         shared_sizze_230461 %
                                                         8) % 8) +
                                                 (shared_sizze_230463 + (8 -
                                                                         shared_sizze_230463 %
                                                                         8) %
                                                  8) + (shared_sizze_230465 +
                                                        (8 -
                                                         shared_sizze_230465 %
                                                         8) % 8) +
                                                 (shared_sizze_230467 + (8 -
                                                                         shared_sizze_230467 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_230472 = 0 +
                                                 (shared_sizze_230447 + (8 -
                                                                         shared_sizze_230447 %
                                                                         8) %
                                                  8) + (shared_sizze_230449 +
                                                        (8 -
                                                         shared_sizze_230449 %
                                                         8) % 8) +
                                                 (shared_sizze_230451 + (8 -
                                                                         shared_sizze_230451 %
                                                                         8) %
                                                  8) + (shared_sizze_230453 +
                                                        (8 -
                                                         shared_sizze_230453 %
                                                         8) % 8) +
                                                 (shared_sizze_230455 + (8 -
                                                                         shared_sizze_230455 %
                                                                         8) %
                                                  8) + (shared_sizze_230457 +
                                                        (8 -
                                                         shared_sizze_230457 %
                                                         8) % 8) +
                                                 (shared_sizze_230459 + (8 -
                                                                         shared_sizze_230459 %
                                                                         8) %
                                                  8) + (shared_sizze_230461 +
                                                        (8 -
                                                         shared_sizze_230461 %
                                                         8) % 8) +
                                                 (shared_sizze_230463 + (8 -
                                                                         shared_sizze_230463 %
                                                                         8) %
                                                  8) + (shared_sizze_230465 +
                                                        (8 -
                                                         shared_sizze_230465 %
                                                         8) % 8) +
                                                 (shared_sizze_230467 + (8 -
                                                                         shared_sizze_230467 %
                                                                         8) %
                                                  8) + (shared_sizze_230469 +
                                                        (8 -
                                                         shared_sizze_230469 %
                                                         8) % 8);
                                    
                                    if ((((((1 && binop_x_222259 != 0) && 1 !=
                                            0) && 1 != 0) &&
                                          computed_group_sizze_206788 != 0) &&
                                         1 != 0) && 1 != 0) {
                                        int perm[3] = {0, 1, 2};
                                        
                                        if (1 >= 1 << 16) {
                                            perm[1] = perm[0];
                                            perm[0] = 1;
                                        }
                                        if (1 >= 1 << 16) {
                                            perm[2] = perm[0];
                                            perm[0] = 2;
                                        }
                                        
                                        size_t grid[3];
                                        
                                        grid[perm[0]] = binop_x_222259;
                                        grid[perm[1]] = 1;
                                        grid[perm[2]] = 1;
                                        
                                        void *kernel_args_230444[] =
                                             {&ctx->global_failure,
                                              &shared_offset_230448,
                                              &shared_offset_230450,
                                              &shared_offset_230452,
                                              &shared_offset_230454,
                                              &shared_offset_230456,
                                              &shared_offset_230458,
                                              &shared_offset_230460,
                                              &shared_offset_230462,
                                              &shared_offset_230464,
                                              &shared_offset_230466,
                                              &shared_offset_230468,
                                              &shared_offset_230470,
                                              &shared_offset_230472, &m_196691,
                                              &n_p_196694, &q_s_196695,
                                              &jump_s_196701,
                                              &defunc_0_f_res_196740,
                                              &pad_css_len_196741,
                                              &s_n_m_196745,
                                              &computed_group_sizze_206788,
                                              &kernel_arg_230473,
                                              &kernel_arg_230474,
                                              &kernel_arg_230475,
                                              &kernel_arg_230476,
                                              &kernel_arg_230477,
                                              &kernel_arg_230478,
                                              &kernel_arg_230479,
                                              &kernel_arg_230480};
                                        int64_t time_start_230445 = 0,
                                                time_end_230446 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                    "main.segmap_intragroup_206919",
                                                    (long) binop_x_222259,
                                                    (long) 1, (long) 1,
                                                    (long) computed_group_sizze_206788,
                                                    (long) 1, (long) 1,
                                                    (int) (0 +
                                                           (shared_sizze_230447 +
                                                            (8 -
                                                             shared_sizze_230447 %
                                                             8) % 8) +
                                                           (shared_sizze_230449 +
                                                            (8 -
                                                             shared_sizze_230449 %
                                                             8) % 8) +
                                                           (shared_sizze_230451 +
                                                            (8 -
                                                             shared_sizze_230451 %
                                                             8) % 8) +
                                                           (shared_sizze_230453 +
                                                            (8 -
                                                             shared_sizze_230453 %
                                                             8) % 8) +
                                                           (shared_sizze_230455 +
                                                            (8 -
                                                             shared_sizze_230455 %
                                                             8) % 8) +
                                                           (shared_sizze_230457 +
                                                            (8 -
                                                             shared_sizze_230457 %
                                                             8) % 8) +
                                                           (shared_sizze_230459 +
                                                            (8 -
                                                             shared_sizze_230459 %
                                                             8) % 8) +
                                                           (shared_sizze_230461 +
                                                            (8 -
                                                             shared_sizze_230461 %
                                                             8) % 8) +
                                                           (shared_sizze_230463 +
                                                            (8 -
                                                             shared_sizze_230463 %
                                                             8) % 8) +
                                                           (shared_sizze_230465 +
                                                            (8 -
                                                             shared_sizze_230465 %
                                                             8) % 8) +
                                                           (shared_sizze_230467 +
                                                            (8 -
                                                             shared_sizze_230467 %
                                                             8) % 8) +
                                                           (shared_sizze_230469 +
                                                            (8 -
                                                             shared_sizze_230469 %
                                                             8) % 8) +
                                                           (shared_sizze_230471 +
                                                            (8 -
                                                             shared_sizze_230471 %
                                                             8) % 8)));
                                            time_start_230445 = get_wall_time();
                                        }
                                        
                                        cudaEvent_t *pevents = NULL;
                                        
                                        if (ctx->profiling &&
                                            !ctx->profiling_paused) {
                                            pevents =
                                                cuda_get_events(&ctx->cuda,
                                                                &ctx->mainzisegmap_intragroup_206919_runs,
                                                                &ctx->mainzisegmap_intragroup_206919_total_runtime);
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                               0));
                                        }
                                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_intragroup_206919,
                                                                              grid[0],
                                                                              grid[1],
                                                                              grid[2],
                                                                              computed_group_sizze_206788,
                                                                              1,
                                                                              1,
                                                                              0 +
                                                                              (shared_sizze_230447 +
                                                                               (8 -
                                                                                shared_sizze_230447 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230449 +
                                                                               (8 -
                                                                                shared_sizze_230449 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230451 +
                                                                               (8 -
                                                                                shared_sizze_230451 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230453 +
                                                                               (8 -
                                                                                shared_sizze_230453 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230455 +
                                                                               (8 -
                                                                                shared_sizze_230455 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230457 +
                                                                               (8 -
                                                                                shared_sizze_230457 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230459 +
                                                                               (8 -
                                                                                shared_sizze_230459 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230461 +
                                                                               (8 -
                                                                                shared_sizze_230461 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230463 +
                                                                               (8 -
                                                                                shared_sizze_230463 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230465 +
                                                                               (8 -
                                                                                shared_sizze_230465 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230467 +
                                                                               (8 -
                                                                                shared_sizze_230467 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230469 +
                                                                               (8 -
                                                                                shared_sizze_230469 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230471 +
                                                                               (8 -
                                                                                shared_sizze_230471 %
                                                                                8) %
                                                                               8),
                                                                              NULL,
                                                                              kernel_args_230444,
                                                                              NULL));
                                        if (pevents != NULL)
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                               0));
                                        if (ctx->debugging) {
                                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                            time_end_230446 = get_wall_time();
                                            fprintf(ctx->log,
                                                    "Kernel %s runtime: %ldus\n",
                                                    "main.segmap_intragroup_206919",
                                                    time_end_230446 -
                                                    time_start_230445);
                                        }
                                    }
                                    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_226615;
                                    
                                    local_memory_capacity_226615 =
                                        ctx->cuda.max_shared_memory;
                                    if (sle64((int64_t) 0,
                                              sext_i32_i64(local_memory_capacity_226615)) &&
                                        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");
                                        
                                        CUdeviceptr kernel_arg_230484 =
                                                    ext_mem_222321.mem;
                                        CUdeviceptr kernel_arg_230485 =
                                                    ext_mem_222322.mem;
                                        CUdeviceptr kernel_arg_230486 =
                                                    ext_mem_222419.mem;
                                        CUdeviceptr kernel_arg_230487 =
                                                    ext_mem_222420.mem;
                                        CUdeviceptr kernel_arg_230488 =
                                                    mem_222583.mem;
                                        CUdeviceptr kernel_arg_230489 =
                                                    mem_222588.mem;
                                        CUdeviceptr kernel_arg_230490 =
                                                    mem_223019.mem;
                                        CUdeviceptr kernel_arg_230491 =
                                                    mem_223024.mem;
                                        
                                        if ((((((1 &&
                                                 segmap_usable_groups_207065 !=
                                                 0) && 1 != 0) && 1 != 0) &&
                                              segmap_group_sizze_207064 != 0) &&
                                             1 != 0) && 1 != 0) {
                                            int perm[3] = {0, 1, 2};
                                            
                                            if (1 >= 1 << 16) {
                                                perm[1] = perm[0];
                                                perm[0] = 1;
                                            }
                                            if (1 >= 1 << 16) {
                                                perm[2] = perm[0];
                                                perm[0] = 2;
                                            }
                                            
                                            size_t grid[3];
                                            
                                            grid[perm[0]] =
                                                segmap_usable_groups_207065;
                                            grid[perm[1]] = 1;
                                            grid[perm[2]] = 1;
                                            
                                            void *kernel_args_230481[] =
                                                 {&ctx->global_failure,
                                                  &m_196691, &n_p_196694,
                                                  &q_s_196695, &jump_s_196701,
                                                  &defunc_0_f_res_196740,
                                                  &pad_css_len_196741,
                                                  &s_n_m_196745,
                                                  &kernel_arg_230484,
                                                  &kernel_arg_230485,
                                                  &kernel_arg_230486,
                                                  &kernel_arg_230487,
                                                  &kernel_arg_230488,
                                                  &kernel_arg_230489,
                                                  &kernel_arg_230490,
                                                  &kernel_arg_230491};
                                            int64_t time_start_230482 = 0,
                                                    time_end_230483 = 0;
                                            
                                            if (ctx->debugging) {
                                                fprintf(ctx->log,
                                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                        "main.segmap_207077",
                                                        (long) segmap_usable_groups_207065,
                                                        (long) 1, (long) 1,
                                                        (long) segmap_group_sizze_207064,
                                                        (long) 1, (long) 1,
                                                        (int) 0);
                                                time_start_230482 =
                                                    get_wall_time();
                                            }
                                            
                                            cudaEvent_t *pevents = NULL;
                                            
                                            if (ctx->profiling &&
                                                !ctx->profiling_paused) {
                                                pevents =
                                                    cuda_get_events(&ctx->cuda,
                                                                    &ctx->mainzisegmap_207077_runs,
                                                                    &ctx->mainzisegmap_207077_total_runtime);
                                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                                   0));
                                            }
                                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_207077,
                                                                                  grid[0],
                                                                                  grid[1],
                                                                                  grid[2],
                                                                                  segmap_group_sizze_207064,
                                                                                  1,
                                                                                  1,
                                                                                  0,
                                                                                  NULL,
                                                                                  kernel_args_230481,
                                                                                  NULL));
                                            if (pevents != NULL)
                                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                                   0));
                                            if (ctx->debugging) {
                                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                                time_end_230483 =
                                                    get_wall_time();
                                                fprintf(ctx->log,
                                                        "Kernel %s runtime: %ldus\n",
                                                        "main.segmap_207077",
                                                        time_end_230483 -
                                                        time_start_230482);
                                            }
                                        }
                                        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");
                                        
                                        CUdeviceptr kernel_arg_230495 =
                                                    mem_223030.mem;
                                        CUdeviceptr kernel_arg_230496 =
                                                    mem_223034.mem;
                                        
                                        if ((((((1 &&
                                                 segmap_usable_groups_207188 !=
                                                 0) && 1 != 0) && 1 != 0) &&
                                              segmap_group_sizze_207187 != 0) &&
                                             1 != 0) && 1 != 0) {
                                            int perm[3] = {0, 1, 2};
                                            
                                            if (1 >= 1 << 16) {
                                                perm[1] = perm[0];
                                                perm[0] = 1;
                                            }
                                            if (1 >= 1 << 16) {
                                                perm[2] = perm[0];
                                                perm[0] = 2;
                                            }
                                            
                                            size_t grid[3];
                                            
                                            grid[perm[0]] =
                                                segmap_usable_groups_207188;
                                            grid[perm[1]] = 1;
                                            grid[perm[2]] = 1;
                                            
                                            void *kernel_args_230492[] =
                                                 {&ctx->global_failure,
                                                  &m_196691, &n_p_196694,
                                                  &jump_s_196701,
                                                  &defunc_0_f_res_196740,
                                                  &pad_css_len_196741,
                                                  &s_n_m_196745,
                                                  &kernel_arg_230495,
                                                  &kernel_arg_230496};
                                            int64_t time_start_230493 = 0,
                                                    time_end_230494 = 0;
                                            
                                            if (ctx->debugging) {
                                                fprintf(ctx->log,
                                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                        "main.segmap_207194",
                                                        (long) segmap_usable_groups_207188,
                                                        (long) 1, (long) 1,
                                                        (long) segmap_group_sizze_207187,
                                                        (long) 1, (long) 1,
                                                        (int) 0);
                                                time_start_230493 =
                                                    get_wall_time();
                                            }
                                            
                                            cudaEvent_t *pevents = NULL;
                                            
                                            if (ctx->profiling &&
                                                !ctx->profiling_paused) {
                                                pevents =
                                                    cuda_get_events(&ctx->cuda,
                                                                    &ctx->mainzisegmap_207194_runs,
                                                                    &ctx->mainzisegmap_207194_total_runtime);
                                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                                   0));
                                            }
                                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_207194,
                                                                                  grid[0],
                                                                                  grid[1],
                                                                                  grid[2],
                                                                                  segmap_group_sizze_207187,
                                                                                  1,
                                                                                  1,
                                                                                  0,
                                                                                  NULL,
                                                                                  kernel_args_230492,
                                                                                  NULL));
                                            if (pevents != NULL)
                                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                                   0));
                                            if (ctx->debugging) {
                                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                                time_end_230494 =
                                                    get_wall_time();
                                                fprintf(ctx->log,
                                                        "Kernel %s runtime: %ldus\n",
                                                        "main.segmap_207194",
                                                        time_end_230494 -
                                                        time_start_230493);
                                            }
                                        }
                                        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_226409 =
                                            smax64((int64_t) 1, q_s_196695);
                                            int64_t num_threads_226410 =
                                                    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_226409),
                                                        '\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_226409))),
                                                        '\n');
                                            
                                            unsigned int shared_sizze_230500 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_207210;
                                            unsigned int shared_sizze_230502 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_207210;
                                            unsigned int shared_sizze_230504 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_207210;
                                            CUdeviceptr kernel_arg_230506 =
                                                        ext_mem_222321.mem;
                                            CUdeviceptr kernel_arg_230507 =
                                                        ext_mem_222322.mem;
                                            CUdeviceptr kernel_arg_230508 =
                                                        ext_mem_222419.mem;
                                            CUdeviceptr kernel_arg_230509 =
                                                        ext_mem_222420.mem;
                                            CUdeviceptr kernel_arg_230510 =
                                                        mem_222588.mem;
                                            CUdeviceptr kernel_arg_230511 =
                                                        mem_223030.mem;
                                            CUdeviceptr kernel_arg_230512 =
                                                        mem_223040.mem;
                                            CUdeviceptr kernel_arg_230513 =
                                                        mem_223045.mem;
                                            CUdeviceptr kernel_arg_230514 =
                                                        mem_223050.mem;
                                            unsigned int shared_offset_230501 =
                                                         0;
                                            unsigned int shared_offset_230503 =
                                                         0 +
                                                         (shared_sizze_230500 +
                                                          (8 -
                                                           shared_sizze_230500 %
                                                           8) % 8);
                                            unsigned int shared_offset_230505 =
                                                         0 +
                                                         (shared_sizze_230500 +
                                                          (8 -
                                                           shared_sizze_230500 %
                                                           8) % 8) +
                                                         (shared_sizze_230502 +
                                                          (8 -
                                                           shared_sizze_230502 %
                                                           8) % 8);
                                            
                                            if ((((((1 && num_groups_207211 !=
                                                     0) && 1 != 0) && 1 != 0) &&
                                                  segred_group_sizze_207210 !=
                                                  0) && 1 != 0) && 1 != 0) {
                                                int perm[3] = {0, 1, 2};
                                                
                                                if (1 >= 1 << 16) {
                                                    perm[1] = perm[0];
                                                    perm[0] = 1;
                                                }
                                                if (1 >= 1 << 16) {
                                                    perm[2] = perm[0];
                                                    perm[0] = 2;
                                                }
                                                
                                                size_t grid[3];
                                                
                                                grid[perm[0]] =
                                                    num_groups_207211;
                                                grid[perm[1]] = 1;
                                                grid[perm[2]] = 1;
                                                
                                                void *kernel_args_230497[] =
                                                     {&ctx->global_failure,
                                                      &shared_offset_230501,
                                                      &shared_offset_230503,
                                                      &shared_offset_230505,
                                                      &m_196691, &n_p_196694,
                                                      &q_s_196695,
                                                      &defunc_0_f_res_196740,
                                                      &s_n_m_196745,
                                                      &num_groups_207211,
                                                      &segment_sizze_nonzzero_226409,
                                                      &kernel_arg_230506,
                                                      &kernel_arg_230507,
                                                      &kernel_arg_230508,
                                                      &kernel_arg_230509,
                                                      &kernel_arg_230510,
                                                      &kernel_arg_230511,
                                                      &kernel_arg_230512,
                                                      &kernel_arg_230513,
                                                      &kernel_arg_230514};
                                                int64_t time_start_230498 = 0,
                                                        time_end_230499 = 0;
                                                
                                                if (ctx->debugging) {
                                                    fprintf(ctx->log,
                                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                            "main.segred_small_207220",
                                                            (long) num_groups_207211,
                                                            (long) 1, (long) 1,
                                                            (long) segred_group_sizze_207210,
                                                            (long) 1, (long) 1,
                                                            (int) (0 +
                                                                   (shared_sizze_230500 +
                                                                    (8 -
                                                                     shared_sizze_230500 %
                                                                     8) % 8) +
                                                                   (shared_sizze_230502 +
                                                                    (8 -
                                                                     shared_sizze_230502 %
                                                                     8) % 8) +
                                                                   (shared_sizze_230504 +
                                                                    (8 -
                                                                     shared_sizze_230504 %
                                                                     8) % 8)));
                                                    time_start_230498 =
                                                        get_wall_time();
                                                }
                                                
                                                cudaEvent_t *pevents = NULL;
                                                
                                                if (ctx->profiling &&
                                                    !ctx->profiling_paused) {
                                                    pevents =
                                                        cuda_get_events(&ctx->cuda,
                                                                        &ctx->mainzisegred_small_207220_runs,
                                                                        &ctx->mainzisegred_small_207220_total_runtime);
                                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                                       0));
                                                }
                                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_small_207220,
                                                                                      grid[0],
                                                                                      grid[1],
                                                                                      grid[2],
                                                                                      segred_group_sizze_207210,
                                                                                      1,
                                                                                      1,
                                                                                      0 +
                                                                                      (shared_sizze_230500 +
                                                                                       (8 -
                                                                                        shared_sizze_230500 %
                                                                                        8) %
                                                                                       8) +
                                                                                      (shared_sizze_230502 +
                                                                                       (8 -
                                                                                        shared_sizze_230502 %
                                                                                        8) %
                                                                                       8) +
                                                                                      (shared_sizze_230504 +
                                                                                       (8 -
                                                                                        shared_sizze_230504 %
                                                                                        8) %
                                                                                       8),
                                                                                      NULL,
                                                                                      kernel_args_230497,
                                                                                      NULL));
                                                if (pevents != NULL)
                                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                                       0));
                                                if (ctx->debugging) {
                                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                                    time_end_230499 =
                                                        get_wall_time();
                                                    fprintf(ctx->log,
                                                            "Kernel %s runtime: %ldus\n",
                                                            "main.segred_small_207220",
                                                            time_end_230499 -
                                                            time_start_230498);
                                                }
                                            }
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n", "");
                                        } else {
                                            int64_t groups_per_segment_226452 =
                                                    sdiv_up64(num_groups_207211,
                                                              smax64((int64_t) 1,
                                                                     m_196691 *
                                                                     n_p_196694 *
                                                                     s_n_m_196745));
                                            int64_t elements_per_thread_226453 =
                                                    sdiv_up64(q_s_196695,
                                                              segred_group_sizze_207210 *
                                                              groups_per_segment_226452);
                                            int64_t virt_num_groups_226454 =
                                                    groups_per_segment_226452 *
                                                    (m_196691 * n_p_196694 *
                                                     s_n_m_196745);
                                            int64_t num_threads_226455 =
                                                    num_groups_207211 *
                                                    segred_group_sizze_207210;
                                            int64_t threads_per_segment_226456 =
                                                    groups_per_segment_226452 *
                                                    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_226454,
                                                        '\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_226453,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "groups_per_segment",
                                                        (long long) groups_per_segment_226452,
                                                        '\n');
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226457;
                                            
                                            segred_tmp_mem_226457.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226457,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226454,
                                                                      "segred_tmp_mem_226457")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226459;
                                            
                                            segred_tmp_mem_226459.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226459,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226454,
                                                                      "segred_tmp_mem_226459")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226461;
                                            
                                            segred_tmp_mem_226461.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226461,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226454,
                                                                      "segred_tmp_mem_226461")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            mainzicounter_mem_226463 =
                                            ctx->mainzicounter_mem_226463;
                                            unsigned int shared_sizze_230519 =
                                                         1;
                                            unsigned int shared_sizze_230521 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_207210;
                                            unsigned int shared_sizze_230523 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_207210;
                                            unsigned int shared_sizze_230525 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_207210;
                                            CUdeviceptr kernel_arg_230527 =
                                                        ext_mem_222321.mem;
                                            CUdeviceptr kernel_arg_230528 =
                                                        ext_mem_222322.mem;
                                            CUdeviceptr kernel_arg_230529 =
                                                        ext_mem_222419.mem;
                                            CUdeviceptr kernel_arg_230530 =
                                                        ext_mem_222420.mem;
                                            CUdeviceptr kernel_arg_230531 =
                                                        mem_222588.mem;
                                            CUdeviceptr kernel_arg_230532 =
                                                        mem_223030.mem;
                                            CUdeviceptr kernel_arg_230533 =
                                                        mem_223040.mem;
                                            CUdeviceptr kernel_arg_230534 =
                                                        mem_223045.mem;
                                            CUdeviceptr kernel_arg_230535 =
                                                        mem_223050.mem;
                                            CUdeviceptr kernel_arg_230536 =
                                                        segred_tmp_mem_226457.mem;
                                            CUdeviceptr kernel_arg_230537 =
                                                        segred_tmp_mem_226459.mem;
                                            CUdeviceptr kernel_arg_230538 =
                                                        segred_tmp_mem_226461.mem;
                                            CUdeviceptr kernel_arg_230539 =
                                                        mainzicounter_mem_226463.mem;
                                            unsigned int shared_offset_230520 =
                                                         0;
                                            unsigned int shared_offset_230522 =
                                                         0 +
                                                         (shared_sizze_230519 +
                                                          (8 -
                                                           shared_sizze_230519 %
                                                           8) % 8);
                                            unsigned int shared_offset_230524 =
                                                         0 +
                                                         (shared_sizze_230519 +
                                                          (8 -
                                                           shared_sizze_230519 %
                                                           8) % 8) +
                                                         (shared_sizze_230521 +
                                                          (8 -
                                                           shared_sizze_230521 %
                                                           8) % 8);
                                            unsigned int shared_offset_230526 =
                                                         0 +
                                                         (shared_sizze_230519 +
                                                          (8 -
                                                           shared_sizze_230519 %
                                                           8) % 8) +
                                                         (shared_sizze_230521 +
                                                          (8 -
                                                           shared_sizze_230521 %
                                                           8) % 8) +
                                                         (shared_sizze_230523 +
                                                          (8 -
                                                           shared_sizze_230523 %
                                                           8) % 8);
                                            
                                            if ((((((1 && num_groups_207211 !=
                                                     0) && 1 != 0) && 1 != 0) &&
                                                  segred_group_sizze_207210 !=
                                                  0) && 1 != 0) && 1 != 0) {
                                                int perm[3] = {0, 1, 2};
                                                
                                                if (1 >= 1 << 16) {
                                                    perm[1] = perm[0];
                                                    perm[0] = 1;
                                                }
                                                if (1 >= 1 << 16) {
                                                    perm[2] = perm[0];
                                                    perm[0] = 2;
                                                }
                                                
                                                size_t grid[3];
                                                
                                                grid[perm[0]] =
                                                    num_groups_207211;
                                                grid[perm[1]] = 1;
                                                grid[perm[2]] = 1;
                                                
                                                void *kernel_args_230516[] =
                                                     {&ctx->global_failure,
                                                      &shared_offset_230520,
                                                      &shared_offset_230522,
                                                      &shared_offset_230524,
                                                      &shared_offset_230526,
                                                      &m_196691, &n_p_196694,
                                                      &q_s_196695,
                                                      &defunc_0_f_res_196740,
                                                      &s_n_m_196745,
                                                      &num_groups_207211,
                                                      &groups_per_segment_226452,
                                                      &elements_per_thread_226453,
                                                      &virt_num_groups_226454,
                                                      &threads_per_segment_226456,
                                                      &kernel_arg_230527,
                                                      &kernel_arg_230528,
                                                      &kernel_arg_230529,
                                                      &kernel_arg_230530,
                                                      &kernel_arg_230531,
                                                      &kernel_arg_230532,
                                                      &kernel_arg_230533,
                                                      &kernel_arg_230534,
                                                      &kernel_arg_230535,
                                                      &kernel_arg_230536,
                                                      &kernel_arg_230537,
                                                      &kernel_arg_230538,
                                                      &kernel_arg_230539};
                                                int64_t time_start_230517 = 0,
                                                        time_end_230518 = 0;
                                                
                                                if (ctx->debugging) {
                                                    fprintf(ctx->log,
                                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                            "main.segred_large_207220",
                                                            (long) num_groups_207211,
                                                            (long) 1, (long) 1,
                                                            (long) segred_group_sizze_207210,
                                                            (long) 1, (long) 1,
                                                            (int) (0 +
                                                                   (shared_sizze_230519 +
                                                                    (8 -
                                                                     shared_sizze_230519 %
                                                                     8) % 8) +
                                                                   (shared_sizze_230521 +
                                                                    (8 -
                                                                     shared_sizze_230521 %
                                                                     8) % 8) +
                                                                   (shared_sizze_230523 +
                                                                    (8 -
                                                                     shared_sizze_230523 %
                                                                     8) % 8) +
                                                                   (shared_sizze_230525 +
                                                                    (8 -
                                                                     shared_sizze_230525 %
                                                                     8) % 8)));
                                                    time_start_230517 =
                                                        get_wall_time();
                                                }
                                                
                                                cudaEvent_t *pevents = NULL;
                                                
                                                if (ctx->profiling &&
                                                    !ctx->profiling_paused) {
                                                    pevents =
                                                        cuda_get_events(&ctx->cuda,
                                                                        &ctx->mainzisegred_large_207220_runs,
                                                                        &ctx->mainzisegred_large_207220_total_runtime);
                                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                                       0));
                                                }
                                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_large_207220,
                                                                                      grid[0],
                                                                                      grid[1],
                                                                                      grid[2],
                                                                                      segred_group_sizze_207210,
                                                                                      1,
                                                                                      1,
                                                                                      0 +
                                                                                      (shared_sizze_230519 +
                                                                                       (8 -
                                                                                        shared_sizze_230519 %
                                                                                        8) %
                                                                                       8) +
                                                                                      (shared_sizze_230521 +
                                                                                       (8 -
                                                                                        shared_sizze_230521 %
                                                                                        8) %
                                                                                       8) +
                                                                                      (shared_sizze_230523 +
                                                                                       (8 -
                                                                                        shared_sizze_230523 %
                                                                                        8) %
                                                                                       8) +
                                                                                      (shared_sizze_230525 +
                                                                                       (8 -
                                                                                        shared_sizze_230525 %
                                                                                        8) %
                                                                                       8),
                                                                                      NULL,
                                                                                      kernel_args_230516,
                                                                                      NULL));
                                                if (pevents != NULL)
                                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                                       0));
                                                if (ctx->debugging) {
                                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                                    time_end_230518 =
                                                        get_wall_time();
                                                    fprintf(ctx->log,
                                                            "Kernel %s runtime: %ldus\n",
                                                            "main.segred_large_207220",
                                                            time_end_230518 -
                                                            time_start_230517);
                                                }
                                            }
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n", "");
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226461,
                                                                      "segred_tmp_mem_226461") !=
                                                0)
                                                return 1;
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226459,
                                                                      "segred_tmp_mem_226459") !=
                                                0)
                                                return 1;
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226457,
                                                                      "segred_tmp_mem_226457") !=
                                                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");
                                        
                                        CUdeviceptr kernel_arg_230543 =
                                                    mem_223040.mem;
                                        CUdeviceptr kernel_arg_230544 =
                                                    mem_223045.mem;
                                        CUdeviceptr kernel_arg_230545 =
                                                    mem_223050.mem;
                                        CUdeviceptr kernel_arg_230546 =
                                                    mem_223056.mem;
                                        CUdeviceptr kernel_arg_230547 =
                                                    mem_223061.mem;
                                        CUdeviceptr kernel_arg_230548 =
                                                    mem_223066.mem;
                                        CUdeviceptr kernel_arg_230549 =
                                                    mem_223071.mem;
                                        
                                        if ((((((1 &&
                                                 segmap_usable_groups_207270 !=
                                                 0) && 1 != 0) && 1 != 0) &&
                                              segmap_group_sizze_207269 != 0) &&
                                             1 != 0) && 1 != 0) {
                                            int perm[3] = {0, 1, 2};
                                            
                                            if (1 >= 1 << 16) {
                                                perm[1] = perm[0];
                                                perm[0] = 1;
                                            }
                                            if (1 >= 1 << 16) {
                                                perm[2] = perm[0];
                                                perm[0] = 2;
                                            }
                                            
                                            size_t grid[3];
                                            
                                            grid[perm[0]] =
                                                segmap_usable_groups_207270;
                                            grid[perm[1]] = 1;
                                            grid[perm[2]] = 1;
                                            
                                            void *kernel_args_230540[] =
                                                 {&ctx->global_failure,
                                                  &m_196691, &n_p_196694,
                                                  &jump_s_196701,
                                                  &defunc_0_f_res_196740,
                                                  &pad_css_len_196741,
                                                  &s_n_m_196745,
                                                  &kernel_arg_230543,
                                                  &kernel_arg_230544,
                                                  &kernel_arg_230545,
                                                  &kernel_arg_230546,
                                                  &kernel_arg_230547,
                                                  &kernel_arg_230548,
                                                  &kernel_arg_230549};
                                            int64_t time_start_230541 = 0,
                                                    time_end_230542 = 0;
                                            
                                            if (ctx->debugging) {
                                                fprintf(ctx->log,
                                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                        "main.segmap_207278",
                                                        (long) segmap_usable_groups_207270,
                                                        (long) 1, (long) 1,
                                                        (long) segmap_group_sizze_207269,
                                                        (long) 1, (long) 1,
                                                        (int) 0);
                                                time_start_230541 =
                                                    get_wall_time();
                                            }
                                            
                                            cudaEvent_t *pevents = NULL;
                                            
                                            if (ctx->profiling &&
                                                !ctx->profiling_paused) {
                                                pevents =
                                                    cuda_get_events(&ctx->cuda,
                                                                    &ctx->mainzisegmap_207278_runs,
                                                                    &ctx->mainzisegmap_207278_total_runtime);
                                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                                   0));
                                            }
                                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_207278,
                                                                                  grid[0],
                                                                                  grid[1],
                                                                                  grid[2],
                                                                                  segmap_group_sizze_207269,
                                                                                  1,
                                                                                  1,
                                                                                  0,
                                                                                  NULL,
                                                                                  kernel_args_230540,
                                                                                  NULL));
                                            if (pevents != NULL)
                                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                                   0));
                                            if (ctx->debugging) {
                                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                                time_end_230542 =
                                                    get_wall_time();
                                                fprintf(ctx->log,
                                                        "Kernel %s runtime: %ldus\n",
                                                        "main.segmap_207278",
                                                        time_end_230542 -
                                                        time_start_230541);
                                            }
                                        }
                                        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_226525 =
                                            smax64((int64_t) 1, q_s_196695);
                                            int64_t num_threads_226526 =
                                                    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_226525),
                                                        '\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_226525))),
                                                        '\n');
                                            
                                            unsigned int shared_sizze_230553 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_207305;
                                            unsigned int shared_sizze_230555 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_207305;
                                            CUdeviceptr kernel_arg_230557 =
                                                        ext_mem_222321.mem;
                                            CUdeviceptr kernel_arg_230558 =
                                                        ext_mem_222322.mem;
                                            CUdeviceptr kernel_arg_230559 =
                                                        ext_mem_222419.mem;
                                            CUdeviceptr kernel_arg_230560 =
                                                        ext_mem_222420.mem;
                                            CUdeviceptr kernel_arg_230561 =
                                                        mem_222583.mem;
                                            CUdeviceptr kernel_arg_230562 =
                                                        mem_222588.mem;
                                            CUdeviceptr kernel_arg_230563 =
                                                        mem_223056.mem;
                                            CUdeviceptr kernel_arg_230564 =
                                                        mem_223061.mem;
                                            CUdeviceptr kernel_arg_230565 =
                                                        mem_223066.mem;
                                            CUdeviceptr kernel_arg_230566 =
                                                        mem_223071.mem;
                                            CUdeviceptr kernel_arg_230567 =
                                                        mem_223077.mem;
                                            CUdeviceptr kernel_arg_230568 =
                                                        mem_223082.mem;
                                            unsigned int shared_offset_230554 =
                                                         0;
                                            unsigned int shared_offset_230556 =
                                                         0 +
                                                         (shared_sizze_230553 +
                                                          (8 -
                                                           shared_sizze_230553 %
                                                           8) % 8);
                                            
                                            if ((((((1 && num_groups_207306 !=
                                                     0) && 1 != 0) && 1 != 0) &&
                                                  segred_group_sizze_207305 !=
                                                  0) && 1 != 0) && 1 != 0) {
                                                int perm[3] = {0, 1, 2};
                                                
                                                if (1 >= 1 << 16) {
                                                    perm[1] = perm[0];
                                                    perm[0] = 1;
                                                }
                                                if (1 >= 1 << 16) {
                                                    perm[2] = perm[0];
                                                    perm[0] = 2;
                                                }
                                                
                                                size_t grid[3];
                                                
                                                grid[perm[0]] =
                                                    num_groups_207306;
                                                grid[perm[1]] = 1;
                                                grid[perm[2]] = 1;
                                                
                                                void *kernel_args_230550[] =
                                                     {&ctx->global_failure,
                                                      &shared_offset_230554,
                                                      &shared_offset_230556,
                                                      &m_196691, &n_p_196694,
                                                      &q_s_196695,
                                                      &defunc_0_f_res_196740,
                                                      &s_n_m_196745,
                                                      &num_groups_207306,
                                                      &segment_sizze_nonzzero_226525,
                                                      &kernel_arg_230557,
                                                      &kernel_arg_230558,
                                                      &kernel_arg_230559,
                                                      &kernel_arg_230560,
                                                      &kernel_arg_230561,
                                                      &kernel_arg_230562,
                                                      &kernel_arg_230563,
                                                      &kernel_arg_230564,
                                                      &kernel_arg_230565,
                                                      &kernel_arg_230566,
                                                      &kernel_arg_230567,
                                                      &kernel_arg_230568};
                                                int64_t time_start_230551 = 0,
                                                        time_end_230552 = 0;
                                                
                                                if (ctx->debugging) {
                                                    fprintf(ctx->log,
                                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                            "main.segred_small_207314",
                                                            (long) num_groups_207306,
                                                            (long) 1, (long) 1,
                                                            (long) segred_group_sizze_207305,
                                                            (long) 1, (long) 1,
                                                            (int) (0 +
                                                                   (shared_sizze_230553 +
                                                                    (8 -
                                                                     shared_sizze_230553 %
                                                                     8) % 8) +
                                                                   (shared_sizze_230555 +
                                                                    (8 -
                                                                     shared_sizze_230555 %
                                                                     8) % 8)));
                                                    time_start_230551 =
                                                        get_wall_time();
                                                }
                                                
                                                cudaEvent_t *pevents = NULL;
                                                
                                                if (ctx->profiling &&
                                                    !ctx->profiling_paused) {
                                                    pevents =
                                                        cuda_get_events(&ctx->cuda,
                                                                        &ctx->mainzisegred_small_207314_runs,
                                                                        &ctx->mainzisegred_small_207314_total_runtime);
                                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                                       0));
                                                }
                                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_small_207314,
                                                                                      grid[0],
                                                                                      grid[1],
                                                                                      grid[2],
                                                                                      segred_group_sizze_207305,
                                                                                      1,
                                                                                      1,
                                                                                      0 +
                                                                                      (shared_sizze_230553 +
                                                                                       (8 -
                                                                                        shared_sizze_230553 %
                                                                                        8) %
                                                                                       8) +
                                                                                      (shared_sizze_230555 +
                                                                                       (8 -
                                                                                        shared_sizze_230555 %
                                                                                        8) %
                                                                                       8),
                                                                                      NULL,
                                                                                      kernel_args_230550,
                                                                                      NULL));
                                                if (pevents != NULL)
                                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                                       0));
                                                if (ctx->debugging) {
                                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                                    time_end_230552 =
                                                        get_wall_time();
                                                    fprintf(ctx->log,
                                                            "Kernel %s runtime: %ldus\n",
                                                            "main.segred_small_207314",
                                                            time_end_230552 -
                                                            time_start_230551);
                                                }
                                            }
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n", "");
                                        } else {
                                            int64_t groups_per_segment_226562 =
                                                    sdiv_up64(num_groups_207306,
                                                              smax64((int64_t) 1,
                                                                     m_196691 *
                                                                     n_p_196694 *
                                                                     s_n_m_196745));
                                            int64_t elements_per_thread_226563 =
                                                    sdiv_up64(q_s_196695,
                                                              segred_group_sizze_207305 *
                                                              groups_per_segment_226562);
                                            int64_t virt_num_groups_226564 =
                                                    groups_per_segment_226562 *
                                                    (m_196691 * n_p_196694 *
                                                     s_n_m_196745);
                                            int64_t num_threads_226565 =
                                                    num_groups_207306 *
                                                    segred_group_sizze_207305;
                                            int64_t threads_per_segment_226566 =
                                                    groups_per_segment_226562 *
                                                    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_226564,
                                                        '\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_226563,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "groups_per_segment",
                                                        (long long) groups_per_segment_226562,
                                                        '\n');
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226567;
                                            
                                            segred_tmp_mem_226567.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226567,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226564,
                                                                      "segred_tmp_mem_226567")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226569;
                                            
                                            segred_tmp_mem_226569.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226569,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226564,
                                                                      "segred_tmp_mem_226569")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            mainzicounter_mem_226571 =
                                            ctx->mainzicounter_mem_226571;
                                            unsigned int shared_sizze_230573 =
                                                         1;
                                            unsigned int shared_sizze_230575 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_207305;
                                            unsigned int shared_sizze_230577 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_207305;
                                            CUdeviceptr kernel_arg_230579 =
                                                        ext_mem_222321.mem;
                                            CUdeviceptr kernel_arg_230580 =
                                                        ext_mem_222322.mem;
                                            CUdeviceptr kernel_arg_230581 =
                                                        ext_mem_222419.mem;
                                            CUdeviceptr kernel_arg_230582 =
                                                        ext_mem_222420.mem;
                                            CUdeviceptr kernel_arg_230583 =
                                                        mem_222583.mem;
                                            CUdeviceptr kernel_arg_230584 =
                                                        mem_222588.mem;
                                            CUdeviceptr kernel_arg_230585 =
                                                        mem_223056.mem;
                                            CUdeviceptr kernel_arg_230586 =
                                                        mem_223061.mem;
                                            CUdeviceptr kernel_arg_230587 =
                                                        mem_223066.mem;
                                            CUdeviceptr kernel_arg_230588 =
                                                        mem_223071.mem;
                                            CUdeviceptr kernel_arg_230589 =
                                                        mem_223077.mem;
                                            CUdeviceptr kernel_arg_230590 =
                                                        mem_223082.mem;
                                            CUdeviceptr kernel_arg_230591 =
                                                        segred_tmp_mem_226567.mem;
                                            CUdeviceptr kernel_arg_230592 =
                                                        segred_tmp_mem_226569.mem;
                                            CUdeviceptr kernel_arg_230593 =
                                                        mainzicounter_mem_226571.mem;
                                            unsigned int shared_offset_230574 =
                                                         0;
                                            unsigned int shared_offset_230576 =
                                                         0 +
                                                         (shared_sizze_230573 +
                                                          (8 -
                                                           shared_sizze_230573 %
                                                           8) % 8);
                                            unsigned int shared_offset_230578 =
                                                         0 +
                                                         (shared_sizze_230573 +
                                                          (8 -
                                                           shared_sizze_230573 %
                                                           8) % 8) +
                                                         (shared_sizze_230575 +
                                                          (8 -
                                                           shared_sizze_230575 %
                                                           8) % 8);
                                            
                                            if ((((((1 && num_groups_207306 !=
                                                     0) && 1 != 0) && 1 != 0) &&
                                                  segred_group_sizze_207305 !=
                                                  0) && 1 != 0) && 1 != 0) {
                                                int perm[3] = {0, 1, 2};
                                                
                                                if (1 >= 1 << 16) {
                                                    perm[1] = perm[0];
                                                    perm[0] = 1;
                                                }
                                                if (1 >= 1 << 16) {
                                                    perm[2] = perm[0];
                                                    perm[0] = 2;
                                                }
                                                
                                                size_t grid[3];
                                                
                                                grid[perm[0]] =
                                                    num_groups_207306;
                                                grid[perm[1]] = 1;
                                                grid[perm[2]] = 1;
                                                
                                                void *kernel_args_230570[] =
                                                     {&ctx->global_failure,
                                                      &shared_offset_230574,
                                                      &shared_offset_230576,
                                                      &shared_offset_230578,
                                                      &m_196691, &n_p_196694,
                                                      &q_s_196695,
                                                      &defunc_0_f_res_196740,
                                                      &s_n_m_196745,
                                                      &num_groups_207306,
                                                      &groups_per_segment_226562,
                                                      &elements_per_thread_226563,
                                                      &virt_num_groups_226564,
                                                      &threads_per_segment_226566,
                                                      &kernel_arg_230579,
                                                      &kernel_arg_230580,
                                                      &kernel_arg_230581,
                                                      &kernel_arg_230582,
                                                      &kernel_arg_230583,
                                                      &kernel_arg_230584,
                                                      &kernel_arg_230585,
                                                      &kernel_arg_230586,
                                                      &kernel_arg_230587,
                                                      &kernel_arg_230588,
                                                      &kernel_arg_230589,
                                                      &kernel_arg_230590,
                                                      &kernel_arg_230591,
                                                      &kernel_arg_230592,
                                                      &kernel_arg_230593};
                                                int64_t time_start_230571 = 0,
                                                        time_end_230572 = 0;
                                                
                                                if (ctx->debugging) {
                                                    fprintf(ctx->log,
                                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                            "main.segred_large_207314",
                                                            (long) num_groups_207306,
                                                            (long) 1, (long) 1,
                                                            (long) segred_group_sizze_207305,
                                                            (long) 1, (long) 1,
                                                            (int) (0 +
                                                                   (shared_sizze_230573 +
                                                                    (8 -
                                                                     shared_sizze_230573 %
                                                                     8) % 8) +
                                                                   (shared_sizze_230575 +
                                                                    (8 -
                                                                     shared_sizze_230575 %
                                                                     8) % 8) +
                                                                   (shared_sizze_230577 +
                                                                    (8 -
                                                                     shared_sizze_230577 %
                                                                     8) % 8)));
                                                    time_start_230571 =
                                                        get_wall_time();
                                                }
                                                
                                                cudaEvent_t *pevents = NULL;
                                                
                                                if (ctx->profiling &&
                                                    !ctx->profiling_paused) {
                                                    pevents =
                                                        cuda_get_events(&ctx->cuda,
                                                                        &ctx->mainzisegred_large_207314_runs,
                                                                        &ctx->mainzisegred_large_207314_total_runtime);
                                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                                       0));
                                                }
                                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_large_207314,
                                                                                      grid[0],
                                                                                      grid[1],
                                                                                      grid[2],
                                                                                      segred_group_sizze_207305,
                                                                                      1,
                                                                                      1,
                                                                                      0 +
                                                                                      (shared_sizze_230573 +
                                                                                       (8 -
                                                                                        shared_sizze_230573 %
                                                                                        8) %
                                                                                       8) +
                                                                                      (shared_sizze_230575 +
                                                                                       (8 -
                                                                                        shared_sizze_230575 %
                                                                                        8) %
                                                                                       8) +
                                                                                      (shared_sizze_230577 +
                                                                                       (8 -
                                                                                        shared_sizze_230577 %
                                                                                        8) %
                                                                                       8),
                                                                                      NULL,
                                                                                      kernel_args_230570,
                                                                                      NULL));
                                                if (pevents != NULL)
                                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                                       0));
                                                if (ctx->debugging) {
                                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                                    time_end_230572 =
                                                        get_wall_time();
                                                    fprintf(ctx->log,
                                                            "Kernel %s runtime: %ldus\n",
                                                            "main.segred_large_207314",
                                                            time_end_230572 -
                                                            time_start_230571);
                                                }
                                            }
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n", "");
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226569,
                                                                      "segred_tmp_mem_226569") !=
                                                0)
                                                return 1;
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226567,
                                                                      "segred_tmp_mem_226567") !=
                                                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_226619;
                        
                        max_num_groups_226619 =
                            *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_226619))));
                        
                        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_226620;
                        
                        max_num_groups_226620 =
                            *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_226620))));
                        
                        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_226621;
                        
                        max_num_groups_226621 =
                            *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_226621))));
                        
                        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_226622;
                        
                        max_num_groups_226622 =
                            *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_226622))));
                        
                        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_227043;
                        
                        local_memory_capacity_227043 =
                            ctx->cuda.max_shared_memory;
                        if (sle64((int64_t) 0,
                                  sext_i32_i64(local_memory_capacity_227043)) &&
                            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");
                            
                            CUdeviceptr kernel_arg_230597 = mem_223118.mem;
                            CUdeviceptr kernel_arg_230598 = mem_223121.mem;
                            CUdeviceptr kernel_arg_230599 = mem_223125.mem;
                            CUdeviceptr kernel_arg_230600 = mem_223129.mem;
                            CUdeviceptr kernel_arg_230601 = mem_223133.mem;
                            CUdeviceptr kernel_arg_230602 = mem_223137.mem;
                            CUdeviceptr kernel_arg_230603 = mem_223230.mem;
                            CUdeviceptr kernel_arg_230604 = mem_223234.mem;
                            CUdeviceptr kernel_arg_230605 = color_225051.mem;
                            CUdeviceptr kernel_arg_230606 = color_225052.mem;
                            
                            if ((((((1 && num_groups_207548 != 0) && 1 != 0) &&
                                   1 != 0) && segmap_group_sizze_207547 != 0) &&
                                 1 != 0) && 1 != 0) {
                                int perm[3] = {0, 1, 2};
                                
                                if (1 >= 1 << 16) {
                                    perm[1] = perm[0];
                                    perm[0] = 1;
                                }
                                if (1 >= 1 << 16) {
                                    perm[2] = perm[0];
                                    perm[0] = 2;
                                }
                                
                                size_t grid[3];
                                
                                grid[perm[0]] = num_groups_207548;
                                grid[perm[1]] = 1;
                                grid[perm[2]] = 1;
                                
                                void *kernel_args_230594[] =
                                     {&ctx->global_failure, &m_196691,
                                      &n_p_196694, &q_s_196695, &jump_s_196701,
                                      &defunc_0_f_res_196740,
                                      &pad_css_len_196741, &s_n_m_196745,
                                      &num_groups_207548, &num_threads_225175,
                                      &kernel_arg_230597, &kernel_arg_230598,
                                      &kernel_arg_230599, &kernel_arg_230600,
                                      &kernel_arg_230601, &kernel_arg_230602,
                                      &kernel_arg_230603, &kernel_arg_230604,
                                      &kernel_arg_230605, &kernel_arg_230606};
                                int64_t time_start_230595 = 0, time_end_230596 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                            "main.segmap_207553",
                                            (long) num_groups_207548, (long) 1,
                                            (long) 1,
                                            (long) segmap_group_sizze_207547,
                                            (long) 1, (long) 1, (int) 0);
                                    time_start_230595 = get_wall_time();
                                }
                                
                                cudaEvent_t *pevents = NULL;
                                
                                if (ctx->profiling && !ctx->profiling_paused) {
                                    pevents = cuda_get_events(&ctx->cuda,
                                                              &ctx->mainzisegmap_207553_runs,
                                                              &ctx->mainzisegmap_207553_total_runtime);
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                       0));
                                }
                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_207553,
                                                                      grid[0],
                                                                      grid[1],
                                                                      grid[2],
                                                                      segmap_group_sizze_207547,
                                                                      1, 1, 0,
                                                                      NULL,
                                                                      kernel_args_230594,
                                                                      NULL));
                                if (pevents != NULL)
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                       0));
                                if (ctx->debugging) {
                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                    time_end_230596 = get_wall_time();
                                    fprintf(ctx->log,
                                            "Kernel %s runtime: %ldus\n",
                                            "main.segmap_207553",
                                            time_end_230596 -
                                            time_start_230595);
                                }
                            }
                            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_227042;
                            
                            local_memory_capacity_227042 =
                                ctx->cuda.max_shared_memory;
                            if (sle64((int64_t) 0,
                                      sext_i32_i64(local_memory_capacity_227042)) &&
                                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");
                                
                                CUdeviceptr kernel_arg_230610 =
                                            ext_mem_222321.mem;
                                CUdeviceptr kernel_arg_230611 = mem_223238.mem;
                                CUdeviceptr kernel_arg_230612 = mem_223242.mem;
                                CUdeviceptr kernel_arg_230613 = mem_223246.mem;
                                CUdeviceptr kernel_arg_230614 = mem_223250.mem;
                                CUdeviceptr kernel_arg_230615 = mem_223254.mem;
                                CUdeviceptr kernel_arg_230616 = mem_223289.mem;
                                CUdeviceptr kernel_arg_230617 = mem_223293.mem;
                                CUdeviceptr kernel_arg_230618 =
                                            color_225053.mem;
                                CUdeviceptr kernel_arg_230619 =
                                            color_225054.mem;
                                
                                if ((((((1 && num_groups_209323 != 0) && 1 !=
                                        0) && 1 != 0) &&
                                      segmap_group_sizze_209322 != 0) && 1 !=
                                     0) && 1 != 0) {
                                    int perm[3] = {0, 1, 2};
                                    
                                    if (1 >= 1 << 16) {
                                        perm[1] = perm[0];
                                        perm[0] = 1;
                                    }
                                    if (1 >= 1 << 16) {
                                        perm[2] = perm[0];
                                        perm[0] = 2;
                                    }
                                    
                                    size_t grid[3];
                                    
                                    grid[perm[0]] = num_groups_209323;
                                    grid[perm[1]] = 1;
                                    grid[perm[2]] = 1;
                                    
                                    void *kernel_args_230607[] =
                                         {&ctx->global_failure, &m_196691,
                                          &n_p_196694, &q_s_196695,
                                          &jump_s_196701,
                                          &defunc_0_f_res_196740,
                                          &pad_css_len_196741, &s_n_m_196745,
                                          &num_groups_209323,
                                          &num_threads_225178,
                                          &kernel_arg_230610,
                                          &kernel_arg_230611,
                                          &kernel_arg_230612,
                                          &kernel_arg_230613,
                                          &kernel_arg_230614,
                                          &kernel_arg_230615,
                                          &kernel_arg_230616,
                                          &kernel_arg_230617,
                                          &kernel_arg_230618,
                                          &kernel_arg_230619};
                                    int64_t time_start_230608 = 0,
                                            time_end_230609 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                "main.segmap_209345",
                                                (long) num_groups_209323,
                                                (long) 1, (long) 1,
                                                (long) segmap_group_sizze_209322,
                                                (long) 1, (long) 1, (int) 0);
                                        time_start_230608 = get_wall_time();
                                    }
                                    
                                    cudaEvent_t *pevents = NULL;
                                    
                                    if (ctx->profiling &&
                                        !ctx->profiling_paused) {
                                        pevents = cuda_get_events(&ctx->cuda,
                                                                  &ctx->mainzisegmap_209345_runs,
                                                                  &ctx->mainzisegmap_209345_total_runtime);
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                           0));
                                    }
                                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_209345,
                                                                          grid[0],
                                                                          grid[1],
                                                                          grid[2],
                                                                          segmap_group_sizze_209322,
                                                                          1, 1,
                                                                          0,
                                                                          NULL,
                                                                          kernel_args_230607,
                                                                          NULL));
                                    if (pevents != NULL)
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                           0));
                                    if (ctx->debugging) {
                                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                        time_end_230609 = get_wall_time();
                                        fprintf(ctx->log,
                                                "Kernel %s runtime: %ldus\n",
                                                "main.segmap_209345",
                                                time_end_230609 -
                                                time_start_230608);
                                    }
                                }
                                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_227041;
                                
                                local_memory_capacity_227041 =
                                    ctx->cuda.max_shared_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_227041)) &&
                                    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");
                                    
                                    unsigned int shared_sizze_230623 =
                                                 (int64_t) 4 * (s_n_m_196745 *
                                                                q_s_196695);
                                    unsigned int shared_sizze_230625 =
                                                 (int64_t) 4 * (s_n_m_196745 *
                                                                q_s_196695);
                                    unsigned int shared_sizze_230627 =
                                                 (int64_t) 4 * (s_n_m_196745 *
                                                                q_s_196695);
                                    unsigned int shared_sizze_230629 =
                                                 (int64_t) 4 * (s_n_m_196745 *
                                                                q_s_196695);
                                    unsigned int shared_sizze_230631 =
                                                 (int64_t) 4 * (s_n_m_196745 *
                                                                q_s_196695);
                                    unsigned int shared_sizze_230633 =
                                                 (int64_t) 4 * (s_n_m_196745 *
                                                                q_s_196695);
                                    unsigned int shared_sizze_230635 =
                                                 (int64_t) 4 * (s_n_m_196745 *
                                                                q_s_196695);
                                    unsigned int shared_sizze_230637 =
                                                 bytes_223299;
                                    unsigned int shared_sizze_230639 =
                                                 bytes_222368;
                                    unsigned int shared_sizze_230641 =
                                                 bytes_222368;
                                    unsigned int shared_sizze_230643 =
                                                 bytes_222368;
                                    unsigned int shared_sizze_230645 =
                                                 bytes_222368;
                                    unsigned int shared_sizze_230647 =
                                                 bytes_222368;
                                    unsigned int shared_sizze_230649 =
                                                 bytes_222368;
                                    unsigned int shared_sizze_230651 =
                                                 bytes_222368;
                                    unsigned int shared_sizze_230653 =
                                                 bytes_222368;
                                    unsigned int shared_sizze_230655 =
                                                 bytes_222371;
                                    unsigned int shared_sizze_230657 =
                                                 bytes_222368;
                                    unsigned int shared_sizze_230659 =
                                                 bytes_222368;
                                    CUdeviceptr kernel_arg_230661 =
                                                ext_mem_222321.mem;
                                    CUdeviceptr kernel_arg_230662 =
                                                ext_mem_222322.mem;
                                    CUdeviceptr kernel_arg_230663 =
                                                ext_mem_222419.mem;
                                    CUdeviceptr kernel_arg_230664 =
                                                ext_mem_222420.mem;
                                    CUdeviceptr kernel_arg_230665 =
                                                mem_222583.mem;
                                    CUdeviceptr kernel_arg_230666 =
                                                mem_222588.mem;
                                    CUdeviceptr kernel_arg_230667 =
                                                mem_223347.mem;
                                    CUdeviceptr kernel_arg_230668 =
                                                mem_223352.mem;
                                    unsigned int shared_offset_230624 = 0;
                                    unsigned int shared_offset_230626 = 0 +
                                                 (shared_sizze_230623 + (8 -
                                                                         shared_sizze_230623 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_230628 = 0 +
                                                 (shared_sizze_230623 + (8 -
                                                                         shared_sizze_230623 %
                                                                         8) %
                                                  8) + (shared_sizze_230625 +
                                                        (8 -
                                                         shared_sizze_230625 %
                                                         8) % 8);
                                    unsigned int shared_offset_230630 = 0 +
                                                 (shared_sizze_230623 + (8 -
                                                                         shared_sizze_230623 %
                                                                         8) %
                                                  8) + (shared_sizze_230625 +
                                                        (8 -
                                                         shared_sizze_230625 %
                                                         8) % 8) +
                                                 (shared_sizze_230627 + (8 -
                                                                         shared_sizze_230627 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_230632 = 0 +
                                                 (shared_sizze_230623 + (8 -
                                                                         shared_sizze_230623 %
                                                                         8) %
                                                  8) + (shared_sizze_230625 +
                                                        (8 -
                                                         shared_sizze_230625 %
                                                         8) % 8) +
                                                 (shared_sizze_230627 + (8 -
                                                                         shared_sizze_230627 %
                                                                         8) %
                                                  8) + (shared_sizze_230629 +
                                                        (8 -
                                                         shared_sizze_230629 %
                                                         8) % 8);
                                    unsigned int shared_offset_230634 = 0 +
                                                 (shared_sizze_230623 + (8 -
                                                                         shared_sizze_230623 %
                                                                         8) %
                                                  8) + (shared_sizze_230625 +
                                                        (8 -
                                                         shared_sizze_230625 %
                                                         8) % 8) +
                                                 (shared_sizze_230627 + (8 -
                                                                         shared_sizze_230627 %
                                                                         8) %
                                                  8) + (shared_sizze_230629 +
                                                        (8 -
                                                         shared_sizze_230629 %
                                                         8) % 8) +
                                                 (shared_sizze_230631 + (8 -
                                                                         shared_sizze_230631 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_230636 = 0 +
                                                 (shared_sizze_230623 + (8 -
                                                                         shared_sizze_230623 %
                                                                         8) %
                                                  8) + (shared_sizze_230625 +
                                                        (8 -
                                                         shared_sizze_230625 %
                                                         8) % 8) +
                                                 (shared_sizze_230627 + (8 -
                                                                         shared_sizze_230627 %
                                                                         8) %
                                                  8) + (shared_sizze_230629 +
                                                        (8 -
                                                         shared_sizze_230629 %
                                                         8) % 8) +
                                                 (shared_sizze_230631 + (8 -
                                                                         shared_sizze_230631 %
                                                                         8) %
                                                  8) + (shared_sizze_230633 +
                                                        (8 -
                                                         shared_sizze_230633 %
                                                         8) % 8);
                                    unsigned int shared_offset_230638 = 0 +
                                                 (shared_sizze_230623 + (8 -
                                                                         shared_sizze_230623 %
                                                                         8) %
                                                  8) + (shared_sizze_230625 +
                                                        (8 -
                                                         shared_sizze_230625 %
                                                         8) % 8) +
                                                 (shared_sizze_230627 + (8 -
                                                                         shared_sizze_230627 %
                                                                         8) %
                                                  8) + (shared_sizze_230629 +
                                                        (8 -
                                                         shared_sizze_230629 %
                                                         8) % 8) +
                                                 (shared_sizze_230631 + (8 -
                                                                         shared_sizze_230631 %
                                                                         8) %
                                                  8) + (shared_sizze_230633 +
                                                        (8 -
                                                         shared_sizze_230633 %
                                                         8) % 8) +
                                                 (shared_sizze_230635 + (8 -
                                                                         shared_sizze_230635 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_230640 = 0 +
                                                 (shared_sizze_230623 + (8 -
                                                                         shared_sizze_230623 %
                                                                         8) %
                                                  8) + (shared_sizze_230625 +
                                                        (8 -
                                                         shared_sizze_230625 %
                                                         8) % 8) +
                                                 (shared_sizze_230627 + (8 -
                                                                         shared_sizze_230627 %
                                                                         8) %
                                                  8) + (shared_sizze_230629 +
                                                        (8 -
                                                         shared_sizze_230629 %
                                                         8) % 8) +
                                                 (shared_sizze_230631 + (8 -
                                                                         shared_sizze_230631 %
                                                                         8) %
                                                  8) + (shared_sizze_230633 +
                                                        (8 -
                                                         shared_sizze_230633 %
                                                         8) % 8) +
                                                 (shared_sizze_230635 + (8 -
                                                                         shared_sizze_230635 %
                                                                         8) %
                                                  8) + (shared_sizze_230637 +
                                                        (8 -
                                                         shared_sizze_230637 %
                                                         8) % 8);
                                    unsigned int shared_offset_230642 = 0 +
                                                 (shared_sizze_230623 + (8 -
                                                                         shared_sizze_230623 %
                                                                         8) %
                                                  8) + (shared_sizze_230625 +
                                                        (8 -
                                                         shared_sizze_230625 %
                                                         8) % 8) +
                                                 (shared_sizze_230627 + (8 -
                                                                         shared_sizze_230627 %
                                                                         8) %
                                                  8) + (shared_sizze_230629 +
                                                        (8 -
                                                         shared_sizze_230629 %
                                                         8) % 8) +
                                                 (shared_sizze_230631 + (8 -
                                                                         shared_sizze_230631 %
                                                                         8) %
                                                  8) + (shared_sizze_230633 +
                                                        (8 -
                                                         shared_sizze_230633 %
                                                         8) % 8) +
                                                 (shared_sizze_230635 + (8 -
                                                                         shared_sizze_230635 %
                                                                         8) %
                                                  8) + (shared_sizze_230637 +
                                                        (8 -
                                                         shared_sizze_230637 %
                                                         8) % 8) +
                                                 (shared_sizze_230639 + (8 -
                                                                         shared_sizze_230639 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_230644 = 0 +
                                                 (shared_sizze_230623 + (8 -
                                                                         shared_sizze_230623 %
                                                                         8) %
                                                  8) + (shared_sizze_230625 +
                                                        (8 -
                                                         shared_sizze_230625 %
                                                         8) % 8) +
                                                 (shared_sizze_230627 + (8 -
                                                                         shared_sizze_230627 %
                                                                         8) %
                                                  8) + (shared_sizze_230629 +
                                                        (8 -
                                                         shared_sizze_230629 %
                                                         8) % 8) +
                                                 (shared_sizze_230631 + (8 -
                                                                         shared_sizze_230631 %
                                                                         8) %
                                                  8) + (shared_sizze_230633 +
                                                        (8 -
                                                         shared_sizze_230633 %
                                                         8) % 8) +
                                                 (shared_sizze_230635 + (8 -
                                                                         shared_sizze_230635 %
                                                                         8) %
                                                  8) + (shared_sizze_230637 +
                                                        (8 -
                                                         shared_sizze_230637 %
                                                         8) % 8) +
                                                 (shared_sizze_230639 + (8 -
                                                                         shared_sizze_230639 %
                                                                         8) %
                                                  8) + (shared_sizze_230641 +
                                                        (8 -
                                                         shared_sizze_230641 %
                                                         8) % 8);
                                    unsigned int shared_offset_230646 = 0 +
                                                 (shared_sizze_230623 + (8 -
                                                                         shared_sizze_230623 %
                                                                         8) %
                                                  8) + (shared_sizze_230625 +
                                                        (8 -
                                                         shared_sizze_230625 %
                                                         8) % 8) +
                                                 (shared_sizze_230627 + (8 -
                                                                         shared_sizze_230627 %
                                                                         8) %
                                                  8) + (shared_sizze_230629 +
                                                        (8 -
                                                         shared_sizze_230629 %
                                                         8) % 8) +
                                                 (shared_sizze_230631 + (8 -
                                                                         shared_sizze_230631 %
                                                                         8) %
                                                  8) + (shared_sizze_230633 +
                                                        (8 -
                                                         shared_sizze_230633 %
                                                         8) % 8) +
                                                 (shared_sizze_230635 + (8 -
                                                                         shared_sizze_230635 %
                                                                         8) %
                                                  8) + (shared_sizze_230637 +
                                                        (8 -
                                                         shared_sizze_230637 %
                                                         8) % 8) +
                                                 (shared_sizze_230639 + (8 -
                                                                         shared_sizze_230639 %
                                                                         8) %
                                                  8) + (shared_sizze_230641 +
                                                        (8 -
                                                         shared_sizze_230641 %
                                                         8) % 8) +
                                                 (shared_sizze_230643 + (8 -
                                                                         shared_sizze_230643 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_230648 = 0 +
                                                 (shared_sizze_230623 + (8 -
                                                                         shared_sizze_230623 %
                                                                         8) %
                                                  8) + (shared_sizze_230625 +
                                                        (8 -
                                                         shared_sizze_230625 %
                                                         8) % 8) +
                                                 (shared_sizze_230627 + (8 -
                                                                         shared_sizze_230627 %
                                                                         8) %
                                                  8) + (shared_sizze_230629 +
                                                        (8 -
                                                         shared_sizze_230629 %
                                                         8) % 8) +
                                                 (shared_sizze_230631 + (8 -
                                                                         shared_sizze_230631 %
                                                                         8) %
                                                  8) + (shared_sizze_230633 +
                                                        (8 -
                                                         shared_sizze_230633 %
                                                         8) % 8) +
                                                 (shared_sizze_230635 + (8 -
                                                                         shared_sizze_230635 %
                                                                         8) %
                                                  8) + (shared_sizze_230637 +
                                                        (8 -
                                                         shared_sizze_230637 %
                                                         8) % 8) +
                                                 (shared_sizze_230639 + (8 -
                                                                         shared_sizze_230639 %
                                                                         8) %
                                                  8) + (shared_sizze_230641 +
                                                        (8 -
                                                         shared_sizze_230641 %
                                                         8) % 8) +
                                                 (shared_sizze_230643 + (8 -
                                                                         shared_sizze_230643 %
                                                                         8) %
                                                  8) + (shared_sizze_230645 +
                                                        (8 -
                                                         shared_sizze_230645 %
                                                         8) % 8);
                                    unsigned int shared_offset_230650 = 0 +
                                                 (shared_sizze_230623 + (8 -
                                                                         shared_sizze_230623 %
                                                                         8) %
                                                  8) + (shared_sizze_230625 +
                                                        (8 -
                                                         shared_sizze_230625 %
                                                         8) % 8) +
                                                 (shared_sizze_230627 + (8 -
                                                                         shared_sizze_230627 %
                                                                         8) %
                                                  8) + (shared_sizze_230629 +
                                                        (8 -
                                                         shared_sizze_230629 %
                                                         8) % 8) +
                                                 (shared_sizze_230631 + (8 -
                                                                         shared_sizze_230631 %
                                                                         8) %
                                                  8) + (shared_sizze_230633 +
                                                        (8 -
                                                         shared_sizze_230633 %
                                                         8) % 8) +
                                                 (shared_sizze_230635 + (8 -
                                                                         shared_sizze_230635 %
                                                                         8) %
                                                  8) + (shared_sizze_230637 +
                                                        (8 -
                                                         shared_sizze_230637 %
                                                         8) % 8) +
                                                 (shared_sizze_230639 + (8 -
                                                                         shared_sizze_230639 %
                                                                         8) %
                                                  8) + (shared_sizze_230641 +
                                                        (8 -
                                                         shared_sizze_230641 %
                                                         8) % 8) +
                                                 (shared_sizze_230643 + (8 -
                                                                         shared_sizze_230643 %
                                                                         8) %
                                                  8) + (shared_sizze_230645 +
                                                        (8 -
                                                         shared_sizze_230645 %
                                                         8) % 8) +
                                                 (shared_sizze_230647 + (8 -
                                                                         shared_sizze_230647 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_230652 = 0 +
                                                 (shared_sizze_230623 + (8 -
                                                                         shared_sizze_230623 %
                                                                         8) %
                                                  8) + (shared_sizze_230625 +
                                                        (8 -
                                                         shared_sizze_230625 %
                                                         8) % 8) +
                                                 (shared_sizze_230627 + (8 -
                                                                         shared_sizze_230627 %
                                                                         8) %
                                                  8) + (shared_sizze_230629 +
                                                        (8 -
                                                         shared_sizze_230629 %
                                                         8) % 8) +
                                                 (shared_sizze_230631 + (8 -
                                                                         shared_sizze_230631 %
                                                                         8) %
                                                  8) + (shared_sizze_230633 +
                                                        (8 -
                                                         shared_sizze_230633 %
                                                         8) % 8) +
                                                 (shared_sizze_230635 + (8 -
                                                                         shared_sizze_230635 %
                                                                         8) %
                                                  8) + (shared_sizze_230637 +
                                                        (8 -
                                                         shared_sizze_230637 %
                                                         8) % 8) +
                                                 (shared_sizze_230639 + (8 -
                                                                         shared_sizze_230639 %
                                                                         8) %
                                                  8) + (shared_sizze_230641 +
                                                        (8 -
                                                         shared_sizze_230641 %
                                                         8) % 8) +
                                                 (shared_sizze_230643 + (8 -
                                                                         shared_sizze_230643 %
                                                                         8) %
                                                  8) + (shared_sizze_230645 +
                                                        (8 -
                                                         shared_sizze_230645 %
                                                         8) % 8) +
                                                 (shared_sizze_230647 + (8 -
                                                                         shared_sizze_230647 %
                                                                         8) %
                                                  8) + (shared_sizze_230649 +
                                                        (8 -
                                                         shared_sizze_230649 %
                                                         8) % 8);
                                    unsigned int shared_offset_230654 = 0 +
                                                 (shared_sizze_230623 + (8 -
                                                                         shared_sizze_230623 %
                                                                         8) %
                                                  8) + (shared_sizze_230625 +
                                                        (8 -
                                                         shared_sizze_230625 %
                                                         8) % 8) +
                                                 (shared_sizze_230627 + (8 -
                                                                         shared_sizze_230627 %
                                                                         8) %
                                                  8) + (shared_sizze_230629 +
                                                        (8 -
                                                         shared_sizze_230629 %
                                                         8) % 8) +
                                                 (shared_sizze_230631 + (8 -
                                                                         shared_sizze_230631 %
                                                                         8) %
                                                  8) + (shared_sizze_230633 +
                                                        (8 -
                                                         shared_sizze_230633 %
                                                         8) % 8) +
                                                 (shared_sizze_230635 + (8 -
                                                                         shared_sizze_230635 %
                                                                         8) %
                                                  8) + (shared_sizze_230637 +
                                                        (8 -
                                                         shared_sizze_230637 %
                                                         8) % 8) +
                                                 (shared_sizze_230639 + (8 -
                                                                         shared_sizze_230639 %
                                                                         8) %
                                                  8) + (shared_sizze_230641 +
                                                        (8 -
                                                         shared_sizze_230641 %
                                                         8) % 8) +
                                                 (shared_sizze_230643 + (8 -
                                                                         shared_sizze_230643 %
                                                                         8) %
                                                  8) + (shared_sizze_230645 +
                                                        (8 -
                                                         shared_sizze_230645 %
                                                         8) % 8) +
                                                 (shared_sizze_230647 + (8 -
                                                                         shared_sizze_230647 %
                                                                         8) %
                                                  8) + (shared_sizze_230649 +
                                                        (8 -
                                                         shared_sizze_230649 %
                                                         8) % 8) +
                                                 (shared_sizze_230651 + (8 -
                                                                         shared_sizze_230651 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_230656 = 0 +
                                                 (shared_sizze_230623 + (8 -
                                                                         shared_sizze_230623 %
                                                                         8) %
                                                  8) + (shared_sizze_230625 +
                                                        (8 -
                                                         shared_sizze_230625 %
                                                         8) % 8) +
                                                 (shared_sizze_230627 + (8 -
                                                                         shared_sizze_230627 %
                                                                         8) %
                                                  8) + (shared_sizze_230629 +
                                                        (8 -
                                                         shared_sizze_230629 %
                                                         8) % 8) +
                                                 (shared_sizze_230631 + (8 -
                                                                         shared_sizze_230631 %
                                                                         8) %
                                                  8) + (shared_sizze_230633 +
                                                        (8 -
                                                         shared_sizze_230633 %
                                                         8) % 8) +
                                                 (shared_sizze_230635 + (8 -
                                                                         shared_sizze_230635 %
                                                                         8) %
                                                  8) + (shared_sizze_230637 +
                                                        (8 -
                                                         shared_sizze_230637 %
                                                         8) % 8) +
                                                 (shared_sizze_230639 + (8 -
                                                                         shared_sizze_230639 %
                                                                         8) %
                                                  8) + (shared_sizze_230641 +
                                                        (8 -
                                                         shared_sizze_230641 %
                                                         8) % 8) +
                                                 (shared_sizze_230643 + (8 -
                                                                         shared_sizze_230643 %
                                                                         8) %
                                                  8) + (shared_sizze_230645 +
                                                        (8 -
                                                         shared_sizze_230645 %
                                                         8) % 8) +
                                                 (shared_sizze_230647 + (8 -
                                                                         shared_sizze_230647 %
                                                                         8) %
                                                  8) + (shared_sizze_230649 +
                                                        (8 -
                                                         shared_sizze_230649 %
                                                         8) % 8) +
                                                 (shared_sizze_230651 + (8 -
                                                                         shared_sizze_230651 %
                                                                         8) %
                                                  8) + (shared_sizze_230653 +
                                                        (8 -
                                                         shared_sizze_230653 %
                                                         8) % 8);
                                    unsigned int shared_offset_230658 = 0 +
                                                 (shared_sizze_230623 + (8 -
                                                                         shared_sizze_230623 %
                                                                         8) %
                                                  8) + (shared_sizze_230625 +
                                                        (8 -
                                                         shared_sizze_230625 %
                                                         8) % 8) +
                                                 (shared_sizze_230627 + (8 -
                                                                         shared_sizze_230627 %
                                                                         8) %
                                                  8) + (shared_sizze_230629 +
                                                        (8 -
                                                         shared_sizze_230629 %
                                                         8) % 8) +
                                                 (shared_sizze_230631 + (8 -
                                                                         shared_sizze_230631 %
                                                                         8) %
                                                  8) + (shared_sizze_230633 +
                                                        (8 -
                                                         shared_sizze_230633 %
                                                         8) % 8) +
                                                 (shared_sizze_230635 + (8 -
                                                                         shared_sizze_230635 %
                                                                         8) %
                                                  8) + (shared_sizze_230637 +
                                                        (8 -
                                                         shared_sizze_230637 %
                                                         8) % 8) +
                                                 (shared_sizze_230639 + (8 -
                                                                         shared_sizze_230639 %
                                                                         8) %
                                                  8) + (shared_sizze_230641 +
                                                        (8 -
                                                         shared_sizze_230641 %
                                                         8) % 8) +
                                                 (shared_sizze_230643 + (8 -
                                                                         shared_sizze_230643 %
                                                                         8) %
                                                  8) + (shared_sizze_230645 +
                                                        (8 -
                                                         shared_sizze_230645 %
                                                         8) % 8) +
                                                 (shared_sizze_230647 + (8 -
                                                                         shared_sizze_230647 %
                                                                         8) %
                                                  8) + (shared_sizze_230649 +
                                                        (8 -
                                                         shared_sizze_230649 %
                                                         8) % 8) +
                                                 (shared_sizze_230651 + (8 -
                                                                         shared_sizze_230651 %
                                                                         8) %
                                                  8) + (shared_sizze_230653 +
                                                        (8 -
                                                         shared_sizze_230653 %
                                                         8) % 8) +
                                                 (shared_sizze_230655 + (8 -
                                                                         shared_sizze_230655 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_230660 = 0 +
                                                 (shared_sizze_230623 + (8 -
                                                                         shared_sizze_230623 %
                                                                         8) %
                                                  8) + (shared_sizze_230625 +
                                                        (8 -
                                                         shared_sizze_230625 %
                                                         8) % 8) +
                                                 (shared_sizze_230627 + (8 -
                                                                         shared_sizze_230627 %
                                                                         8) %
                                                  8) + (shared_sizze_230629 +
                                                        (8 -
                                                         shared_sizze_230629 %
                                                         8) % 8) +
                                                 (shared_sizze_230631 + (8 -
                                                                         shared_sizze_230631 %
                                                                         8) %
                                                  8) + (shared_sizze_230633 +
                                                        (8 -
                                                         shared_sizze_230633 %
                                                         8) % 8) +
                                                 (shared_sizze_230635 + (8 -
                                                                         shared_sizze_230635 %
                                                                         8) %
                                                  8) + (shared_sizze_230637 +
                                                        (8 -
                                                         shared_sizze_230637 %
                                                         8) % 8) +
                                                 (shared_sizze_230639 + (8 -
                                                                         shared_sizze_230639 %
                                                                         8) %
                                                  8) + (shared_sizze_230641 +
                                                        (8 -
                                                         shared_sizze_230641 %
                                                         8) % 8) +
                                                 (shared_sizze_230643 + (8 -
                                                                         shared_sizze_230643 %
                                                                         8) %
                                                  8) + (shared_sizze_230645 +
                                                        (8 -
                                                         shared_sizze_230645 %
                                                         8) % 8) +
                                                 (shared_sizze_230647 + (8 -
                                                                         shared_sizze_230647 %
                                                                         8) %
                                                  8) + (shared_sizze_230649 +
                                                        (8 -
                                                         shared_sizze_230649 %
                                                         8) % 8) +
                                                 (shared_sizze_230651 + (8 -
                                                                         shared_sizze_230651 %
                                                                         8) %
                                                  8) + (shared_sizze_230653 +
                                                        (8 -
                                                         shared_sizze_230653 %
                                                         8) % 8) +
                                                 (shared_sizze_230655 + (8 -
                                                                         shared_sizze_230655 %
                                                                         8) %
                                                  8) + (shared_sizze_230657 +
                                                        (8 -
                                                         shared_sizze_230657 %
                                                         8) % 8);
                                    
                                    if ((((((1 && binop_x_222259 != 0) && 1 !=
                                            0) && 1 != 0) &&
                                          computed_group_sizze_209331 != 0) &&
                                         1 != 0) && 1 != 0) {
                                        int perm[3] = {0, 1, 2};
                                        
                                        if (1 >= 1 << 16) {
                                            perm[1] = perm[0];
                                            perm[0] = 1;
                                        }
                                        if (1 >= 1 << 16) {
                                            perm[2] = perm[0];
                                            perm[0] = 2;
                                        }
                                        
                                        size_t grid[3];
                                        
                                        grid[perm[0]] = binop_x_222259;
                                        grid[perm[1]] = 1;
                                        grid[perm[2]] = 1;
                                        
                                        void *kernel_args_230620[] =
                                             {&ctx->global_failure,
                                              &shared_offset_230624,
                                              &shared_offset_230626,
                                              &shared_offset_230628,
                                              &shared_offset_230630,
                                              &shared_offset_230632,
                                              &shared_offset_230634,
                                              &shared_offset_230636,
                                              &shared_offset_230638,
                                              &shared_offset_230640,
                                              &shared_offset_230642,
                                              &shared_offset_230644,
                                              &shared_offset_230646,
                                              &shared_offset_230648,
                                              &shared_offset_230650,
                                              &shared_offset_230652,
                                              &shared_offset_230654,
                                              &shared_offset_230656,
                                              &shared_offset_230658,
                                              &shared_offset_230660, &m_196691,
                                              &n_p_196694, &q_s_196695,
                                              &jump_s_196701,
                                              &defunc_0_f_res_196740,
                                              &pad_css_len_196741,
                                              &s_n_m_196745,
                                              &computed_group_sizze_209331,
                                              &kernel_arg_230661,
                                              &kernel_arg_230662,
                                              &kernel_arg_230663,
                                              &kernel_arg_230664,
                                              &kernel_arg_230665,
                                              &kernel_arg_230666,
                                              &kernel_arg_230667,
                                              &kernel_arg_230668};
                                        int64_t time_start_230621 = 0,
                                                time_end_230622 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                    "main.segmap_intragroup_209494",
                                                    (long) binop_x_222259,
                                                    (long) 1, (long) 1,
                                                    (long) computed_group_sizze_209331,
                                                    (long) 1, (long) 1,
                                                    (int) (0 +
                                                           (shared_sizze_230623 +
                                                            (8 -
                                                             shared_sizze_230623 %
                                                             8) % 8) +
                                                           (shared_sizze_230625 +
                                                            (8 -
                                                             shared_sizze_230625 %
                                                             8) % 8) +
                                                           (shared_sizze_230627 +
                                                            (8 -
                                                             shared_sizze_230627 %
                                                             8) % 8) +
                                                           (shared_sizze_230629 +
                                                            (8 -
                                                             shared_sizze_230629 %
                                                             8) % 8) +
                                                           (shared_sizze_230631 +
                                                            (8 -
                                                             shared_sizze_230631 %
                                                             8) % 8) +
                                                           (shared_sizze_230633 +
                                                            (8 -
                                                             shared_sizze_230633 %
                                                             8) % 8) +
                                                           (shared_sizze_230635 +
                                                            (8 -
                                                             shared_sizze_230635 %
                                                             8) % 8) +
                                                           (shared_sizze_230637 +
                                                            (8 -
                                                             shared_sizze_230637 %
                                                             8) % 8) +
                                                           (shared_sizze_230639 +
                                                            (8 -
                                                             shared_sizze_230639 %
                                                             8) % 8) +
                                                           (shared_sizze_230641 +
                                                            (8 -
                                                             shared_sizze_230641 %
                                                             8) % 8) +
                                                           (shared_sizze_230643 +
                                                            (8 -
                                                             shared_sizze_230643 %
                                                             8) % 8) +
                                                           (shared_sizze_230645 +
                                                            (8 -
                                                             shared_sizze_230645 %
                                                             8) % 8) +
                                                           (shared_sizze_230647 +
                                                            (8 -
                                                             shared_sizze_230647 %
                                                             8) % 8) +
                                                           (shared_sizze_230649 +
                                                            (8 -
                                                             shared_sizze_230649 %
                                                             8) % 8) +
                                                           (shared_sizze_230651 +
                                                            (8 -
                                                             shared_sizze_230651 %
                                                             8) % 8) +
                                                           (shared_sizze_230653 +
                                                            (8 -
                                                             shared_sizze_230653 %
                                                             8) % 8) +
                                                           (shared_sizze_230655 +
                                                            (8 -
                                                             shared_sizze_230655 %
                                                             8) % 8) +
                                                           (shared_sizze_230657 +
                                                            (8 -
                                                             shared_sizze_230657 %
                                                             8) % 8) +
                                                           (shared_sizze_230659 +
                                                            (8 -
                                                             shared_sizze_230659 %
                                                             8) % 8)));
                                            time_start_230621 = get_wall_time();
                                        }
                                        
                                        cudaEvent_t *pevents = NULL;
                                        
                                        if (ctx->profiling &&
                                            !ctx->profiling_paused) {
                                            pevents =
                                                cuda_get_events(&ctx->cuda,
                                                                &ctx->mainzisegmap_intragroup_209494_runs,
                                                                &ctx->mainzisegmap_intragroup_209494_total_runtime);
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                               0));
                                        }
                                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_intragroup_209494,
                                                                              grid[0],
                                                                              grid[1],
                                                                              grid[2],
                                                                              computed_group_sizze_209331,
                                                                              1,
                                                                              1,
                                                                              0 +
                                                                              (shared_sizze_230623 +
                                                                               (8 -
                                                                                shared_sizze_230623 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230625 +
                                                                               (8 -
                                                                                shared_sizze_230625 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230627 +
                                                                               (8 -
                                                                                shared_sizze_230627 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230629 +
                                                                               (8 -
                                                                                shared_sizze_230629 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230631 +
                                                                               (8 -
                                                                                shared_sizze_230631 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230633 +
                                                                               (8 -
                                                                                shared_sizze_230633 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230635 +
                                                                               (8 -
                                                                                shared_sizze_230635 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230637 +
                                                                               (8 -
                                                                                shared_sizze_230637 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230639 +
                                                                               (8 -
                                                                                shared_sizze_230639 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230641 +
                                                                               (8 -
                                                                                shared_sizze_230641 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230643 +
                                                                               (8 -
                                                                                shared_sizze_230643 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230645 +
                                                                               (8 -
                                                                                shared_sizze_230645 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230647 +
                                                                               (8 -
                                                                                shared_sizze_230647 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230649 +
                                                                               (8 -
                                                                                shared_sizze_230649 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230651 +
                                                                               (8 -
                                                                                shared_sizze_230651 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230653 +
                                                                               (8 -
                                                                                shared_sizze_230653 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230655 +
                                                                               (8 -
                                                                                shared_sizze_230655 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230657 +
                                                                               (8 -
                                                                                shared_sizze_230657 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_230659 +
                                                                               (8 -
                                                                                shared_sizze_230659 %
                                                                                8) %
                                                                               8),
                                                                              NULL,
                                                                              kernel_args_230620,
                                                                              NULL));
                                        if (pevents != NULL)
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                               0));
                                        if (ctx->debugging) {
                                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                            time_end_230622 = get_wall_time();
                                            fprintf(ctx->log,
                                                    "Kernel %s runtime: %ldus\n",
                                                    "main.segmap_intragroup_209494",
                                                    time_end_230622 -
                                                    time_start_230621);
                                        }
                                    }
                                    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_227040;
                                    
                                    local_memory_capacity_227040 =
                                        ctx->cuda.max_shared_memory;
                                    if (sle64((int64_t) 0,
                                              sext_i32_i64(local_memory_capacity_227040)) &&
                                        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");
                                        
                                        CUdeviceptr kernel_arg_230672 =
                                                    ext_mem_222321.mem;
                                        CUdeviceptr kernel_arg_230673 =
                                                    ext_mem_222322.mem;
                                        CUdeviceptr kernel_arg_230674 =
                                                    ext_mem_222419.mem;
                                        CUdeviceptr kernel_arg_230675 =
                                                    ext_mem_222420.mem;
                                        CUdeviceptr kernel_arg_230676 =
                                                    mem_222583.mem;
                                        CUdeviceptr kernel_arg_230677 =
                                                    mem_222588.mem;
                                        CUdeviceptr kernel_arg_230678 =
                                                    mem_223358.mem;
                                        CUdeviceptr kernel_arg_230679 =
                                                    mem_223363.mem;
                                        
                                        if ((((((1 &&
                                                 segmap_usable_groups_209678 !=
                                                 0) && 1 != 0) && 1 != 0) &&
                                              segmap_group_sizze_209677 != 0) &&
                                             1 != 0) && 1 != 0) {
                                            int perm[3] = {0, 1, 2};
                                            
                                            if (1 >= 1 << 16) {
                                                perm[1] = perm[0];
                                                perm[0] = 1;
                                            }
                                            if (1 >= 1 << 16) {
                                                perm[2] = perm[0];
                                                perm[0] = 2;
                                            }
                                            
                                            size_t grid[3];
                                            
                                            grid[perm[0]] =
                                                segmap_usable_groups_209678;
                                            grid[perm[1]] = 1;
                                            grid[perm[2]] = 1;
                                            
                                            void *kernel_args_230669[] =
                                                 {&ctx->global_failure,
                                                  &m_196691, &n_p_196694,
                                                  &q_s_196695, &jump_s_196701,
                                                  &defunc_0_f_res_196740,
                                                  &pad_css_len_196741,
                                                  &s_n_m_196745,
                                                  &kernel_arg_230672,
                                                  &kernel_arg_230673,
                                                  &kernel_arg_230674,
                                                  &kernel_arg_230675,
                                                  &kernel_arg_230676,
                                                  &kernel_arg_230677,
                                                  &kernel_arg_230678,
                                                  &kernel_arg_230679};
                                            int64_t time_start_230670 = 0,
                                                    time_end_230671 = 0;
                                            
                                            if (ctx->debugging) {
                                                fprintf(ctx->log,
                                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                        "main.segmap_209690",
                                                        (long) segmap_usable_groups_209678,
                                                        (long) 1, (long) 1,
                                                        (long) segmap_group_sizze_209677,
                                                        (long) 1, (long) 1,
                                                        (int) 0);
                                                time_start_230670 =
                                                    get_wall_time();
                                            }
                                            
                                            cudaEvent_t *pevents = NULL;
                                            
                                            if (ctx->profiling &&
                                                !ctx->profiling_paused) {
                                                pevents =
                                                    cuda_get_events(&ctx->cuda,
                                                                    &ctx->mainzisegmap_209690_runs,
                                                                    &ctx->mainzisegmap_209690_total_runtime);
                                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                                   0));
                                            }
                                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_209690,
                                                                                  grid[0],
                                                                                  grid[1],
                                                                                  grid[2],
                                                                                  segmap_group_sizze_209677,
                                                                                  1,
                                                                                  1,
                                                                                  0,
                                                                                  NULL,
                                                                                  kernel_args_230669,
                                                                                  NULL));
                                            if (pevents != NULL)
                                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                                   0));
                                            if (ctx->debugging) {
                                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                                time_end_230671 =
                                                    get_wall_time();
                                                fprintf(ctx->log,
                                                        "Kernel %s runtime: %ldus\n",
                                                        "main.segmap_209690",
                                                        time_end_230671 -
                                                        time_start_230670);
                                            }
                                        }
                                        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");
                                        
                                        CUdeviceptr kernel_arg_230683 =
                                                    mem_223369.mem;
                                        CUdeviceptr kernel_arg_230684 =
                                                    mem_223373.mem;
                                        
                                        if ((((((1 &&
                                                 segmap_usable_groups_209833 !=
                                                 0) && 1 != 0) && 1 != 0) &&
                                              segmap_group_sizze_209832 != 0) &&
                                             1 != 0) && 1 != 0) {
                                            int perm[3] = {0, 1, 2};
                                            
                                            if (1 >= 1 << 16) {
                                                perm[1] = perm[0];
                                                perm[0] = 1;
                                            }
                                            if (1 >= 1 << 16) {
                                                perm[2] = perm[0];
                                                perm[0] = 2;
                                            }
                                            
                                            size_t grid[3];
                                            
                                            grid[perm[0]] =
                                                segmap_usable_groups_209833;
                                            grid[perm[1]] = 1;
                                            grid[perm[2]] = 1;
                                            
                                            void *kernel_args_230680[] =
                                                 {&ctx->global_failure,
                                                  &m_196691, &n_p_196694,
                                                  &jump_s_196701,
                                                  &defunc_0_f_res_196740,
                                                  &pad_css_len_196741,
                                                  &s_n_m_196745,
                                                  &kernel_arg_230683,
                                                  &kernel_arg_230684};
                                            int64_t time_start_230681 = 0,
                                                    time_end_230682 = 0;
                                            
                                            if (ctx->debugging) {
                                                fprintf(ctx->log,
                                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                        "main.segmap_209839",
                                                        (long) segmap_usable_groups_209833,
                                                        (long) 1, (long) 1,
                                                        (long) segmap_group_sizze_209832,
                                                        (long) 1, (long) 1,
                                                        (int) 0);
                                                time_start_230681 =
                                                    get_wall_time();
                                            }
                                            
                                            cudaEvent_t *pevents = NULL;
                                            
                                            if (ctx->profiling &&
                                                !ctx->profiling_paused) {
                                                pevents =
                                                    cuda_get_events(&ctx->cuda,
                                                                    &ctx->mainzisegmap_209839_runs,
                                                                    &ctx->mainzisegmap_209839_total_runtime);
                                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                                   0));
                                            }
                                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_209839,
                                                                                  grid[0],
                                                                                  grid[1],
                                                                                  grid[2],
                                                                                  segmap_group_sizze_209832,
                                                                                  1,
                                                                                  1,
                                                                                  0,
                                                                                  NULL,
                                                                                  kernel_args_230680,
                                                                                  NULL));
                                            if (pevents != NULL)
                                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                                   0));
                                            if (ctx->debugging) {
                                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                                time_end_230682 =
                                                    get_wall_time();
                                                fprintf(ctx->log,
                                                        "Kernel %s runtime: %ldus\n",
                                                        "main.segmap_209839",
                                                        time_end_230682 -
                                                        time_start_230681);
                                            }
                                        }
                                        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_226806 =
                                            smax64((int64_t) 1, q_s_196695);
                                            int64_t num_threads_226807 =
                                                    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_226806),
                                                        '\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_226806))),
                                                        '\n');
                                            
                                            unsigned int shared_sizze_230688 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_209855;
                                            unsigned int shared_sizze_230690 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_209855;
                                            unsigned int shared_sizze_230692 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_209855;
                                            unsigned int shared_sizze_230694 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_209855;
                                            unsigned int shared_sizze_230696 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_209855;
                                            CUdeviceptr kernel_arg_230698 =
                                                        ext_mem_222321.mem;
                                            CUdeviceptr kernel_arg_230699 =
                                                        ext_mem_222322.mem;
                                            CUdeviceptr kernel_arg_230700 =
                                                        ext_mem_222419.mem;
                                            CUdeviceptr kernel_arg_230701 =
                                                        ext_mem_222420.mem;
                                            CUdeviceptr kernel_arg_230702 =
                                                        mem_222588.mem;
                                            CUdeviceptr kernel_arg_230703 =
                                                        mem_223369.mem;
                                            CUdeviceptr kernel_arg_230704 =
                                                        mem_223379.mem;
                                            CUdeviceptr kernel_arg_230705 =
                                                        mem_223384.mem;
                                            CUdeviceptr kernel_arg_230706 =
                                                        mem_223389.mem;
                                            CUdeviceptr kernel_arg_230707 =
                                                        mem_223394.mem;
                                            CUdeviceptr kernel_arg_230708 =
                                                        mem_223399.mem;
                                            unsigned int shared_offset_230689 =
                                                         0;
                                            unsigned int shared_offset_230691 =
                                                         0 +
                                                         (shared_sizze_230688 +
                                                          (8 -
                                                           shared_sizze_230688 %
                                                           8) % 8);
                                            unsigned int shared_offset_230693 =
                                                         0 +
                                                         (shared_sizze_230688 +
                                                          (8 -
                                                           shared_sizze_230688 %
                                                           8) % 8) +
                                                         (shared_sizze_230690 +
                                                          (8 -
                                                           shared_sizze_230690 %
                                                           8) % 8);
                                            unsigned int shared_offset_230695 =
                                                         0 +
                                                         (shared_sizze_230688 +
                                                          (8 -
                                                           shared_sizze_230688 %
                                                           8) % 8) +
                                                         (shared_sizze_230690 +
                                                          (8 -
                                                           shared_sizze_230690 %
                                                           8) % 8) +
                                                         (shared_sizze_230692 +
                                                          (8 -
                                                           shared_sizze_230692 %
                                                           8) % 8);
                                            unsigned int shared_offset_230697 =
                                                         0 +
                                                         (shared_sizze_230688 +
                                                          (8 -
                                                           shared_sizze_230688 %
                                                           8) % 8) +
                                                         (shared_sizze_230690 +
                                                          (8 -
                                                           shared_sizze_230690 %
                                                           8) % 8) +
                                                         (shared_sizze_230692 +
                                                          (8 -
                                                           shared_sizze_230692 %
                                                           8) % 8) +
                                                         (shared_sizze_230694 +
                                                          (8 -
                                                           shared_sizze_230694 %
                                                           8) % 8);
                                            
                                            if ((((((1 && num_groups_209856 !=
                                                     0) && 1 != 0) && 1 != 0) &&
                                                  segred_group_sizze_209855 !=
                                                  0) && 1 != 0) && 1 != 0) {
                                                int perm[3] = {0, 1, 2};
                                                
                                                if (1 >= 1 << 16) {
                                                    perm[1] = perm[0];
                                                    perm[0] = 1;
                                                }
                                                if (1 >= 1 << 16) {
                                                    perm[2] = perm[0];
                                                    perm[0] = 2;
                                                }
                                                
                                                size_t grid[3];
                                                
                                                grid[perm[0]] =
                                                    num_groups_209856;
                                                grid[perm[1]] = 1;
                                                grid[perm[2]] = 1;
                                                
                                                void *kernel_args_230685[] =
                                                     {&ctx->global_failure,
                                                      &shared_offset_230689,
                                                      &shared_offset_230691,
                                                      &shared_offset_230693,
                                                      &shared_offset_230695,
                                                      &shared_offset_230697,
                                                      &m_196691, &n_p_196694,
                                                      &q_s_196695,
                                                      &defunc_0_f_res_196740,
                                                      &s_n_m_196745,
                                                      &num_groups_209856,
                                                      &segment_sizze_nonzzero_226806,
                                                      &kernel_arg_230698,
                                                      &kernel_arg_230699,
                                                      &kernel_arg_230700,
                                                      &kernel_arg_230701,
                                                      &kernel_arg_230702,
                                                      &kernel_arg_230703,
                                                      &kernel_arg_230704,
                                                      &kernel_arg_230705,
                                                      &kernel_arg_230706,
                                                      &kernel_arg_230707,
                                                      &kernel_arg_230708};
                                                int64_t time_start_230686 = 0,
                                                        time_end_230687 = 0;
                                                
                                                if (ctx->debugging) {
                                                    fprintf(ctx->log,
                                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                            "main.segred_small_209867",
                                                            (long) num_groups_209856,
                                                            (long) 1, (long) 1,
                                                            (long) segred_group_sizze_209855,
                                                            (long) 1, (long) 1,
                                                            (int) (0 +
                                                                   (shared_sizze_230688 +
                                                                    (8 -
                                                                     shared_sizze_230688 %
                                                                     8) % 8) +
                                                                   (shared_sizze_230690 +
                                                                    (8 -
                                                                     shared_sizze_230690 %
                                                                     8) % 8) +
                                                                   (shared_sizze_230692 +
                                                                    (8 -
                                                                     shared_sizze_230692 %
                                                                     8) % 8) +
                                                                   (shared_sizze_230694 +
                                                                    (8 -
                                                                     shared_sizze_230694 %
                                                                     8) % 8) +
                                                                   (shared_sizze_230696 +
                                                                    (8 -
                                                                     shared_sizze_230696 %
                                                                     8) % 8)));
                                                    time_start_230686 =
                                                        get_wall_time();
                                                }
                                                
                                                cudaEvent_t *pevents = NULL;
                                                
                                                if (ctx->profiling &&
                                                    !ctx->profiling_paused) {
                                                    pevents =
                                                        cuda_get_events(&ctx->cuda,
                                                                        &ctx->mainzisegred_small_209867_runs,
                                                                        &ctx->mainzisegred_small_209867_total_runtime);
                                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                                       0));
                                                }
                                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_small_209867,
                                                                                      grid[0],
                                                                                      grid[1],
                                                                                      grid[2],
                                                                                      segred_group_sizze_209855,
                                                                                      1,
                                                                                      1,
                                                                                      0 +
                                                                                      (shared_sizze_230688 +
                                                                                       (8 -
                                                                                        shared_sizze_230688 %
                                                                                        8) %
                                                                                       8) +
                                                                                      (shared_sizze_230690 +
                                                                                       (8 -
                                                                                        shared_sizze_230690 %
                                                                                        8) %
                                                                                       8) +
                                                                                      (shared_sizze_230692 +
                                                                                       (8 -
                                                                                        shared_sizze_230692 %
                                                                                        8) %
                                                                                       8) +
                                                                                      (shared_sizze_230694 +
                                                                                       (8 -
                                                                                        shared_sizze_230694 %
                                                                                        8) %
                                                                                       8) +
                                                                                      (shared_sizze_230696 +
                                                                                       (8 -
                                                                                        shared_sizze_230696 %
                                                                                        8) %
                                                                                       8),
                                                                                      NULL,
                                                                                      kernel_args_230685,
                                                                                      NULL));
                                                if (pevents != NULL)
                                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                                       0));
                                                if (ctx->debugging) {
                                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                                    time_end_230687 =
                                                        get_wall_time();
                                                    fprintf(ctx->log,
                                                            "Kernel %s runtime: %ldus\n",
                                                            "main.segred_small_209867",
                                                            time_end_230687 -
                                                            time_start_230686);
                                                }
                                            }
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n", "");
                                        } else {
                                            int64_t groups_per_segment_226861 =
                                                    sdiv_up64(num_groups_209856,
                                                              smax64((int64_t) 1,
                                                                     m_196691 *
                                                                     n_p_196694 *
                                                                     s_n_m_196745));
                                            int64_t elements_per_thread_226862 =
                                                    sdiv_up64(q_s_196695,
                                                              segred_group_sizze_209855 *
                                                              groups_per_segment_226861);
                                            int64_t virt_num_groups_226863 =
                                                    groups_per_segment_226861 *
                                                    (m_196691 * n_p_196694 *
                                                     s_n_m_196745);
                                            int64_t num_threads_226864 =
                                                    num_groups_209856 *
                                                    segred_group_sizze_209855;
                                            int64_t threads_per_segment_226865 =
                                                    groups_per_segment_226861 *
                                                    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_226863,
                                                        '\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_226862,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "groups_per_segment",
                                                        (long long) groups_per_segment_226861,
                                                        '\n');
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226866;
                                            
                                            segred_tmp_mem_226866.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226866,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226863,
                                                                      "segred_tmp_mem_226866")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226868;
                                            
                                            segred_tmp_mem_226868.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226868,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226863,
                                                                      "segred_tmp_mem_226868")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226870;
                                            
                                            segred_tmp_mem_226870.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226870,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226863,
                                                                      "segred_tmp_mem_226870")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226872;
                                            
                                            segred_tmp_mem_226872.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226872,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226863,
                                                                      "segred_tmp_mem_226872")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226874;
                                            
                                            segred_tmp_mem_226874.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226874,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226863,
                                                                      "segred_tmp_mem_226874")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            mainzicounter_mem_226876 =
                                            ctx->mainzicounter_mem_226876;
                                            unsigned int shared_sizze_230713 =
                                                         1;
                                            unsigned int shared_sizze_230715 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_209855;
                                            unsigned int shared_sizze_230717 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_209855;
                                            unsigned int shared_sizze_230719 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_209855;
                                            unsigned int shared_sizze_230721 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_209855;
                                            unsigned int shared_sizze_230723 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_209855;
                                            CUdeviceptr kernel_arg_230725 =
                                                        ext_mem_222321.mem;
                                            CUdeviceptr kernel_arg_230726 =
                                                        ext_mem_222322.mem;
                                            CUdeviceptr kernel_arg_230727 =
                                                        ext_mem_222419.mem;
                                            CUdeviceptr kernel_arg_230728 =
                                                        ext_mem_222420.mem;
                                            CUdeviceptr kernel_arg_230729 =
                                                        mem_222588.mem;
                                            CUdeviceptr kernel_arg_230730 =
                                                        mem_223369.mem;
                                            CUdeviceptr kernel_arg_230731 =
                                                        mem_223379.mem;
                                            CUdeviceptr kernel_arg_230732 =
                                                        mem_223384.mem;
                                            CUdeviceptr kernel_arg_230733 =
                                                        mem_223389.mem;
                                            CUdeviceptr kernel_arg_230734 =
                                                        mem_223394.mem;
                                            CUdeviceptr kernel_arg_230735 =
                                                        mem_223399.mem;
                                            CUdeviceptr kernel_arg_230736 =
                                                        segred_tmp_mem_226866.mem;
                                            CUdeviceptr kernel_arg_230737 =
                                                        segred_tmp_mem_226868.mem;
                                            CUdeviceptr kernel_arg_230738 =
                                                        segred_tmp_mem_226870.mem;
                                            CUdeviceptr kernel_arg_230739 =
                                                        segred_tmp_mem_226872.mem;
                                            CUdeviceptr kernel_arg_230740 =
                                                        segred_tmp_mem_226874.mem;
                                            CUdeviceptr kernel_arg_230741 =
                                                        mainzicounter_mem_226876.mem;
                                            unsigned int shared_offset_230714 =
                                                         0;
                                            unsigned int shared_offset_230716 =
                                                         0 +
                                                         (shared_sizze_230713 +
                                                          (8 -
                                                           shared_sizze_230713 %
                                                           8) % 8);
                                            unsigned int shared_offset_230718 =
                                                         0 +
                                                         (shared_sizze_230713 +
                                                          (8 -
                                                           shared_sizze_230713 %
                                                           8) % 8) +
                                                         (shared_sizze_230715 +
                                                          (8 -
                                                           shared_sizze_230715 %
                                                           8) % 8);
                                            unsigned int shared_offset_230720 =
                                                         0 +
                                                         (shared_sizze_230713 +
                                                          (8 -
                                                           shared_sizze_230713 %
                                                           8) % 8) +
                                                         (shared_sizze_230715 +
                                                          (8 -
                                                           shared_sizze_230715 %
                                                           8) % 8) +
                                                         (shared_sizze_230717 +
                                                          (8 -
                                                           shared_sizze_230717 %
                                                           8) % 8);
                                            unsigned int shared_offset_230722 =
                                                         0 +
                                                         (shared_sizze_230713 +
                                                          (8 -
                                                           shared_sizze_230713 %
                                                           8) % 8) +
                                                         (shared_sizze_230715 +
                                                          (8 -
                                                           shared_sizze_230715 %
                                                           8) % 8) +
                                                         (shared_sizze_230717 +
                                                          (8 -
                                                           shared_sizze_230717 %
                                                           8) % 8) +
                                                         (shared_sizze_230719 +
                                                          (8 -
                                                           shared_sizze_230719 %
                                                           8) % 8);
                                            unsigned int shared_offset_230724 =
                                                         0 +
                                                         (shared_sizze_230713 +
                                                          (8 -
                                                           shared_sizze_230713 %
                                                           8) % 8) +
                                                         (shared_sizze_230715 +
                                                          (8 -
                                                           shared_sizze_230715 %
                                                           8) % 8) +
                                                         (shared_sizze_230717 +
                                                          (8 -
                                                           shared_sizze_230717 %
                                                           8) % 8) +
                                                         (shared_sizze_230719 +
                                                          (8 -
                                                           shared_sizze_230719 %
                                                           8) % 8) +
                                                         (shared_sizze_230721 +
                                                          (8 -
                                                           shared_sizze_230721 %
                                                           8) % 8);
                                            
                                            if ((((((1 && num_groups_209856 !=
                                                     0) && 1 != 0) && 1 != 0) &&
                                                  segred_group_sizze_209855 !=
                                                  0) && 1 != 0) && 1 != 0) {
                                                int perm[3] = {0, 1, 2};
                                                
                                                if (1 >= 1 << 16) {
                                                    perm[1] = perm[0];
                                                    perm[0] = 1;
                                                }
                                                if (1 >= 1 << 16) {
                                                    perm[2] = perm[0];
                                                    perm[0] = 2;
                                                }
                                                
                                                size_t grid[3];
                                                
                                                grid[perm[0]] =
                                                    num_groups_209856;
                                                grid[perm[1]] = 1;
                                                grid[perm[2]] = 1;
                                                
                                                void *kernel_args_230710[] =
                                                     {&ctx->global_failure,
                                                      &shared_offset_230714,
                                                      &shared_offset_230716,
                                                      &shared_offset_230718,
                                                      &shared_offset_230720,
                                                      &shared_offset_230722,
                                                      &shared_offset_230724,
                                                      &m_196691, &n_p_196694,
                                                      &q_s_196695,
                                                      &defunc_0_f_res_196740,
                                                      &s_n_m_196745,
                                                      &num_groups_209856,
                                                      &groups_per_segment_226861,
                                                      &elements_per_thread_226862,
                                                      &virt_num_groups_226863,
                                                      &threads_per_segment_226865,
                                                      &kernel_arg_230725,
                                                      &kernel_arg_230726,
                                                      &kernel_arg_230727,
                                                      &kernel_arg_230728,
                                                      &kernel_arg_230729,
                                                      &kernel_arg_230730,
                                                      &kernel_arg_230731,
                                                      &kernel_arg_230732,
                                                      &kernel_arg_230733,
                                                      &kernel_arg_230734,
                                                      &kernel_arg_230735,
                                                      &kernel_arg_230736,
                                                      &kernel_arg_230737,
                                                      &kernel_arg_230738,
                                                      &kernel_arg_230739,
                                                      &kernel_arg_230740,
                                                      &kernel_arg_230741};
                                                int64_t time_start_230711 = 0,
                                                        time_end_230712 = 0;
                                                
                                                if (ctx->debugging) {
                                                    fprintf(ctx->log,
                                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                            "main.segred_large_209867",
                                                            (long) num_groups_209856,
                                                            (long) 1, (long) 1,
                                                            (long) segred_group_sizze_209855,
                                                            (long) 1, (long) 1,
                                                            (int) (0 +
                                                                   (shared_sizze_230713 +
                                                                    (8 -
                                                                     shared_sizze_230713 %
                                                                     8) % 8) +
                                                                   (shared_sizze_230715 +
                                                                    (8 -
                                                                     shared_sizze_230715 %
                                                                     8) % 8) +
                                                                   (shared_sizze_230717 +
                                                                    (8 -
                                                                     shared_sizze_230717 %
                                                                     8) % 8) +
                                                                   (shared_sizze_230719 +
                                                                    (8 -
                                                                     shared_sizze_230719 %
                                                                     8) % 8) +
                                                                   (shared_sizze_230721 +
                                                                    (8 -
                                                                     shared_sizze_230721 %
                                                                     8) % 8) +
                                                                   (shared_sizze_230723 +
                                                                    (8 -
                                                                     shared_sizze_230723 %
                                                                     8) % 8)));
                                                    time_start_230711 =
                                                        get_wall_time();
                                                }
                                                
                                                cudaEvent_t *pevents = NULL;
                                                
                                                if (ctx->profiling &&
                                                    !ctx->profiling_paused) {
                                                    pevents =
                                                        cuda_get_events(&ctx->cuda,
                                                                        &ctx->mainzisegred_large_209867_runs,
                                                                        &ctx->mainzisegred_large_209867_total_runtime);
                                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                                       0));
                                                }
                                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_large_209867,
                                                                                      grid[0],
                                                                                      grid[1],
                                                                                      grid[2],
                                                                                      segred_group_sizze_209855,
                                                                                      1,
                                                                                      1,
                                                                                      0 +
                                                                                      (shared_sizze_230713 +
                                                                                       (8 -
                                                                                        shared_sizze_230713 %
                                                                                        8) %
                                                                                       8) +
                                                                                      (shared_sizze_230715 +
                                                                                       (8 -
                                                                                        shared_sizze_230715 %
                                                                                        8) %
                                                                                       8) +
                                                                                      (shared_sizze_230717 +
                                                                                       (8 -
                                                                                        shared_sizze_230717 %
                                                                                        8) %
                                                                                       8) +
                                                                                      (shared_sizze_230719 +
                                                                                       (8 -
                                                                                        shared_sizze_230719 %
                                                                                        8) %
                                                                                       8) +
                                                                                      (shared_sizze_230721 +
                                                                                       (8 -
                                                                                        shared_sizze_230721 %
                                                                                        8) %
                                                                                       8) +
                                                                                      (shared_sizze_230723 +
                                                                                       (8 -
                                                                                        shared_sizze_230723 %
                                                                                        8) %
                                                                                       8),
                                                                                      NULL,
                                                                                      kernel_args_230710,
                                                                                      NULL));
                                                if (pevents != NULL)
                                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                                       0));
                                                if (ctx->debugging) {
                                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                                    time_end_230712 =
                                                        get_wall_time();
                                                    fprintf(ctx->log,
                                                            "Kernel %s runtime: %ldus\n",
                                                            "main.segred_large_209867",
                                                            time_end_230712 -
                                                            time_start_230711);
                                                }
                                            }
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n", "");
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226874,
                                                                      "segred_tmp_mem_226874") !=
                                                0)
                                                return 1;
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226872,
                                                                      "segred_tmp_mem_226872") !=
                                                0)
                                                return 1;
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226870,
                                                                      "segred_tmp_mem_226870") !=
                                                0)
                                                return 1;
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226868,
                                                                      "segred_tmp_mem_226868") !=
                                                0)
                                                return 1;
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226866,
                                                                      "segred_tmp_mem_226866") !=
                                                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");
                                        
                                        CUdeviceptr kernel_arg_230745 =
                                                    mem_223379.mem;
                                        CUdeviceptr kernel_arg_230746 =
                                                    mem_223384.mem;
                                        CUdeviceptr kernel_arg_230747 =
                                                    mem_223389.mem;
                                        CUdeviceptr kernel_arg_230748 =
                                                    mem_223394.mem;
                                        CUdeviceptr kernel_arg_230749 =
                                                    mem_223399.mem;
                                        CUdeviceptr kernel_arg_230750 =
                                                    mem_223405.mem;
                                        CUdeviceptr kernel_arg_230751 =
                                                    mem_223410.mem;
                                        CUdeviceptr kernel_arg_230752 =
                                                    mem_223415.mem;
                                        CUdeviceptr kernel_arg_230753 =
                                                    mem_223420.mem;
                                        CUdeviceptr kernel_arg_230754 =
                                                    mem_223425.mem;
                                        CUdeviceptr kernel_arg_230755 =
                                                    mem_223430.mem;
                                        
                                        if ((((((1 &&
                                                 segmap_usable_groups_209925 !=
                                                 0) && 1 != 0) && 1 != 0) &&
                                              segmap_group_sizze_209924 != 0) &&
                                             1 != 0) && 1 != 0) {
                                            int perm[3] = {0, 1, 2};
                                            
                                            if (1 >= 1 << 16) {
                                                perm[1] = perm[0];
                                                perm[0] = 1;
                                            }
                                            if (1 >= 1 << 16) {
                                                perm[2] = perm[0];
                                                perm[0] = 2;
                                            }
                                            
                                            size_t grid[3];
                                            
                                            grid[perm[0]] =
                                                segmap_usable_groups_209925;
                                            grid[perm[1]] = 1;
                                            grid[perm[2]] = 1;
                                            
                                            void *kernel_args_230742[] =
                                                 {&ctx->global_failure,
                                                  &m_196691, &n_p_196694,
                                                  &jump_s_196701,
                                                  &defunc_0_f_res_196740,
                                                  &pad_css_len_196741,
                                                  &s_n_m_196745,
                                                  &kernel_arg_230745,
                                                  &kernel_arg_230746,
                                                  &kernel_arg_230747,
                                                  &kernel_arg_230748,
                                                  &kernel_arg_230749,
                                                  &kernel_arg_230750,
                                                  &kernel_arg_230751,
                                                  &kernel_arg_230752,
                                                  &kernel_arg_230753,
                                                  &kernel_arg_230754,
                                                  &kernel_arg_230755};
                                            int64_t time_start_230743 = 0,
                                                    time_end_230744 = 0;
                                            
                                            if (ctx->debugging) {
                                                fprintf(ctx->log,
                                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                        "main.segmap_209935",
                                                        (long) segmap_usable_groups_209925,
                                                        (long) 1, (long) 1,
                                                        (long) segmap_group_sizze_209924,
                                                        (long) 1, (long) 1,
                                                        (int) 0);
                                                time_start_230743 =
                                                    get_wall_time();
                                            }
                                            
                                            cudaEvent_t *pevents = NULL;
                                            
                                            if (ctx->profiling &&
                                                !ctx->profiling_paused) {
                                                pevents =
                                                    cuda_get_events(&ctx->cuda,
                                                                    &ctx->mainzisegmap_209935_runs,
                                                                    &ctx->mainzisegmap_209935_total_runtime);
                                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                                   0));
                                            }
                                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_209935,
                                                                                  grid[0],
                                                                                  grid[1],
                                                                                  grid[2],
                                                                                  segmap_group_sizze_209924,
                                                                                  1,
                                                                                  1,
                                                                                  0,
                                                                                  NULL,
                                                                                  kernel_args_230742,
                                                                                  NULL));
                                            if (pevents != NULL)
                                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                                   0));
                                            if (ctx->debugging) {
                                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                                time_end_230744 =
                                                    get_wall_time();
                                                fprintf(ctx->log,
                                                        "Kernel %s runtime: %ldus\n",
                                                        "main.segmap_209935",
                                                        time_end_230744 -
                                                        time_start_230743);
                                            }
                                        }
                                        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_226950 =
                                            smax64((int64_t) 1, q_s_196695);
                                            int64_t num_threads_226951 =
                                                    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_226950),
                                                        '\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_226950))),
                                                        '\n');
                                            
                                            unsigned int shared_sizze_230759 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_209981;
                                            unsigned int shared_sizze_230761 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_209981;
                                            CUdeviceptr kernel_arg_230763 =
                                                        ext_mem_222321.mem;
                                            CUdeviceptr kernel_arg_230764 =
                                                        ext_mem_222322.mem;
                                            CUdeviceptr kernel_arg_230765 =
                                                        ext_mem_222419.mem;
                                            CUdeviceptr kernel_arg_230766 =
                                                        ext_mem_222420.mem;
                                            CUdeviceptr kernel_arg_230767 =
                                                        mem_222583.mem;
                                            CUdeviceptr kernel_arg_230768 =
                                                        mem_222588.mem;
                                            CUdeviceptr kernel_arg_230769 =
                                                        mem_223405.mem;
                                            CUdeviceptr kernel_arg_230770 =
                                                        mem_223410.mem;
                                            CUdeviceptr kernel_arg_230771 =
                                                        mem_223415.mem;
                                            CUdeviceptr kernel_arg_230772 =
                                                        mem_223420.mem;
                                            CUdeviceptr kernel_arg_230773 =
                                                        mem_223425.mem;
                                            CUdeviceptr kernel_arg_230774 =
                                                        mem_223430.mem;
                                            CUdeviceptr kernel_arg_230775 =
                                                        mem_223436.mem;
                                            CUdeviceptr kernel_arg_230776 =
                                                        mem_223441.mem;
                                            unsigned int shared_offset_230760 =
                                                         0;
                                            unsigned int shared_offset_230762 =
                                                         0 +
                                                         (shared_sizze_230759 +
                                                          (8 -
                                                           shared_sizze_230759 %
                                                           8) % 8);
                                            
                                            if ((((((1 && num_groups_209982 !=
                                                     0) && 1 != 0) && 1 != 0) &&
                                                  segred_group_sizze_209981 !=
                                                  0) && 1 != 0) && 1 != 0) {
                                                int perm[3] = {0, 1, 2};
                                                
                                                if (1 >= 1 << 16) {
                                                    perm[1] = perm[0];
                                                    perm[0] = 1;
                                                }
                                                if (1 >= 1 << 16) {
                                                    perm[2] = perm[0];
                                                    perm[0] = 2;
                                                }
                                                
                                                size_t grid[3];
                                                
                                                grid[perm[0]] =
                                                    num_groups_209982;
                                                grid[perm[1]] = 1;
                                                grid[perm[2]] = 1;
                                                
                                                void *kernel_args_230756[] =
                                                     {&ctx->global_failure,
                                                      &shared_offset_230760,
                                                      &shared_offset_230762,
                                                      &m_196691, &n_p_196694,
                                                      &q_s_196695,
                                                      &defunc_0_f_res_196740,
                                                      &s_n_m_196745,
                                                      &num_groups_209982,
                                                      &segment_sizze_nonzzero_226950,
                                                      &kernel_arg_230763,
                                                      &kernel_arg_230764,
                                                      &kernel_arg_230765,
                                                      &kernel_arg_230766,
                                                      &kernel_arg_230767,
                                                      &kernel_arg_230768,
                                                      &kernel_arg_230769,
                                                      &kernel_arg_230770,
                                                      &kernel_arg_230771,
                                                      &kernel_arg_230772,
                                                      &kernel_arg_230773,
                                                      &kernel_arg_230774,
                                                      &kernel_arg_230775,
                                                      &kernel_arg_230776};
                                                int64_t time_start_230757 = 0,
                                                        time_end_230758 = 0;
                                                
                                                if (ctx->debugging) {
                                                    fprintf(ctx->log,
                                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                            "main.segred_small_209990",
                                                            (long) num_groups_209982,
                                                            (long) 1, (long) 1,
                                                            (long) segred_group_sizze_209981,
                                                            (long) 1, (long) 1,
                                                            (int) (0 +
                                                                   (shared_sizze_230759 +
                                                                    (8 -
                                                                     shared_sizze_230759 %
                                                                     8) % 8) +
                                                                   (shared_sizze_230761 +
                                                                    (8 -
                                                                     shared_sizze_230761 %
                                                                     8) % 8)));
                                                    time_start_230757 =
                                                        get_wall_time();
                                                }
                                                
                                                cudaEvent_t *pevents = NULL;
                                                
                                                if (ctx->profiling &&
                                                    !ctx->profiling_paused) {
                                                    pevents =
                                                        cuda_get_events(&ctx->cuda,
                                                                        &ctx->mainzisegred_small_209990_runs,
                                                                        &ctx->mainzisegred_small_209990_total_runtime);
                                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                                       0));
                                                }
                                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_small_209990,
                                                                                      grid[0],
                                                                                      grid[1],
                                                                                      grid[2],
                                                                                      segred_group_sizze_209981,
                                                                                      1,
                                                                                      1,
                                                                                      0 +
                                                                                      (shared_sizze_230759 +
                                                                                       (8 -
                                                                                        shared_sizze_230759 %
                                                                                        8) %
                                                                                       8) +
                                                                                      (shared_sizze_230761 +
                                                                                       (8 -
                                                                                        shared_sizze_230761 %
                                                                                        8) %
                                                                                       8),
                                                                                      NULL,
                                                                                      kernel_args_230756,
                                                                                      NULL));
                                                if (pevents != NULL)
                                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                                       0));
                                                if (ctx->debugging) {
                                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                                    time_end_230758 =
                                                        get_wall_time();
                                                    fprintf(ctx->log,
                                                            "Kernel %s runtime: %ldus\n",
                                                            "main.segred_small_209990",
                                                            time_end_230758 -
                                                            time_start_230757);
                                                }
                                            }
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n", "");
                                        } else {
                                            int64_t groups_per_segment_226987 =
                                                    sdiv_up64(num_groups_209982,
                                                              smax64((int64_t) 1,
                                                                     m_196691 *
                                                                     n_p_196694 *
                                                                     s_n_m_196745));
                                            int64_t elements_per_thread_226988 =
                                                    sdiv_up64(q_s_196695,
                                                              segred_group_sizze_209981 *
                                                              groups_per_segment_226987);
                                            int64_t virt_num_groups_226989 =
                                                    groups_per_segment_226987 *
                                                    (m_196691 * n_p_196694 *
                                                     s_n_m_196745);
                                            int64_t num_threads_226990 =
                                                    num_groups_209982 *
                                                    segred_group_sizze_209981;
                                            int64_t threads_per_segment_226991 =
                                                    groups_per_segment_226987 *
                                                    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_226989,
                                                        '\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_226988,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "groups_per_segment",
                                                        (long long) groups_per_segment_226987,
                                                        '\n');
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226992;
                                            
                                            segred_tmp_mem_226992.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226992,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226989,
                                                                      "segred_tmp_mem_226992")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226994;
                                            
                                            segred_tmp_mem_226994.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226994,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226989,
                                                                      "segred_tmp_mem_226994")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            mainzicounter_mem_226996 =
                                            ctx->mainzicounter_mem_226996;
                                            unsigned int shared_sizze_230781 =
                                                         1;
                                            unsigned int shared_sizze_230783 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_209981;
                                            unsigned int shared_sizze_230785 =
                                                         (int64_t) 4 *
                                                         segred_group_sizze_209981;
                                            CUdeviceptr kernel_arg_230787 =
                                                        ext_mem_222321.mem;
                                            CUdeviceptr kernel_arg_230788 =
                                                        ext_mem_222322.mem;
                                            CUdeviceptr kernel_arg_230789 =
                                                        ext_mem_222419.mem;
                                            CUdeviceptr kernel_arg_230790 =
                                                        ext_mem_222420.mem;
                                            CUdeviceptr kernel_arg_230791 =
                                                        mem_222583.mem;
                                            CUdeviceptr kernel_arg_230792 =
                                                        mem_222588.mem;
                                            CUdeviceptr kernel_arg_230793 =
                                                        mem_223405.mem;
                                            CUdeviceptr kernel_arg_230794 =
                                                        mem_223410.mem;
                                            CUdeviceptr kernel_arg_230795 =
                                                        mem_223415.mem;
                                            CUdeviceptr kernel_arg_230796 =
                                                        mem_223420.mem;
                                            CUdeviceptr kernel_arg_230797 =
                                                        mem_223425.mem;
                                            CUdeviceptr kernel_arg_230798 =
                                                        mem_223430.mem;
                                            CUdeviceptr kernel_arg_230799 =
                                                        mem_223436.mem;
                                            CUdeviceptr kernel_arg_230800 =
                                                        mem_223441.mem;
                                            CUdeviceptr kernel_arg_230801 =
                                                        segred_tmp_mem_226992.mem;
                                            CUdeviceptr kernel_arg_230802 =
                                                        segred_tmp_mem_226994.mem;
                                            CUdeviceptr kernel_arg_230803 =
                                                        mainzicounter_mem_226996.mem;
                                            unsigned int shared_offset_230782 =
                                                         0;
                                            unsigned int shared_offset_230784 =
                                                         0 +
                                                         (shared_sizze_230781 +
                                                          (8 -
                                                           shared_sizze_230781 %
                                                           8) % 8);
                                            unsigned int shared_offset_230786 =
                                                         0 +
                                                         (shared_sizze_230781 +
                                                          (8 -
                                                           shared_sizze_230781 %
                                                           8) % 8) +
                                                         (shared_sizze_230783 +
                                                          (8 -
                                                           shared_sizze_230783 %
                                                           8) % 8);
                                            
                                            if ((((((1 && num_groups_209982 !=
                                                     0) && 1 != 0) && 1 != 0) &&
                                                  segred_group_sizze_209981 !=
                                                  0) && 1 != 0) && 1 != 0) {
                                                int perm[3] = {0, 1, 2};
                                                
                                                if (1 >= 1 << 16) {
                                                    perm[1] = perm[0];
                                                    perm[0] = 1;
                                                }
                                                if (1 >= 1 << 16) {
                                                    perm[2] = perm[0];
                                                    perm[0] = 2;
                                                }
                                                
                                                size_t grid[3];
                                                
                                                grid[perm[0]] =
                                                    num_groups_209982;
                                                grid[perm[1]] = 1;
                                                grid[perm[2]] = 1;
                                                
                                                void *kernel_args_230778[] =
                                                     {&ctx->global_failure,
                                                      &shared_offset_230782,
                                                      &shared_offset_230784,
                                                      &shared_offset_230786,
                                                      &m_196691, &n_p_196694,
                                                      &q_s_196695,
                                                      &defunc_0_f_res_196740,
                                                      &s_n_m_196745,
                                                      &num_groups_209982,
                                                      &groups_per_segment_226987,
                                                      &elements_per_thread_226988,
                                                      &virt_num_groups_226989,
                                                      &threads_per_segment_226991,
                                                      &kernel_arg_230787,
                                                      &kernel_arg_230788,
                                                      &kernel_arg_230789,
                                                      &kernel_arg_230790,
                                                      &kernel_arg_230791,
                                                      &kernel_arg_230792,
                                                      &kernel_arg_230793,
                                                      &kernel_arg_230794,
                                                      &kernel_arg_230795,
                                                      &kernel_arg_230796,
                                                      &kernel_arg_230797,
                                                      &kernel_arg_230798,
                                                      &kernel_arg_230799,
                                                      &kernel_arg_230800,
                                                      &kernel_arg_230801,
                                                      &kernel_arg_230802,
                                                      &kernel_arg_230803};
                                                int64_t time_start_230779 = 0,
                                                        time_end_230780 = 0;
                                                
                                                if (ctx->debugging) {
                                                    fprintf(ctx->log,
                                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                            "main.segred_large_209990",
                                                            (long) num_groups_209982,
                                                            (long) 1, (long) 1,
                                                            (long) segred_group_sizze_209981,
                                                            (long) 1, (long) 1,
                                                            (int) (0 +
                                                                   (shared_sizze_230781 +
                                                                    (8 -
                                                                     shared_sizze_230781 %
                                                                     8) % 8) +
                                                                   (shared_sizze_230783 +
                                                                    (8 -
                                                                     shared_sizze_230783 %
                                                                     8) % 8) +
                                                                   (shared_sizze_230785 +
                                                                    (8 -
                                                                     shared_sizze_230785 %
                                                                     8) % 8)));
                                                    time_start_230779 =
                                                        get_wall_time();
                                                }
                                                
                                                cudaEvent_t *pevents = NULL;
                                                
                                                if (ctx->profiling &&
                                                    !ctx->profiling_paused) {
                                                    pevents =
                                                        cuda_get_events(&ctx->cuda,
                                                                        &ctx->mainzisegred_large_209990_runs,
                                                                        &ctx->mainzisegred_large_209990_total_runtime);
                                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                                       0));
                                                }
                                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_large_209990,
                                                                                      grid[0],
                                                                                      grid[1],
                                                                                      grid[2],
                                                                                      segred_group_sizze_209981,
                                                                                      1,
                                                                                      1,
                                                                                      0 +
                                                                                      (shared_sizze_230781 +
                                                                                       (8 -
                                                                                        shared_sizze_230781 %
                                                                                        8) %
                                                                                       8) +
                                                                                      (shared_sizze_230783 +
                                                                                       (8 -
                                                                                        shared_sizze_230783 %
                                                                                        8) %
                                                                                       8) +
                                                                                      (shared_sizze_230785 +
                                                                                       (8 -
                                                                                        shared_sizze_230785 %
                                                                                        8) %
                                                                                       8),
                                                                                      NULL,
                                                                                      kernel_args_230778,
                                                                                      NULL));
                                                if (pevents != NULL)
                                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                                       0));
                                                if (ctx->debugging) {
                                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                                    time_end_230780 =
                                                        get_wall_time();
                                                    fprintf(ctx->log,
                                                            "Kernel %s runtime: %ldus\n",
                                                            "main.segred_large_209990",
                                                            time_end_230780 -
                                                            time_start_230779);
                                                }
                                            }
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n", "");
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226994,
                                                                      "segred_tmp_mem_226994") !=
                                                0)
                                                return 1;
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226992,
                                                                      "segred_tmp_mem_226992") !=
                                                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");
                    
                    unsigned int shared_sizze_230807 = (int64_t) 4 * q_s_196695;
                    unsigned int shared_sizze_230809 = (int64_t) 4 * q_s_196695;
                    unsigned int shared_sizze_230811 = bytes_223486;
                    CUdeviceptr kernel_arg_230813 = ext_mem_222321.mem;
                    CUdeviceptr kernel_arg_230814 = ext_mem_222322.mem;
                    CUdeviceptr kernel_arg_230815 = ext_mem_222419.mem;
                    CUdeviceptr kernel_arg_230816 = ext_mem_222420.mem;
                    CUdeviceptr kernel_arg_230817 = mem_222583.mem;
                    CUdeviceptr kernel_arg_230818 = mem_222588.mem;
                    CUdeviceptr kernel_arg_230819 = mem_223493.mem;
                    unsigned int shared_offset_230808 = 0;
                    unsigned int shared_offset_230810 = 0 +
                                 (shared_sizze_230807 + (8 -
                                                         shared_sizze_230807 %
                                                         8) % 8);
                    unsigned int shared_offset_230812 = 0 +
                                 (shared_sizze_230807 + (8 -
                                                         shared_sizze_230807 %
                                                         8) % 8) +
                                 (shared_sizze_230809 + (8 -
                                                         shared_sizze_230809 %
                                                         8) % 8);
                    
                    if ((((((1 && nest_sizze_201931 != 0) && 1 != 0) && 1 !=
                           0) && q_s_196695 != 0) && 1 != 0) && 1 != 0) {
                        int perm[3] = {0, 1, 2};
                        
                        if (1 >= 1 << 16) {
                            perm[1] = perm[0];
                            perm[0] = 1;
                        }
                        if (1 >= 1 << 16) {
                            perm[2] = perm[0];
                            perm[0] = 2;
                        }
                        
                        size_t grid[3];
                        
                        grid[perm[0]] = nest_sizze_201931;
                        grid[perm[1]] = 1;
                        grid[perm[2]] = 1;
                        
                        void *kernel_args_230804[] = {&ctx->global_failure,
                                                      &shared_offset_230808,
                                                      &shared_offset_230810,
                                                      &shared_offset_230812,
                                                      &m_196691, &n_p_196694,
                                                      &q_s_196695,
                                                      &jump_s_196701,
                                                      &defunc_0_f_res_196740,
                                                      &pad_css_len_196741,
                                                      &s_n_m_196745,
                                                      &kernel_arg_230813,
                                                      &kernel_arg_230814,
                                                      &kernel_arg_230815,
                                                      &kernel_arg_230816,
                                                      &kernel_arg_230817,
                                                      &kernel_arg_230818,
                                                      &kernel_arg_230819};
                        int64_t time_start_230805 = 0, time_end_230806 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                    "main.segmap_intragroup_210266",
                                    (long) nest_sizze_201931, (long) 1,
                                    (long) 1, (long) q_s_196695, (long) 1,
                                    (long) 1, (int) (0 + (shared_sizze_230807 +
                                                          (8 -
                                                           shared_sizze_230807 %
                                                           8) % 8) +
                                                     (shared_sizze_230809 + (8 -
                                                                             shared_sizze_230809 %
                                                                             8) %
                                                      8) +
                                                     (shared_sizze_230811 + (8 -
                                                                             shared_sizze_230811 %
                                                                             8) %
                                                      8)));
                            time_start_230805 = get_wall_time();
                        }
                        
                        cudaEvent_t *pevents = NULL;
                        
                        if (ctx->profiling && !ctx->profiling_paused) {
                            pevents = cuda_get_events(&ctx->cuda,
                                                      &ctx->mainzisegmap_intragroup_210266_runs,
                                                      &ctx->mainzisegmap_intragroup_210266_total_runtime);
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                        }
                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_intragroup_210266,
                                                              grid[0], grid[1],
                                                              grid[2],
                                                              q_s_196695, 1, 1,
                                                              0 +
                                                              (shared_sizze_230807 +
                                                               (8 -
                                                                shared_sizze_230807 %
                                                                8) % 8) +
                                                              (shared_sizze_230809 +
                                                               (8 -
                                                                shared_sizze_230809 %
                                                                8) % 8) +
                                                              (shared_sizze_230811 +
                                                               (8 -
                                                                shared_sizze_230811 %
                                                                8) % 8), NULL,
                                                              kernel_args_230804,
                                                              NULL));
                        if (pevents != NULL)
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                        if (ctx->debugging) {
                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                            time_end_230806 = get_wall_time();
                            fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                    "main.segmap_intragroup_210266",
                                    time_end_230806 - time_start_230805);
                        }
                    }
                    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");
                        
                        unsigned int shared_sizze_230823 = (int64_t) 4 *
                                     q_s_196695;
                        unsigned int shared_sizze_230825 = (int64_t) 4 *
                                     q_s_196695;
                        unsigned int shared_sizze_230827 = (int64_t) 4 *
                                     q_s_196695;
                        unsigned int shared_sizze_230829 = (int64_t) 4 *
                                     q_s_196695;
                        unsigned int shared_sizze_230831 = (int64_t) 4 *
                                     q_s_196695;
                        unsigned int shared_sizze_230833 = bytes_223486;
                        unsigned int shared_sizze_230835 = bytes_223486;
                        CUdeviceptr kernel_arg_230837 = ext_mem_222321.mem;
                        CUdeviceptr kernel_arg_230838 = ext_mem_222322.mem;
                        CUdeviceptr kernel_arg_230839 = ext_mem_222419.mem;
                        CUdeviceptr kernel_arg_230840 = ext_mem_222420.mem;
                        CUdeviceptr kernel_arg_230841 = mem_222583.mem;
                        CUdeviceptr kernel_arg_230842 = mem_222588.mem;
                        CUdeviceptr kernel_arg_230843 = mem_223507.mem;
                        CUdeviceptr kernel_arg_230844 = mem_223512.mem;
                        unsigned int shared_offset_230824 = 0;
                        unsigned int shared_offset_230826 = 0 +
                                     (shared_sizze_230823 + (8 -
                                                             shared_sizze_230823 %
                                                             8) % 8);
                        unsigned int shared_offset_230828 = 0 +
                                     (shared_sizze_230823 + (8 -
                                                             shared_sizze_230823 %
                                                             8) % 8) +
                                     (shared_sizze_230825 + (8 -
                                                             shared_sizze_230825 %
                                                             8) % 8);
                        unsigned int shared_offset_230830 = 0 +
                                     (shared_sizze_230823 + (8 -
                                                             shared_sizze_230823 %
                                                             8) % 8) +
                                     (shared_sizze_230825 + (8 -
                                                             shared_sizze_230825 %
                                                             8) % 8) +
                                     (shared_sizze_230827 + (8 -
                                                             shared_sizze_230827 %
                                                             8) % 8);
                        unsigned int shared_offset_230832 = 0 +
                                     (shared_sizze_230823 + (8 -
                                                             shared_sizze_230823 %
                                                             8) % 8) +
                                     (shared_sizze_230825 + (8 -
                                                             shared_sizze_230825 %
                                                             8) % 8) +
                                     (shared_sizze_230827 + (8 -
                                                             shared_sizze_230827 %
                                                             8) % 8) +
                                     (shared_sizze_230829 + (8 -
                                                             shared_sizze_230829 %
                                                             8) % 8);
                        unsigned int shared_offset_230834 = 0 +
                                     (shared_sizze_230823 + (8 -
                                                             shared_sizze_230823 %
                                                             8) % 8) +
                                     (shared_sizze_230825 + (8 -
                                                             shared_sizze_230825 %
                                                             8) % 8) +
                                     (shared_sizze_230827 + (8 -
                                                             shared_sizze_230827 %
                                                             8) % 8) +
                                     (shared_sizze_230829 + (8 -
                                                             shared_sizze_230829 %
                                                             8) % 8) +
                                     (shared_sizze_230831 + (8 -
                                                             shared_sizze_230831 %
                                                             8) % 8);
                        unsigned int shared_offset_230836 = 0 +
                                     (shared_sizze_230823 + (8 -
                                                             shared_sizze_230823 %
                                                             8) % 8) +
                                     (shared_sizze_230825 + (8 -
                                                             shared_sizze_230825 %
                                                             8) % 8) +
                                     (shared_sizze_230827 + (8 -
                                                             shared_sizze_230827 %
                                                             8) % 8) +
                                     (shared_sizze_230829 + (8 -
                                                             shared_sizze_230829 %
                                                             8) % 8) +
                                     (shared_sizze_230831 + (8 -
                                                             shared_sizze_230831 %
                                                             8) % 8) +
                                     (shared_sizze_230833 + (8 -
                                                             shared_sizze_230833 %
                                                             8) % 8);
                        
                        if ((((((1 && nest_sizze_201931 != 0) && 1 != 0) && 1 !=
                               0) && q_s_196695 != 0) && 1 != 0) && 1 != 0) {
                            int perm[3] = {0, 1, 2};
                            
                            if (1 >= 1 << 16) {
                                perm[1] = perm[0];
                                perm[0] = 1;
                            }
                            if (1 >= 1 << 16) {
                                perm[2] = perm[0];
                                perm[0] = 2;
                            }
                            
                            size_t grid[3];
                            
                            grid[perm[0]] = nest_sizze_201931;
                            grid[perm[1]] = 1;
                            grid[perm[2]] = 1;
                            
                            void *kernel_args_230820[] = {&ctx->global_failure,
                                                          &shared_offset_230824,
                                                          &shared_offset_230826,
                                                          &shared_offset_230828,
                                                          &shared_offset_230830,
                                                          &shared_offset_230832,
                                                          &shared_offset_230834,
                                                          &shared_offset_230836,
                                                          &m_196691,
                                                          &n_p_196694,
                                                          &q_s_196695,
                                                          &jump_s_196701,
                                                          &defunc_0_f_res_196740,
                                                          &pad_css_len_196741,
                                                          &s_n_m_196745,
                                                          &kernel_arg_230837,
                                                          &kernel_arg_230838,
                                                          &kernel_arg_230839,
                                                          &kernel_arg_230840,
                                                          &kernel_arg_230841,
                                                          &kernel_arg_230842,
                                                          &kernel_arg_230843,
                                                          &kernel_arg_230844};
                            int64_t time_start_230821 = 0, time_end_230822 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                        "main.segmap_intragroup_210587",
                                        (long) nest_sizze_201931, (long) 1,
                                        (long) 1, (long) q_s_196695, (long) 1,
                                        (long) 1, (int) (0 +
                                                         (shared_sizze_230823 +
                                                          (8 -
                                                           shared_sizze_230823 %
                                                           8) % 8) +
                                                         (shared_sizze_230825 +
                                                          (8 -
                                                           shared_sizze_230825 %
                                                           8) % 8) +
                                                         (shared_sizze_230827 +
                                                          (8 -
                                                           shared_sizze_230827 %
                                                           8) % 8) +
                                                         (shared_sizze_230829 +
                                                          (8 -
                                                           shared_sizze_230829 %
                                                           8) % 8) +
                                                         (shared_sizze_230831 +
                                                          (8 -
                                                           shared_sizze_230831 %
                                                           8) % 8) +
                                                         (shared_sizze_230833 +
                                                          (8 -
                                                           shared_sizze_230833 %
                                                           8) % 8) +
                                                         (shared_sizze_230835 +
                                                          (8 -
                                                           shared_sizze_230835 %
                                                           8) % 8)));
                                time_start_230821 = get_wall_time();
                            }
                            
                            cudaEvent_t *pevents = NULL;
                            
                            if (ctx->profiling && !ctx->profiling_paused) {
                                pevents = cuda_get_events(&ctx->cuda,
                                                          &ctx->mainzisegmap_intragroup_210587_runs,
                                                          &ctx->mainzisegmap_intragroup_210587_total_runtime);
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                   0));
                            }
                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_intragroup_210587,
                                                                  grid[0],
                                                                  grid[1],
                                                                  grid[2],
                                                                  q_s_196695, 1,
                                                                  1, 0 +
                                                                  (shared_sizze_230823 +
                                                                   (8 -
                                                                    shared_sizze_230823 %
                                                                    8) % 8) +
                                                                  (shared_sizze_230825 +
                                                                   (8 -
                                                                    shared_sizze_230825 %
                                                                    8) % 8) +
                                                                  (shared_sizze_230827 +
                                                                   (8 -
                                                                    shared_sizze_230827 %
                                                                    8) % 8) +
                                                                  (shared_sizze_230829 +
                                                                   (8 -
                                                                    shared_sizze_230829 %
                                                                    8) % 8) +
                                                                  (shared_sizze_230831 +
                                                                   (8 -
                                                                    shared_sizze_230831 %
                                                                    8) % 8) +
                                                                  (shared_sizze_230833 +
                                                                   (8 -
                                                                    shared_sizze_230833 %
                                                                    8) % 8) +
                                                                  (shared_sizze_230835 +
                                                                   (8 -
                                                                    shared_sizze_230835 %
                                                                    8) % 8),
                                                                  NULL,
                                                                  kernel_args_230820,
                                                                  NULL));
                            if (pevents != NULL)
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                   0));
                            if (ctx->debugging) {
                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                time_end_230822 = get_wall_time();
                                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                        "main.segmap_intragroup_210587",
                                        time_end_230822 - time_start_230821);
                            }
                        }
                        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");
                        
                        unsigned int shared_sizze_230848 = (int64_t) 4 *
                                     q_s_196695;
                        unsigned int shared_sizze_230850 = (int64_t) 4 *
                                     q_s_196695;
                        unsigned int shared_sizze_230852 = (int64_t) 4 *
                                     q_s_196695;
                        unsigned int shared_sizze_230854 = (int64_t) 4 *
                                     q_s_196695;
                        unsigned int shared_sizze_230856 = (int64_t) 4 *
                                     q_s_196695;
                        unsigned int shared_sizze_230858 = (int64_t) 4 *
                                     q_s_196695;
                        unsigned int shared_sizze_230860 = (int64_t) 4 *
                                     q_s_196695;
                        unsigned int shared_sizze_230862 = bytes_223486;
                        unsigned int shared_sizze_230864 = bytes_223486;
                        unsigned int shared_sizze_230866 = bytes_223486;
                        unsigned int shared_sizze_230868 = bytes_223486;
                        CUdeviceptr kernel_arg_230870 = ext_mem_222321.mem;
                        CUdeviceptr kernel_arg_230871 = ext_mem_222322.mem;
                        CUdeviceptr kernel_arg_230872 = ext_mem_222419.mem;
                        CUdeviceptr kernel_arg_230873 = ext_mem_222420.mem;
                        CUdeviceptr kernel_arg_230874 = mem_222583.mem;
                        CUdeviceptr kernel_arg_230875 = mem_222588.mem;
                        CUdeviceptr kernel_arg_230876 = mem_223533.mem;
                        CUdeviceptr kernel_arg_230877 = mem_223538.mem;
                        unsigned int shared_offset_230849 = 0;
                        unsigned int shared_offset_230851 = 0 +
                                     (shared_sizze_230848 + (8 -
                                                             shared_sizze_230848 %
                                                             8) % 8);
                        unsigned int shared_offset_230853 = 0 +
                                     (shared_sizze_230848 + (8 -
                                                             shared_sizze_230848 %
                                                             8) % 8) +
                                     (shared_sizze_230850 + (8 -
                                                             shared_sizze_230850 %
                                                             8) % 8);
                        unsigned int shared_offset_230855 = 0 +
                                     (shared_sizze_230848 + (8 -
                                                             shared_sizze_230848 %
                                                             8) % 8) +
                                     (shared_sizze_230850 + (8 -
                                                             shared_sizze_230850 %
                                                             8) % 8) +
                                     (shared_sizze_230852 + (8 -
                                                             shared_sizze_230852 %
                                                             8) % 8);
                        unsigned int shared_offset_230857 = 0 +
                                     (shared_sizze_230848 + (8 -
                                                             shared_sizze_230848 %
                                                             8) % 8) +
                                     (shared_sizze_230850 + (8 -
                                                             shared_sizze_230850 %
                                                             8) % 8) +
                                     (shared_sizze_230852 + (8 -
                                                             shared_sizze_230852 %
                                                             8) % 8) +
                                     (shared_sizze_230854 + (8 -
                                                             shared_sizze_230854 %
                                                             8) % 8);
                        unsigned int shared_offset_230859 = 0 +
                                     (shared_sizze_230848 + (8 -
                                                             shared_sizze_230848 %
                                                             8) % 8) +
                                     (shared_sizze_230850 + (8 -
                                                             shared_sizze_230850 %
                                                             8) % 8) +
                                     (shared_sizze_230852 + (8 -
                                                             shared_sizze_230852 %
                                                             8) % 8) +
                                     (shared_sizze_230854 + (8 -
                                                             shared_sizze_230854 %
                                                             8) % 8) +
                                     (shared_sizze_230856 + (8 -
                                                             shared_sizze_230856 %
                                                             8) % 8);
                        unsigned int shared_offset_230861 = 0 +
                                     (shared_sizze_230848 + (8 -
                                                             shared_sizze_230848 %
                                                             8) % 8) +
                                     (shared_sizze_230850 + (8 -
                                                             shared_sizze_230850 %
                                                             8) % 8) +
                                     (shared_sizze_230852 + (8 -
                                                             shared_sizze_230852 %
                                                             8) % 8) +
                                     (shared_sizze_230854 + (8 -
                                                             shared_sizze_230854 %
                                                             8) % 8) +
                                     (shared_sizze_230856 + (8 -
                                                             shared_sizze_230856 %
                                                             8) % 8) +
                                     (shared_sizze_230858 + (8 -
                                                             shared_sizze_230858 %
                                                             8) % 8);
                        unsigned int shared_offset_230863 = 0 +
                                     (shared_sizze_230848 + (8 -
                                                             shared_sizze_230848 %
                                                             8) % 8) +
                                     (shared_sizze_230850 + (8 -
                                                             shared_sizze_230850 %
                                                             8) % 8) +
                                     (shared_sizze_230852 + (8 -
                                                             shared_sizze_230852 %
                                                             8) % 8) +
                                     (shared_sizze_230854 + (8 -
                                                             shared_sizze_230854 %
                                                             8) % 8) +
                                     (shared_sizze_230856 + (8 -
                                                             shared_sizze_230856 %
                                                             8) % 8) +
                                     (shared_sizze_230858 + (8 -
                                                             shared_sizze_230858 %
                                                             8) % 8) +
                                     (shared_sizze_230860 + (8 -
                                                             shared_sizze_230860 %
                                                             8) % 8);
                        unsigned int shared_offset_230865 = 0 +
                                     (shared_sizze_230848 + (8 -
                                                             shared_sizze_230848 %
                                                             8) % 8) +
                                     (shared_sizze_230850 + (8 -
                                                             shared_sizze_230850 %
                                                             8) % 8) +
                                     (shared_sizze_230852 + (8 -
                                                             shared_sizze_230852 %
                                                             8) % 8) +
                                     (shared_sizze_230854 + (8 -
                                                             shared_sizze_230854 %
                                                             8) % 8) +
                                     (shared_sizze_230856 + (8 -
                                                             shared_sizze_230856 %
                                                             8) % 8) +
                                     (shared_sizze_230858 + (8 -
                                                             shared_sizze_230858 %
                                                             8) % 8) +
                                     (shared_sizze_230860 + (8 -
                                                             shared_sizze_230860 %
                                                             8) % 8) +
                                     (shared_sizze_230862 + (8 -
                                                             shared_sizze_230862 %
                                                             8) % 8);
                        unsigned int shared_offset_230867 = 0 +
                                     (shared_sizze_230848 + (8 -
                                                             shared_sizze_230848 %
                                                             8) % 8) +
                                     (shared_sizze_230850 + (8 -
                                                             shared_sizze_230850 %
                                                             8) % 8) +
                                     (shared_sizze_230852 + (8 -
                                                             shared_sizze_230852 %
                                                             8) % 8) +
                                     (shared_sizze_230854 + (8 -
                                                             shared_sizze_230854 %
                                                             8) % 8) +
                                     (shared_sizze_230856 + (8 -
                                                             shared_sizze_230856 %
                                                             8) % 8) +
                                     (shared_sizze_230858 + (8 -
                                                             shared_sizze_230858 %
                                                             8) % 8) +
                                     (shared_sizze_230860 + (8 -
                                                             shared_sizze_230860 %
                                                             8) % 8) +
                                     (shared_sizze_230862 + (8 -
                                                             shared_sizze_230862 %
                                                             8) % 8) +
                                     (shared_sizze_230864 + (8 -
                                                             shared_sizze_230864 %
                                                             8) % 8);
                        unsigned int shared_offset_230869 = 0 +
                                     (shared_sizze_230848 + (8 -
                                                             shared_sizze_230848 %
                                                             8) % 8) +
                                     (shared_sizze_230850 + (8 -
                                                             shared_sizze_230850 %
                                                             8) % 8) +
                                     (shared_sizze_230852 + (8 -
                                                             shared_sizze_230852 %
                                                             8) % 8) +
                                     (shared_sizze_230854 + (8 -
                                                             shared_sizze_230854 %
                                                             8) % 8) +
                                     (shared_sizze_230856 + (8 -
                                                             shared_sizze_230856 %
                                                             8) % 8) +
                                     (shared_sizze_230858 + (8 -
                                                             shared_sizze_230858 %
                                                             8) % 8) +
                                     (shared_sizze_230860 + (8 -
                                                             shared_sizze_230860 %
                                                             8) % 8) +
                                     (shared_sizze_230862 + (8 -
                                                             shared_sizze_230862 %
                                                             8) % 8) +
                                     (shared_sizze_230864 + (8 -
                                                             shared_sizze_230864 %
                                                             8) % 8) +
                                     (shared_sizze_230866 + (8 -
                                                             shared_sizze_230866 %
                                                             8) % 8);
                        
                        if ((((((1 && nest_sizze_201931 != 0) && 1 != 0) && 1 !=
                               0) && q_s_196695 != 0) && 1 != 0) && 1 != 0) {
                            int perm[3] = {0, 1, 2};
                            
                            if (1 >= 1 << 16) {
                                perm[1] = perm[0];
                                perm[0] = 1;
                            }
                            if (1 >= 1 << 16) {
                                perm[2] = perm[0];
                                perm[0] = 2;
                            }
                            
                            size_t grid[3];
                            
                            grid[perm[0]] = nest_sizze_201931;
                            grid[perm[1]] = 1;
                            grid[perm[2]] = 1;
                            
                            void *kernel_args_230845[] = {&ctx->global_failure,
                                                          &shared_offset_230849,
                                                          &shared_offset_230851,
                                                          &shared_offset_230853,
                                                          &shared_offset_230855,
                                                          &shared_offset_230857,
                                                          &shared_offset_230859,
                                                          &shared_offset_230861,
                                                          &shared_offset_230863,
                                                          &shared_offset_230865,
                                                          &shared_offset_230867,
                                                          &shared_offset_230869,
                                                          &m_196691,
                                                          &n_p_196694,
                                                          &q_s_196695,
                                                          &jump_s_196701,
                                                          &defunc_0_f_res_196740,
                                                          &pad_css_len_196741,
                                                          &s_n_m_196745,
                                                          &kernel_arg_230870,
                                                          &kernel_arg_230871,
                                                          &kernel_arg_230872,
                                                          &kernel_arg_230873,
                                                          &kernel_arg_230874,
                                                          &kernel_arg_230875,
                                                          &kernel_arg_230876,
                                                          &kernel_arg_230877};
                            int64_t time_start_230846 = 0, time_end_230847 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                        "main.segmap_intragroup_211038",
                                        (long) nest_sizze_201931, (long) 1,
                                        (long) 1, (long) q_s_196695, (long) 1,
                                        (long) 1, (int) (0 +
                                                         (shared_sizze_230848 +
                                                          (8 -
                                                           shared_sizze_230848 %
                                                           8) % 8) +
                                                         (shared_sizze_230850 +
                                                          (8 -
                                                           shared_sizze_230850 %
                                                           8) % 8) +
                                                         (shared_sizze_230852 +
                                                          (8 -
                                                           shared_sizze_230852 %
                                                           8) % 8) +
                                                         (shared_sizze_230854 +
                                                          (8 -
                                                           shared_sizze_230854 %
                                                           8) % 8) +
                                                         (shared_sizze_230856 +
                                                          (8 -
                                                           shared_sizze_230856 %
                                                           8) % 8) +
                                                         (shared_sizze_230858 +
                                                          (8 -
                                                           shared_sizze_230858 %
                                                           8) % 8) +
                                                         (shared_sizze_230860 +
                                                          (8 -
                                                           shared_sizze_230860 %
                                                           8) % 8) +
                                                         (shared_sizze_230862 +
                                                          (8 -
                                                           shared_sizze_230862 %
                                                           8) % 8) +
                                                         (shared_sizze_230864 +
                                                          (8 -
                                                           shared_sizze_230864 %
                                                           8) % 8) +
                                                         (shared_sizze_230866 +
                                                          (8 -
                                                           shared_sizze_230866 %
                                                           8) % 8) +
                                                         (shared_sizze_230868 +
                                                          (8 -
                                                           shared_sizze_230868 %
                                                           8) % 8)));
                                time_start_230846 = get_wall_time();
                            }
                            
                            cudaEvent_t *pevents = NULL;
                            
                            if (ctx->profiling && !ctx->profiling_paused) {
                                pevents = cuda_get_events(&ctx->cuda,
                                                          &ctx->mainzisegmap_intragroup_211038_runs,
                                                          &ctx->mainzisegmap_intragroup_211038_total_runtime);
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                   0));
                            }
                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_intragroup_211038,
                                                                  grid[0],
                                                                  grid[1],
                                                                  grid[2],
                                                                  q_s_196695, 1,
                                                                  1, 0 +
                                                                  (shared_sizze_230848 +
                                                                   (8 -
                                                                    shared_sizze_230848 %
                                                                    8) % 8) +
                                                                  (shared_sizze_230850 +
                                                                   (8 -
                                                                    shared_sizze_230850 %
                                                                    8) % 8) +
                                                                  (shared_sizze_230852 +
                                                                   (8 -
                                                                    shared_sizze_230852 %
                                                                    8) % 8) +
                                                                  (shared_sizze_230854 +
                                                                   (8 -
                                                                    shared_sizze_230854 %
                                                                    8) % 8) +
                                                                  (shared_sizze_230856 +
                                                                   (8 -
                                                                    shared_sizze_230856 %
                                                                    8) % 8) +
                                                                  (shared_sizze_230858 +
                                                                   (8 -
                                                                    shared_sizze_230858 %
                                                                    8) % 8) +
                                                                  (shared_sizze_230860 +
                                                                   (8 -
                                                                    shared_sizze_230860 %
                                                                    8) % 8) +
                                                                  (shared_sizze_230862 +
                                                                   (8 -
                                                                    shared_sizze_230862 %
                                                                    8) % 8) +
                                                                  (shared_sizze_230864 +
                                                                   (8 -
                                                                    shared_sizze_230864 %
                                                                    8) % 8) +
                                                                  (shared_sizze_230866 +
                                                                   (8 -
                                                                    shared_sizze_230866 %
                                                                    8) % 8) +
                                                                  (shared_sizze_230868 +
                                                                   (8 -
                                                                    shared_sizze_230868 %
                                                                    8) % 8),
                                                                  NULL,
                                                                  kernel_args_230845,
                                                                  NULL));
                            if (pevents != NULL)
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                   0));
                            if (ctx->debugging) {
                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                time_end_230847 = get_wall_time();
                                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                        "main.segmap_intragroup_211038",
                                        time_end_230847 - time_start_230846);
                            }
                        }
                        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");
                
                CUdeviceptr kernel_arg_230881 = ext_mem_223543.mem;
                CUdeviceptr kernel_arg_230882 = ext_mem_223544.mem;
                CUdeviceptr kernel_arg_230883 = mem_223550.mem;
                
                if ((((((1 && segmap_usable_groups_211491 != 0) && 1 != 0) &&
                       1 != 0) && segmap_group_sizze_211490 != 0) && 1 != 0) &&
                    1 != 0) {
                    int perm[3] = {0, 1, 2};
                    
                    if (1 >= 1 << 16) {
                        perm[1] = perm[0];
                        perm[0] = 1;
                    }
                    if (1 >= 1 << 16) {
                        perm[2] = perm[0];
                        perm[0] = 2;
                    }
                    
                    size_t grid[3];
                    
                    grid[perm[0]] = segmap_usable_groups_211491;
                    grid[perm[1]] = 1;
                    grid[perm[2]] = 1;
                    
                    void *kernel_args_230878[] = {&ctx->global_failure,
                                                  &ctx->failure_is_an_option,
                                                  &ctx->global_failure_args,
                                                  &m_196691, &n_p_196694,
                                                  &jump_s_196701,
                                                  &defunc_0_f_res_196740,
                                                  &pad_css_len_196741,
                                                  &s_n_m_196745,
                                                  &kernel_arg_230881,
                                                  &kernel_arg_230882,
                                                  &kernel_arg_230883};
                    int64_t time_start_230879 = 0, time_end_230880 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                "main.segmap_211496",
                                (long) segmap_usable_groups_211491, (long) 1,
                                (long) 1, (long) segmap_group_sizze_211490,
                                (long) 1, (long) 1, (int) 0);
                        time_start_230879 = get_wall_time();
                    }
                    
                    cudaEvent_t *pevents = NULL;
                    
                    if (ctx->profiling && !ctx->profiling_paused) {
                        pevents = cuda_get_events(&ctx->cuda,
                                                  &ctx->mainzisegmap_211496_runs,
                                                  &ctx->mainzisegmap_211496_total_runtime);
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                    }
                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_211496,
                                                          grid[0], grid[1],
                                                          grid[2],
                                                          segmap_group_sizze_211490,
                                                          1, 1, 0, NULL,
                                                          kernel_args_230878,
                                                          NULL));
                    if (pevents != NULL)
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                    if (ctx->debugging) {
                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                        time_end_230880 = get_wall_time();
                        fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                "main.segmap_211496", time_end_230880 -
                                time_start_230879);
                    }
                }
                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");
            
            CUdeviceptr kernel_arg_230887 = ext_mem_223551.mem;
            CUdeviceptr kernel_arg_230888 = mem_223557.mem;
            
            if ((((((1 && segmap_usable_groups_211641 != 0) && 1 != 0) && 1 !=
                   0) && segmap_group_sizze_211640 != 0) && 1 != 0) && 1 != 0) {
                int perm[3] = {0, 1, 2};
                
                if (1 >= 1 << 16) {
                    perm[1] = perm[0];
                    perm[0] = 1;
                }
                if (1 >= 1 << 16) {
                    perm[2] = perm[0];
                    perm[0] = 2;
                }
                
                size_t grid[3];
                
                grid[perm[0]] = segmap_usable_groups_211641;
                grid[perm[1]] = 1;
                grid[perm[2]] = 1;
                
                void *kernel_args_230884[] = {&ctx->global_failure,
                                              &ctx->failure_is_an_option,
                                              &ctx->global_failure_args,
                                              &m_196691, &n_p_196694,
                                              &C_len_196743,
                                              &css_results_l_197223,
                                              &kernel_arg_230887,
                                              &kernel_arg_230888};
                int64_t time_start_230885 = 0, time_end_230886 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                            "main.segmap_211645",
                            (long) segmap_usable_groups_211641, (long) 1,
                            (long) 1, (long) segmap_group_sizze_211640,
                            (long) 1, (long) 1, (int) 0);
                    time_start_230885 = get_wall_time();
                }
                
                cudaEvent_t *pevents = NULL;
                
                if (ctx->profiling && !ctx->profiling_paused) {
                    pevents = cuda_get_events(&ctx->cuda,
                                              &ctx->mainzisegmap_211645_runs,
                                              &ctx->mainzisegmap_211645_total_runtime);
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                }
                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_211645,
                                                      grid[0], grid[1], grid[2],
                                                      segmap_group_sizze_211640,
                                                      1, 1, 0, NULL,
                                                      kernel_args_230884,
                                                      NULL));
                if (pevents != NULL)
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                if (ctx->debugging) {
                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                    time_end_230886 = get_wall_time();
                    fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                            "main.segmap_211645", time_end_230886 -
                            time_start_230885);
                }
            }
            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_227225;
            
            local_memory_capacity_227225 = ctx->cuda.max_shared_memory;
            if (sle64((int64_t) 0,
                      sext_i32_i64(local_memory_capacity_227225)) &&
                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");
                
                CUdeviceptr kernel_arg_230892 = mem_223560.mem;
                CUdeviceptr kernel_arg_230893 = mem_223564.mem;
                
                if ((((((1 && segmap_usable_groups_211678 != 0) && 1 != 0) &&
                       1 != 0) && segmap_group_sizze_211677 != 0) && 1 != 0) &&
                    1 != 0) {
                    int perm[3] = {0, 1, 2};
                    
                    if (1 >= 1 << 16) {
                        perm[1] = perm[0];
                        perm[0] = 1;
                    }
                    if (1 >= 1 << 16) {
                        perm[2] = perm[0];
                        perm[0] = 2;
                    }
                    
                    size_t grid[3];
                    
                    grid[perm[0]] = segmap_usable_groups_211678;
                    grid[perm[1]] = 1;
                    grid[perm[2]] = 1;
                    
                    void *kernel_args_230889[] = {&ctx->global_failure,
                                                  &m_196691, &n_p_196694,
                                                  &kernel_arg_230892,
                                                  &kernel_arg_230893};
                    int64_t time_start_230890 = 0, time_end_230891 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                "main.segmap_211681",
                                (long) segmap_usable_groups_211678, (long) 1,
                                (long) 1, (long) segmap_group_sizze_211677,
                                (long) 1, (long) 1, (int) 0);
                        time_start_230890 = get_wall_time();
                    }
                    
                    cudaEvent_t *pevents = NULL;
                    
                    if (ctx->profiling && !ctx->profiling_paused) {
                        pevents = cuda_get_events(&ctx->cuda,
                                                  &ctx->mainzisegmap_211681_runs,
                                                  &ctx->mainzisegmap_211681_total_runtime);
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                    }
                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_211681,
                                                          grid[0], grid[1],
                                                          grid[2],
                                                          segmap_group_sizze_211677,
                                                          1, 1, 0, NULL,
                                                          kernel_args_230889,
                                                          NULL));
                    if (pevents != NULL)
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                    if (ctx->debugging) {
                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                        time_end_230891 = get_wall_time();
                        fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                "main.segmap_211681", time_end_230891 -
                                time_start_230890);
                    }
                }
                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_227157 = smax64((int64_t) 1,
                                                                   n_p_196694);
                    int64_t num_threads_227158 = 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_227157),
                                '\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_227157))),
                                '\n');
                    
                    unsigned int shared_sizze_230897 = (int64_t) 4 *
                                 segred_group_sizze_211708;
                    CUdeviceptr kernel_arg_230899 = mem_223557.mem;
                    CUdeviceptr kernel_arg_230900 = mem_223568.mem;
                    unsigned int shared_offset_230898 = 0;
                    
                    if ((((((1 && num_groups_211709 != 0) && 1 != 0) && 1 !=
                           0) && segred_group_sizze_211708 != 0) && 1 != 0) &&
                        1 != 0) {
                        int perm[3] = {0, 1, 2};
                        
                        if (1 >= 1 << 16) {
                            perm[1] = perm[0];
                            perm[0] = 1;
                        }
                        if (1 >= 1 << 16) {
                            perm[2] = perm[0];
                            perm[0] = 2;
                        }
                        
                        size_t grid[3];
                        
                        grid[perm[0]] = num_groups_211709;
                        grid[perm[1]] = 1;
                        grid[perm[2]] = 1;
                        
                        void *kernel_args_230894[] = {&ctx->global_failure,
                                                      &shared_offset_230898,
                                                      &m_196691, &n_p_196694,
                                                      &C_len_196743,
                                                      &num_groups_211709,
                                                      &segment_sizze_nonzzero_227157,
                                                      &kernel_arg_230899,
                                                      &kernel_arg_230900};
                        int64_t time_start_230895 = 0, time_end_230896 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                    "main.segred_small_211714",
                                    (long) num_groups_211709, (long) 1,
                                    (long) 1, (long) segred_group_sizze_211708,
                                    (long) 1, (long) 1, (int) (0 +
                                                               (shared_sizze_230897 +
                                                                (8 -
                                                                 shared_sizze_230897 %
                                                                 8) % 8)));
                            time_start_230895 = get_wall_time();
                        }
                        
                        cudaEvent_t *pevents = NULL;
                        
                        if (ctx->profiling && !ctx->profiling_paused) {
                            pevents = cuda_get_events(&ctx->cuda,
                                                      &ctx->mainzisegred_small_211714_runs,
                                                      &ctx->mainzisegred_small_211714_total_runtime);
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                        }
                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_small_211714,
                                                              grid[0], grid[1],
                                                              grid[2],
                                                              segred_group_sizze_211708,
                                                              1, 1, 0 +
                                                              (shared_sizze_230897 +
                                                               (8 -
                                                                shared_sizze_230897 %
                                                                8) % 8), NULL,
                                                              kernel_args_230894,
                                                              NULL));
                        if (pevents != NULL)
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                        if (ctx->debugging) {
                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                            time_end_230896 = get_wall_time();
                            fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                    "main.segred_small_211714",
                                    time_end_230896 - time_start_230895);
                        }
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "");
                } else {
                    int64_t groups_per_segment_227184 =
                            sdiv_up64(num_groups_211709, smax64((int64_t) 1,
                                                                m_196691));
                    int64_t elements_per_thread_227185 = sdiv_up64(n_p_196694,
                                                                   segred_group_sizze_211708 *
                                                                   groups_per_segment_227184);
                    int64_t virt_num_groups_227186 = groups_per_segment_227184 *
                            m_196691;
                    int64_t num_threads_227187 = num_groups_211709 *
                            segred_group_sizze_211708;
                    int64_t threads_per_segment_227188 =
                            groups_per_segment_227184 *
                            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_227186, '\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_227185, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "groups_per_segment",
                                (long long) groups_per_segment_227184, '\n');
                    
                    struct memblock_device segred_tmp_mem_227189;
                    
                    segred_tmp_mem_227189.references = NULL;
                    if (memblock_alloc_device(ctx, &segred_tmp_mem_227189,
                                              (int64_t) 4 *
                                              virt_num_groups_227186,
                                              "segred_tmp_mem_227189")) {
                        err = 1;
                        goto cleanup;
                    }
                    
                    struct memblock_device mainzicounter_mem_227191 =
                                           ctx->mainzicounter_mem_227191;
                    unsigned int shared_sizze_230905 = 1;
                    unsigned int shared_sizze_230907 = (int64_t) 4 *
                                 segred_group_sizze_211708;
                    CUdeviceptr kernel_arg_230909 = mem_223557.mem;
                    CUdeviceptr kernel_arg_230910 = mem_223568.mem;
                    CUdeviceptr kernel_arg_230911 = segred_tmp_mem_227189.mem;
                    CUdeviceptr kernel_arg_230912 =
                                mainzicounter_mem_227191.mem;
                    unsigned int shared_offset_230906 = 0;
                    unsigned int shared_offset_230908 = 0 +
                                 (shared_sizze_230905 + (8 -
                                                         shared_sizze_230905 %
                                                         8) % 8);
                    
                    if ((((((1 && num_groups_211709 != 0) && 1 != 0) && 1 !=
                           0) && segred_group_sizze_211708 != 0) && 1 != 0) &&
                        1 != 0) {
                        int perm[3] = {0, 1, 2};
                        
                        if (1 >= 1 << 16) {
                            perm[1] = perm[0];
                            perm[0] = 1;
                        }
                        if (1 >= 1 << 16) {
                            perm[2] = perm[0];
                            perm[0] = 2;
                        }
                        
                        size_t grid[3];
                        
                        grid[perm[0]] = num_groups_211709;
                        grid[perm[1]] = 1;
                        grid[perm[2]] = 1;
                        
                        void *kernel_args_230902[] = {&ctx->global_failure,
                                                      &shared_offset_230906,
                                                      &shared_offset_230908,
                                                      &m_196691, &n_p_196694,
                                                      &C_len_196743,
                                                      &num_groups_211709,
                                                      &groups_per_segment_227184,
                                                      &elements_per_thread_227185,
                                                      &virt_num_groups_227186,
                                                      &threads_per_segment_227188,
                                                      &kernel_arg_230909,
                                                      &kernel_arg_230910,
                                                      &kernel_arg_230911,
                                                      &kernel_arg_230912};
                        int64_t time_start_230903 = 0, time_end_230904 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                    "main.segred_large_211714",
                                    (long) num_groups_211709, (long) 1,
                                    (long) 1, (long) segred_group_sizze_211708,
                                    (long) 1, (long) 1, (int) (0 +
                                                               (shared_sizze_230905 +
                                                                (8 -
                                                                 shared_sizze_230905 %
                                                                 8) % 8) +
                                                               (shared_sizze_230907 +
                                                                (8 -
                                                                 shared_sizze_230907 %
                                                                 8) % 8)));
                            time_start_230903 = get_wall_time();
                        }
                        
                        cudaEvent_t *pevents = NULL;
                        
                        if (ctx->profiling && !ctx->profiling_paused) {
                            pevents = cuda_get_events(&ctx->cuda,
                                                      &ctx->mainzisegred_large_211714_runs,
                                                      &ctx->mainzisegred_large_211714_total_runtime);
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                        }
                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_large_211714,
                                                              grid[0], grid[1],
                                                              grid[2],
                                                              segred_group_sizze_211708,
                                                              1, 1, 0 +
                                                              (shared_sizze_230905 +
                                                               (8 -
                                                                shared_sizze_230905 %
                                                                8) % 8) +
                                                              (shared_sizze_230907 +
                                                               (8 -
                                                                shared_sizze_230907 %
                                                                8) % 8), NULL,
                                                              kernel_args_230902,
                                                              NULL));
                        if (pevents != NULL)
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                        if (ctx->debugging) {
                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                            time_end_230904 = get_wall_time();
                            fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                    "main.segred_large_211714",
                                    time_end_230904 - time_start_230903);
                        }
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "");
                    if (memblock_unref_device(ctx, &segred_tmp_mem_227189,
                                              "segred_tmp_mem_227189") != 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");
                if (ctx->debugging)
                    fprintf(ctx->log, "%s: %llu%c",
                            "SegScan: number of elements processed sequentially per thread is m:",
                            (long long) 23, '\n');
                if (ctx->debugging)
                    fprintf(ctx->log, "%s: %llu%c",
                            "SegScan: memory constraints is: ", (long long) 23,
                            '\n');
                if (ctx->debugging)
                    fprintf(ctx->log, "%s: %llu%c",
                            "SegScan: register constraints is: ",
                            (long long) 31, '\n');
                if (ctx->debugging)
                    fprintf(ctx->log, "%s: %llu%c", "SegScan: sumT' is: ",
                            (long long) 1, '\n');
                
                int64_t numThreads_227226 = sdiv_up64(m_196691 *
                                                      lifted_single_ma_l_arg_197247,
                                                      segscan_group_sizze_211760 *
                                                      (int64_t) 23) *
                        segscan_group_sizze_211760;
                int64_t numGroups_227227 = sdiv_up64(m_196691 *
                                                     lifted_single_ma_l_arg_197247,
                                                     segscan_group_sizze_211760 *
                                                     (int64_t) 23);
                struct memblock_device mainziid_counter_mem_227228 =
                                       ctx->mainziid_counter_mem_227228;
                struct memblock_device status_flags_mem_227230;
                
                status_flags_mem_227230.references = NULL;
                if (memblock_alloc_device(ctx, &status_flags_mem_227230,
                                          numGroups_227227,
                                          "status_flags_mem_227230")) {
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device aggregates_mem_227232;
                
                aggregates_mem_227232.references = NULL;
                if (memblock_alloc_device(ctx, &aggregates_mem_227232,
                                          (int64_t) 4 * numGroups_227227,
                                          "aggregates_mem_227232")) {
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device incprefixes_mem_227234;
                
                incprefixes_mem_227234.references = NULL;
                if (memblock_alloc_device(ctx, &incprefixes_mem_227234,
                                          (int64_t) 4 * numGroups_227227,
                                          "incprefixes_mem_227234")) {
                    err = 1;
                    goto cleanup;
                }
                if (futrts_builtinzhreplicate_i8(ctx, status_flags_mem_227230,
                                                 numGroups_227227,
                                                 (int8_t) 0) != 0) {
                    if (memblock_unref_device(ctx, &incprefixes_mem_227234,
                                              "incprefixes_mem_227234") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &aggregates_mem_227232,
                                              "aggregates_mem_227232") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &status_flags_mem_227230,
                                              "status_flags_mem_227230") != 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;
                }
                
                unsigned int shared_sizze_230917 = smax64(smax64((int64_t) 160,
                                                                 (int64_t) 4 *
                                                                 segscan_group_sizze_211760),
                                                          (int64_t) 23 *
                                                          segscan_group_sizze_211760 *
                                                          (int64_t) 4);
                CUdeviceptr kernel_arg_230919 = mem_223557.mem;
                CUdeviceptr kernel_arg_230920 = ext_mem_223569.mem;
                CUdeviceptr kernel_arg_230921 = mem_223574.mem;
                CUdeviceptr kernel_arg_230922 = mainziid_counter_mem_227228.mem;
                CUdeviceptr kernel_arg_230923 = status_flags_mem_227230.mem;
                CUdeviceptr kernel_arg_230924 = aggregates_mem_227232.mem;
                CUdeviceptr kernel_arg_230925 = incprefixes_mem_227234.mem;
                unsigned int shared_offset_230918 = 0;
                
                if ((((((1 && sdiv_up64(m_196691 *
                                        lifted_single_ma_l_arg_197247,
                                        segscan_group_sizze_211760 *
                                        (int64_t) 23) != 0) && 1 != 0) && 1 !=
                       0) && segscan_group_sizze_211760 != 0) && 1 != 0) && 1 !=
                    0) {
                    int perm[3] = {0, 1, 2};
                    
                    if (1 >= 1 << 16) {
                        perm[1] = perm[0];
                        perm[0] = 1;
                    }
                    if (1 >= 1 << 16) {
                        perm[2] = perm[0];
                        perm[0] = 2;
                    }
                    
                    size_t grid[3];
                    
                    grid[perm[0]] = sdiv_up64(m_196691 *
                                              lifted_single_ma_l_arg_197247,
                                              segscan_group_sizze_211760 *
                                              (int64_t) 23);
                    grid[perm[1]] = 1;
                    grid[perm[2]] = 1;
                    
                    void *kernel_args_230914[] = {&ctx->global_failure,
                                                  &ctx->failure_is_an_option,
                                                  &ctx->global_failure_args,
                                                  &shared_offset_230918,
                                                  &m_196691, &n_p_196694,
                                                  &i64_res_196737,
                                                  &C_len_196743,
                                                  &lifted_single_ma_l_arg_197247,
                                                  &kernel_arg_230919,
                                                  &kernel_arg_230920,
                                                  &kernel_arg_230921,
                                                  &kernel_arg_230922,
                                                  &kernel_arg_230923,
                                                  &kernel_arg_230924,
                                                  &kernel_arg_230925};
                    int64_t time_start_230915 = 0, time_end_230916 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                "main.segscan_211766",
                                (long) sdiv_up64(m_196691 *
                                                 lifted_single_ma_l_arg_197247,
                                                 segscan_group_sizze_211760 *
                                                 (int64_t) 23), (long) 1,
                                (long) 1, (long) segscan_group_sizze_211760,
                                (long) 1, (long) 1, (int) (0 +
                                                           (shared_sizze_230917 +
                                                            (8 -
                                                             shared_sizze_230917 %
                                                             8) % 8)));
                        time_start_230915 = get_wall_time();
                    }
                    
                    cudaEvent_t *pevents = NULL;
                    
                    if (ctx->profiling && !ctx->profiling_paused) {
                        pevents = cuda_get_events(&ctx->cuda,
                                                  &ctx->mainzisegscan_211766_runs,
                                                  &ctx->mainzisegscan_211766_total_runtime);
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                    }
                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegscan_211766,
                                                          grid[0], grid[1],
                                                          grid[2],
                                                          segscan_group_sizze_211760,
                                                          1, 1, 0 +
                                                          (shared_sizze_230917 +
                                                           (8 -
                                                            shared_sizze_230917 %
                                                            8) % 8), NULL,
                                                          kernel_args_230914,
                                                          NULL));
                    if (pevents != NULL)
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                    if (ctx->debugging) {
                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                        time_end_230916 = get_wall_time();
                        fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                "main.segscan_211766", time_end_230916 -
                                time_start_230915);
                    }
                }
                ctx->failure_is_an_option = 1;
                if (memblock_unref_device(ctx, &incprefixes_mem_227234,
                                          "incprefixes_mem_227234") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &aggregates_mem_227232,
                                          "aggregates_mem_227232") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &status_flags_mem_227230,
                                          "status_flags_mem_227230") != 0)
                    return 1;
            }
            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_227406;
            
            local_memory_capacity_227406 = ctx->cuda.max_shared_memory;
            if (sle64((int64_t) 0,
                      sext_i32_i64(local_memory_capacity_227406)) &&
                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");
                
                CUdeviceptr kernel_arg_230929 = mem_223577.mem;
                CUdeviceptr kernel_arg_230930 = mem_223581.mem;
                
                if ((((((1 && segmap_usable_groups_211809 != 0) && 1 != 0) &&
                       1 != 0) && segmap_group_sizze_211808 != 0) && 1 != 0) &&
                    1 != 0) {
                    int perm[3] = {0, 1, 2};
                    
                    if (1 >= 1 << 16) {
                        perm[1] = perm[0];
                        perm[0] = 1;
                    }
                    if (1 >= 1 << 16) {
                        perm[2] = perm[0];
                        perm[0] = 2;
                    }
                    
                    size_t grid[3];
                    
                    grid[perm[0]] = segmap_usable_groups_211809;
                    grid[perm[1]] = 1;
                    grid[perm[2]] = 1;
                    
                    void *kernel_args_230926[] = {&ctx->global_failure,
                                                  &m_196691, &n_p_196694,
                                                  &kernel_arg_230929,
                                                  &kernel_arg_230930};
                    int64_t time_start_230927 = 0, time_end_230928 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                "main.segmap_211812",
                                (long) segmap_usable_groups_211809, (long) 1,
                                (long) 1, (long) segmap_group_sizze_211808,
                                (long) 1, (long) 1, (int) 0);
                        time_start_230927 = get_wall_time();
                    }
                    
                    cudaEvent_t *pevents = NULL;
                    
                    if (ctx->profiling && !ctx->profiling_paused) {
                        pevents = cuda_get_events(&ctx->cuda,
                                                  &ctx->mainzisegmap_211812_runs,
                                                  &ctx->mainzisegmap_211812_total_runtime);
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                    }
                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_211812,
                                                          grid[0], grid[1],
                                                          grid[2],
                                                          segmap_group_sizze_211808,
                                                          1, 1, 0, NULL,
                                                          kernel_args_230926,
                                                          NULL));
                    if (pevents != NULL)
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                    if (ctx->debugging) {
                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                        time_end_230928 = get_wall_time();
                        fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                "main.segmap_211812", time_end_230928 -
                                time_start_230927);
                    }
                }
                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_227338 = smax64((int64_t) 1,
                                                                   n_p_196694);
                    int64_t num_threads_227339 = 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_227338),
                                '\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_227338))),
                                '\n');
                    
                    unsigned int shared_sizze_230934 = (int64_t) 4 *
                                 segred_group_sizze_211839;
                    CUdeviceptr kernel_arg_230936 = mem_223574.mem;
                    CUdeviceptr kernel_arg_230937 = mem_223585.mem;
                    unsigned int shared_offset_230935 = 0;
                    
                    if ((((((1 && num_groups_211840 != 0) && 1 != 0) && 1 !=
                           0) && segred_group_sizze_211839 != 0) && 1 != 0) &&
                        1 != 0) {
                        int perm[3] = {0, 1, 2};
                        
                        if (1 >= 1 << 16) {
                            perm[1] = perm[0];
                            perm[0] = 1;
                        }
                        if (1 >= 1 << 16) {
                            perm[2] = perm[0];
                            perm[0] = 2;
                        }
                        
                        size_t grid[3];
                        
                        grid[perm[0]] = num_groups_211840;
                        grid[perm[1]] = 1;
                        grid[perm[2]] = 1;
                        
                        void *kernel_args_230931[] = {&ctx->global_failure,
                                                      &shared_offset_230935,
                                                      &m_196691, &n_p_196694,
                                                      &lifted_single_ma_l_arg_197247,
                                                      &num_groups_211840,
                                                      &segment_sizze_nonzzero_227338,
                                                      &kernel_arg_230936,
                                                      &kernel_arg_230937};
                        int64_t time_start_230932 = 0, time_end_230933 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                    "main.segred_small_211845",
                                    (long) num_groups_211840, (long) 1,
                                    (long) 1, (long) segred_group_sizze_211839,
                                    (long) 1, (long) 1, (int) (0 +
                                                               (shared_sizze_230934 +
                                                                (8 -
                                                                 shared_sizze_230934 %
                                                                 8) % 8)));
                            time_start_230932 = get_wall_time();
                        }
                        
                        cudaEvent_t *pevents = NULL;
                        
                        if (ctx->profiling && !ctx->profiling_paused) {
                            pevents = cuda_get_events(&ctx->cuda,
                                                      &ctx->mainzisegred_small_211845_runs,
                                                      &ctx->mainzisegred_small_211845_total_runtime);
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                        }
                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_small_211845,
                                                              grid[0], grid[1],
                                                              grid[2],
                                                              segred_group_sizze_211839,
                                                              1, 1, 0 +
                                                              (shared_sizze_230934 +
                                                               (8 -
                                                                shared_sizze_230934 %
                                                                8) % 8), NULL,
                                                              kernel_args_230931,
                                                              NULL));
                        if (pevents != NULL)
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                        if (ctx->debugging) {
                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                            time_end_230933 = get_wall_time();
                            fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                    "main.segred_small_211845",
                                    time_end_230933 - time_start_230932);
                        }
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "");
                } else {
                    int64_t groups_per_segment_227365 =
                            sdiv_up64(num_groups_211840, smax64((int64_t) 1,
                                                                m_196691));
                    int64_t elements_per_thread_227366 = sdiv_up64(n_p_196694,
                                                                   segred_group_sizze_211839 *
                                                                   groups_per_segment_227365);
                    int64_t virt_num_groups_227367 = groups_per_segment_227365 *
                            m_196691;
                    int64_t num_threads_227368 = num_groups_211840 *
                            segred_group_sizze_211839;
                    int64_t threads_per_segment_227369 =
                            groups_per_segment_227365 *
                            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_227367, '\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_227366, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "groups_per_segment",
                                (long long) groups_per_segment_227365, '\n');
                    
                    struct memblock_device segred_tmp_mem_227370;
                    
                    segred_tmp_mem_227370.references = NULL;
                    if (memblock_alloc_device(ctx, &segred_tmp_mem_227370,
                                              (int64_t) 4 *
                                              virt_num_groups_227367,
                                              "segred_tmp_mem_227370")) {
                        err = 1;
                        goto cleanup;
                    }
                    
                    struct memblock_device mainzicounter_mem_227372 =
                                           ctx->mainzicounter_mem_227372;
                    unsigned int shared_sizze_230942 = 1;
                    unsigned int shared_sizze_230944 = (int64_t) 4 *
                                 segred_group_sizze_211839;
                    CUdeviceptr kernel_arg_230946 = mem_223574.mem;
                    CUdeviceptr kernel_arg_230947 = mem_223585.mem;
                    CUdeviceptr kernel_arg_230948 = segred_tmp_mem_227370.mem;
                    CUdeviceptr kernel_arg_230949 =
                                mainzicounter_mem_227372.mem;
                    unsigned int shared_offset_230943 = 0;
                    unsigned int shared_offset_230945 = 0 +
                                 (shared_sizze_230942 + (8 -
                                                         shared_sizze_230942 %
                                                         8) % 8);
                    
                    if ((((((1 && num_groups_211840 != 0) && 1 != 0) && 1 !=
                           0) && segred_group_sizze_211839 != 0) && 1 != 0) &&
                        1 != 0) {
                        int perm[3] = {0, 1, 2};
                        
                        if (1 >= 1 << 16) {
                            perm[1] = perm[0];
                            perm[0] = 1;
                        }
                        if (1 >= 1 << 16) {
                            perm[2] = perm[0];
                            perm[0] = 2;
                        }
                        
                        size_t grid[3];
                        
                        grid[perm[0]] = num_groups_211840;
                        grid[perm[1]] = 1;
                        grid[perm[2]] = 1;
                        
                        void *kernel_args_230939[] = {&ctx->global_failure,
                                                      &shared_offset_230943,
                                                      &shared_offset_230945,
                                                      &m_196691, &n_p_196694,
                                                      &lifted_single_ma_l_arg_197247,
                                                      &num_groups_211840,
                                                      &groups_per_segment_227365,
                                                      &elements_per_thread_227366,
                                                      &virt_num_groups_227367,
                                                      &threads_per_segment_227369,
                                                      &kernel_arg_230946,
                                                      &kernel_arg_230947,
                                                      &kernel_arg_230948,
                                                      &kernel_arg_230949};
                        int64_t time_start_230940 = 0, time_end_230941 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                    "main.segred_large_211845",
                                    (long) num_groups_211840, (long) 1,
                                    (long) 1, (long) segred_group_sizze_211839,
                                    (long) 1, (long) 1, (int) (0 +
                                                               (shared_sizze_230942 +
                                                                (8 -
                                                                 shared_sizze_230942 %
                                                                 8) % 8) +
                                                               (shared_sizze_230944 +
                                                                (8 -
                                                                 shared_sizze_230944 %
                                                                 8) % 8)));
                            time_start_230940 = get_wall_time();
                        }
                        
                        cudaEvent_t *pevents = NULL;
                        
                        if (ctx->profiling && !ctx->profiling_paused) {
                            pevents = cuda_get_events(&ctx->cuda,
                                                      &ctx->mainzisegred_large_211845_runs,
                                                      &ctx->mainzisegred_large_211845_total_runtime);
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                        }
                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_large_211845,
                                                              grid[0], grid[1],
                                                              grid[2],
                                                              segred_group_sizze_211839,
                                                              1, 1, 0 +
                                                              (shared_sizze_230942 +
                                                               (8 -
                                                                shared_sizze_230942 %
                                                                8) % 8) +
                                                              (shared_sizze_230944 +
                                                               (8 -
                                                                shared_sizze_230944 %
                                                                8) % 8), NULL,
                                                              kernel_args_230939,
                                                              NULL));
                        if (pevents != NULL)
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                        if (ctx->debugging) {
                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                            time_end_230941 = get_wall_time();
                            fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                    "main.segred_large_211845",
                                    time_end_230941 - time_start_230940);
                        }
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "");
                    if (memblock_unref_device(ctx, &segred_tmp_mem_227370,
                                              "segred_tmp_mem_227370") != 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");
                if (ctx->debugging)
                    fprintf(ctx->log, "%s: %llu%c",
                            "SegScan: number of elements processed sequentially per thread is m:",
                            (long long) 23, '\n');
                if (ctx->debugging)
                    fprintf(ctx->log, "%s: %llu%c",
                            "SegScan: memory constraints is: ", (long long) 23,
                            '\n');
                if (ctx->debugging)
                    fprintf(ctx->log, "%s: %llu%c",
                            "SegScan: register constraints is: ",
                            (long long) 31, '\n');
                if (ctx->debugging)
                    fprintf(ctx->log, "%s: %llu%c", "SegScan: sumT' is: ",
                            (long long) 1, '\n');
                
                int64_t numThreads_227407 = sdiv_up64(m_196691 *
                                                      dyn_lifted_single_ma_l_arg_197257,
                                                      segscan_group_sizze_211891 *
                                                      (int64_t) 23) *
                        segscan_group_sizze_211891;
                int64_t numGroups_227408 = sdiv_up64(m_196691 *
                                                     dyn_lifted_single_ma_l_arg_197257,
                                                     segscan_group_sizze_211891 *
                                                     (int64_t) 23);
                struct memblock_device mainziid_counter_mem_227409 =
                                       ctx->mainziid_counter_mem_227409;
                struct memblock_device status_flags_mem_227411;
                
                status_flags_mem_227411.references = NULL;
                if (memblock_alloc_device(ctx, &status_flags_mem_227411,
                                          numGroups_227408,
                                          "status_flags_mem_227411")) {
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device aggregates_mem_227413;
                
                aggregates_mem_227413.references = NULL;
                if (memblock_alloc_device(ctx, &aggregates_mem_227413,
                                          (int64_t) 4 * numGroups_227408,
                                          "aggregates_mem_227413")) {
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device incprefixes_mem_227415;
                
                incprefixes_mem_227415.references = NULL;
                if (memblock_alloc_device(ctx, &incprefixes_mem_227415,
                                          (int64_t) 4 * numGroups_227408,
                                          "incprefixes_mem_227415")) {
                    err = 1;
                    goto cleanup;
                }
                if (futrts_builtinzhreplicate_i8(ctx, status_flags_mem_227411,
                                                 numGroups_227408,
                                                 (int8_t) 0) != 0) {
                    if (memblock_unref_device(ctx, &incprefixes_mem_227415,
                                              "incprefixes_mem_227415") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &aggregates_mem_227413,
                                              "aggregates_mem_227413") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &status_flags_mem_227411,
                                              "status_flags_mem_227411") != 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;
                }
                
                unsigned int shared_sizze_230954 = smax64(smax64((int64_t) 160,
                                                                 (int64_t) 4 *
                                                                 segscan_group_sizze_211891),
                                                          (int64_t) 23 *
                                                          segscan_group_sizze_211891 *
                                                          (int64_t) 4);
                CUdeviceptr kernel_arg_230956 = mem_223574.mem;
                CUdeviceptr kernel_arg_230957 = ext_mem_223586.mem;
                CUdeviceptr kernel_arg_230958 = mem_223591.mem;
                CUdeviceptr kernel_arg_230959 = mainziid_counter_mem_227409.mem;
                CUdeviceptr kernel_arg_230960 = status_flags_mem_227411.mem;
                CUdeviceptr kernel_arg_230961 = aggregates_mem_227413.mem;
                CUdeviceptr kernel_arg_230962 = incprefixes_mem_227415.mem;
                unsigned int shared_offset_230955 = 0;
                
                if ((((((1 && sdiv_up64(m_196691 *
                                        dyn_lifted_single_ma_l_arg_197257,
                                        segscan_group_sizze_211891 *
                                        (int64_t) 23) != 0) && 1 != 0) && 1 !=
                       0) && segscan_group_sizze_211891 != 0) && 1 != 0) && 1 !=
                    0) {
                    int perm[3] = {0, 1, 2};
                    
                    if (1 >= 1 << 16) {
                        perm[1] = perm[0];
                        perm[0] = 1;
                    }
                    if (1 >= 1 << 16) {
                        perm[2] = perm[0];
                        perm[0] = 2;
                    }
                    
                    size_t grid[3];
                    
                    grid[perm[0]] = sdiv_up64(m_196691 *
                                              dyn_lifted_single_ma_l_arg_197257,
                                              segscan_group_sizze_211891 *
                                              (int64_t) 23);
                    grid[perm[1]] = 1;
                    grid[perm[2]] = 1;
                    
                    void *kernel_args_230951[] = {&ctx->global_failure,
                                                  &ctx->failure_is_an_option,
                                                  &ctx->global_failure_args,
                                                  &shared_offset_230955,
                                                  &m_196691, &n_p_196694,
                                                  &i64_res_196737,
                                                  &lifted_single_ma_l_arg_197247,
                                                  &dyn_lifted_single_ma_l_arg_197257,
                                                  &kernel_arg_230956,
                                                  &kernel_arg_230957,
                                                  &kernel_arg_230958,
                                                  &kernel_arg_230959,
                                                  &kernel_arg_230960,
                                                  &kernel_arg_230961,
                                                  &kernel_arg_230962};
                    int64_t time_start_230952 = 0, time_end_230953 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                "main.segscan_211897",
                                (long) sdiv_up64(m_196691 *
                                                 dyn_lifted_single_ma_l_arg_197257,
                                                 segscan_group_sizze_211891 *
                                                 (int64_t) 23), (long) 1,
                                (long) 1, (long) segscan_group_sizze_211891,
                                (long) 1, (long) 1, (int) (0 +
                                                           (shared_sizze_230954 +
                                                            (8 -
                                                             shared_sizze_230954 %
                                                             8) % 8)));
                        time_start_230952 = get_wall_time();
                    }
                    
                    cudaEvent_t *pevents = NULL;
                    
                    if (ctx->profiling && !ctx->profiling_paused) {
                        pevents = cuda_get_events(&ctx->cuda,
                                                  &ctx->mainzisegscan_211897_runs,
                                                  &ctx->mainzisegscan_211897_total_runtime);
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                    }
                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegscan_211897,
                                                          grid[0], grid[1],
                                                          grid[2],
                                                          segscan_group_sizze_211891,
                                                          1, 1, 0 +
                                                          (shared_sizze_230954 +
                                                           (8 -
                                                            shared_sizze_230954 %
                                                            8) % 8), NULL,
                                                          kernel_args_230951,
                                                          NULL));
                    if (pevents != NULL)
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                    if (ctx->debugging) {
                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                        time_end_230953 = get_wall_time();
                        fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                "main.segscan_211897", time_end_230953 -
                                time_start_230952);
                    }
                }
                ctx->failure_is_an_option = 1;
                if (memblock_unref_device(ctx, &incprefixes_mem_227415,
                                          "incprefixes_mem_227415") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &aggregates_mem_227413,
                                          "aggregates_mem_227413") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &status_flags_mem_227411,
                                          "status_flags_mem_227411") != 0)
                    return 1;
            }
            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_227587;
            
            local_memory_capacity_227587 = ctx->cuda.max_shared_memory;
            if (sle64((int64_t) 0,
                      sext_i32_i64(local_memory_capacity_227587)) &&
                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");
                
                CUdeviceptr kernel_arg_230966 = mem_223594.mem;
                CUdeviceptr kernel_arg_230967 = mem_223598.mem;
                
                if ((((((1 && segmap_usable_groups_211940 != 0) && 1 != 0) &&
                       1 != 0) && segmap_group_sizze_211939 != 0) && 1 != 0) &&
                    1 != 0) {
                    int perm[3] = {0, 1, 2};
                    
                    if (1 >= 1 << 16) {
                        perm[1] = perm[0];
                        perm[0] = 1;
                    }
                    if (1 >= 1 << 16) {
                        perm[2] = perm[0];
                        perm[0] = 2;
                    }
                    
                    size_t grid[3];
                    
                    grid[perm[0]] = segmap_usable_groups_211940;
                    grid[perm[1]] = 1;
                    grid[perm[2]] = 1;
                    
                    void *kernel_args_230963[] = {&ctx->global_failure,
                                                  &m_196691, &kernel_arg_230966,
                                                  &kernel_arg_230967};
                    int64_t time_start_230964 = 0, time_end_230965 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                "main.segmap_211943",
                                (long) segmap_usable_groups_211940, (long) 1,
                                (long) 1, (long) segmap_group_sizze_211939,
                                (long) 1, (long) 1, (int) 0);
                        time_start_230964 = get_wall_time();
                    }
                    
                    cudaEvent_t *pevents = NULL;
                    
                    if (ctx->profiling && !ctx->profiling_paused) {
                        pevents = cuda_get_events(&ctx->cuda,
                                                  &ctx->mainzisegmap_211943_runs,
                                                  &ctx->mainzisegmap_211943_total_runtime);
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                    }
                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_211943,
                                                          grid[0], grid[1],
                                                          grid[2],
                                                          segmap_group_sizze_211939,
                                                          1, 1, 0, NULL,
                                                          kernel_args_230963,
                                                          NULL));
                    if (pevents != NULL)
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                    if (ctx->debugging) {
                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                        time_end_230965 = get_wall_time();
                        fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                "main.segmap_211943", time_end_230965 -
                                time_start_230964);
                    }
                }
                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_227519 = smax64((int64_t) 1,
                                                                   (int64_t) 3);
                    int64_t num_threads_227520 = 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_227519),
                                '\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_227519))),
                                '\n');
                    
                    unsigned int shared_sizze_230971 = (int64_t) 4 *
                                 segred_group_sizze_211970;
                    CUdeviceptr kernel_arg_230973 = mem_223591.mem;
                    CUdeviceptr kernel_arg_230974 = mem_223602.mem;
                    unsigned int shared_offset_230972 = 0;
                    
                    if ((((((1 && num_groups_211971 != 0) && 1 != 0) && 1 !=
                           0) && segred_group_sizze_211970 != 0) && 1 != 0) &&
                        1 != 0) {
                        int perm[3] = {0, 1, 2};
                        
                        if (1 >= 1 << 16) {
                            perm[1] = perm[0];
                            perm[0] = 1;
                        }
                        if (1 >= 1 << 16) {
                            perm[2] = perm[0];
                            perm[0] = 2;
                        }
                        
                        size_t grid[3];
                        
                        grid[perm[0]] = num_groups_211971;
                        grid[perm[1]] = 1;
                        grid[perm[2]] = 1;
                        
                        void *kernel_args_230968[] = {&ctx->global_failure,
                                                      &shared_offset_230972,
                                                      &m_196691,
                                                      &dyn_lifted_single_ma_l_arg_197257,
                                                      &num_groups_211971,
                                                      &segment_sizze_nonzzero_227519,
                                                      &kernel_arg_230973,
                                                      &kernel_arg_230974};
                        int64_t time_start_230969 = 0, time_end_230970 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                    "main.segred_small_211976",
                                    (long) num_groups_211971, (long) 1,
                                    (long) 1, (long) segred_group_sizze_211970,
                                    (long) 1, (long) 1, (int) (0 +
                                                               (shared_sizze_230971 +
                                                                (8 -
                                                                 shared_sizze_230971 %
                                                                 8) % 8)));
                            time_start_230969 = get_wall_time();
                        }
                        
                        cudaEvent_t *pevents = NULL;
                        
                        if (ctx->profiling && !ctx->profiling_paused) {
                            pevents = cuda_get_events(&ctx->cuda,
                                                      &ctx->mainzisegred_small_211976_runs,
                                                      &ctx->mainzisegred_small_211976_total_runtime);
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                        }
                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_small_211976,
                                                              grid[0], grid[1],
                                                              grid[2],
                                                              segred_group_sizze_211970,
                                                              1, 1, 0 +
                                                              (shared_sizze_230971 +
                                                               (8 -
                                                                shared_sizze_230971 %
                                                                8) % 8), NULL,
                                                              kernel_args_230968,
                                                              NULL));
                        if (pevents != NULL)
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                        if (ctx->debugging) {
                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                            time_end_230970 = get_wall_time();
                            fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                    "main.segred_small_211976",
                                    time_end_230970 - time_start_230969);
                        }
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "");
                } else {
                    int64_t groups_per_segment_227546 =
                            sdiv_up64(num_groups_211971, smax64((int64_t) 1,
                                                                m_196691));
                    int64_t elements_per_thread_227547 = sdiv_up64((int64_t) 3,
                                                                   segred_group_sizze_211970 *
                                                                   groups_per_segment_227546);
                    int64_t virt_num_groups_227548 = groups_per_segment_227546 *
                            m_196691;
                    int64_t num_threads_227549 = num_groups_211971 *
                            segred_group_sizze_211970;
                    int64_t threads_per_segment_227550 =
                            groups_per_segment_227546 *
                            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_227548, '\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_227547, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "groups_per_segment",
                                (long long) groups_per_segment_227546, '\n');
                    
                    struct memblock_device segred_tmp_mem_227551;
                    
                    segred_tmp_mem_227551.references = NULL;
                    if (memblock_alloc_device(ctx, &segred_tmp_mem_227551,
                                              (int64_t) 4 *
                                              virt_num_groups_227548,
                                              "segred_tmp_mem_227551")) {
                        err = 1;
                        goto cleanup;
                    }
                    
                    struct memblock_device mainzicounter_mem_227553 =
                                           ctx->mainzicounter_mem_227553;
                    unsigned int shared_sizze_230979 = 1;
                    unsigned int shared_sizze_230981 = (int64_t) 4 *
                                 segred_group_sizze_211970;
                    CUdeviceptr kernel_arg_230983 = mem_223591.mem;
                    CUdeviceptr kernel_arg_230984 = mem_223602.mem;
                    CUdeviceptr kernel_arg_230985 = segred_tmp_mem_227551.mem;
                    CUdeviceptr kernel_arg_230986 =
                                mainzicounter_mem_227553.mem;
                    unsigned int shared_offset_230980 = 0;
                    unsigned int shared_offset_230982 = 0 +
                                 (shared_sizze_230979 + (8 -
                                                         shared_sizze_230979 %
                                                         8) % 8);
                    
                    if ((((((1 && num_groups_211971 != 0) && 1 != 0) && 1 !=
                           0) && segred_group_sizze_211970 != 0) && 1 != 0) &&
                        1 != 0) {
                        int perm[3] = {0, 1, 2};
                        
                        if (1 >= 1 << 16) {
                            perm[1] = perm[0];
                            perm[0] = 1;
                        }
                        if (1 >= 1 << 16) {
                            perm[2] = perm[0];
                            perm[0] = 2;
                        }
                        
                        size_t grid[3];
                        
                        grid[perm[0]] = num_groups_211971;
                        grid[perm[1]] = 1;
                        grid[perm[2]] = 1;
                        
                        void *kernel_args_230976[] = {&ctx->global_failure,
                                                      &shared_offset_230980,
                                                      &shared_offset_230982,
                                                      &m_196691,
                                                      &dyn_lifted_single_ma_l_arg_197257,
                                                      &num_groups_211971,
                                                      &groups_per_segment_227546,
                                                      &elements_per_thread_227547,
                                                      &virt_num_groups_227548,
                                                      &threads_per_segment_227550,
                                                      &kernel_arg_230983,
                                                      &kernel_arg_230984,
                                                      &kernel_arg_230985,
                                                      &kernel_arg_230986};
                        int64_t time_start_230977 = 0, time_end_230978 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                    "main.segred_large_211976",
                                    (long) num_groups_211971, (long) 1,
                                    (long) 1, (long) segred_group_sizze_211970,
                                    (long) 1, (long) 1, (int) (0 +
                                                               (shared_sizze_230979 +
                                                                (8 -
                                                                 shared_sizze_230979 %
                                                                 8) % 8) +
                                                               (shared_sizze_230981 +
                                                                (8 -
                                                                 shared_sizze_230981 %
                                                                 8) % 8)));
                            time_start_230977 = get_wall_time();
                        }
                        
                        cudaEvent_t *pevents = NULL;
                        
                        if (ctx->profiling && !ctx->profiling_paused) {
                            pevents = cuda_get_events(&ctx->cuda,
                                                      &ctx->mainzisegred_large_211976_runs,
                                                      &ctx->mainzisegred_large_211976_total_runtime);
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                        }
                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_large_211976,
                                                              grid[0], grid[1],
                                                              grid[2],
                                                              segred_group_sizze_211970,
                                                              1, 1, 0 +
                                                              (shared_sizze_230979 +
                                                               (8 -
                                                                shared_sizze_230979 %
                                                                8) % 8) +
                                                              (shared_sizze_230981 +
                                                               (8 -
                                                                shared_sizze_230981 %
                                                                8) % 8), NULL,
                                                              kernel_args_230976,
                                                              NULL));
                        if (pevents != NULL)
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                        if (ctx->debugging) {
                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                            time_end_230978 = get_wall_time();
                            fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                    "main.segred_large_211976",
                                    time_end_230978 - time_start_230977);
                        }
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "");
                    if (memblock_unref_device(ctx, &segred_tmp_mem_227551,
                                              "segred_tmp_mem_227551") != 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");
                if (ctx->debugging)
                    fprintf(ctx->log, "%s: %llu%c",
                            "SegScan: number of elements processed sequentially per thread is m:",
                            (long long) 23, '\n');
                if (ctx->debugging)
                    fprintf(ctx->log, "%s: %llu%c",
                            "SegScan: memory constraints is: ", (long long) 23,
                            '\n');
                if (ctx->debugging)
                    fprintf(ctx->log, "%s: %llu%c",
                            "SegScan: register constraints is: ",
                            (long long) 31, '\n');
                if (ctx->debugging)
                    fprintf(ctx->log, "%s: %llu%c", "SegScan: sumT' is: ",
                            (long long) 1, '\n');
                
                int64_t numThreads_227588 = sdiv_up64(m_196691 * n_196692,
                                                      segscan_group_sizze_212022 *
                                                      (int64_t) 23) *
                        segscan_group_sizze_212022;
                int64_t numGroups_227589 = sdiv_up64(m_196691 * n_196692,
                                                     segscan_group_sizze_212022 *
                                                     (int64_t) 23);
                struct memblock_device mainziid_counter_mem_227590 =
                                       ctx->mainziid_counter_mem_227590;
                struct memblock_device status_flags_mem_227592;
                
                status_flags_mem_227592.references = NULL;
                if (memblock_alloc_device(ctx, &status_flags_mem_227592,
                                          numGroups_227589,
                                          "status_flags_mem_227592")) {
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device aggregates_mem_227594;
                
                aggregates_mem_227594.references = NULL;
                if (memblock_alloc_device(ctx, &aggregates_mem_227594,
                                          (int64_t) 4 * numGroups_227589,
                                          "aggregates_mem_227594")) {
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device incprefixes_mem_227596;
                
                incprefixes_mem_227596.references = NULL;
                if (memblock_alloc_device(ctx, &incprefixes_mem_227596,
                                          (int64_t) 4 * numGroups_227589,
                                          "incprefixes_mem_227596")) {
                    err = 1;
                    goto cleanup;
                }
                if (futrts_builtinzhreplicate_i8(ctx, status_flags_mem_227592,
                                                 numGroups_227589,
                                                 (int8_t) 0) != 0) {
                    if (memblock_unref_device(ctx, &incprefixes_mem_227596,
                                              "incprefixes_mem_227596") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &aggregates_mem_227594,
                                              "aggregates_mem_227594") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &status_flags_mem_227592,
                                              "status_flags_mem_227592") != 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;
                }
                
                unsigned int shared_sizze_230991 = smax64(smax64((int64_t) 160,
                                                                 (int64_t) 4 *
                                                                 segscan_group_sizze_212022),
                                                          (int64_t) 23 *
                                                          segscan_group_sizze_212022 *
                                                          (int64_t) 4);
                CUdeviceptr kernel_arg_230993 = mem_223591.mem;
                CUdeviceptr kernel_arg_230994 = ext_mem_223603.mem;
                CUdeviceptr kernel_arg_230995 = mem_223608.mem;
                CUdeviceptr kernel_arg_230996 = mainziid_counter_mem_227590.mem;
                CUdeviceptr kernel_arg_230997 = status_flags_mem_227592.mem;
                CUdeviceptr kernel_arg_230998 = aggregates_mem_227594.mem;
                CUdeviceptr kernel_arg_230999 = incprefixes_mem_227596.mem;
                unsigned int shared_offset_230992 = 0;
                
                if ((((((1 && sdiv_up64(m_196691 * n_196692,
                                        segscan_group_sizze_212022 *
                                        (int64_t) 23) != 0) && 1 != 0) && 1 !=
                       0) && segscan_group_sizze_212022 != 0) && 1 != 0) && 1 !=
                    0) {
                    int perm[3] = {0, 1, 2};
                    
                    if (1 >= 1 << 16) {
                        perm[1] = perm[0];
                        perm[0] = 1;
                    }
                    if (1 >= 1 << 16) {
                        perm[2] = perm[0];
                        perm[0] = 2;
                    }
                    
                    size_t grid[3];
                    
                    grid[perm[0]] = sdiv_up64(m_196691 * n_196692,
                                              segscan_group_sizze_212022 *
                                              (int64_t) 23);
                    grid[perm[1]] = 1;
                    grid[perm[2]] = 1;
                    
                    void *kernel_args_230988[] = {&ctx->global_failure,
                                                  &ctx->failure_is_an_option,
                                                  &ctx->global_failure_args,
                                                  &shared_offset_230992,
                                                  &m_196691, &n_196692,
                                                  &dyn_lifted_single_ma_l_arg_197257,
                                                  &kernel_arg_230993,
                                                  &kernel_arg_230994,
                                                  &kernel_arg_230995,
                                                  &kernel_arg_230996,
                                                  &kernel_arg_230997,
                                                  &kernel_arg_230998,
                                                  &kernel_arg_230999};
                    int64_t time_start_230989 = 0, time_end_230990 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                "main.segscan_212028",
                                (long) sdiv_up64(m_196691 * n_196692,
                                                 segscan_group_sizze_212022 *
                                                 (int64_t) 23), (long) 1,
                                (long) 1, (long) segscan_group_sizze_212022,
                                (long) 1, (long) 1, (int) (0 +
                                                           (shared_sizze_230991 +
                                                            (8 -
                                                             shared_sizze_230991 %
                                                             8) % 8)));
                        time_start_230989 = get_wall_time();
                    }
                    
                    cudaEvent_t *pevents = NULL;
                    
                    if (ctx->profiling && !ctx->profiling_paused) {
                        pevents = cuda_get_events(&ctx->cuda,
                                                  &ctx->mainzisegscan_212028_runs,
                                                  &ctx->mainzisegscan_212028_total_runtime);
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                    }
                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegscan_212028,
                                                          grid[0], grid[1],
                                                          grid[2],
                                                          segscan_group_sizze_212022,
                                                          1, 1, 0 +
                                                          (shared_sizze_230991 +
                                                           (8 -
                                                            shared_sizze_230991 %
                                                            8) % 8), NULL,
                                                          kernel_args_230988,
                                                          NULL));
                    if (pevents != NULL)
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                    if (ctx->debugging) {
                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                        time_end_230990 = get_wall_time();
                        fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                "main.segscan_212028", time_end_230990 -
                                time_start_230989);
                    }
                }
                ctx->failure_is_an_option = 1;
                if (memblock_unref_device(ctx, &incprefixes_mem_227596,
                                          "incprefixes_mem_227596") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &aggregates_mem_227594,
                                          "aggregates_mem_227594") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &status_flags_mem_227592,
                                          "status_flags_mem_227592") != 0)
                    return 1;
            }
            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_227691;
                    
                    max_num_groups_227691 =
                        *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_227691))));
                    
                    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_227692;
                    
                    max_num_groups_227692 =
                        *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_227692))));
                    
                    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_227693;
                    
                    max_num_groups_227693 =
                        *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_227693))));
                    
                    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_227889;
                    
                    local_memory_capacity_227889 = ctx->cuda.max_shared_memory;
                    if ((sle64((int64_t) 0,
                               sext_i32_i64(local_memory_capacity_227889)) &&
                         sle64((int64_t) 0,
                               sext_i32_i64(local_memory_capacity_227889))) &&
                        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_227697;
                        
                        group_sizze_227697 =
                            *ctx->tuning_params.mainzigroup_sizze_227697;
                        
                        int64_t num_groups_227698 = sdiv_up64(m_196691 *
                                                              n_196692,
                                                              group_sizze_227697);
                        CUdeviceptr kernel_arg_231003 = mem_param_222550.mem;
                        CUdeviceptr kernel_arg_231004 = mem_223621.mem;
                        
                        if ((((((1 && num_groups_227698 != 0) && 1 != 0) && 1 !=
                               0) && group_sizze_227697 != 0) && 1 != 0) && 1 !=
                            0) {
                            int perm[3] = {0, 1, 2};
                            
                            if (1 >= 1 << 16) {
                                perm[1] = perm[0];
                                perm[0] = 1;
                            }
                            if (1 >= 1 << 16) {
                                perm[2] = perm[0];
                                perm[0] = 2;
                            }
                            
                            size_t grid[3];
                            
                            grid[perm[0]] = num_groups_227698;
                            grid[perm[1]] = 1;
                            grid[perm[2]] = 1;
                            
                            void *kernel_args_231000[] = {&m_196691, &n_196692,
                                                          &ctx_param_ext_222545,
                                                          &ctx_param_ext_222546,
                                                          &ctx_param_ext_222548,
                                                          &kernel_arg_231003,
                                                          &kernel_arg_231004};
                            int64_t time_start_231001 = 0, time_end_231002 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                        "main.copy_227694",
                                        (long) num_groups_227698, (long) 1,
                                        (long) 1, (long) group_sizze_227697,
                                        (long) 1, (long) 1, (int) 0);
                                time_start_231001 = get_wall_time();
                            }
                            
                            cudaEvent_t *pevents = NULL;
                            
                            if (ctx->profiling && !ctx->profiling_paused) {
                                pevents = cuda_get_events(&ctx->cuda,
                                                          &ctx->mainzicopy_227694_runs,
                                                          &ctx->mainzicopy_227694_total_runtime);
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                   0));
                            }
                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzicopy_227694,
                                                                  grid[0],
                                                                  grid[1],
                                                                  grid[2],
                                                                  group_sizze_227697,
                                                                  1, 1, 0, NULL,
                                                                  kernel_args_231000,
                                                                  NULL));
                            if (pevents != NULL)
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                   0));
                            if (ctx->debugging) {
                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                time_end_231002 = get_wall_time();
                                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                        "main.copy_227694", time_end_231002 -
                                        time_start_231001);
                            }
                        }
                        
                        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");
                        
                        CUdeviceptr kernel_arg_231008 = mem_223615.mem;
                        CUdeviceptr kernel_arg_231009 = mem_223618.mem;
                        CUdeviceptr kernel_arg_231010 = mem_223621.mem;
                        CUdeviceptr kernel_arg_231011 = mem_223624.mem;
                        CUdeviceptr kernel_arg_231012 = mem_223643.mem;
                        CUdeviceptr kernel_arg_231013 = color_225074.mem;
                        
                        if ((((((1 && num_groups_212128 != 0) && 1 != 0) && 1 !=
                               0) && segmap_group_sizze_212127 != 0) && 1 !=
                             0) && 1 != 0) {
                            int perm[3] = {0, 1, 2};
                            
                            if (1 >= 1 << 16) {
                                perm[1] = perm[0];
                                perm[0] = 1;
                            }
                            if (1 >= 1 << 16) {
                                perm[2] = perm[0];
                                perm[0] = 2;
                            }
                            
                            size_t grid[3];
                            
                            grid[perm[0]] = num_groups_212128;
                            grid[perm[1]] = 1;
                            grid[perm[2]] = 1;
                            
                            void *kernel_args_231005[] = {&ctx->global_failure,
                                                          &m_196691, &n_196692,
                                                          &q_l_196697,
                                                          &jump_t_196702,
                                                          &l_n_m_196752,
                                                          &i_196779,
                                                          &num_groups_212128,
                                                          &num_threads_225201,
                                                          &kernel_arg_231008,
                                                          &kernel_arg_231009,
                                                          &kernel_arg_231010,
                                                          &kernel_arg_231011,
                                                          &kernel_arg_231012,
                                                          &kernel_arg_231013};
                            int64_t time_start_231006 = 0, time_end_231007 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                        "main.segmap_212132",
                                        (long) num_groups_212128, (long) 1,
                                        (long) 1,
                                        (long) segmap_group_sizze_212127,
                                        (long) 1, (long) 1, (int) 0);
                                time_start_231006 = get_wall_time();
                            }
                            
                            cudaEvent_t *pevents = NULL;
                            
                            if (ctx->profiling && !ctx->profiling_paused) {
                                pevents = cuda_get_events(&ctx->cuda,
                                                          &ctx->mainzisegmap_212132_runs,
                                                          &ctx->mainzisegmap_212132_total_runtime);
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                   0));
                            }
                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_212132,
                                                                  grid[0],
                                                                  grid[1],
                                                                  grid[2],
                                                                  segmap_group_sizze_212127,
                                                                  1, 1, 0, NULL,
                                                                  kernel_args_231005,
                                                                  NULL));
                            if (pevents != NULL)
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                   0));
                            if (ctx->debugging) {
                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                time_end_231007 = get_wall_time();
                                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                        "main.segmap_212132", time_end_231007 -
                                        time_start_231006);
                            }
                        }
                        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_227888;
                        
                        local_memory_capacity_227888 =
                            ctx->cuda.max_shared_memory;
                        if (sle64((int64_t) 0,
                                  sext_i32_i64(local_memory_capacity_227888)) &&
                            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");
                            
                            CUdeviceptr kernel_arg_231017 = ext_mem_222468.mem;
                            CUdeviceptr kernel_arg_231018 = ext_mem_222469.mem;
                            CUdeviceptr kernel_arg_231019 =
                                        mem_param_222550.mem;
                            CUdeviceptr kernel_arg_231020 = mem_223608.mem;
                            CUdeviceptr kernel_arg_231021 = mem_223648.mem;
                            
                            if ((((((1 && segmap_usable_groups_212509 != 0) &&
                                    1 != 0) && 1 != 0) &&
                                  segmap_group_sizze_212508 != 0) && 1 != 0) &&
                                1 != 0) {
                                int perm[3] = {0, 1, 2};
                                
                                if (1 >= 1 << 16) {
                                    perm[1] = perm[0];
                                    perm[0] = 1;
                                }
                                if (1 >= 1 << 16) {
                                    perm[2] = perm[0];
                                    perm[0] = 2;
                                }
                                
                                size_t grid[3];
                                
                                grid[perm[0]] = segmap_usable_groups_212509;
                                grid[perm[1]] = 1;
                                grid[perm[2]] = 1;
                                
                                void *kernel_args_231014[] =
                                     {&ctx->global_failure, &m_196691,
                                      &n_196692, &q_l_196697, &jump_t_196702,
                                      &l_n_m_196752, &i_196779,
                                      &ctx_param_ext_222545,
                                      &ctx_param_ext_222546,
                                      &ctx_param_ext_222548, &kernel_arg_231017,
                                      &kernel_arg_231018, &kernel_arg_231019,
                                      &kernel_arg_231020, &kernel_arg_231021};
                                int64_t time_start_231015 = 0, time_end_231016 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                            "main.segmap_212517",
                                            (long) segmap_usable_groups_212509,
                                            (long) 1, (long) 1,
                                            (long) segmap_group_sizze_212508,
                                            (long) 1, (long) 1, (int) 0);
                                    time_start_231015 = get_wall_time();
                                }
                                
                                cudaEvent_t *pevents = NULL;
                                
                                if (ctx->profiling && !ctx->profiling_paused) {
                                    pevents = cuda_get_events(&ctx->cuda,
                                                              &ctx->mainzisegmap_212517_runs,
                                                              &ctx->mainzisegmap_212517_total_runtime);
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                       0));
                                }
                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_212517,
                                                                      grid[0],
                                                                      grid[1],
                                                                      grid[2],
                                                                      segmap_group_sizze_212508,
                                                                      1, 1, 0,
                                                                      NULL,
                                                                      kernel_args_231014,
                                                                      NULL));
                                if (pevents != NULL)
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                       0));
                                if (ctx->debugging) {
                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                    time_end_231016 = get_wall_time();
                                    fprintf(ctx->log,
                                            "Kernel %s runtime: %ldus\n",
                                            "main.segmap_212517",
                                            time_end_231016 -
                                            time_start_231015);
                                }
                            }
                            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_227734 =
                                        smax64((int64_t) 1, q_l_196697);
                                int64_t num_threads_227735 = 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_227734),
                                            '\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_227734))),
                                            '\n');
                                
                                unsigned int shared_sizze_231025 = (int64_t) 4 *
                                             segred_group_sizze_212591;
                                CUdeviceptr kernel_arg_231027 =
                                            ext_mem_222468.mem;
                                CUdeviceptr kernel_arg_231028 =
                                            ext_mem_222469.mem;
                                CUdeviceptr kernel_arg_231029 =
                                            mem_param_222550.mem;
                                CUdeviceptr kernel_arg_231030 = mem_223653.mem;
                                unsigned int shared_offset_231026 = 0;
                                
                                if ((((((1 && num_groups_212592 != 0) && 1 !=
                                        0) && 1 != 0) &&
                                      segred_group_sizze_212591 != 0) && 1 !=
                                     0) && 1 != 0) {
                                    int perm[3] = {0, 1, 2};
                                    
                                    if (1 >= 1 << 16) {
                                        perm[1] = perm[0];
                                        perm[0] = 1;
                                    }
                                    if (1 >= 1 << 16) {
                                        perm[2] = perm[0];
                                        perm[0] = 2;
                                    }
                                    
                                    size_t grid[3];
                                    
                                    grid[perm[0]] = num_groups_212592;
                                    grid[perm[1]] = 1;
                                    grid[perm[2]] = 1;
                                    
                                    void *kernel_args_231022[] =
                                         {&ctx->global_failure,
                                          &shared_offset_231026, &m_196691,
                                          &n_196692, &q_l_196697,
                                          &jump_t_196702, &l_n_m_196752,
                                          &i_196779, &num_groups_212592,
                                          &ctx_param_ext_222545,
                                          &ctx_param_ext_222546,
                                          &ctx_param_ext_222548,
                                          &segment_sizze_nonzzero_227734,
                                          &kernel_arg_231027,
                                          &kernel_arg_231028,
                                          &kernel_arg_231029,
                                          &kernel_arg_231030};
                                    int64_t time_start_231023 = 0,
                                            time_end_231024 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                "main.segred_small_212598",
                                                (long) num_groups_212592,
                                                (long) 1, (long) 1,
                                                (long) segred_group_sizze_212591,
                                                (long) 1, (long) 1, (int) (0 +
                                                                           (shared_sizze_231025 +
                                                                            (8 -
                                                                             shared_sizze_231025 %
                                                                             8) %
                                                                            8)));
                                        time_start_231023 = get_wall_time();
                                    }
                                    
                                    cudaEvent_t *pevents = NULL;
                                    
                                    if (ctx->profiling &&
                                        !ctx->profiling_paused) {
                                        pevents = cuda_get_events(&ctx->cuda,
                                                                  &ctx->mainzisegred_small_212598_runs,
                                                                  &ctx->mainzisegred_small_212598_total_runtime);
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                           0));
                                    }
                                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_small_212598,
                                                                          grid[0],
                                                                          grid[1],
                                                                          grid[2],
                                                                          segred_group_sizze_212591,
                                                                          1, 1,
                                                                          0 +
                                                                          (shared_sizze_231025 +
                                                                           (8 -
                                                                            shared_sizze_231025 %
                                                                            8) %
                                                                           8),
                                                                          NULL,
                                                                          kernel_args_231022,
                                                                          NULL));
                                    if (pevents != NULL)
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                           0));
                                    if (ctx->debugging) {
                                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                        time_end_231024 = get_wall_time();
                                        fprintf(ctx->log,
                                                "Kernel %s runtime: %ldus\n",
                                                "main.segred_small_212598",
                                                time_end_231024 -
                                                time_start_231023);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                            } else {
                                int64_t groups_per_segment_227763 =
                                        sdiv_up64(num_groups_212592,
                                                  smax64((int64_t) 1, m_196691 *
                                                         l_n_m_196752));
                                int64_t elements_per_thread_227764 =
                                        sdiv_up64(q_l_196697,
                                                  segred_group_sizze_212591 *
                                                  groups_per_segment_227763);
                                int64_t virt_num_groups_227765 =
                                        groups_per_segment_227763 * (m_196691 *
                                                                     l_n_m_196752);
                                int64_t num_threads_227766 = num_groups_212592 *
                                        segred_group_sizze_212591;
                                int64_t threads_per_segment_227767 =
                                        groups_per_segment_227763 *
                                        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_227765,
                                            '\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_227764,
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "groups_per_segment",
                                            (long long) groups_per_segment_227763,
                                            '\n');
                                
                                struct memblock_device segred_tmp_mem_227768;
                                
                                segred_tmp_mem_227768.references = NULL;
                                if (memblock_alloc_device(ctx,
                                                          &segred_tmp_mem_227768,
                                                          (int64_t) 4 *
                                                          virt_num_groups_227765,
                                                          "segred_tmp_mem_227768")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mainzicounter_mem_227770
                                                       =
                                                       ctx->mainzicounter_mem_227770;
                                unsigned int shared_sizze_231035 = 1;
                                unsigned int shared_sizze_231037 = (int64_t) 4 *
                                             segred_group_sizze_212591;
                                CUdeviceptr kernel_arg_231039 =
                                            ext_mem_222468.mem;
                                CUdeviceptr kernel_arg_231040 =
                                            ext_mem_222469.mem;
                                CUdeviceptr kernel_arg_231041 =
                                            mem_param_222550.mem;
                                CUdeviceptr kernel_arg_231042 = mem_223653.mem;
                                CUdeviceptr kernel_arg_231043 =
                                            segred_tmp_mem_227768.mem;
                                CUdeviceptr kernel_arg_231044 =
                                            mainzicounter_mem_227770.mem;
                                unsigned int shared_offset_231036 = 0;
                                unsigned int shared_offset_231038 = 0 +
                                             (shared_sizze_231035 + (8 -
                                                                     shared_sizze_231035 %
                                                                     8) % 8);
                                
                                if ((((((1 && num_groups_212592 != 0) && 1 !=
                                        0) && 1 != 0) &&
                                      segred_group_sizze_212591 != 0) && 1 !=
                                     0) && 1 != 0) {
                                    int perm[3] = {0, 1, 2};
                                    
                                    if (1 >= 1 << 16) {
                                        perm[1] = perm[0];
                                        perm[0] = 1;
                                    }
                                    if (1 >= 1 << 16) {
                                        perm[2] = perm[0];
                                        perm[0] = 2;
                                    }
                                    
                                    size_t grid[3];
                                    
                                    grid[perm[0]] = num_groups_212592;
                                    grid[perm[1]] = 1;
                                    grid[perm[2]] = 1;
                                    
                                    void *kernel_args_231032[] =
                                         {&ctx->global_failure,
                                          &shared_offset_231036,
                                          &shared_offset_231038, &m_196691,
                                          &n_196692, &q_l_196697,
                                          &jump_t_196702, &l_n_m_196752,
                                          &i_196779, &num_groups_212592,
                                          &ctx_param_ext_222545,
                                          &ctx_param_ext_222546,
                                          &ctx_param_ext_222548,
                                          &groups_per_segment_227763,
                                          &elements_per_thread_227764,
                                          &virt_num_groups_227765,
                                          &threads_per_segment_227767,
                                          &kernel_arg_231039,
                                          &kernel_arg_231040,
                                          &kernel_arg_231041,
                                          &kernel_arg_231042,
                                          &kernel_arg_231043,
                                          &kernel_arg_231044};
                                    int64_t time_start_231033 = 0,
                                            time_end_231034 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                "main.segred_large_212598",
                                                (long) num_groups_212592,
                                                (long) 1, (long) 1,
                                                (long) segred_group_sizze_212591,
                                                (long) 1, (long) 1, (int) (0 +
                                                                           (shared_sizze_231035 +
                                                                            (8 -
                                                                             shared_sizze_231035 %
                                                                             8) %
                                                                            8) +
                                                                           (shared_sizze_231037 +
                                                                            (8 -
                                                                             shared_sizze_231037 %
                                                                             8) %
                                                                            8)));
                                        time_start_231033 = get_wall_time();
                                    }
                                    
                                    cudaEvent_t *pevents = NULL;
                                    
                                    if (ctx->profiling &&
                                        !ctx->profiling_paused) {
                                        pevents = cuda_get_events(&ctx->cuda,
                                                                  &ctx->mainzisegred_large_212598_runs,
                                                                  &ctx->mainzisegred_large_212598_total_runtime);
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                           0));
                                    }
                                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_large_212598,
                                                                          grid[0],
                                                                          grid[1],
                                                                          grid[2],
                                                                          segred_group_sizze_212591,
                                                                          1, 1,
                                                                          0 +
                                                                          (shared_sizze_231035 +
                                                                           (8 -
                                                                            shared_sizze_231035 %
                                                                            8) %
                                                                           8) +
                                                                          (shared_sizze_231037 +
                                                                           (8 -
                                                                            shared_sizze_231037 %
                                                                            8) %
                                                                           8),
                                                                          NULL,
                                                                          kernel_args_231032,
                                                                          NULL));
                                    if (pevents != NULL)
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                           0));
                                    if (ctx->debugging) {
                                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                        time_end_231034 = get_wall_time();
                                        fprintf(ctx->log,
                                                "Kernel %s runtime: %ldus\n",
                                                "main.segred_large_212598",
                                                time_end_231034 -
                                                time_start_231033);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                                if (memblock_unref_device(ctx,
                                                          &segred_tmp_mem_227768,
                                                          "segred_tmp_mem_227768") !=
                                    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");
                            
                            CUdeviceptr kernel_arg_231048 = mem_223653.mem;
                            CUdeviceptr kernel_arg_231049 = mem_223658.mem;
                            
                            if ((((((1 && segmap_usable_groups_212630 != 0) &&
                                    1 != 0) && 1 != 0) &&
                                  segmap_group_sizze_212629 != 0) && 1 != 0) &&
                                1 != 0) {
                                int perm[3] = {0, 1, 2};
                                
                                if (1 >= 1 << 16) {
                                    perm[1] = perm[0];
                                    perm[0] = 1;
                                }
                                if (1 >= 1 << 16) {
                                    perm[2] = perm[0];
                                    perm[0] = 2;
                                }
                                
                                size_t grid[3];
                                
                                grid[perm[0]] = segmap_usable_groups_212630;
                                grid[perm[1]] = 1;
                                grid[perm[2]] = 1;
                                
                                void *kernel_args_231045[] =
                                     {&ctx->global_failure, &m_196691,
                                      &l_n_m_196752, &kernel_arg_231048,
                                      &kernel_arg_231049};
                                int64_t time_start_231046 = 0, time_end_231047 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                            "main.segmap_212634",
                                            (long) segmap_usable_groups_212630,
                                            (long) 1, (long) 1,
                                            (long) segmap_group_sizze_212629,
                                            (long) 1, (long) 1, (int) 0);
                                    time_start_231046 = get_wall_time();
                                }
                                
                                cudaEvent_t *pevents = NULL;
                                
                                if (ctx->profiling && !ctx->profiling_paused) {
                                    pevents = cuda_get_events(&ctx->cuda,
                                                              &ctx->mainzisegmap_212634_runs,
                                                              &ctx->mainzisegmap_212634_total_runtime);
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                       0));
                                }
                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_212634,
                                                                      grid[0],
                                                                      grid[1],
                                                                      grid[2],
                                                                      segmap_group_sizze_212629,
                                                                      1, 1, 0,
                                                                      NULL,
                                                                      kernel_args_231045,
                                                                      NULL));
                                if (pevents != NULL)
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                       0));
                                if (ctx->debugging) {
                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                    time_end_231047 = get_wall_time();
                                    fprintf(ctx->log,
                                            "Kernel %s runtime: %ldus\n",
                                            "main.segmap_212634",
                                            time_end_231047 -
                                            time_start_231046);
                                }
                            }
                            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_227816 =
                                        smax64((int64_t) 1, q_l_196697);
                                int64_t num_threads_227817 = 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_227816),
                                            '\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_227816))),
                                            '\n');
                                
                                unsigned int shared_sizze_231053 = (int64_t) 4 *
                                             segred_group_sizze_212640;
                                CUdeviceptr kernel_arg_231055 =
                                            ext_mem_222468.mem;
                                CUdeviceptr kernel_arg_231056 =
                                            ext_mem_222469.mem;
                                CUdeviceptr kernel_arg_231057 =
                                            mem_param_222550.mem;
                                CUdeviceptr kernel_arg_231058 = mem_223608.mem;
                                CUdeviceptr kernel_arg_231059 = mem_223658.mem;
                                CUdeviceptr kernel_arg_231060 = mem_223663.mem;
                                unsigned int shared_offset_231054 = 0;
                                
                                if ((((((1 && num_groups_212641 != 0) && 1 !=
                                        0) && 1 != 0) &&
                                      segred_group_sizze_212640 != 0) && 1 !=
                                     0) && 1 != 0) {
                                    int perm[3] = {0, 1, 2};
                                    
                                    if (1 >= 1 << 16) {
                                        perm[1] = perm[0];
                                        perm[0] = 1;
                                    }
                                    if (1 >= 1 << 16) {
                                        perm[2] = perm[0];
                                        perm[0] = 2;
                                    }
                                    
                                    size_t grid[3];
                                    
                                    grid[perm[0]] = num_groups_212641;
                                    grid[perm[1]] = 1;
                                    grid[perm[2]] = 1;
                                    
                                    void *kernel_args_231050[] =
                                         {&ctx->global_failure,
                                          &shared_offset_231054, &m_196691,
                                          &n_196692, &q_l_196697,
                                          &jump_t_196702, &l_n_m_196752,
                                          &i_196779, &num_groups_212641,
                                          &ctx_param_ext_222545,
                                          &ctx_param_ext_222546,
                                          &ctx_param_ext_222548,
                                          &segment_sizze_nonzzero_227816,
                                          &kernel_arg_231055,
                                          &kernel_arg_231056,
                                          &kernel_arg_231057,
                                          &kernel_arg_231058,
                                          &kernel_arg_231059,
                                          &kernel_arg_231060};
                                    int64_t time_start_231051 = 0,
                                            time_end_231052 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                "main.segred_small_212647",
                                                (long) num_groups_212641,
                                                (long) 1, (long) 1,
                                                (long) segred_group_sizze_212640,
                                                (long) 1, (long) 1, (int) (0 +
                                                                           (shared_sizze_231053 +
                                                                            (8 -
                                                                             shared_sizze_231053 %
                                                                             8) %
                                                                            8)));
                                        time_start_231051 = get_wall_time();
                                    }
                                    
                                    cudaEvent_t *pevents = NULL;
                                    
                                    if (ctx->profiling &&
                                        !ctx->profiling_paused) {
                                        pevents = cuda_get_events(&ctx->cuda,
                                                                  &ctx->mainzisegred_small_212647_runs,
                                                                  &ctx->mainzisegred_small_212647_total_runtime);
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                           0));
                                    }
                                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_small_212647,
                                                                          grid[0],
                                                                          grid[1],
                                                                          grid[2],
                                                                          segred_group_sizze_212640,
                                                                          1, 1,
                                                                          0 +
                                                                          (shared_sizze_231053 +
                                                                           (8 -
                                                                            shared_sizze_231053 %
                                                                            8) %
                                                                           8),
                                                                          NULL,
                                                                          kernel_args_231050,
                                                                          NULL));
                                    if (pevents != NULL)
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                           0));
                                    if (ctx->debugging) {
                                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                        time_end_231052 = get_wall_time();
                                        fprintf(ctx->log,
                                                "Kernel %s runtime: %ldus\n",
                                                "main.segred_small_212647",
                                                time_end_231052 -
                                                time_start_231051);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                            } else {
                                int64_t groups_per_segment_227845 =
                                        sdiv_up64(num_groups_212641,
                                                  smax64((int64_t) 1, m_196691 *
                                                         l_n_m_196752));
                                int64_t elements_per_thread_227846 =
                                        sdiv_up64(q_l_196697,
                                                  segred_group_sizze_212640 *
                                                  groups_per_segment_227845);
                                int64_t virt_num_groups_227847 =
                                        groups_per_segment_227845 * (m_196691 *
                                                                     l_n_m_196752);
                                int64_t num_threads_227848 = num_groups_212641 *
                                        segred_group_sizze_212640;
                                int64_t threads_per_segment_227849 =
                                        groups_per_segment_227845 *
                                        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_227847,
                                            '\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_227846,
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "groups_per_segment",
                                            (long long) groups_per_segment_227845,
                                            '\n');
                                
                                struct memblock_device segred_tmp_mem_227850;
                                
                                segred_tmp_mem_227850.references = NULL;
                                if (memblock_alloc_device(ctx,
                                                          &segred_tmp_mem_227850,
                                                          (int64_t) 4 *
                                                          virt_num_groups_227847,
                                                          "segred_tmp_mem_227850")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mainzicounter_mem_227852
                                                       =
                                                       ctx->mainzicounter_mem_227852;
                                unsigned int shared_sizze_231065 = 1;
                                unsigned int shared_sizze_231067 = (int64_t) 4 *
                                             segred_group_sizze_212640;
                                CUdeviceptr kernel_arg_231069 =
                                            ext_mem_222468.mem;
                                CUdeviceptr kernel_arg_231070 =
                                            ext_mem_222469.mem;
                                CUdeviceptr kernel_arg_231071 =
                                            mem_param_222550.mem;
                                CUdeviceptr kernel_arg_231072 = mem_223608.mem;
                                CUdeviceptr kernel_arg_231073 = mem_223658.mem;
                                CUdeviceptr kernel_arg_231074 = mem_223663.mem;
                                CUdeviceptr kernel_arg_231075 =
                                            segred_tmp_mem_227850.mem;
                                CUdeviceptr kernel_arg_231076 =
                                            mainzicounter_mem_227852.mem;
                                unsigned int shared_offset_231066 = 0;
                                unsigned int shared_offset_231068 = 0 +
                                             (shared_sizze_231065 + (8 -
                                                                     shared_sizze_231065 %
                                                                     8) % 8);
                                
                                if ((((((1 && num_groups_212641 != 0) && 1 !=
                                        0) && 1 != 0) &&
                                      segred_group_sizze_212640 != 0) && 1 !=
                                     0) && 1 != 0) {
                                    int perm[3] = {0, 1, 2};
                                    
                                    if (1 >= 1 << 16) {
                                        perm[1] = perm[0];
                                        perm[0] = 1;
                                    }
                                    if (1 >= 1 << 16) {
                                        perm[2] = perm[0];
                                        perm[0] = 2;
                                    }
                                    
                                    size_t grid[3];
                                    
                                    grid[perm[0]] = num_groups_212641;
                                    grid[perm[1]] = 1;
                                    grid[perm[2]] = 1;
                                    
                                    void *kernel_args_231062[] =
                                         {&ctx->global_failure,
                                          &shared_offset_231066,
                                          &shared_offset_231068, &m_196691,
                                          &n_196692, &q_l_196697,
                                          &jump_t_196702, &l_n_m_196752,
                                          &i_196779, &num_groups_212641,
                                          &ctx_param_ext_222545,
                                          &ctx_param_ext_222546,
                                          &ctx_param_ext_222548,
                                          &groups_per_segment_227845,
                                          &elements_per_thread_227846,
                                          &virt_num_groups_227847,
                                          &threads_per_segment_227849,
                                          &kernel_arg_231069,
                                          &kernel_arg_231070,
                                          &kernel_arg_231071,
                                          &kernel_arg_231072,
                                          &kernel_arg_231073,
                                          &kernel_arg_231074,
                                          &kernel_arg_231075,
                                          &kernel_arg_231076};
                                    int64_t time_start_231063 = 0,
                                            time_end_231064 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                "main.segred_large_212647",
                                                (long) num_groups_212641,
                                                (long) 1, (long) 1,
                                                (long) segred_group_sizze_212640,
                                                (long) 1, (long) 1, (int) (0 +
                                                                           (shared_sizze_231065 +
                                                                            (8 -
                                                                             shared_sizze_231065 %
                                                                             8) %
                                                                            8) +
                                                                           (shared_sizze_231067 +
                                                                            (8 -
                                                                             shared_sizze_231067 %
                                                                             8) %
                                                                            8)));
                                        time_start_231063 = get_wall_time();
                                    }
                                    
                                    cudaEvent_t *pevents = NULL;
                                    
                                    if (ctx->profiling &&
                                        !ctx->profiling_paused) {
                                        pevents = cuda_get_events(&ctx->cuda,
                                                                  &ctx->mainzisegred_large_212647_runs,
                                                                  &ctx->mainzisegred_large_212647_total_runtime);
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                           0));
                                    }
                                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_large_212647,
                                                                          grid[0],
                                                                          grid[1],
                                                                          grid[2],
                                                                          segred_group_sizze_212640,
                                                                          1, 1,
                                                                          0 +
                                                                          (shared_sizze_231065 +
                                                                           (8 -
                                                                            shared_sizze_231065 %
                                                                            8) %
                                                                           8) +
                                                                          (shared_sizze_231067 +
                                                                           (8 -
                                                                            shared_sizze_231067 %
                                                                            8) %
                                                                           8),
                                                                          NULL,
                                                                          kernel_args_231062,
                                                                          NULL));
                                    if (pevents != NULL)
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                           0));
                                    if (ctx->debugging) {
                                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                        time_end_231064 = get_wall_time();
                                        fprintf(ctx->log,
                                                "Kernel %s runtime: %ldus\n",
                                                "main.segred_large_212647",
                                                time_end_231064 -
                                                time_start_231063);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                                if (memblock_unref_device(ctx,
                                                          &segred_tmp_mem_227850,
                                                          "segred_tmp_mem_227850") !=
                                    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_227890;
                        
                        max_num_groups_227890 =
                            *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_227890))));
                        
                        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_227891;
                        
                        max_num_groups_227891 =
                            *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_227891))));
                        
                        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_227892;
                        
                        max_num_groups_227892 =
                            *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_227892))));
                        
                        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_228139;
                        
                        local_memory_capacity_228139 =
                            ctx->cuda.max_shared_memory;
                        if ((sle64((int64_t) 0,
                                   sext_i32_i64(local_memory_capacity_228139)) &&
                             sle64((int64_t) 0,
                                   sext_i32_i64(local_memory_capacity_228139))) &&
                            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_227896;
                            
                            group_sizze_227896 =
                                *ctx->tuning_params.mainzigroup_sizze_227896;
                            
                            int64_t num_groups_227897 = sdiv_up64(m_196691 *
                                                                  n_196692,
                                                                  group_sizze_227896);
                            CUdeviceptr kernel_arg_231080 =
                                        mem_param_222550.mem;
                            CUdeviceptr kernel_arg_231081 = mem_223679.mem;
                            
                            if ((((((1 && num_groups_227897 != 0) && 1 != 0) &&
                                   1 != 0) && group_sizze_227896 != 0) && 1 !=
                                 0) && 1 != 0) {
                                int perm[3] = {0, 1, 2};
                                
                                if (1 >= 1 << 16) {
                                    perm[1] = perm[0];
                                    perm[0] = 1;
                                }
                                if (1 >= 1 << 16) {
                                    perm[2] = perm[0];
                                    perm[0] = 2;
                                }
                                
                                size_t grid[3];
                                
                                grid[perm[0]] = num_groups_227897;
                                grid[perm[1]] = 1;
                                grid[perm[2]] = 1;
                                
                                void *kernel_args_231077[] = {&m_196691,
                                                              &n_196692,
                                                              &ctx_param_ext_222545,
                                                              &ctx_param_ext_222546,
                                                              &ctx_param_ext_222548,
                                                              &kernel_arg_231080,
                                                              &kernel_arg_231081};
                                int64_t time_start_231078 = 0, time_end_231079 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                            "main.copy_227893",
                                            (long) num_groups_227897, (long) 1,
                                            (long) 1, (long) group_sizze_227896,
                                            (long) 1, (long) 1, (int) 0);
                                    time_start_231078 = get_wall_time();
                                }
                                
                                cudaEvent_t *pevents = NULL;
                                
                                if (ctx->profiling && !ctx->profiling_paused) {
                                    pevents = cuda_get_events(&ctx->cuda,
                                                              &ctx->mainzicopy_227893_runs,
                                                              &ctx->mainzicopy_227893_total_runtime);
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                       0));
                                }
                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzicopy_227893,
                                                                      grid[0],
                                                                      grid[1],
                                                                      grid[2],
                                                                      group_sizze_227896,
                                                                      1, 1, 0,
                                                                      NULL,
                                                                      kernel_args_231077,
                                                                      NULL));
                                if (pevents != NULL)
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                       0));
                                if (ctx->debugging) {
                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                    time_end_231079 = get_wall_time();
                                    fprintf(ctx->log,
                                            "Kernel %s runtime: %ldus\n",
                                            "main.copy_227893",
                                            time_end_231079 -
                                            time_start_231078);
                                }
                            }
                            
                            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");
                            
                            CUdeviceptr kernel_arg_231085 = mem_223673.mem;
                            CUdeviceptr kernel_arg_231086 = mem_223676.mem;
                            CUdeviceptr kernel_arg_231087 = mem_223679.mem;
                            CUdeviceptr kernel_arg_231088 = mem_223682.mem;
                            CUdeviceptr kernel_arg_231089 = mem_223716.mem;
                            CUdeviceptr kernel_arg_231090 = mem_223719.mem;
                            CUdeviceptr kernel_arg_231091 = color_225075.mem;
                            CUdeviceptr kernel_arg_231092 = color_225076.mem;
                            
                            if ((((((1 && num_groups_212790 != 0) && 1 != 0) &&
                                   1 != 0) && segmap_group_sizze_212789 != 0) &&
                                 1 != 0) && 1 != 0) {
                                int perm[3] = {0, 1, 2};
                                
                                if (1 >= 1 << 16) {
                                    perm[1] = perm[0];
                                    perm[0] = 1;
                                }
                                if (1 >= 1 << 16) {
                                    perm[2] = perm[0];
                                    perm[0] = 2;
                                }
                                
                                size_t grid[3];
                                
                                grid[perm[0]] = num_groups_212790;
                                grid[perm[1]] = 1;
                                grid[perm[2]] = 1;
                                
                                void *kernel_args_231082[] =
                                     {&ctx->global_failure, &m_196691,
                                      &n_196692, &q_l_196697, &jump_t_196702,
                                      &l_n_m_196752, &i_196779,
                                      &num_groups_212790, &num_threads_225207,
                                      &kernel_arg_231085, &kernel_arg_231086,
                                      &kernel_arg_231087, &kernel_arg_231088,
                                      &kernel_arg_231089, &kernel_arg_231090,
                                      &kernel_arg_231091, &kernel_arg_231092};
                                int64_t time_start_231083 = 0, time_end_231084 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                            "main.segmap_212795",
                                            (long) num_groups_212790, (long) 1,
                                            (long) 1,
                                            (long) segmap_group_sizze_212789,
                                            (long) 1, (long) 1, (int) 0);
                                    time_start_231083 = get_wall_time();
                                }
                                
                                cudaEvent_t *pevents = NULL;
                                
                                if (ctx->profiling && !ctx->profiling_paused) {
                                    pevents = cuda_get_events(&ctx->cuda,
                                                              &ctx->mainzisegmap_212795_runs,
                                                              &ctx->mainzisegmap_212795_total_runtime);
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                       0));
                                }
                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_212795,
                                                                      grid[0],
                                                                      grid[1],
                                                                      grid[2],
                                                                      segmap_group_sizze_212789,
                                                                      1, 1, 0,
                                                                      NULL,
                                                                      kernel_args_231082,
                                                                      NULL));
                                if (pevents != NULL)
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                       0));
                                if (ctx->debugging) {
                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                    time_end_231084 = get_wall_time();
                                    fprintf(ctx->log,
                                            "Kernel %s runtime: %ldus\n",
                                            "main.segmap_212795",
                                            time_end_231084 -
                                            time_start_231083);
                                }
                            }
                            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_228138;
                            
                            local_memory_capacity_228138 =
                                ctx->cuda.max_shared_memory;
                            if (sle64((int64_t) 0,
                                      sext_i32_i64(local_memory_capacity_228138)) &&
                                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");
                                
                                CUdeviceptr kernel_arg_231096 =
                                            ext_mem_222468.mem;
                                CUdeviceptr kernel_arg_231097 =
                                            ext_mem_222469.mem;
                                CUdeviceptr kernel_arg_231098 =
                                            mem_param_222550.mem;
                                CUdeviceptr kernel_arg_231099 = mem_223608.mem;
                                CUdeviceptr kernel_arg_231100 = mem_223724.mem;
                                CUdeviceptr kernel_arg_231101 = mem_223728.mem;
                                
                                if ((((((1 && segmap_usable_groups_213306 !=
                                         0) && 1 != 0) && 1 != 0) &&
                                      segmap_group_sizze_213305 != 0) && 1 !=
                                     0) && 1 != 0) {
                                    int perm[3] = {0, 1, 2};
                                    
                                    if (1 >= 1 << 16) {
                                        perm[1] = perm[0];
                                        perm[0] = 1;
                                    }
                                    if (1 >= 1 << 16) {
                                        perm[2] = perm[0];
                                        perm[0] = 2;
                                    }
                                    
                                    size_t grid[3];
                                    
                                    grid[perm[0]] = segmap_usable_groups_213306;
                                    grid[perm[1]] = 1;
                                    grid[perm[2]] = 1;
                                    
                                    void *kernel_args_231093[] =
                                         {&ctx->global_failure, &m_196691,
                                          &n_196692, &q_l_196697,
                                          &jump_t_196702, &l_n_m_196752,
                                          &i_196779, &ctx_param_ext_222545,
                                          &ctx_param_ext_222546,
                                          &ctx_param_ext_222548,
                                          &kernel_arg_231096,
                                          &kernel_arg_231097,
                                          &kernel_arg_231098,
                                          &kernel_arg_231099,
                                          &kernel_arg_231100,
                                          &kernel_arg_231101};
                                    int64_t time_start_231094 = 0,
                                            time_end_231095 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                "main.segmap_213316",
                                                (long) segmap_usable_groups_213306,
                                                (long) 1, (long) 1,
                                                (long) segmap_group_sizze_213305,
                                                (long) 1, (long) 1, (int) 0);
                                        time_start_231094 = get_wall_time();
                                    }
                                    
                                    cudaEvent_t *pevents = NULL;
                                    
                                    if (ctx->profiling &&
                                        !ctx->profiling_paused) {
                                        pevents = cuda_get_events(&ctx->cuda,
                                                                  &ctx->mainzisegmap_213316_runs,
                                                                  &ctx->mainzisegmap_213316_total_runtime);
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                           0));
                                    }
                                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_213316,
                                                                          grid[0],
                                                                          grid[1],
                                                                          grid[2],
                                                                          segmap_group_sizze_213305,
                                                                          1, 1,
                                                                          0,
                                                                          NULL,
                                                                          kernel_args_231093,
                                                                          NULL));
                                    if (pevents != NULL)
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                           0));
                                    if (ctx->debugging) {
                                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                        time_end_231095 = get_wall_time();
                                        fprintf(ctx->log,
                                                "Kernel %s runtime: %ldus\n",
                                                "main.segmap_213316",
                                                time_end_231095 -
                                                time_start_231094);
                                    }
                                }
                                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_227942 =
                                            smax64((int64_t) 1, q_l_196697);
                                    int64_t num_threads_227943 =
                                            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_227942),
                                                '\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_227942))),
                                                '\n');
                                    
                                    unsigned int shared_sizze_231105 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_213418;
                                    unsigned int shared_sizze_231107 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_213418;
                                    unsigned int shared_sizze_231109 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_213418;
                                    CUdeviceptr kernel_arg_231111 =
                                                ext_mem_222468.mem;
                                    CUdeviceptr kernel_arg_231112 =
                                                ext_mem_222469.mem;
                                    CUdeviceptr kernel_arg_231113 =
                                                mem_param_222550.mem;
                                    CUdeviceptr kernel_arg_231114 =
                                                mem_223733.mem;
                                    CUdeviceptr kernel_arg_231115 =
                                                mem_223737.mem;
                                    CUdeviceptr kernel_arg_231116 =
                                                mem_223741.mem;
                                    unsigned int shared_offset_231106 = 0;
                                    unsigned int shared_offset_231108 = 0 +
                                                 (shared_sizze_231105 + (8 -
                                                                         shared_sizze_231105 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_231110 = 0 +
                                                 (shared_sizze_231105 + (8 -
                                                                         shared_sizze_231105 %
                                                                         8) %
                                                  8) + (shared_sizze_231107 +
                                                        (8 -
                                                         shared_sizze_231107 %
                                                         8) % 8);
                                    
                                    if ((((((1 && num_groups_213419 != 0) &&
                                            1 != 0) && 1 != 0) &&
                                          segred_group_sizze_213418 != 0) &&
                                         1 != 0) && 1 != 0) {
                                        int perm[3] = {0, 1, 2};
                                        
                                        if (1 >= 1 << 16) {
                                            perm[1] = perm[0];
                                            perm[0] = 1;
                                        }
                                        if (1 >= 1 << 16) {
                                            perm[2] = perm[0];
                                            perm[0] = 2;
                                        }
                                        
                                        size_t grid[3];
                                        
                                        grid[perm[0]] = num_groups_213419;
                                        grid[perm[1]] = 1;
                                        grid[perm[2]] = 1;
                                        
                                        void *kernel_args_231102[] =
                                             {&ctx->global_failure,
                                              &shared_offset_231106,
                                              &shared_offset_231108,
                                              &shared_offset_231110, &m_196691,
                                              &n_196692, &q_l_196697,
                                              &jump_t_196702, &l_n_m_196752,
                                              &i_196779, &num_groups_213419,
                                              &ctx_param_ext_222545,
                                              &ctx_param_ext_222546,
                                              &ctx_param_ext_222548,
                                              &segment_sizze_nonzzero_227942,
                                              &kernel_arg_231111,
                                              &kernel_arg_231112,
                                              &kernel_arg_231113,
                                              &kernel_arg_231114,
                                              &kernel_arg_231115,
                                              &kernel_arg_231116};
                                        int64_t time_start_231103 = 0,
                                                time_end_231104 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                    "main.segred_small_213427",
                                                    (long) num_groups_213419,
                                                    (long) 1, (long) 1,
                                                    (long) segred_group_sizze_213418,
                                                    (long) 1, (long) 1,
                                                    (int) (0 +
                                                           (shared_sizze_231105 +
                                                            (8 -
                                                             shared_sizze_231105 %
                                                             8) % 8) +
                                                           (shared_sizze_231107 +
                                                            (8 -
                                                             shared_sizze_231107 %
                                                             8) % 8) +
                                                           (shared_sizze_231109 +
                                                            (8 -
                                                             shared_sizze_231109 %
                                                             8) % 8)));
                                            time_start_231103 = get_wall_time();
                                        }
                                        
                                        cudaEvent_t *pevents = NULL;
                                        
                                        if (ctx->profiling &&
                                            !ctx->profiling_paused) {
                                            pevents =
                                                cuda_get_events(&ctx->cuda,
                                                                &ctx->mainzisegred_small_213427_runs,
                                                                &ctx->mainzisegred_small_213427_total_runtime);
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                               0));
                                        }
                                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_small_213427,
                                                                              grid[0],
                                                                              grid[1],
                                                                              grid[2],
                                                                              segred_group_sizze_213418,
                                                                              1,
                                                                              1,
                                                                              0 +
                                                                              (shared_sizze_231105 +
                                                                               (8 -
                                                                                shared_sizze_231105 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231107 +
                                                                               (8 -
                                                                                shared_sizze_231107 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231109 +
                                                                               (8 -
                                                                                shared_sizze_231109 %
                                                                                8) %
                                                                               8),
                                                                              NULL,
                                                                              kernel_args_231102,
                                                                              NULL));
                                        if (pevents != NULL)
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                               0));
                                        if (ctx->debugging) {
                                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                            time_end_231104 = get_wall_time();
                                            fprintf(ctx->log,
                                                    "Kernel %s runtime: %ldus\n",
                                                    "main.segred_small_213427",
                                                    time_end_231104 -
                                                    time_start_231103);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                } else {
                                    int64_t groups_per_segment_227983 =
                                            sdiv_up64(num_groups_213419,
                                                      smax64((int64_t) 1,
                                                             m_196691 *
                                                             l_n_m_196752));
                                    int64_t elements_per_thread_227984 =
                                            sdiv_up64(q_l_196697,
                                                      segred_group_sizze_213418 *
                                                      groups_per_segment_227983);
                                    int64_t virt_num_groups_227985 =
                                            groups_per_segment_227983 *
                                            (m_196691 * l_n_m_196752);
                                    int64_t num_threads_227986 =
                                            num_groups_213419 *
                                            segred_group_sizze_213418;
                                    int64_t threads_per_segment_227987 =
                                            groups_per_segment_227983 *
                                            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_227985,
                                                '\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_227984,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "groups_per_segment",
                                                (long long) groups_per_segment_227983,
                                                '\n');
                                    
                                    struct memblock_device
                                    segred_tmp_mem_227988;
                                    
                                    segred_tmp_mem_227988.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_227988,
                                                              (int64_t) 4 *
                                                              virt_num_groups_227985,
                                                              "segred_tmp_mem_227988")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_227990;
                                    
                                    segred_tmp_mem_227990.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_227990,
                                                              (int64_t) 4 *
                                                              virt_num_groups_227985,
                                                              "segred_tmp_mem_227990")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_227992;
                                    
                                    segred_tmp_mem_227992.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_227992,
                                                              (int64_t) 4 *
                                                              virt_num_groups_227985,
                                                              "segred_tmp_mem_227992")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    mainzicounter_mem_227994 =
                                    ctx->mainzicounter_mem_227994;
                                    unsigned int shared_sizze_231121 = 1;
                                    unsigned int shared_sizze_231123 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_213418;
                                    unsigned int shared_sizze_231125 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_213418;
                                    unsigned int shared_sizze_231127 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_213418;
                                    CUdeviceptr kernel_arg_231129 =
                                                ext_mem_222468.mem;
                                    CUdeviceptr kernel_arg_231130 =
                                                ext_mem_222469.mem;
                                    CUdeviceptr kernel_arg_231131 =
                                                mem_param_222550.mem;
                                    CUdeviceptr kernel_arg_231132 =
                                                mem_223733.mem;
                                    CUdeviceptr kernel_arg_231133 =
                                                mem_223737.mem;
                                    CUdeviceptr kernel_arg_231134 =
                                                mem_223741.mem;
                                    CUdeviceptr kernel_arg_231135 =
                                                segred_tmp_mem_227988.mem;
                                    CUdeviceptr kernel_arg_231136 =
                                                segred_tmp_mem_227990.mem;
                                    CUdeviceptr kernel_arg_231137 =
                                                segred_tmp_mem_227992.mem;
                                    CUdeviceptr kernel_arg_231138 =
                                                mainzicounter_mem_227994.mem;
                                    unsigned int shared_offset_231122 = 0;
                                    unsigned int shared_offset_231124 = 0 +
                                                 (shared_sizze_231121 + (8 -
                                                                         shared_sizze_231121 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_231126 = 0 +
                                                 (shared_sizze_231121 + (8 -
                                                                         shared_sizze_231121 %
                                                                         8) %
                                                  8) + (shared_sizze_231123 +
                                                        (8 -
                                                         shared_sizze_231123 %
                                                         8) % 8);
                                    unsigned int shared_offset_231128 = 0 +
                                                 (shared_sizze_231121 + (8 -
                                                                         shared_sizze_231121 %
                                                                         8) %
                                                  8) + (shared_sizze_231123 +
                                                        (8 -
                                                         shared_sizze_231123 %
                                                         8) % 8) +
                                                 (shared_sizze_231125 + (8 -
                                                                         shared_sizze_231125 %
                                                                         8) %
                                                  8);
                                    
                                    if ((((((1 && num_groups_213419 != 0) &&
                                            1 != 0) && 1 != 0) &&
                                          segred_group_sizze_213418 != 0) &&
                                         1 != 0) && 1 != 0) {
                                        int perm[3] = {0, 1, 2};
                                        
                                        if (1 >= 1 << 16) {
                                            perm[1] = perm[0];
                                            perm[0] = 1;
                                        }
                                        if (1 >= 1 << 16) {
                                            perm[2] = perm[0];
                                            perm[0] = 2;
                                        }
                                        
                                        size_t grid[3];
                                        
                                        grid[perm[0]] = num_groups_213419;
                                        grid[perm[1]] = 1;
                                        grid[perm[2]] = 1;
                                        
                                        void *kernel_args_231118[] =
                                             {&ctx->global_failure,
                                              &shared_offset_231122,
                                              &shared_offset_231124,
                                              &shared_offset_231126,
                                              &shared_offset_231128, &m_196691,
                                              &n_196692, &q_l_196697,
                                              &jump_t_196702, &l_n_m_196752,
                                              &i_196779, &num_groups_213419,
                                              &ctx_param_ext_222545,
                                              &ctx_param_ext_222546,
                                              &ctx_param_ext_222548,
                                              &groups_per_segment_227983,
                                              &elements_per_thread_227984,
                                              &virt_num_groups_227985,
                                              &threads_per_segment_227987,
                                              &kernel_arg_231129,
                                              &kernel_arg_231130,
                                              &kernel_arg_231131,
                                              &kernel_arg_231132,
                                              &kernel_arg_231133,
                                              &kernel_arg_231134,
                                              &kernel_arg_231135,
                                              &kernel_arg_231136,
                                              &kernel_arg_231137,
                                              &kernel_arg_231138};
                                        int64_t time_start_231119 = 0,
                                                time_end_231120 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                    "main.segred_large_213427",
                                                    (long) num_groups_213419,
                                                    (long) 1, (long) 1,
                                                    (long) segred_group_sizze_213418,
                                                    (long) 1, (long) 1,
                                                    (int) (0 +
                                                           (shared_sizze_231121 +
                                                            (8 -
                                                             shared_sizze_231121 %
                                                             8) % 8) +
                                                           (shared_sizze_231123 +
                                                            (8 -
                                                             shared_sizze_231123 %
                                                             8) % 8) +
                                                           (shared_sizze_231125 +
                                                            (8 -
                                                             shared_sizze_231125 %
                                                             8) % 8) +
                                                           (shared_sizze_231127 +
                                                            (8 -
                                                             shared_sizze_231127 %
                                                             8) % 8)));
                                            time_start_231119 = get_wall_time();
                                        }
                                        
                                        cudaEvent_t *pevents = NULL;
                                        
                                        if (ctx->profiling &&
                                            !ctx->profiling_paused) {
                                            pevents =
                                                cuda_get_events(&ctx->cuda,
                                                                &ctx->mainzisegred_large_213427_runs,
                                                                &ctx->mainzisegred_large_213427_total_runtime);
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                               0));
                                        }
                                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_large_213427,
                                                                              grid[0],
                                                                              grid[1],
                                                                              grid[2],
                                                                              segred_group_sizze_213418,
                                                                              1,
                                                                              1,
                                                                              0 +
                                                                              (shared_sizze_231121 +
                                                                               (8 -
                                                                                shared_sizze_231121 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231123 +
                                                                               (8 -
                                                                                shared_sizze_231123 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231125 +
                                                                               (8 -
                                                                                shared_sizze_231125 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231127 +
                                                                               (8 -
                                                                                shared_sizze_231127 %
                                                                                8) %
                                                                               8),
                                                                              NULL,
                                                                              kernel_args_231118,
                                                                              NULL));
                                        if (pevents != NULL)
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                               0));
                                        if (ctx->debugging) {
                                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                            time_end_231120 = get_wall_time();
                                            fprintf(ctx->log,
                                                    "Kernel %s runtime: %ldus\n",
                                                    "main.segred_large_213427",
                                                    time_end_231120 -
                                                    time_start_231119);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_227992,
                                                              "segred_tmp_mem_227992") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_227990,
                                                              "segred_tmp_mem_227990") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_227988,
                                                              "segred_tmp_mem_227988") !=
                                        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");
                                
                                CUdeviceptr kernel_arg_231142 = mem_223733.mem;
                                CUdeviceptr kernel_arg_231143 = mem_223737.mem;
                                CUdeviceptr kernel_arg_231144 = mem_223741.mem;
                                CUdeviceptr kernel_arg_231145 = mem_223746.mem;
                                CUdeviceptr kernel_arg_231146 = mem_223750.mem;
                                CUdeviceptr kernel_arg_231147 = mem_223754.mem;
                                
                                if ((((((1 && segmap_usable_groups_213467 !=
                                         0) && 1 != 0) && 1 != 0) &&
                                      segmap_group_sizze_213466 != 0) && 1 !=
                                     0) && 1 != 0) {
                                    int perm[3] = {0, 1, 2};
                                    
                                    if (1 >= 1 << 16) {
                                        perm[1] = perm[0];
                                        perm[0] = 1;
                                    }
                                    if (1 >= 1 << 16) {
                                        perm[2] = perm[0];
                                        perm[0] = 2;
                                    }
                                    
                                    size_t grid[3];
                                    
                                    grid[perm[0]] = segmap_usable_groups_213467;
                                    grid[perm[1]] = 1;
                                    grid[perm[2]] = 1;
                                    
                                    void *kernel_args_231139[] =
                                         {&ctx->global_failure, &m_196691,
                                          &l_n_m_196752, &kernel_arg_231142,
                                          &kernel_arg_231143,
                                          &kernel_arg_231144,
                                          &kernel_arg_231145,
                                          &kernel_arg_231146,
                                          &kernel_arg_231147};
                                    int64_t time_start_231140 = 0,
                                            time_end_231141 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                "main.segmap_213473",
                                                (long) segmap_usable_groups_213467,
                                                (long) 1, (long) 1,
                                                (long) segmap_group_sizze_213466,
                                                (long) 1, (long) 1, (int) 0);
                                        time_start_231140 = get_wall_time();
                                    }
                                    
                                    cudaEvent_t *pevents = NULL;
                                    
                                    if (ctx->profiling &&
                                        !ctx->profiling_paused) {
                                        pevents = cuda_get_events(&ctx->cuda,
                                                                  &ctx->mainzisegmap_213473_runs,
                                                                  &ctx->mainzisegmap_213473_total_runtime);
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                           0));
                                    }
                                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_213473,
                                                                          grid[0],
                                                                          grid[1],
                                                                          grid[2],
                                                                          segmap_group_sizze_213466,
                                                                          1, 1,
                                                                          0,
                                                                          NULL,
                                                                          kernel_args_231139,
                                                                          NULL));
                                    if (pevents != NULL)
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                           0));
                                    if (ctx->debugging) {
                                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                        time_end_231141 = get_wall_time();
                                        fprintf(ctx->log,
                                                "Kernel %s runtime: %ldus\n",
                                                "main.segmap_213473",
                                                time_end_231141 -
                                                time_start_231140);
                                    }
                                }
                                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_228052 =
                                            smax64((int64_t) 1, q_l_196697);
                                    int64_t num_threads_228053 =
                                            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_228052),
                                                '\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_228052))),
                                                '\n');
                                    
                                    unsigned int shared_sizze_231151 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_213488;
                                    unsigned int shared_sizze_231153 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_213488;
                                    CUdeviceptr kernel_arg_231155 =
                                                ext_mem_222468.mem;
                                    CUdeviceptr kernel_arg_231156 =
                                                ext_mem_222469.mem;
                                    CUdeviceptr kernel_arg_231157 =
                                                mem_param_222550.mem;
                                    CUdeviceptr kernel_arg_231158 =
                                                mem_223608.mem;
                                    CUdeviceptr kernel_arg_231159 =
                                                mem_223746.mem;
                                    CUdeviceptr kernel_arg_231160 =
                                                mem_223750.mem;
                                    CUdeviceptr kernel_arg_231161 =
                                                mem_223754.mem;
                                    CUdeviceptr kernel_arg_231162 =
                                                mem_223759.mem;
                                    CUdeviceptr kernel_arg_231163 =
                                                mem_223763.mem;
                                    unsigned int shared_offset_231152 = 0;
                                    unsigned int shared_offset_231154 = 0 +
                                                 (shared_sizze_231151 + (8 -
                                                                         shared_sizze_231151 %
                                                                         8) %
                                                  8);
                                    
                                    if ((((((1 && num_groups_213489 != 0) &&
                                            1 != 0) && 1 != 0) &&
                                          segred_group_sizze_213488 != 0) &&
                                         1 != 0) && 1 != 0) {
                                        int perm[3] = {0, 1, 2};
                                        
                                        if (1 >= 1 << 16) {
                                            perm[1] = perm[0];
                                            perm[0] = 1;
                                        }
                                        if (1 >= 1 << 16) {
                                            perm[2] = perm[0];
                                            perm[0] = 2;
                                        }
                                        
                                        size_t grid[3];
                                        
                                        grid[perm[0]] = num_groups_213489;
                                        grid[perm[1]] = 1;
                                        grid[perm[2]] = 1;
                                        
                                        void *kernel_args_231148[] =
                                             {&ctx->global_failure,
                                              &shared_offset_231152,
                                              &shared_offset_231154, &m_196691,
                                              &n_196692, &q_l_196697,
                                              &jump_t_196702, &l_n_m_196752,
                                              &i_196779, &num_groups_213489,
                                              &ctx_param_ext_222545,
                                              &ctx_param_ext_222546,
                                              &ctx_param_ext_222548,
                                              &segment_sizze_nonzzero_228052,
                                              &kernel_arg_231155,
                                              &kernel_arg_231156,
                                              &kernel_arg_231157,
                                              &kernel_arg_231158,
                                              &kernel_arg_231159,
                                              &kernel_arg_231160,
                                              &kernel_arg_231161,
                                              &kernel_arg_231162,
                                              &kernel_arg_231163};
                                        int64_t time_start_231149 = 0,
                                                time_end_231150 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                    "main.segred_small_213496",
                                                    (long) num_groups_213489,
                                                    (long) 1, (long) 1,
                                                    (long) segred_group_sizze_213488,
                                                    (long) 1, (long) 1,
                                                    (int) (0 +
                                                           (shared_sizze_231151 +
                                                            (8 -
                                                             shared_sizze_231151 %
                                                             8) % 8) +
                                                           (shared_sizze_231153 +
                                                            (8 -
                                                             shared_sizze_231153 %
                                                             8) % 8)));
                                            time_start_231149 = get_wall_time();
                                        }
                                        
                                        cudaEvent_t *pevents = NULL;
                                        
                                        if (ctx->profiling &&
                                            !ctx->profiling_paused) {
                                            pevents =
                                                cuda_get_events(&ctx->cuda,
                                                                &ctx->mainzisegred_small_213496_runs,
                                                                &ctx->mainzisegred_small_213496_total_runtime);
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                               0));
                                        }
                                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_small_213496,
                                                                              grid[0],
                                                                              grid[1],
                                                                              grid[2],
                                                                              segred_group_sizze_213488,
                                                                              1,
                                                                              1,
                                                                              0 +
                                                                              (shared_sizze_231151 +
                                                                               (8 -
                                                                                shared_sizze_231151 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231153 +
                                                                               (8 -
                                                                                shared_sizze_231153 %
                                                                                8) %
                                                                               8),
                                                                              NULL,
                                                                              kernel_args_231148,
                                                                              NULL));
                                        if (pevents != NULL)
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                               0));
                                        if (ctx->debugging) {
                                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                            time_end_231150 = get_wall_time();
                                            fprintf(ctx->log,
                                                    "Kernel %s runtime: %ldus\n",
                                                    "main.segred_small_213496",
                                                    time_end_231150 -
                                                    time_start_231149);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                } else {
                                    int64_t groups_per_segment_228087 =
                                            sdiv_up64(num_groups_213489,
                                                      smax64((int64_t) 1,
                                                             m_196691 *
                                                             l_n_m_196752));
                                    int64_t elements_per_thread_228088 =
                                            sdiv_up64(q_l_196697,
                                                      segred_group_sizze_213488 *
                                                      groups_per_segment_228087);
                                    int64_t virt_num_groups_228089 =
                                            groups_per_segment_228087 *
                                            (m_196691 * l_n_m_196752);
                                    int64_t num_threads_228090 =
                                            num_groups_213489 *
                                            segred_group_sizze_213488;
                                    int64_t threads_per_segment_228091 =
                                            groups_per_segment_228087 *
                                            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_228089,
                                                '\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_228088,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "groups_per_segment",
                                                (long long) groups_per_segment_228087,
                                                '\n');
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228092;
                                    
                                    segred_tmp_mem_228092.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228092,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228089,
                                                              "segred_tmp_mem_228092")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228094;
                                    
                                    segred_tmp_mem_228094.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228094,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228089,
                                                              "segred_tmp_mem_228094")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    mainzicounter_mem_228096 =
                                    ctx->mainzicounter_mem_228096;
                                    unsigned int shared_sizze_231168 = 1;
                                    unsigned int shared_sizze_231170 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_213488;
                                    unsigned int shared_sizze_231172 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_213488;
                                    CUdeviceptr kernel_arg_231174 =
                                                ext_mem_222468.mem;
                                    CUdeviceptr kernel_arg_231175 =
                                                ext_mem_222469.mem;
                                    CUdeviceptr kernel_arg_231176 =
                                                mem_param_222550.mem;
                                    CUdeviceptr kernel_arg_231177 =
                                                mem_223608.mem;
                                    CUdeviceptr kernel_arg_231178 =
                                                mem_223746.mem;
                                    CUdeviceptr kernel_arg_231179 =
                                                mem_223750.mem;
                                    CUdeviceptr kernel_arg_231180 =
                                                mem_223754.mem;
                                    CUdeviceptr kernel_arg_231181 =
                                                mem_223759.mem;
                                    CUdeviceptr kernel_arg_231182 =
                                                mem_223763.mem;
                                    CUdeviceptr kernel_arg_231183 =
                                                segred_tmp_mem_228092.mem;
                                    CUdeviceptr kernel_arg_231184 =
                                                segred_tmp_mem_228094.mem;
                                    CUdeviceptr kernel_arg_231185 =
                                                mainzicounter_mem_228096.mem;
                                    unsigned int shared_offset_231169 = 0;
                                    unsigned int shared_offset_231171 = 0 +
                                                 (shared_sizze_231168 + (8 -
                                                                         shared_sizze_231168 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_231173 = 0 +
                                                 (shared_sizze_231168 + (8 -
                                                                         shared_sizze_231168 %
                                                                         8) %
                                                  8) + (shared_sizze_231170 +
                                                        (8 -
                                                         shared_sizze_231170 %
                                                         8) % 8);
                                    
                                    if ((((((1 && num_groups_213489 != 0) &&
                                            1 != 0) && 1 != 0) &&
                                          segred_group_sizze_213488 != 0) &&
                                         1 != 0) && 1 != 0) {
                                        int perm[3] = {0, 1, 2};
                                        
                                        if (1 >= 1 << 16) {
                                            perm[1] = perm[0];
                                            perm[0] = 1;
                                        }
                                        if (1 >= 1 << 16) {
                                            perm[2] = perm[0];
                                            perm[0] = 2;
                                        }
                                        
                                        size_t grid[3];
                                        
                                        grid[perm[0]] = num_groups_213489;
                                        grid[perm[1]] = 1;
                                        grid[perm[2]] = 1;
                                        
                                        void *kernel_args_231165[] =
                                             {&ctx->global_failure,
                                              &shared_offset_231169,
                                              &shared_offset_231171,
                                              &shared_offset_231173, &m_196691,
                                              &n_196692, &q_l_196697,
                                              &jump_t_196702, &l_n_m_196752,
                                              &i_196779, &num_groups_213489,
                                              &ctx_param_ext_222545,
                                              &ctx_param_ext_222546,
                                              &ctx_param_ext_222548,
                                              &groups_per_segment_228087,
                                              &elements_per_thread_228088,
                                              &virt_num_groups_228089,
                                              &threads_per_segment_228091,
                                              &kernel_arg_231174,
                                              &kernel_arg_231175,
                                              &kernel_arg_231176,
                                              &kernel_arg_231177,
                                              &kernel_arg_231178,
                                              &kernel_arg_231179,
                                              &kernel_arg_231180,
                                              &kernel_arg_231181,
                                              &kernel_arg_231182,
                                              &kernel_arg_231183,
                                              &kernel_arg_231184,
                                              &kernel_arg_231185};
                                        int64_t time_start_231166 = 0,
                                                time_end_231167 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                    "main.segred_large_213496",
                                                    (long) num_groups_213489,
                                                    (long) 1, (long) 1,
                                                    (long) segred_group_sizze_213488,
                                                    (long) 1, (long) 1,
                                                    (int) (0 +
                                                           (shared_sizze_231168 +
                                                            (8 -
                                                             shared_sizze_231168 %
                                                             8) % 8) +
                                                           (shared_sizze_231170 +
                                                            (8 -
                                                             shared_sizze_231170 %
                                                             8) % 8) +
                                                           (shared_sizze_231172 +
                                                            (8 -
                                                             shared_sizze_231172 %
                                                             8) % 8)));
                                            time_start_231166 = get_wall_time();
                                        }
                                        
                                        cudaEvent_t *pevents = NULL;
                                        
                                        if (ctx->profiling &&
                                            !ctx->profiling_paused) {
                                            pevents =
                                                cuda_get_events(&ctx->cuda,
                                                                &ctx->mainzisegred_large_213496_runs,
                                                                &ctx->mainzisegred_large_213496_total_runtime);
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                               0));
                                        }
                                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_large_213496,
                                                                              grid[0],
                                                                              grid[1],
                                                                              grid[2],
                                                                              segred_group_sizze_213488,
                                                                              1,
                                                                              1,
                                                                              0 +
                                                                              (shared_sizze_231168 +
                                                                               (8 -
                                                                                shared_sizze_231168 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231170 +
                                                                               (8 -
                                                                                shared_sizze_231170 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231172 +
                                                                               (8 -
                                                                                shared_sizze_231172 %
                                                                                8) %
                                                                               8),
                                                                              NULL,
                                                                              kernel_args_231165,
                                                                              NULL));
                                        if (pevents != NULL)
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                               0));
                                        if (ctx->debugging) {
                                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                            time_end_231167 = get_wall_time();
                                            fprintf(ctx->log,
                                                    "Kernel %s runtime: %ldus\n",
                                                    "main.segred_large_213496",
                                                    time_end_231167 -
                                                    time_start_231166);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228094,
                                                              "segred_tmp_mem_228094") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228092,
                                                              "segred_tmp_mem_228092") !=
                                        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_228140;
                        
                        max_num_groups_228140 =
                            *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_228140))));
                        
                        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_228141;
                        
                        max_num_groups_228141 =
                            *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_228141))));
                        
                        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_228142;
                        
                        max_num_groups_228142 =
                            *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_228142))));
                        
                        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_228421;
                        
                        local_memory_capacity_228421 =
                            ctx->cuda.max_shared_memory;
                        if ((sle64((int64_t) 0,
                                   sext_i32_i64(local_memory_capacity_228421)) &&
                             sle64((int64_t) 0,
                                   sext_i32_i64(local_memory_capacity_228421))) &&
                            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_228146;
                            
                            group_sizze_228146 =
                                *ctx->tuning_params.mainzigroup_sizze_228146;
                            
                            int64_t num_groups_228147 = sdiv_up64(m_196691 *
                                                                  n_196692,
                                                                  group_sizze_228146);
                            CUdeviceptr kernel_arg_231189 =
                                        mem_param_222550.mem;
                            CUdeviceptr kernel_arg_231190 = mem_223786.mem;
                            
                            if ((((((1 && num_groups_228147 != 0) && 1 != 0) &&
                                   1 != 0) && group_sizze_228146 != 0) && 1 !=
                                 0) && 1 != 0) {
                                int perm[3] = {0, 1, 2};
                                
                                if (1 >= 1 << 16) {
                                    perm[1] = perm[0];
                                    perm[0] = 1;
                                }
                                if (1 >= 1 << 16) {
                                    perm[2] = perm[0];
                                    perm[0] = 2;
                                }
                                
                                size_t grid[3];
                                
                                grid[perm[0]] = num_groups_228147;
                                grid[perm[1]] = 1;
                                grid[perm[2]] = 1;
                                
                                void *kernel_args_231186[] = {&m_196691,
                                                              &n_196692,
                                                              &ctx_param_ext_222545,
                                                              &ctx_param_ext_222546,
                                                              &ctx_param_ext_222548,
                                                              &kernel_arg_231189,
                                                              &kernel_arg_231190};
                                int64_t time_start_231187 = 0, time_end_231188 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                            "main.copy_228143",
                                            (long) num_groups_228147, (long) 1,
                                            (long) 1, (long) group_sizze_228146,
                                            (long) 1, (long) 1, (int) 0);
                                    time_start_231187 = get_wall_time();
                                }
                                
                                cudaEvent_t *pevents = NULL;
                                
                                if (ctx->profiling && !ctx->profiling_paused) {
                                    pevents = cuda_get_events(&ctx->cuda,
                                                              &ctx->mainzicopy_228143_runs,
                                                              &ctx->mainzicopy_228143_total_runtime);
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                       0));
                                }
                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzicopy_228143,
                                                                      grid[0],
                                                                      grid[1],
                                                                      grid[2],
                                                                      group_sizze_228146,
                                                                      1, 1, 0,
                                                                      NULL,
                                                                      kernel_args_231186,
                                                                      NULL));
                                if (pevents != NULL)
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                       0));
                                if (ctx->debugging) {
                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                    time_end_231188 = get_wall_time();
                                    fprintf(ctx->log,
                                            "Kernel %s runtime: %ldus\n",
                                            "main.copy_228143",
                                            time_end_231188 -
                                            time_start_231187);
                                }
                            }
                            
                            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");
                            
                            CUdeviceptr kernel_arg_231194 = mem_223780.mem;
                            CUdeviceptr kernel_arg_231195 = mem_223783.mem;
                            CUdeviceptr kernel_arg_231196 = mem_223786.mem;
                            CUdeviceptr kernel_arg_231197 = mem_223789.mem;
                            CUdeviceptr kernel_arg_231198 = mem_223823.mem;
                            CUdeviceptr kernel_arg_231199 = mem_223826.mem;
                            CUdeviceptr kernel_arg_231200 = color_225077.mem;
                            CUdeviceptr kernel_arg_231201 = color_225078.mem;
                            
                            if ((((((1 && num_groups_213687 != 0) && 1 != 0) &&
                                   1 != 0) && segmap_group_sizze_213686 != 0) &&
                                 1 != 0) && 1 != 0) {
                                int perm[3] = {0, 1, 2};
                                
                                if (1 >= 1 << 16) {
                                    perm[1] = perm[0];
                                    perm[0] = 1;
                                }
                                if (1 >= 1 << 16) {
                                    perm[2] = perm[0];
                                    perm[0] = 2;
                                }
                                
                                size_t grid[3];
                                
                                grid[perm[0]] = num_groups_213687;
                                grid[perm[1]] = 1;
                                grid[perm[2]] = 1;
                                
                                void *kernel_args_231191[] =
                                     {&ctx->global_failure, &m_196691,
                                      &n_196692, &q_l_196697, &jump_t_196702,
                                      &l_n_m_196752, &i_196779,
                                      &num_groups_213687, &num_threads_225214,
                                      &kernel_arg_231194, &kernel_arg_231195,
                                      &kernel_arg_231196, &kernel_arg_231197,
                                      &kernel_arg_231198, &kernel_arg_231199,
                                      &kernel_arg_231200, &kernel_arg_231201};
                                int64_t time_start_231192 = 0, time_end_231193 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                            "main.segmap_213692",
                                            (long) num_groups_213687, (long) 1,
                                            (long) 1,
                                            (long) segmap_group_sizze_213686,
                                            (long) 1, (long) 1, (int) 0);
                                    time_start_231192 = get_wall_time();
                                }
                                
                                cudaEvent_t *pevents = NULL;
                                
                                if (ctx->profiling && !ctx->profiling_paused) {
                                    pevents = cuda_get_events(&ctx->cuda,
                                                              &ctx->mainzisegmap_213692_runs,
                                                              &ctx->mainzisegmap_213692_total_runtime);
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                       0));
                                }
                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_213692,
                                                                      grid[0],
                                                                      grid[1],
                                                                      grid[2],
                                                                      segmap_group_sizze_213686,
                                                                      1, 1, 0,
                                                                      NULL,
                                                                      kernel_args_231191,
                                                                      NULL));
                                if (pevents != NULL)
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                       0));
                                if (ctx->debugging) {
                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                    time_end_231193 = get_wall_time();
                                    fprintf(ctx->log,
                                            "Kernel %s runtime: %ldus\n",
                                            "main.segmap_213692",
                                            time_end_231193 -
                                            time_start_231192);
                                }
                            }
                            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_228420;
                            
                            local_memory_capacity_228420 =
                                ctx->cuda.max_shared_memory;
                            if (sle64((int64_t) 0,
                                      sext_i32_i64(local_memory_capacity_228420)) &&
                                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");
                                
                                CUdeviceptr kernel_arg_231205 =
                                            ext_mem_222468.mem;
                                CUdeviceptr kernel_arg_231206 =
                                            ext_mem_222469.mem;
                                CUdeviceptr kernel_arg_231207 =
                                            mem_param_222550.mem;
                                CUdeviceptr kernel_arg_231208 = mem_223608.mem;
                                CUdeviceptr kernel_arg_231209 = mem_223831.mem;
                                CUdeviceptr kernel_arg_231210 = mem_223835.mem;
                                
                                if ((((((1 && segmap_usable_groups_214351 !=
                                         0) && 1 != 0) && 1 != 0) &&
                                      segmap_group_sizze_214350 != 0) && 1 !=
                                     0) && 1 != 0) {
                                    int perm[3] = {0, 1, 2};
                                    
                                    if (1 >= 1 << 16) {
                                        perm[1] = perm[0];
                                        perm[0] = 1;
                                    }
                                    if (1 >= 1 << 16) {
                                        perm[2] = perm[0];
                                        perm[0] = 2;
                                    }
                                    
                                    size_t grid[3];
                                    
                                    grid[perm[0]] = segmap_usable_groups_214351;
                                    grid[perm[1]] = 1;
                                    grid[perm[2]] = 1;
                                    
                                    void *kernel_args_231202[] =
                                         {&ctx->global_failure, &m_196691,
                                          &n_196692, &q_l_196697,
                                          &jump_t_196702, &l_n_m_196752,
                                          &i_196779, &ctx_param_ext_222545,
                                          &ctx_param_ext_222546,
                                          &ctx_param_ext_222548,
                                          &kernel_arg_231205,
                                          &kernel_arg_231206,
                                          &kernel_arg_231207,
                                          &kernel_arg_231208,
                                          &kernel_arg_231209,
                                          &kernel_arg_231210};
                                    int64_t time_start_231203 = 0,
                                            time_end_231204 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                "main.segmap_214361",
                                                (long) segmap_usable_groups_214351,
                                                (long) 1, (long) 1,
                                                (long) segmap_group_sizze_214350,
                                                (long) 1, (long) 1, (int) 0);
                                        time_start_231203 = get_wall_time();
                                    }
                                    
                                    cudaEvent_t *pevents = NULL;
                                    
                                    if (ctx->profiling &&
                                        !ctx->profiling_paused) {
                                        pevents = cuda_get_events(&ctx->cuda,
                                                                  &ctx->mainzisegmap_214361_runs,
                                                                  &ctx->mainzisegmap_214361_total_runtime);
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                           0));
                                    }
                                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_214361,
                                                                          grid[0],
                                                                          grid[1],
                                                                          grid[2],
                                                                          segmap_group_sizze_214350,
                                                                          1, 1,
                                                                          0,
                                                                          NULL,
                                                                          kernel_args_231202,
                                                                          NULL));
                                    if (pevents != NULL)
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                           0));
                                    if (ctx->debugging) {
                                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                        time_end_231204 = get_wall_time();
                                        fprintf(ctx->log,
                                                "Kernel %s runtime: %ldus\n",
                                                "main.segmap_214361",
                                                time_end_231204 -
                                                time_start_231203);
                                    }
                                }
                                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_228196 =
                                            smax64((int64_t) 1, q_l_196697);
                                    int64_t num_threads_228197 =
                                            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_228196),
                                                '\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_228196))),
                                                '\n');
                                    
                                    unsigned int shared_sizze_231214 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_214495;
                                    unsigned int shared_sizze_231216 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_214495;
                                    unsigned int shared_sizze_231218 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_214495;
                                    unsigned int shared_sizze_231220 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_214495;
                                    unsigned int shared_sizze_231222 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_214495;
                                    CUdeviceptr kernel_arg_231224 =
                                                ext_mem_222468.mem;
                                    CUdeviceptr kernel_arg_231225 =
                                                ext_mem_222469.mem;
                                    CUdeviceptr kernel_arg_231226 =
                                                mem_param_222550.mem;
                                    CUdeviceptr kernel_arg_231227 =
                                                mem_223840.mem;
                                    CUdeviceptr kernel_arg_231228 =
                                                mem_223844.mem;
                                    CUdeviceptr kernel_arg_231229 =
                                                mem_223848.mem;
                                    CUdeviceptr kernel_arg_231230 =
                                                mem_223852.mem;
                                    CUdeviceptr kernel_arg_231231 =
                                                mem_223856.mem;
                                    unsigned int shared_offset_231215 = 0;
                                    unsigned int shared_offset_231217 = 0 +
                                                 (shared_sizze_231214 + (8 -
                                                                         shared_sizze_231214 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_231219 = 0 +
                                                 (shared_sizze_231214 + (8 -
                                                                         shared_sizze_231214 %
                                                                         8) %
                                                  8) + (shared_sizze_231216 +
                                                        (8 -
                                                         shared_sizze_231216 %
                                                         8) % 8);
                                    unsigned int shared_offset_231221 = 0 +
                                                 (shared_sizze_231214 + (8 -
                                                                         shared_sizze_231214 %
                                                                         8) %
                                                  8) + (shared_sizze_231216 +
                                                        (8 -
                                                         shared_sizze_231216 %
                                                         8) % 8) +
                                                 (shared_sizze_231218 + (8 -
                                                                         shared_sizze_231218 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_231223 = 0 +
                                                 (shared_sizze_231214 + (8 -
                                                                         shared_sizze_231214 %
                                                                         8) %
                                                  8) + (shared_sizze_231216 +
                                                        (8 -
                                                         shared_sizze_231216 %
                                                         8) % 8) +
                                                 (shared_sizze_231218 + (8 -
                                                                         shared_sizze_231218 %
                                                                         8) %
                                                  8) + (shared_sizze_231220 +
                                                        (8 -
                                                         shared_sizze_231220 %
                                                         8) % 8);
                                    
                                    if ((((((1 && num_groups_214496 != 0) &&
                                            1 != 0) && 1 != 0) &&
                                          segred_group_sizze_214495 != 0) &&
                                         1 != 0) && 1 != 0) {
                                        int perm[3] = {0, 1, 2};
                                        
                                        if (1 >= 1 << 16) {
                                            perm[1] = perm[0];
                                            perm[0] = 1;
                                        }
                                        if (1 >= 1 << 16) {
                                            perm[2] = perm[0];
                                            perm[0] = 2;
                                        }
                                        
                                        size_t grid[3];
                                        
                                        grid[perm[0]] = num_groups_214496;
                                        grid[perm[1]] = 1;
                                        grid[perm[2]] = 1;
                                        
                                        void *kernel_args_231211[] =
                                             {&ctx->global_failure,
                                              &shared_offset_231215,
                                              &shared_offset_231217,
                                              &shared_offset_231219,
                                              &shared_offset_231221,
                                              &shared_offset_231223, &m_196691,
                                              &n_196692, &q_l_196697,
                                              &jump_t_196702, &l_n_m_196752,
                                              &i_196779, &num_groups_214496,
                                              &ctx_param_ext_222545,
                                              &ctx_param_ext_222546,
                                              &ctx_param_ext_222548,
                                              &segment_sizze_nonzzero_228196,
                                              &kernel_arg_231224,
                                              &kernel_arg_231225,
                                              &kernel_arg_231226,
                                              &kernel_arg_231227,
                                              &kernel_arg_231228,
                                              &kernel_arg_231229,
                                              &kernel_arg_231230,
                                              &kernel_arg_231231};
                                        int64_t time_start_231212 = 0,
                                                time_end_231213 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                    "main.segred_small_214506",
                                                    (long) num_groups_214496,
                                                    (long) 1, (long) 1,
                                                    (long) segred_group_sizze_214495,
                                                    (long) 1, (long) 1,
                                                    (int) (0 +
                                                           (shared_sizze_231214 +
                                                            (8 -
                                                             shared_sizze_231214 %
                                                             8) % 8) +
                                                           (shared_sizze_231216 +
                                                            (8 -
                                                             shared_sizze_231216 %
                                                             8) % 8) +
                                                           (shared_sizze_231218 +
                                                            (8 -
                                                             shared_sizze_231218 %
                                                             8) % 8) +
                                                           (shared_sizze_231220 +
                                                            (8 -
                                                             shared_sizze_231220 %
                                                             8) % 8) +
                                                           (shared_sizze_231222 +
                                                            (8 -
                                                             shared_sizze_231222 %
                                                             8) % 8)));
                                            time_start_231212 = get_wall_time();
                                        }
                                        
                                        cudaEvent_t *pevents = NULL;
                                        
                                        if (ctx->profiling &&
                                            !ctx->profiling_paused) {
                                            pevents =
                                                cuda_get_events(&ctx->cuda,
                                                                &ctx->mainzisegred_small_214506_runs,
                                                                &ctx->mainzisegred_small_214506_total_runtime);
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                               0));
                                        }
                                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_small_214506,
                                                                              grid[0],
                                                                              grid[1],
                                                                              grid[2],
                                                                              segred_group_sizze_214495,
                                                                              1,
                                                                              1,
                                                                              0 +
                                                                              (shared_sizze_231214 +
                                                                               (8 -
                                                                                shared_sizze_231214 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231216 +
                                                                               (8 -
                                                                                shared_sizze_231216 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231218 +
                                                                               (8 -
                                                                                shared_sizze_231218 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231220 +
                                                                               (8 -
                                                                                shared_sizze_231220 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231222 +
                                                                               (8 -
                                                                                shared_sizze_231222 %
                                                                                8) %
                                                                               8),
                                                                              NULL,
                                                                              kernel_args_231211,
                                                                              NULL));
                                        if (pevents != NULL)
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                               0));
                                        if (ctx->debugging) {
                                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                            time_end_231213 = get_wall_time();
                                            fprintf(ctx->log,
                                                    "Kernel %s runtime: %ldus\n",
                                                    "main.segred_small_214506",
                                                    time_end_231213 -
                                                    time_start_231212);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                } else {
                                    int64_t groups_per_segment_228249 =
                                            sdiv_up64(num_groups_214496,
                                                      smax64((int64_t) 1,
                                                             m_196691 *
                                                             l_n_m_196752));
                                    int64_t elements_per_thread_228250 =
                                            sdiv_up64(q_l_196697,
                                                      segred_group_sizze_214495 *
                                                      groups_per_segment_228249);
                                    int64_t virt_num_groups_228251 =
                                            groups_per_segment_228249 *
                                            (m_196691 * l_n_m_196752);
                                    int64_t num_threads_228252 =
                                            num_groups_214496 *
                                            segred_group_sizze_214495;
                                    int64_t threads_per_segment_228253 =
                                            groups_per_segment_228249 *
                                            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_228251,
                                                '\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_228250,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "groups_per_segment",
                                                (long long) groups_per_segment_228249,
                                                '\n');
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228254;
                                    
                                    segred_tmp_mem_228254.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228254,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228251,
                                                              "segred_tmp_mem_228254")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228256;
                                    
                                    segred_tmp_mem_228256.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228256,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228251,
                                                              "segred_tmp_mem_228256")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228258;
                                    
                                    segred_tmp_mem_228258.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228258,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228251,
                                                              "segred_tmp_mem_228258")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228260;
                                    
                                    segred_tmp_mem_228260.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228260,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228251,
                                                              "segred_tmp_mem_228260")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228262;
                                    
                                    segred_tmp_mem_228262.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228262,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228251,
                                                              "segred_tmp_mem_228262")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    mainzicounter_mem_228264 =
                                    ctx->mainzicounter_mem_228264;
                                    unsigned int shared_sizze_231236 = 1;
                                    unsigned int shared_sizze_231238 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_214495;
                                    unsigned int shared_sizze_231240 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_214495;
                                    unsigned int shared_sizze_231242 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_214495;
                                    unsigned int shared_sizze_231244 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_214495;
                                    unsigned int shared_sizze_231246 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_214495;
                                    CUdeviceptr kernel_arg_231248 =
                                                ext_mem_222468.mem;
                                    CUdeviceptr kernel_arg_231249 =
                                                ext_mem_222469.mem;
                                    CUdeviceptr kernel_arg_231250 =
                                                mem_param_222550.mem;
                                    CUdeviceptr kernel_arg_231251 =
                                                mem_223840.mem;
                                    CUdeviceptr kernel_arg_231252 =
                                                mem_223844.mem;
                                    CUdeviceptr kernel_arg_231253 =
                                                mem_223848.mem;
                                    CUdeviceptr kernel_arg_231254 =
                                                mem_223852.mem;
                                    CUdeviceptr kernel_arg_231255 =
                                                mem_223856.mem;
                                    CUdeviceptr kernel_arg_231256 =
                                                segred_tmp_mem_228254.mem;
                                    CUdeviceptr kernel_arg_231257 =
                                                segred_tmp_mem_228256.mem;
                                    CUdeviceptr kernel_arg_231258 =
                                                segred_tmp_mem_228258.mem;
                                    CUdeviceptr kernel_arg_231259 =
                                                segred_tmp_mem_228260.mem;
                                    CUdeviceptr kernel_arg_231260 =
                                                segred_tmp_mem_228262.mem;
                                    CUdeviceptr kernel_arg_231261 =
                                                mainzicounter_mem_228264.mem;
                                    unsigned int shared_offset_231237 = 0;
                                    unsigned int shared_offset_231239 = 0 +
                                                 (shared_sizze_231236 + (8 -
                                                                         shared_sizze_231236 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_231241 = 0 +
                                                 (shared_sizze_231236 + (8 -
                                                                         shared_sizze_231236 %
                                                                         8) %
                                                  8) + (shared_sizze_231238 +
                                                        (8 -
                                                         shared_sizze_231238 %
                                                         8) % 8);
                                    unsigned int shared_offset_231243 = 0 +
                                                 (shared_sizze_231236 + (8 -
                                                                         shared_sizze_231236 %
                                                                         8) %
                                                  8) + (shared_sizze_231238 +
                                                        (8 -
                                                         shared_sizze_231238 %
                                                         8) % 8) +
                                                 (shared_sizze_231240 + (8 -
                                                                         shared_sizze_231240 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_231245 = 0 +
                                                 (shared_sizze_231236 + (8 -
                                                                         shared_sizze_231236 %
                                                                         8) %
                                                  8) + (shared_sizze_231238 +
                                                        (8 -
                                                         shared_sizze_231238 %
                                                         8) % 8) +
                                                 (shared_sizze_231240 + (8 -
                                                                         shared_sizze_231240 %
                                                                         8) %
                                                  8) + (shared_sizze_231242 +
                                                        (8 -
                                                         shared_sizze_231242 %
                                                         8) % 8);
                                    unsigned int shared_offset_231247 = 0 +
                                                 (shared_sizze_231236 + (8 -
                                                                         shared_sizze_231236 %
                                                                         8) %
                                                  8) + (shared_sizze_231238 +
                                                        (8 -
                                                         shared_sizze_231238 %
                                                         8) % 8) +
                                                 (shared_sizze_231240 + (8 -
                                                                         shared_sizze_231240 %
                                                                         8) %
                                                  8) + (shared_sizze_231242 +
                                                        (8 -
                                                         shared_sizze_231242 %
                                                         8) % 8) +
                                                 (shared_sizze_231244 + (8 -
                                                                         shared_sizze_231244 %
                                                                         8) %
                                                  8);
                                    
                                    if ((((((1 && num_groups_214496 != 0) &&
                                            1 != 0) && 1 != 0) &&
                                          segred_group_sizze_214495 != 0) &&
                                         1 != 0) && 1 != 0) {
                                        int perm[3] = {0, 1, 2};
                                        
                                        if (1 >= 1 << 16) {
                                            perm[1] = perm[0];
                                            perm[0] = 1;
                                        }
                                        if (1 >= 1 << 16) {
                                            perm[2] = perm[0];
                                            perm[0] = 2;
                                        }
                                        
                                        size_t grid[3];
                                        
                                        grid[perm[0]] = num_groups_214496;
                                        grid[perm[1]] = 1;
                                        grid[perm[2]] = 1;
                                        
                                        void *kernel_args_231233[] =
                                             {&ctx->global_failure,
                                              &shared_offset_231237,
                                              &shared_offset_231239,
                                              &shared_offset_231241,
                                              &shared_offset_231243,
                                              &shared_offset_231245,
                                              &shared_offset_231247, &m_196691,
                                              &n_196692, &q_l_196697,
                                              &jump_t_196702, &l_n_m_196752,
                                              &i_196779, &num_groups_214496,
                                              &ctx_param_ext_222545,
                                              &ctx_param_ext_222546,
                                              &ctx_param_ext_222548,
                                              &groups_per_segment_228249,
                                              &elements_per_thread_228250,
                                              &virt_num_groups_228251,
                                              &threads_per_segment_228253,
                                              &kernel_arg_231248,
                                              &kernel_arg_231249,
                                              &kernel_arg_231250,
                                              &kernel_arg_231251,
                                              &kernel_arg_231252,
                                              &kernel_arg_231253,
                                              &kernel_arg_231254,
                                              &kernel_arg_231255,
                                              &kernel_arg_231256,
                                              &kernel_arg_231257,
                                              &kernel_arg_231258,
                                              &kernel_arg_231259,
                                              &kernel_arg_231260,
                                              &kernel_arg_231261};
                                        int64_t time_start_231234 = 0,
                                                time_end_231235 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                    "main.segred_large_214506",
                                                    (long) num_groups_214496,
                                                    (long) 1, (long) 1,
                                                    (long) segred_group_sizze_214495,
                                                    (long) 1, (long) 1,
                                                    (int) (0 +
                                                           (shared_sizze_231236 +
                                                            (8 -
                                                             shared_sizze_231236 %
                                                             8) % 8) +
                                                           (shared_sizze_231238 +
                                                            (8 -
                                                             shared_sizze_231238 %
                                                             8) % 8) +
                                                           (shared_sizze_231240 +
                                                            (8 -
                                                             shared_sizze_231240 %
                                                             8) % 8) +
                                                           (shared_sizze_231242 +
                                                            (8 -
                                                             shared_sizze_231242 %
                                                             8) % 8) +
                                                           (shared_sizze_231244 +
                                                            (8 -
                                                             shared_sizze_231244 %
                                                             8) % 8) +
                                                           (shared_sizze_231246 +
                                                            (8 -
                                                             shared_sizze_231246 %
                                                             8) % 8)));
                                            time_start_231234 = get_wall_time();
                                        }
                                        
                                        cudaEvent_t *pevents = NULL;
                                        
                                        if (ctx->profiling &&
                                            !ctx->profiling_paused) {
                                            pevents =
                                                cuda_get_events(&ctx->cuda,
                                                                &ctx->mainzisegred_large_214506_runs,
                                                                &ctx->mainzisegred_large_214506_total_runtime);
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                               0));
                                        }
                                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_large_214506,
                                                                              grid[0],
                                                                              grid[1],
                                                                              grid[2],
                                                                              segred_group_sizze_214495,
                                                                              1,
                                                                              1,
                                                                              0 +
                                                                              (shared_sizze_231236 +
                                                                               (8 -
                                                                                shared_sizze_231236 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231238 +
                                                                               (8 -
                                                                                shared_sizze_231238 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231240 +
                                                                               (8 -
                                                                                shared_sizze_231240 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231242 +
                                                                               (8 -
                                                                                shared_sizze_231242 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231244 +
                                                                               (8 -
                                                                                shared_sizze_231244 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231246 +
                                                                               (8 -
                                                                                shared_sizze_231246 %
                                                                                8) %
                                                                               8),
                                                                              NULL,
                                                                              kernel_args_231233,
                                                                              NULL));
                                        if (pevents != NULL)
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                               0));
                                        if (ctx->debugging) {
                                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                            time_end_231235 = get_wall_time();
                                            fprintf(ctx->log,
                                                    "Kernel %s runtime: %ldus\n",
                                                    "main.segred_large_214506",
                                                    time_end_231235 -
                                                    time_start_231234);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228262,
                                                              "segred_tmp_mem_228262") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228260,
                                                              "segred_tmp_mem_228260") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228258,
                                                              "segred_tmp_mem_228258") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228256,
                                                              "segred_tmp_mem_228256") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228254,
                                                              "segred_tmp_mem_228254") !=
                                        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");
                                
                                CUdeviceptr kernel_arg_231265 = mem_223840.mem;
                                CUdeviceptr kernel_arg_231266 = mem_223844.mem;
                                CUdeviceptr kernel_arg_231267 = mem_223848.mem;
                                CUdeviceptr kernel_arg_231268 = mem_223852.mem;
                                CUdeviceptr kernel_arg_231269 = mem_223856.mem;
                                CUdeviceptr kernel_arg_231270 = mem_223861.mem;
                                CUdeviceptr kernel_arg_231271 = mem_223865.mem;
                                CUdeviceptr kernel_arg_231272 = mem_223869.mem;
                                CUdeviceptr kernel_arg_231273 = mem_223873.mem;
                                CUdeviceptr kernel_arg_231274 = mem_223877.mem;
                                
                                if ((((((1 && segmap_usable_groups_214554 !=
                                         0) && 1 != 0) && 1 != 0) &&
                                      segmap_group_sizze_214553 != 0) && 1 !=
                                     0) && 1 != 0) {
                                    int perm[3] = {0, 1, 2};
                                    
                                    if (1 >= 1 << 16) {
                                        perm[1] = perm[0];
                                        perm[0] = 1;
                                    }
                                    if (1 >= 1 << 16) {
                                        perm[2] = perm[0];
                                        perm[0] = 2;
                                    }
                                    
                                    size_t grid[3];
                                    
                                    grid[perm[0]] = segmap_usable_groups_214554;
                                    grid[perm[1]] = 1;
                                    grid[perm[2]] = 1;
                                    
                                    void *kernel_args_231262[] =
                                         {&ctx->global_failure, &m_196691,
                                          &l_n_m_196752, &kernel_arg_231265,
                                          &kernel_arg_231266,
                                          &kernel_arg_231267,
                                          &kernel_arg_231268,
                                          &kernel_arg_231269,
                                          &kernel_arg_231270,
                                          &kernel_arg_231271,
                                          &kernel_arg_231272,
                                          &kernel_arg_231273,
                                          &kernel_arg_231274};
                                    int64_t time_start_231263 = 0,
                                            time_end_231264 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                "main.segmap_214562",
                                                (long) segmap_usable_groups_214554,
                                                (long) 1, (long) 1,
                                                (long) segmap_group_sizze_214553,
                                                (long) 1, (long) 1, (int) 0);
                                        time_start_231263 = get_wall_time();
                                    }
                                    
                                    cudaEvent_t *pevents = NULL;
                                    
                                    if (ctx->profiling &&
                                        !ctx->profiling_paused) {
                                        pevents = cuda_get_events(&ctx->cuda,
                                                                  &ctx->mainzisegmap_214562_runs,
                                                                  &ctx->mainzisegmap_214562_total_runtime);
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                           0));
                                    }
                                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_214562,
                                                                          grid[0],
                                                                          grid[1],
                                                                          grid[2],
                                                                          segmap_group_sizze_214553,
                                                                          1, 1,
                                                                          0,
                                                                          NULL,
                                                                          kernel_args_231262,
                                                                          NULL));
                                    if (pevents != NULL)
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                           0));
                                    if (ctx->debugging) {
                                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                        time_end_231264 = get_wall_time();
                                        fprintf(ctx->log,
                                                "Kernel %s runtime: %ldus\n",
                                                "main.segmap_214562",
                                                time_end_231264 -
                                                time_start_231263);
                                    }
                                }
                                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_228334 =
                                            smax64((int64_t) 1, q_l_196697);
                                    int64_t num_threads_228335 =
                                            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_228334),
                                                '\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_228334))),
                                                '\n');
                                    
                                    unsigned int shared_sizze_231278 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_214596;
                                    unsigned int shared_sizze_231280 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_214596;
                                    CUdeviceptr kernel_arg_231282 =
                                                ext_mem_222468.mem;
                                    CUdeviceptr kernel_arg_231283 =
                                                ext_mem_222469.mem;
                                    CUdeviceptr kernel_arg_231284 =
                                                mem_param_222550.mem;
                                    CUdeviceptr kernel_arg_231285 =
                                                mem_223608.mem;
                                    CUdeviceptr kernel_arg_231286 =
                                                mem_223861.mem;
                                    CUdeviceptr kernel_arg_231287 =
                                                mem_223865.mem;
                                    CUdeviceptr kernel_arg_231288 =
                                                mem_223869.mem;
                                    CUdeviceptr kernel_arg_231289 =
                                                mem_223873.mem;
                                    CUdeviceptr kernel_arg_231290 =
                                                mem_223877.mem;
                                    CUdeviceptr kernel_arg_231291 =
                                                mem_223882.mem;
                                    CUdeviceptr kernel_arg_231292 =
                                                mem_223886.mem;
                                    unsigned int shared_offset_231279 = 0;
                                    unsigned int shared_offset_231281 = 0 +
                                                 (shared_sizze_231278 + (8 -
                                                                         shared_sizze_231278 %
                                                                         8) %
                                                  8);
                                    
                                    if ((((((1 && num_groups_214597 != 0) &&
                                            1 != 0) && 1 != 0) &&
                                          segred_group_sizze_214596 != 0) &&
                                         1 != 0) && 1 != 0) {
                                        int perm[3] = {0, 1, 2};
                                        
                                        if (1 >= 1 << 16) {
                                            perm[1] = perm[0];
                                            perm[0] = 1;
                                        }
                                        if (1 >= 1 << 16) {
                                            perm[2] = perm[0];
                                            perm[0] = 2;
                                        }
                                        
                                        size_t grid[3];
                                        
                                        grid[perm[0]] = num_groups_214597;
                                        grid[perm[1]] = 1;
                                        grid[perm[2]] = 1;
                                        
                                        void *kernel_args_231275[] =
                                             {&ctx->global_failure,
                                              &shared_offset_231279,
                                              &shared_offset_231281, &m_196691,
                                              &n_196692, &q_l_196697,
                                              &jump_t_196702, &l_n_m_196752,
                                              &i_196779, &num_groups_214597,
                                              &ctx_param_ext_222545,
                                              &ctx_param_ext_222546,
                                              &ctx_param_ext_222548,
                                              &segment_sizze_nonzzero_228334,
                                              &kernel_arg_231282,
                                              &kernel_arg_231283,
                                              &kernel_arg_231284,
                                              &kernel_arg_231285,
                                              &kernel_arg_231286,
                                              &kernel_arg_231287,
                                              &kernel_arg_231288,
                                              &kernel_arg_231289,
                                              &kernel_arg_231290,
                                              &kernel_arg_231291,
                                              &kernel_arg_231292};
                                        int64_t time_start_231276 = 0,
                                                time_end_231277 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                    "main.segred_small_214604",
                                                    (long) num_groups_214597,
                                                    (long) 1, (long) 1,
                                                    (long) segred_group_sizze_214596,
                                                    (long) 1, (long) 1,
                                                    (int) (0 +
                                                           (shared_sizze_231278 +
                                                            (8 -
                                                             shared_sizze_231278 %
                                                             8) % 8) +
                                                           (shared_sizze_231280 +
                                                            (8 -
                                                             shared_sizze_231280 %
                                                             8) % 8)));
                                            time_start_231276 = get_wall_time();
                                        }
                                        
                                        cudaEvent_t *pevents = NULL;
                                        
                                        if (ctx->profiling &&
                                            !ctx->profiling_paused) {
                                            pevents =
                                                cuda_get_events(&ctx->cuda,
                                                                &ctx->mainzisegred_small_214604_runs,
                                                                &ctx->mainzisegred_small_214604_total_runtime);
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                               0));
                                        }
                                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_small_214604,
                                                                              grid[0],
                                                                              grid[1],
                                                                              grid[2],
                                                                              segred_group_sizze_214596,
                                                                              1,
                                                                              1,
                                                                              0 +
                                                                              (shared_sizze_231278 +
                                                                               (8 -
                                                                                shared_sizze_231278 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231280 +
                                                                               (8 -
                                                                                shared_sizze_231280 %
                                                                                8) %
                                                                               8),
                                                                              NULL,
                                                                              kernel_args_231275,
                                                                              NULL));
                                        if (pevents != NULL)
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                               0));
                                        if (ctx->debugging) {
                                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                            time_end_231277 = get_wall_time();
                                            fprintf(ctx->log,
                                                    "Kernel %s runtime: %ldus\n",
                                                    "main.segred_small_214604",
                                                    time_end_231277 -
                                                    time_start_231276);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                } else {
                                    int64_t groups_per_segment_228369 =
                                            sdiv_up64(num_groups_214597,
                                                      smax64((int64_t) 1,
                                                             m_196691 *
                                                             l_n_m_196752));
                                    int64_t elements_per_thread_228370 =
                                            sdiv_up64(q_l_196697,
                                                      segred_group_sizze_214596 *
                                                      groups_per_segment_228369);
                                    int64_t virt_num_groups_228371 =
                                            groups_per_segment_228369 *
                                            (m_196691 * l_n_m_196752);
                                    int64_t num_threads_228372 =
                                            num_groups_214597 *
                                            segred_group_sizze_214596;
                                    int64_t threads_per_segment_228373 =
                                            groups_per_segment_228369 *
                                            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_228371,
                                                '\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_228370,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "groups_per_segment",
                                                (long long) groups_per_segment_228369,
                                                '\n');
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228374;
                                    
                                    segred_tmp_mem_228374.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228374,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228371,
                                                              "segred_tmp_mem_228374")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228376;
                                    
                                    segred_tmp_mem_228376.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228376,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228371,
                                                              "segred_tmp_mem_228376")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    mainzicounter_mem_228378 =
                                    ctx->mainzicounter_mem_228378;
                                    unsigned int shared_sizze_231297 = 1;
                                    unsigned int shared_sizze_231299 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_214596;
                                    unsigned int shared_sizze_231301 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_214596;
                                    CUdeviceptr kernel_arg_231303 =
                                                ext_mem_222468.mem;
                                    CUdeviceptr kernel_arg_231304 =
                                                ext_mem_222469.mem;
                                    CUdeviceptr kernel_arg_231305 =
                                                mem_param_222550.mem;
                                    CUdeviceptr kernel_arg_231306 =
                                                mem_223608.mem;
                                    CUdeviceptr kernel_arg_231307 =
                                                mem_223861.mem;
                                    CUdeviceptr kernel_arg_231308 =
                                                mem_223865.mem;
                                    CUdeviceptr kernel_arg_231309 =
                                                mem_223869.mem;
                                    CUdeviceptr kernel_arg_231310 =
                                                mem_223873.mem;
                                    CUdeviceptr kernel_arg_231311 =
                                                mem_223877.mem;
                                    CUdeviceptr kernel_arg_231312 =
                                                mem_223882.mem;
                                    CUdeviceptr kernel_arg_231313 =
                                                mem_223886.mem;
                                    CUdeviceptr kernel_arg_231314 =
                                                segred_tmp_mem_228374.mem;
                                    CUdeviceptr kernel_arg_231315 =
                                                segred_tmp_mem_228376.mem;
                                    CUdeviceptr kernel_arg_231316 =
                                                mainzicounter_mem_228378.mem;
                                    unsigned int shared_offset_231298 = 0;
                                    unsigned int shared_offset_231300 = 0 +
                                                 (shared_sizze_231297 + (8 -
                                                                         shared_sizze_231297 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_231302 = 0 +
                                                 (shared_sizze_231297 + (8 -
                                                                         shared_sizze_231297 %
                                                                         8) %
                                                  8) + (shared_sizze_231299 +
                                                        (8 -
                                                         shared_sizze_231299 %
                                                         8) % 8);
                                    
                                    if ((((((1 && num_groups_214597 != 0) &&
                                            1 != 0) && 1 != 0) &&
                                          segred_group_sizze_214596 != 0) &&
                                         1 != 0) && 1 != 0) {
                                        int perm[3] = {0, 1, 2};
                                        
                                        if (1 >= 1 << 16) {
                                            perm[1] = perm[0];
                                            perm[0] = 1;
                                        }
                                        if (1 >= 1 << 16) {
                                            perm[2] = perm[0];
                                            perm[0] = 2;
                                        }
                                        
                                        size_t grid[3];
                                        
                                        grid[perm[0]] = num_groups_214597;
                                        grid[perm[1]] = 1;
                                        grid[perm[2]] = 1;
                                        
                                        void *kernel_args_231294[] =
                                             {&ctx->global_failure,
                                              &shared_offset_231298,
                                              &shared_offset_231300,
                                              &shared_offset_231302, &m_196691,
                                              &n_196692, &q_l_196697,
                                              &jump_t_196702, &l_n_m_196752,
                                              &i_196779, &num_groups_214597,
                                              &ctx_param_ext_222545,
                                              &ctx_param_ext_222546,
                                              &ctx_param_ext_222548,
                                              &groups_per_segment_228369,
                                              &elements_per_thread_228370,
                                              &virt_num_groups_228371,
                                              &threads_per_segment_228373,
                                              &kernel_arg_231303,
                                              &kernel_arg_231304,
                                              &kernel_arg_231305,
                                              &kernel_arg_231306,
                                              &kernel_arg_231307,
                                              &kernel_arg_231308,
                                              &kernel_arg_231309,
                                              &kernel_arg_231310,
                                              &kernel_arg_231311,
                                              &kernel_arg_231312,
                                              &kernel_arg_231313,
                                              &kernel_arg_231314,
                                              &kernel_arg_231315,
                                              &kernel_arg_231316};
                                        int64_t time_start_231295 = 0,
                                                time_end_231296 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                    "main.segred_large_214604",
                                                    (long) num_groups_214597,
                                                    (long) 1, (long) 1,
                                                    (long) segred_group_sizze_214596,
                                                    (long) 1, (long) 1,
                                                    (int) (0 +
                                                           (shared_sizze_231297 +
                                                            (8 -
                                                             shared_sizze_231297 %
                                                             8) % 8) +
                                                           (shared_sizze_231299 +
                                                            (8 -
                                                             shared_sizze_231299 %
                                                             8) % 8) +
                                                           (shared_sizze_231301 +
                                                            (8 -
                                                             shared_sizze_231301 %
                                                             8) % 8)));
                                            time_start_231295 = get_wall_time();
                                        }
                                        
                                        cudaEvent_t *pevents = NULL;
                                        
                                        if (ctx->profiling &&
                                            !ctx->profiling_paused) {
                                            pevents =
                                                cuda_get_events(&ctx->cuda,
                                                                &ctx->mainzisegred_large_214604_runs,
                                                                &ctx->mainzisegred_large_214604_total_runtime);
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                               0));
                                        }
                                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_large_214604,
                                                                              grid[0],
                                                                              grid[1],
                                                                              grid[2],
                                                                              segred_group_sizze_214596,
                                                                              1,
                                                                              1,
                                                                              0 +
                                                                              (shared_sizze_231297 +
                                                                               (8 -
                                                                                shared_sizze_231297 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231299 +
                                                                               (8 -
                                                                                shared_sizze_231299 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231301 +
                                                                               (8 -
                                                                                shared_sizze_231301 %
                                                                                8) %
                                                                               8),
                                                                              NULL,
                                                                              kernel_args_231294,
                                                                              NULL));
                                        if (pevents != NULL)
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                               0));
                                        if (ctx->debugging) {
                                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                            time_end_231296 = get_wall_time();
                                            fprintf(ctx->log,
                                                    "Kernel %s runtime: %ldus\n",
                                                    "main.segred_large_214604",
                                                    time_end_231296 -
                                                    time_start_231295);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228376,
                                                              "segred_tmp_mem_228376") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228374,
                                                              "segred_tmp_mem_228374") !=
                                        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");
                    
                    unsigned int shared_sizze_231320 = (int64_t) 4 * q_l_196697;
                    unsigned int shared_sizze_231322 = (int64_t) 4 * q_l_196697;
                    unsigned int shared_sizze_231324 = bytes_223912;
                    CUdeviceptr kernel_arg_231326 = ext_mem_222468.mem;
                    CUdeviceptr kernel_arg_231327 = ext_mem_222469.mem;
                    CUdeviceptr kernel_arg_231328 = mem_param_222550.mem;
                    CUdeviceptr kernel_arg_231329 = mem_223608.mem;
                    CUdeviceptr kernel_arg_231330 = mem_223918.mem;
                    unsigned int shared_offset_231321 = 0;
                    unsigned int shared_offset_231323 = 0 +
                                 (shared_sizze_231320 + (8 -
                                                         shared_sizze_231320 %
                                                         8) % 8);
                    unsigned int shared_offset_231325 = 0 +
                                 (shared_sizze_231320 + (8 -
                                                         shared_sizze_231320 %
                                                         8) % 8) +
                                 (shared_sizze_231322 + (8 -
                                                         shared_sizze_231322 %
                                                         8) % 8);
                    
                    if ((((((1 && nest_sizze_202575 != 0) && 1 != 0) && 1 !=
                           0) && q_l_196697 != 0) && 1 != 0) && 1 != 0) {
                        int perm[3] = {0, 1, 2};
                        
                        if (1 >= 1 << 16) {
                            perm[1] = perm[0];
                            perm[0] = 1;
                        }
                        if (1 >= 1 << 16) {
                            perm[2] = perm[0];
                            perm[0] = 2;
                        }
                        
                        size_t grid[3];
                        
                        grid[perm[0]] = nest_sizze_202575;
                        grid[perm[1]] = 1;
                        grid[perm[2]] = 1;
                        
                        void *kernel_args_231317[] = {&ctx->global_failure,
                                                      &shared_offset_231321,
                                                      &shared_offset_231323,
                                                      &shared_offset_231325,
                                                      &m_196691, &n_196692,
                                                      &q_l_196697,
                                                      &jump_t_196702,
                                                      &l_n_m_196752, &i_196779,
                                                      &ctx_param_ext_222545,
                                                      &ctx_param_ext_222546,
                                                      &ctx_param_ext_222548,
                                                      &kernel_arg_231326,
                                                      &kernel_arg_231327,
                                                      &kernel_arg_231328,
                                                      &kernel_arg_231329,
                                                      &kernel_arg_231330};
                        int64_t time_start_231318 = 0, time_end_231319 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                    "main.segmap_intragroup_214752",
                                    (long) nest_sizze_202575, (long) 1,
                                    (long) 1, (long) q_l_196697, (long) 1,
                                    (long) 1, (int) (0 + (shared_sizze_231320 +
                                                          (8 -
                                                           shared_sizze_231320 %
                                                           8) % 8) +
                                                     (shared_sizze_231322 + (8 -
                                                                             shared_sizze_231322 %
                                                                             8) %
                                                      8) +
                                                     (shared_sizze_231324 + (8 -
                                                                             shared_sizze_231324 %
                                                                             8) %
                                                      8)));
                            time_start_231318 = get_wall_time();
                        }
                        
                        cudaEvent_t *pevents = NULL;
                        
                        if (ctx->profiling && !ctx->profiling_paused) {
                            pevents = cuda_get_events(&ctx->cuda,
                                                      &ctx->mainzisegmap_intragroup_214752_runs,
                                                      &ctx->mainzisegmap_intragroup_214752_total_runtime);
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                        }
                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_intragroup_214752,
                                                              grid[0], grid[1],
                                                              grid[2],
                                                              q_l_196697, 1, 1,
                                                              0 +
                                                              (shared_sizze_231320 +
                                                               (8 -
                                                                shared_sizze_231320 %
                                                                8) % 8) +
                                                              (shared_sizze_231322 +
                                                               (8 -
                                                                shared_sizze_231322 %
                                                                8) % 8) +
                                                              (shared_sizze_231324 +
                                                               (8 -
                                                                shared_sizze_231324 %
                                                                8) % 8), NULL,
                                                              kernel_args_231317,
                                                              NULL));
                        if (pevents != NULL)
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                        if (ctx->debugging) {
                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                            time_end_231319 = get_wall_time();
                            fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                    "main.segmap_intragroup_214752",
                                    time_end_231319 - time_start_231318);
                        }
                    }
                    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");
                        
                        unsigned int shared_sizze_231334 = (int64_t) 4 *
                                     q_l_196697;
                        unsigned int shared_sizze_231336 = (int64_t) 4 *
                                     q_l_196697;
                        unsigned int shared_sizze_231338 = (int64_t) 4 *
                                     q_l_196697;
                        unsigned int shared_sizze_231340 = (int64_t) 4 *
                                     q_l_196697;
                        unsigned int shared_sizze_231342 = (int64_t) 4 *
                                     q_l_196697;
                        unsigned int shared_sizze_231344 = bytes_223912;
                        unsigned int shared_sizze_231346 = bytes_223912;
                        CUdeviceptr kernel_arg_231348 = ext_mem_222468.mem;
                        CUdeviceptr kernel_arg_231349 = ext_mem_222469.mem;
                        CUdeviceptr kernel_arg_231350 = mem_param_222550.mem;
                        CUdeviceptr kernel_arg_231351 = mem_223608.mem;
                        CUdeviceptr kernel_arg_231352 = mem_223931.mem;
                        CUdeviceptr kernel_arg_231353 = mem_223935.mem;
                        unsigned int shared_offset_231335 = 0;
                        unsigned int shared_offset_231337 = 0 +
                                     (shared_sizze_231334 + (8 -
                                                             shared_sizze_231334 %
                                                             8) % 8);
                        unsigned int shared_offset_231339 = 0 +
                                     (shared_sizze_231334 + (8 -
                                                             shared_sizze_231334 %
                                                             8) % 8) +
                                     (shared_sizze_231336 + (8 -
                                                             shared_sizze_231336 %
                                                             8) % 8);
                        unsigned int shared_offset_231341 = 0 +
                                     (shared_sizze_231334 + (8 -
                                                             shared_sizze_231334 %
                                                             8) % 8) +
                                     (shared_sizze_231336 + (8 -
                                                             shared_sizze_231336 %
                                                             8) % 8) +
                                     (shared_sizze_231338 + (8 -
                                                             shared_sizze_231338 %
                                                             8) % 8);
                        unsigned int shared_offset_231343 = 0 +
                                     (shared_sizze_231334 + (8 -
                                                             shared_sizze_231334 %
                                                             8) % 8) +
                                     (shared_sizze_231336 + (8 -
                                                             shared_sizze_231336 %
                                                             8) % 8) +
                                     (shared_sizze_231338 + (8 -
                                                             shared_sizze_231338 %
                                                             8) % 8) +
                                     (shared_sizze_231340 + (8 -
                                                             shared_sizze_231340 %
                                                             8) % 8);
                        unsigned int shared_offset_231345 = 0 +
                                     (shared_sizze_231334 + (8 -
                                                             shared_sizze_231334 %
                                                             8) % 8) +
                                     (shared_sizze_231336 + (8 -
                                                             shared_sizze_231336 %
                                                             8) % 8) +
                                     (shared_sizze_231338 + (8 -
                                                             shared_sizze_231338 %
                                                             8) % 8) +
                                     (shared_sizze_231340 + (8 -
                                                             shared_sizze_231340 %
                                                             8) % 8) +
                                     (shared_sizze_231342 + (8 -
                                                             shared_sizze_231342 %
                                                             8) % 8);
                        unsigned int shared_offset_231347 = 0 +
                                     (shared_sizze_231334 + (8 -
                                                             shared_sizze_231334 %
                                                             8) % 8) +
                                     (shared_sizze_231336 + (8 -
                                                             shared_sizze_231336 %
                                                             8) % 8) +
                                     (shared_sizze_231338 + (8 -
                                                             shared_sizze_231338 %
                                                             8) % 8) +
                                     (shared_sizze_231340 + (8 -
                                                             shared_sizze_231340 %
                                                             8) % 8) +
                                     (shared_sizze_231342 + (8 -
                                                             shared_sizze_231342 %
                                                             8) % 8) +
                                     (shared_sizze_231344 + (8 -
                                                             shared_sizze_231344 %
                                                             8) % 8);
                        
                        if ((((((1 && nest_sizze_202575 != 0) && 1 != 0) && 1 !=
                               0) && q_l_196697 != 0) && 1 != 0) && 1 != 0) {
                            int perm[3] = {0, 1, 2};
                            
                            if (1 >= 1 << 16) {
                                perm[1] = perm[0];
                                perm[0] = 1;
                            }
                            if (1 >= 1 << 16) {
                                perm[2] = perm[0];
                                perm[0] = 2;
                            }
                            
                            size_t grid[3];
                            
                            grid[perm[0]] = nest_sizze_202575;
                            grid[perm[1]] = 1;
                            grid[perm[2]] = 1;
                            
                            void *kernel_args_231331[] = {&ctx->global_failure,
                                                          &shared_offset_231335,
                                                          &shared_offset_231337,
                                                          &shared_offset_231339,
                                                          &shared_offset_231341,
                                                          &shared_offset_231343,
                                                          &shared_offset_231345,
                                                          &shared_offset_231347,
                                                          &m_196691, &n_196692,
                                                          &q_l_196697,
                                                          &jump_t_196702,
                                                          &l_n_m_196752,
                                                          &i_196779,
                                                          &ctx_param_ext_222545,
                                                          &ctx_param_ext_222546,
                                                          &ctx_param_ext_222548,
                                                          &kernel_arg_231348,
                                                          &kernel_arg_231349,
                                                          &kernel_arg_231350,
                                                          &kernel_arg_231351,
                                                          &kernel_arg_231352,
                                                          &kernel_arg_231353};
                            int64_t time_start_231332 = 0, time_end_231333 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                        "main.segmap_intragroup_214919",
                                        (long) nest_sizze_202575, (long) 1,
                                        (long) 1, (long) q_l_196697, (long) 1,
                                        (long) 1, (int) (0 +
                                                         (shared_sizze_231334 +
                                                          (8 -
                                                           shared_sizze_231334 %
                                                           8) % 8) +
                                                         (shared_sizze_231336 +
                                                          (8 -
                                                           shared_sizze_231336 %
                                                           8) % 8) +
                                                         (shared_sizze_231338 +
                                                          (8 -
                                                           shared_sizze_231338 %
                                                           8) % 8) +
                                                         (shared_sizze_231340 +
                                                          (8 -
                                                           shared_sizze_231340 %
                                                           8) % 8) +
                                                         (shared_sizze_231342 +
                                                          (8 -
                                                           shared_sizze_231342 %
                                                           8) % 8) +
                                                         (shared_sizze_231344 +
                                                          (8 -
                                                           shared_sizze_231344 %
                                                           8) % 8) +
                                                         (shared_sizze_231346 +
                                                          (8 -
                                                           shared_sizze_231346 %
                                                           8) % 8)));
                                time_start_231332 = get_wall_time();
                            }
                            
                            cudaEvent_t *pevents = NULL;
                            
                            if (ctx->profiling && !ctx->profiling_paused) {
                                pevents = cuda_get_events(&ctx->cuda,
                                                          &ctx->mainzisegmap_intragroup_214919_runs,
                                                          &ctx->mainzisegmap_intragroup_214919_total_runtime);
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                   0));
                            }
                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_intragroup_214919,
                                                                  grid[0],
                                                                  grid[1],
                                                                  grid[2],
                                                                  q_l_196697, 1,
                                                                  1, 0 +
                                                                  (shared_sizze_231334 +
                                                                   (8 -
                                                                    shared_sizze_231334 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231336 +
                                                                   (8 -
                                                                    shared_sizze_231336 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231338 +
                                                                   (8 -
                                                                    shared_sizze_231338 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231340 +
                                                                   (8 -
                                                                    shared_sizze_231340 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231342 +
                                                                   (8 -
                                                                    shared_sizze_231342 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231344 +
                                                                   (8 -
                                                                    shared_sizze_231344 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231346 +
                                                                   (8 -
                                                                    shared_sizze_231346 %
                                                                    8) % 8),
                                                                  NULL,
                                                                  kernel_args_231331,
                                                                  NULL));
                            if (pevents != NULL)
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                   0));
                            if (ctx->debugging) {
                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                time_end_231333 = get_wall_time();
                                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                        "main.segmap_intragroup_214919",
                                        time_end_231333 - time_start_231332);
                            }
                        }
                        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");
                        
                        unsigned int shared_sizze_231357 = (int64_t) 4 *
                                     q_l_196697;
                        unsigned int shared_sizze_231359 = (int64_t) 4 *
                                     q_l_196697;
                        unsigned int shared_sizze_231361 = (int64_t) 4 *
                                     q_l_196697;
                        unsigned int shared_sizze_231363 = (int64_t) 4 *
                                     q_l_196697;
                        unsigned int shared_sizze_231365 = (int64_t) 4 *
                                     q_l_196697;
                        unsigned int shared_sizze_231367 = (int64_t) 4 *
                                     q_l_196697;
                        unsigned int shared_sizze_231369 = (int64_t) 4 *
                                     q_l_196697;
                        unsigned int shared_sizze_231371 = bytes_223912;
                        unsigned int shared_sizze_231373 = bytes_223912;
                        unsigned int shared_sizze_231375 = bytes_223912;
                        unsigned int shared_sizze_231377 = bytes_223912;
                        CUdeviceptr kernel_arg_231379 = ext_mem_222468.mem;
                        CUdeviceptr kernel_arg_231380 = ext_mem_222469.mem;
                        CUdeviceptr kernel_arg_231381 = mem_param_222550.mem;
                        CUdeviceptr kernel_arg_231382 = mem_223608.mem;
                        CUdeviceptr kernel_arg_231383 = mem_223955.mem;
                        CUdeviceptr kernel_arg_231384 = mem_223959.mem;
                        unsigned int shared_offset_231358 = 0;
                        unsigned int shared_offset_231360 = 0 +
                                     (shared_sizze_231357 + (8 -
                                                             shared_sizze_231357 %
                                                             8) % 8);
                        unsigned int shared_offset_231362 = 0 +
                                     (shared_sizze_231357 + (8 -
                                                             shared_sizze_231357 %
                                                             8) % 8) +
                                     (shared_sizze_231359 + (8 -
                                                             shared_sizze_231359 %
                                                             8) % 8);
                        unsigned int shared_offset_231364 = 0 +
                                     (shared_sizze_231357 + (8 -
                                                             shared_sizze_231357 %
                                                             8) % 8) +
                                     (shared_sizze_231359 + (8 -
                                                             shared_sizze_231359 %
                                                             8) % 8) +
                                     (shared_sizze_231361 + (8 -
                                                             shared_sizze_231361 %
                                                             8) % 8);
                        unsigned int shared_offset_231366 = 0 +
                                     (shared_sizze_231357 + (8 -
                                                             shared_sizze_231357 %
                                                             8) % 8) +
                                     (shared_sizze_231359 + (8 -
                                                             shared_sizze_231359 %
                                                             8) % 8) +
                                     (shared_sizze_231361 + (8 -
                                                             shared_sizze_231361 %
                                                             8) % 8) +
                                     (shared_sizze_231363 + (8 -
                                                             shared_sizze_231363 %
                                                             8) % 8);
                        unsigned int shared_offset_231368 = 0 +
                                     (shared_sizze_231357 + (8 -
                                                             shared_sizze_231357 %
                                                             8) % 8) +
                                     (shared_sizze_231359 + (8 -
                                                             shared_sizze_231359 %
                                                             8) % 8) +
                                     (shared_sizze_231361 + (8 -
                                                             shared_sizze_231361 %
                                                             8) % 8) +
                                     (shared_sizze_231363 + (8 -
                                                             shared_sizze_231363 %
                                                             8) % 8) +
                                     (shared_sizze_231365 + (8 -
                                                             shared_sizze_231365 %
                                                             8) % 8);
                        unsigned int shared_offset_231370 = 0 +
                                     (shared_sizze_231357 + (8 -
                                                             shared_sizze_231357 %
                                                             8) % 8) +
                                     (shared_sizze_231359 + (8 -
                                                             shared_sizze_231359 %
                                                             8) % 8) +
                                     (shared_sizze_231361 + (8 -
                                                             shared_sizze_231361 %
                                                             8) % 8) +
                                     (shared_sizze_231363 + (8 -
                                                             shared_sizze_231363 %
                                                             8) % 8) +
                                     (shared_sizze_231365 + (8 -
                                                             shared_sizze_231365 %
                                                             8) % 8) +
                                     (shared_sizze_231367 + (8 -
                                                             shared_sizze_231367 %
                                                             8) % 8);
                        unsigned int shared_offset_231372 = 0 +
                                     (shared_sizze_231357 + (8 -
                                                             shared_sizze_231357 %
                                                             8) % 8) +
                                     (shared_sizze_231359 + (8 -
                                                             shared_sizze_231359 %
                                                             8) % 8) +
                                     (shared_sizze_231361 + (8 -
                                                             shared_sizze_231361 %
                                                             8) % 8) +
                                     (shared_sizze_231363 + (8 -
                                                             shared_sizze_231363 %
                                                             8) % 8) +
                                     (shared_sizze_231365 + (8 -
                                                             shared_sizze_231365 %
                                                             8) % 8) +
                                     (shared_sizze_231367 + (8 -
                                                             shared_sizze_231367 %
                                                             8) % 8) +
                                     (shared_sizze_231369 + (8 -
                                                             shared_sizze_231369 %
                                                             8) % 8);
                        unsigned int shared_offset_231374 = 0 +
                                     (shared_sizze_231357 + (8 -
                                                             shared_sizze_231357 %
                                                             8) % 8) +
                                     (shared_sizze_231359 + (8 -
                                                             shared_sizze_231359 %
                                                             8) % 8) +
                                     (shared_sizze_231361 + (8 -
                                                             shared_sizze_231361 %
                                                             8) % 8) +
                                     (shared_sizze_231363 + (8 -
                                                             shared_sizze_231363 %
                                                             8) % 8) +
                                     (shared_sizze_231365 + (8 -
                                                             shared_sizze_231365 %
                                                             8) % 8) +
                                     (shared_sizze_231367 + (8 -
                                                             shared_sizze_231367 %
                                                             8) % 8) +
                                     (shared_sizze_231369 + (8 -
                                                             shared_sizze_231369 %
                                                             8) % 8) +
                                     (shared_sizze_231371 + (8 -
                                                             shared_sizze_231371 %
                                                             8) % 8);
                        unsigned int shared_offset_231376 = 0 +
                                     (shared_sizze_231357 + (8 -
                                                             shared_sizze_231357 %
                                                             8) % 8) +
                                     (shared_sizze_231359 + (8 -
                                                             shared_sizze_231359 %
                                                             8) % 8) +
                                     (shared_sizze_231361 + (8 -
                                                             shared_sizze_231361 %
                                                             8) % 8) +
                                     (shared_sizze_231363 + (8 -
                                                             shared_sizze_231363 %
                                                             8) % 8) +
                                     (shared_sizze_231365 + (8 -
                                                             shared_sizze_231365 %
                                                             8) % 8) +
                                     (shared_sizze_231367 + (8 -
                                                             shared_sizze_231367 %
                                                             8) % 8) +
                                     (shared_sizze_231369 + (8 -
                                                             shared_sizze_231369 %
                                                             8) % 8) +
                                     (shared_sizze_231371 + (8 -
                                                             shared_sizze_231371 %
                                                             8) % 8) +
                                     (shared_sizze_231373 + (8 -
                                                             shared_sizze_231373 %
                                                             8) % 8);
                        unsigned int shared_offset_231378 = 0 +
                                     (shared_sizze_231357 + (8 -
                                                             shared_sizze_231357 %
                                                             8) % 8) +
                                     (shared_sizze_231359 + (8 -
                                                             shared_sizze_231359 %
                                                             8) % 8) +
                                     (shared_sizze_231361 + (8 -
                                                             shared_sizze_231361 %
                                                             8) % 8) +
                                     (shared_sizze_231363 + (8 -
                                                             shared_sizze_231363 %
                                                             8) % 8) +
                                     (shared_sizze_231365 + (8 -
                                                             shared_sizze_231365 %
                                                             8) % 8) +
                                     (shared_sizze_231367 + (8 -
                                                             shared_sizze_231367 %
                                                             8) % 8) +
                                     (shared_sizze_231369 + (8 -
                                                             shared_sizze_231369 %
                                                             8) % 8) +
                                     (shared_sizze_231371 + (8 -
                                                             shared_sizze_231371 %
                                                             8) % 8) +
                                     (shared_sizze_231373 + (8 -
                                                             shared_sizze_231373 %
                                                             8) % 8) +
                                     (shared_sizze_231375 + (8 -
                                                             shared_sizze_231375 %
                                                             8) % 8);
                        
                        if ((((((1 && nest_sizze_202575 != 0) && 1 != 0) && 1 !=
                               0) && q_l_196697 != 0) && 1 != 0) && 1 != 0) {
                            int perm[3] = {0, 1, 2};
                            
                            if (1 >= 1 << 16) {
                                perm[1] = perm[0];
                                perm[0] = 1;
                            }
                            if (1 >= 1 << 16) {
                                perm[2] = perm[0];
                                perm[0] = 2;
                            }
                            
                            size_t grid[3];
                            
                            grid[perm[0]] = nest_sizze_202575;
                            grid[perm[1]] = 1;
                            grid[perm[2]] = 1;
                            
                            void *kernel_args_231354[] = {&ctx->global_failure,
                                                          &shared_offset_231358,
                                                          &shared_offset_231360,
                                                          &shared_offset_231362,
                                                          &shared_offset_231364,
                                                          &shared_offset_231366,
                                                          &shared_offset_231368,
                                                          &shared_offset_231370,
                                                          &shared_offset_231372,
                                                          &shared_offset_231374,
                                                          &shared_offset_231376,
                                                          &shared_offset_231378,
                                                          &m_196691, &n_196692,
                                                          &q_l_196697,
                                                          &jump_t_196702,
                                                          &l_n_m_196752,
                                                          &i_196779,
                                                          &ctx_param_ext_222545,
                                                          &ctx_param_ext_222546,
                                                          &ctx_param_ext_222548,
                                                          &kernel_arg_231379,
                                                          &kernel_arg_231380,
                                                          &kernel_arg_231381,
                                                          &kernel_arg_231382,
                                                          &kernel_arg_231383,
                                                          &kernel_arg_231384};
                            int64_t time_start_231355 = 0, time_end_231356 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                        "main.segmap_intragroup_215176",
                                        (long) nest_sizze_202575, (long) 1,
                                        (long) 1, (long) q_l_196697, (long) 1,
                                        (long) 1, (int) (0 +
                                                         (shared_sizze_231357 +
                                                          (8 -
                                                           shared_sizze_231357 %
                                                           8) % 8) +
                                                         (shared_sizze_231359 +
                                                          (8 -
                                                           shared_sizze_231359 %
                                                           8) % 8) +
                                                         (shared_sizze_231361 +
                                                          (8 -
                                                           shared_sizze_231361 %
                                                           8) % 8) +
                                                         (shared_sizze_231363 +
                                                          (8 -
                                                           shared_sizze_231363 %
                                                           8) % 8) +
                                                         (shared_sizze_231365 +
                                                          (8 -
                                                           shared_sizze_231365 %
                                                           8) % 8) +
                                                         (shared_sizze_231367 +
                                                          (8 -
                                                           shared_sizze_231367 %
                                                           8) % 8) +
                                                         (shared_sizze_231369 +
                                                          (8 -
                                                           shared_sizze_231369 %
                                                           8) % 8) +
                                                         (shared_sizze_231371 +
                                                          (8 -
                                                           shared_sizze_231371 %
                                                           8) % 8) +
                                                         (shared_sizze_231373 +
                                                          (8 -
                                                           shared_sizze_231373 %
                                                           8) % 8) +
                                                         (shared_sizze_231375 +
                                                          (8 -
                                                           shared_sizze_231375 %
                                                           8) % 8) +
                                                         (shared_sizze_231377 +
                                                          (8 -
                                                           shared_sizze_231377 %
                                                           8) % 8)));
                                time_start_231355 = get_wall_time();
                            }
                            
                            cudaEvent_t *pevents = NULL;
                            
                            if (ctx->profiling && !ctx->profiling_paused) {
                                pevents = cuda_get_events(&ctx->cuda,
                                                          &ctx->mainzisegmap_intragroup_215176_runs,
                                                          &ctx->mainzisegmap_intragroup_215176_total_runtime);
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                   0));
                            }
                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_intragroup_215176,
                                                                  grid[0],
                                                                  grid[1],
                                                                  grid[2],
                                                                  q_l_196697, 1,
                                                                  1, 0 +
                                                                  (shared_sizze_231357 +
                                                                   (8 -
                                                                    shared_sizze_231357 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231359 +
                                                                   (8 -
                                                                    shared_sizze_231359 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231361 +
                                                                   (8 -
                                                                    shared_sizze_231361 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231363 +
                                                                   (8 -
                                                                    shared_sizze_231363 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231365 +
                                                                   (8 -
                                                                    shared_sizze_231365 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231367 +
                                                                   (8 -
                                                                    shared_sizze_231367 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231369 +
                                                                   (8 -
                                                                    shared_sizze_231369 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231371 +
                                                                   (8 -
                                                                    shared_sizze_231371 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231373 +
                                                                   (8 -
                                                                    shared_sizze_231373 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231375 +
                                                                   (8 -
                                                                    shared_sizze_231375 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231377 +
                                                                   (8 -
                                                                    shared_sizze_231377 %
                                                                    8) % 8),
                                                                  NULL,
                                                                  kernel_args_231354,
                                                                  NULL));
                            if (pevents != NULL)
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                   0));
                            if (ctx->debugging) {
                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                time_end_231356 = get_wall_time();
                                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                        "main.segmap_intragroup_215176",
                                        time_end_231356 - time_start_231355);
                            }
                        }
                        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");
                
                CUdeviceptr kernel_arg_231388 = ext_mem_223964.mem;
                CUdeviceptr kernel_arg_231389 = ext_mem_223965.mem;
                CUdeviceptr kernel_arg_231390 = mem_223970.mem;
                
                if ((((((1 && segmap_usable_groups_215428 != 0) && 1 != 0) &&
                       1 != 0) && segmap_group_sizze_215427 != 0) && 1 != 0) &&
                    1 != 0) {
                    int perm[3] = {0, 1, 2};
                    
                    if (1 >= 1 << 16) {
                        perm[1] = perm[0];
                        perm[0] = 1;
                    }
                    if (1 >= 1 << 16) {
                        perm[2] = perm[0];
                        perm[0] = 2;
                    }
                    
                    size_t grid[3];
                    
                    grid[perm[0]] = segmap_usable_groups_215428;
                    grid[perm[1]] = 1;
                    grid[perm[2]] = 1;
                    
                    void *kernel_args_231385[] = {&ctx->global_failure,
                                                  &ctx->failure_is_an_option,
                                                  &ctx->global_failure_args,
                                                  &m_196691, &n_196692,
                                                  &jump_l_196703, &l_n_m_196752,
                                                  &i_196779, &y_198899,
                                                  &kernel_arg_231388,
                                                  &kernel_arg_231389,
                                                  &kernel_arg_231390};
                    int64_t time_start_231386 = 0, time_end_231387 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                "main.segmap_215432",
                                (long) segmap_usable_groups_215428, (long) 1,
                                (long) 1, (long) segmap_group_sizze_215427,
                                (long) 1, (long) 1, (int) 0);
                        time_start_231386 = get_wall_time();
                    }
                    
                    cudaEvent_t *pevents = NULL;
                    
                    if (ctx->profiling && !ctx->profiling_paused) {
                        pevents = cuda_get_events(&ctx->cuda,
                                                  &ctx->mainzisegmap_215432_runs,
                                                  &ctx->mainzisegmap_215432_total_runtime);
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                    }
                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_215432,
                                                          grid[0], grid[1],
                                                          grid[2],
                                                          segmap_group_sizze_215427,
                                                          1, 1, 0, NULL,
                                                          kernel_args_231385,
                                                          NULL));
                    if (pevents != NULL)
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                    if (ctx->debugging) {
                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                        time_end_231387 = get_wall_time();
                        fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                "main.segmap_215432", time_end_231387 -
                                time_start_231386);
                    }
                }
                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");
            
            CUdeviceptr kernel_arg_231394 = mem_223557.mem;
            CUdeviceptr kernel_arg_231395 = ext_mem_223971.mem;
            CUdeviceptr kernel_arg_231396 = mem_223977.mem;
            
            if ((((((1 && segmap_usable_groups_215523 != 0) && 1 != 0) && 1 !=
                   0) && segmap_group_sizze_215522 != 0) && 1 != 0) && 1 != 0) {
                int perm[3] = {0, 1, 2};
                
                if (1 >= 1 << 16) {
                    perm[1] = perm[0];
                    perm[0] = 1;
                }
                if (1 >= 1 << 16) {
                    perm[2] = perm[0];
                    perm[0] = 2;
                }
                
                size_t grid[3];
                
                grid[perm[0]] = segmap_usable_groups_215523;
                grid[perm[1]] = 1;
                grid[perm[2]] = 1;
                
                void *kernel_args_231391[] = {&ctx->global_failure, &m_196691,
                                              &n_196692, &n_p_196694,
                                              &C_len_196743, &ext_223972,
                                              &kernel_arg_231394,
                                              &kernel_arg_231395,
                                              &kernel_arg_231396};
                int64_t time_start_231392 = 0, time_end_231393 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                            "main.segmap_215527",
                            (long) segmap_usable_groups_215523, (long) 1,
                            (long) 1, (long) segmap_group_sizze_215522,
                            (long) 1, (long) 1, (int) 0);
                    time_start_231392 = get_wall_time();
                }
                
                cudaEvent_t *pevents = NULL;
                
                if (ctx->profiling && !ctx->profiling_paused) {
                    pevents = cuda_get_events(&ctx->cuda,
                                              &ctx->mainzisegmap_215527_runs,
                                              &ctx->mainzisegmap_215527_total_runtime);
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                }
                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_215527,
                                                      grid[0], grid[1], grid[2],
                                                      segmap_group_sizze_215522,
                                                      1, 1, 0, NULL,
                                                      kernel_args_231391,
                                                      NULL));
                if (pevents != NULL)
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                if (ctx->debugging) {
                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                    time_end_231393 = get_wall_time();
                    fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                            "main.segmap_215527", time_end_231393 -
                            time_start_231392);
                }
            }
            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_228518;
                    
                    max_num_groups_228518 =
                        *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_228518))));
                    
                    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_228519;
                    
                    max_num_groups_228519 =
                        *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_228519))));
                    
                    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_228520;
                    
                    max_num_groups_228520 =
                        *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_228520))));
                    
                    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_228739;
                    
                    local_memory_capacity_228739 = ctx->cuda.max_shared_memory;
                    if ((sle64((int64_t) 0,
                               sext_i32_i64(local_memory_capacity_228739)) &&
                         sle64((int64_t) 0,
                               sext_i32_i64(local_memory_capacity_228739))) &&
                        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_228524;
                        
                        group_sizze_228524 =
                            *ctx->tuning_params.mainzigroup_sizze_228524;
                        
                        int64_t num_groups_228525 = sdiv_up64(m_196691 *
                                                              n_196692,
                                                              group_sizze_228524);
                        CUdeviceptr kernel_arg_231400 = mem_param_222550.mem;
                        CUdeviceptr kernel_arg_231401 = mem_223999.mem;
                        
                        if ((((((1 && num_groups_228525 != 0) && 1 != 0) && 1 !=
                               0) && group_sizze_228524 != 0) && 1 != 0) && 1 !=
                            0) {
                            int perm[3] = {0, 1, 2};
                            
                            if (1 >= 1 << 16) {
                                perm[1] = perm[0];
                                perm[0] = 1;
                            }
                            if (1 >= 1 << 16) {
                                perm[2] = perm[0];
                                perm[0] = 2;
                            }
                            
                            size_t grid[3];
                            
                            grid[perm[0]] = num_groups_228525;
                            grid[perm[1]] = 1;
                            grid[perm[2]] = 1;
                            
                            void *kernel_args_231397[] = {&m_196691, &n_196692,
                                                          &ctx_param_ext_222545,
                                                          &ctx_param_ext_222546,
                                                          &ctx_param_ext_222548,
                                                          &kernel_arg_231400,
                                                          &kernel_arg_231401};
                            int64_t time_start_231398 = 0, time_end_231399 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                        "main.copy_228521",
                                        (long) num_groups_228525, (long) 1,
                                        (long) 1, (long) group_sizze_228524,
                                        (long) 1, (long) 1, (int) 0);
                                time_start_231398 = get_wall_time();
                            }
                            
                            cudaEvent_t *pevents = NULL;
                            
                            if (ctx->profiling && !ctx->profiling_paused) {
                                pevents = cuda_get_events(&ctx->cuda,
                                                          &ctx->mainzicopy_228521_runs,
                                                          &ctx->mainzicopy_228521_total_runtime);
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                   0));
                            }
                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzicopy_228521,
                                                                  grid[0],
                                                                  grid[1],
                                                                  grid[2],
                                                                  group_sizze_228524,
                                                                  1, 1, 0, NULL,
                                                                  kernel_args_231397,
                                                                  NULL));
                            if (pevents != NULL)
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                   0));
                            if (ctx->debugging) {
                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                time_end_231399 = get_wall_time();
                                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                        "main.copy_228521", time_end_231399 -
                                        time_start_231398);
                            }
                        }
                        
                        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");
                        
                        CUdeviceptr kernel_arg_231405 = ext_mem_222256.mem;
                        CUdeviceptr kernel_arg_231406 = mem_223984.mem;
                        CUdeviceptr kernel_arg_231407 = mem_223987.mem;
                        CUdeviceptr kernel_arg_231408 = mem_223990.mem;
                        CUdeviceptr kernel_arg_231409 = mem_223993.mem;
                        CUdeviceptr kernel_arg_231410 = mem_223996.mem;
                        CUdeviceptr kernel_arg_231411 = mem_223999.mem;
                        CUdeviceptr kernel_arg_231412 = mem_224063.mem;
                        CUdeviceptr kernel_arg_231413 = color_225087.mem;
                        CUdeviceptr kernel_arg_231414 = color_225088.mem;
                        CUdeviceptr kernel_arg_231415 = color_225089.mem;
                        
                        if ((((((1 && num_groups_215630 != 0) && 1 != 0) && 1 !=
                               0) && segmap_group_sizze_215629 != 0) && 1 !=
                             0) && 1 != 0) {
                            int perm[3] = {0, 1, 2};
                            
                            if (1 >= 1 << 16) {
                                perm[1] = perm[0];
                                perm[0] = 1;
                            }
                            if (1 >= 1 << 16) {
                                perm[2] = perm[0];
                                perm[0] = 2;
                            }
                            
                            size_t grid[3];
                            
                            grid[perm[0]] = num_groups_215630;
                            grid[perm[1]] = 1;
                            grid[perm[2]] = 1;
                            
                            void *kernel_args_231402[] = {&ctx->global_failure,
                                                          &ctx->failure_is_an_option,
                                                          &ctx->global_failure_args,
                                                          &m_196691, &n_196692,
                                                          &q_t_196696,
                                                          &jump_t_196702,
                                                          &t_n_m_196759,
                                                          &i_196779,
                                                          &num_groups_215630,
                                                          &num_threads_225226,
                                                          &kernel_arg_231405,
                                                          &kernel_arg_231406,
                                                          &kernel_arg_231407,
                                                          &kernel_arg_231408,
                                                          &kernel_arg_231409,
                                                          &kernel_arg_231410,
                                                          &kernel_arg_231411,
                                                          &kernel_arg_231412,
                                                          &kernel_arg_231413,
                                                          &kernel_arg_231414,
                                                          &kernel_arg_231415};
                            int64_t time_start_231403 = 0, time_end_231404 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                        "main.segmap_215634",
                                        (long) num_groups_215630, (long) 1,
                                        (long) 1,
                                        (long) segmap_group_sizze_215629,
                                        (long) 1, (long) 1, (int) 0);
                                time_start_231403 = get_wall_time();
                            }
                            
                            cudaEvent_t *pevents = NULL;
                            
                            if (ctx->profiling && !ctx->profiling_paused) {
                                pevents = cuda_get_events(&ctx->cuda,
                                                          &ctx->mainzisegmap_215634_runs,
                                                          &ctx->mainzisegmap_215634_total_runtime);
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                   0));
                            }
                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_215634,
                                                                  grid[0],
                                                                  grid[1],
                                                                  grid[2],
                                                                  segmap_group_sizze_215629,
                                                                  1, 1, 0, NULL,
                                                                  kernel_args_231402,
                                                                  NULL));
                            if (pevents != NULL)
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                   0));
                            if (ctx->debugging) {
                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                time_end_231404 = get_wall_time();
                                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                        "main.segmap_215634", time_end_231404 -
                                        time_start_231403);
                            }
                        }
                        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");
                        
                        CUdeviceptr kernel_arg_231419 = Y_mem_222225.mem;
                        CUdeviceptr kernel_arg_231420 = mem_223977.mem;
                        CUdeviceptr kernel_arg_231421 = mem_224068.mem;
                        
                        if ((((((1 && segmap_usable_groups_216146 != 0) && 1 !=
                                0) && 1 != 0) && segmap_group_sizze_216145 !=
                              0) && 1 != 0) && 1 != 0) {
                            int perm[3] = {0, 1, 2};
                            
                            if (1 >= 1 << 16) {
                                perm[1] = perm[0];
                                perm[0] = 1;
                            }
                            if (1 >= 1 << 16) {
                                perm[2] = perm[0];
                                perm[0] = 2;
                            }
                            
                            size_t grid[3];
                            
                            grid[perm[0]] = segmap_usable_groups_216146;
                            grid[perm[1]] = 1;
                            grid[perm[2]] = 1;
                            
                            void *kernel_args_231416[] = {&ctx->global_failure,
                                                          &m_196691, &n_196692,
                                                          &kernel_arg_231419,
                                                          &kernel_arg_231420,
                                                          &kernel_arg_231421};
                            int64_t time_start_231417 = 0, time_end_231418 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                        "main.segmap_216150",
                                        (long) segmap_usable_groups_216146,
                                        (long) 1, (long) 1,
                                        (long) segmap_group_sizze_216145,
                                        (long) 1, (long) 1, (int) 0);
                                time_start_231417 = get_wall_time();
                            }
                            
                            cudaEvent_t *pevents = NULL;
                            
                            if (ctx->profiling && !ctx->profiling_paused) {
                                pevents = cuda_get_events(&ctx->cuda,
                                                          &ctx->mainzisegmap_216150_runs,
                                                          &ctx->mainzisegmap_216150_total_runtime);
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                   0));
                            }
                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_216150,
                                                                  grid[0],
                                                                  grid[1],
                                                                  grid[2],
                                                                  segmap_group_sizze_216145,
                                                                  1, 1, 0, NULL,
                                                                  kernel_args_231416,
                                                                  NULL));
                            if (pevents != NULL)
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                   0));
                            if (ctx->debugging) {
                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                time_end_231418 = get_wall_time();
                                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                        "main.segmap_216150", time_end_231418 -
                                        time_start_231417);
                            }
                        }
                        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");
                        
                        CUdeviceptr kernel_arg_231425 = ext_mem_222257.mem;
                        CUdeviceptr kernel_arg_231426 = mem_param_222550.mem;
                        CUdeviceptr kernel_arg_231427 = mem_224068.mem;
                        CUdeviceptr kernel_arg_231428 = mem_224073.mem;
                        CUdeviceptr kernel_arg_231429 = mem_224077.mem;
                        
                        if ((((((1 && segmap_usable_groups_216162 != 0) && 1 !=
                                0) && 1 != 0) && segmap_group_sizze_216161 !=
                              0) && 1 != 0) && 1 != 0) {
                            int perm[3] = {0, 1, 2};
                            
                            if (1 >= 1 << 16) {
                                perm[1] = perm[0];
                                perm[0] = 1;
                            }
                            if (1 >= 1 << 16) {
                                perm[2] = perm[0];
                                perm[0] = 2;
                            }
                            
                            size_t grid[3];
                            
                            grid[perm[0]] = segmap_usable_groups_216162;
                            grid[perm[1]] = 1;
                            grid[perm[2]] = 1;
                            
                            void *kernel_args_231422[] = {&ctx->global_failure,
                                                          &ctx->failure_is_an_option,
                                                          &ctx->global_failure_args,
                                                          &m_196691, &n_196692,
                                                          &ctx_param_ext_222545,
                                                          &ctx_param_ext_222546,
                                                          &ctx_param_ext_222548,
                                                          &kernel_arg_231425,
                                                          &kernel_arg_231426,
                                                          &kernel_arg_231427,
                                                          &kernel_arg_231428,
                                                          &kernel_arg_231429};
                            int64_t time_start_231423 = 0, time_end_231424 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                        "main.segmap_216167",
                                        (long) segmap_usable_groups_216162,
                                        (long) 1, (long) 1,
                                        (long) segmap_group_sizze_216161,
                                        (long) 1, (long) 1, (int) 0);
                                time_start_231423 = get_wall_time();
                            }
                            
                            cudaEvent_t *pevents = NULL;
                            
                            if (ctx->profiling && !ctx->profiling_paused) {
                                pevents = cuda_get_events(&ctx->cuda,
                                                          &ctx->mainzisegmap_216167_runs,
                                                          &ctx->mainzisegmap_216167_total_runtime);
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                   0));
                            }
                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_216167,
                                                                  grid[0],
                                                                  grid[1],
                                                                  grid[2],
                                                                  segmap_group_sizze_216161,
                                                                  1, 1, 0, NULL,
                                                                  kernel_args_231422,
                                                                  NULL));
                            if (pevents != NULL)
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                   0));
                            if (ctx->debugging) {
                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                time_end_231424 = get_wall_time();
                                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                        "main.segmap_216167", time_end_231424 -
                                        time_start_231423);
                            }
                        }
                        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_228738;
                        
                        local_memory_capacity_228738 =
                            ctx->cuda.max_shared_memory;
                        if (sle64((int64_t) 0,
                                  sext_i32_i64(local_memory_capacity_228738)) &&
                            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");
                            
                            CUdeviceptr kernel_arg_231433 = ext_mem_222256.mem;
                            CUdeviceptr kernel_arg_231434 = ext_mem_222257.mem;
                            CUdeviceptr kernel_arg_231435 = ext_mem_222517.mem;
                            CUdeviceptr kernel_arg_231436 = ext_mem_222518.mem;
                            CUdeviceptr kernel_arg_231437 = mem_224073.mem;
                            CUdeviceptr kernel_arg_231438 = mem_224077.mem;
                            CUdeviceptr kernel_arg_231439 = mem_224082.mem;
                            
                            if ((((((1 && segmap_usable_groups_216187 != 0) &&
                                    1 != 0) && 1 != 0) &&
                                  segmap_group_sizze_216186 != 0) && 1 != 0) &&
                                1 != 0) {
                                int perm[3] = {0, 1, 2};
                                
                                if (1 >= 1 << 16) {
                                    perm[1] = perm[0];
                                    perm[0] = 1;
                                }
                                if (1 >= 1 << 16) {
                                    perm[2] = perm[0];
                                    perm[0] = 2;
                                }
                                
                                size_t grid[3];
                                
                                grid[perm[0]] = segmap_usable_groups_216187;
                                grid[perm[1]] = 1;
                                grid[perm[2]] = 1;
                                
                                void *kernel_args_231430[] =
                                     {&ctx->global_failure, &m_196691,
                                      &n_196692, &q_t_196696, &jump_t_196702,
                                      &t_n_m_196759, &i_196779,
                                      &kernel_arg_231433, &kernel_arg_231434,
                                      &kernel_arg_231435, &kernel_arg_231436,
                                      &kernel_arg_231437, &kernel_arg_231438,
                                      &kernel_arg_231439};
                                int64_t time_start_231431 = 0, time_end_231432 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                            "main.segmap_216195",
                                            (long) segmap_usable_groups_216187,
                                            (long) 1, (long) 1,
                                            (long) segmap_group_sizze_216186,
                                            (long) 1, (long) 1, (int) 0);
                                    time_start_231431 = get_wall_time();
                                }
                                
                                cudaEvent_t *pevents = NULL;
                                
                                if (ctx->profiling && !ctx->profiling_paused) {
                                    pevents = cuda_get_events(&ctx->cuda,
                                                              &ctx->mainzisegmap_216195_runs,
                                                              &ctx->mainzisegmap_216195_total_runtime);
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                       0));
                                }
                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_216195,
                                                                      grid[0],
                                                                      grid[1],
                                                                      grid[2],
                                                                      segmap_group_sizze_216186,
                                                                      1, 1, 0,
                                                                      NULL,
                                                                      kernel_args_231430,
                                                                      NULL));
                                if (pevents != NULL)
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                       0));
                                if (ctx->debugging) {
                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                    time_end_231432 = get_wall_time();
                                    fprintf(ctx->log,
                                            "Kernel %s runtime: %ldus\n",
                                            "main.segmap_216195",
                                            time_end_231432 -
                                            time_start_231431);
                                }
                            }
                            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_228584 =
                                        smax64((int64_t) 1, q_t_196696);
                                int64_t num_threads_228585 = 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_228584),
                                            '\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_228584))),
                                            '\n');
                                
                                unsigned int shared_sizze_231443 = (int64_t) 4 *
                                             segred_group_sizze_216273;
                                CUdeviceptr kernel_arg_231445 =
                                            ext_mem_222256.mem;
                                CUdeviceptr kernel_arg_231446 =
                                            ext_mem_222257.mem;
                                CUdeviceptr kernel_arg_231447 =
                                            ext_mem_222517.mem;
                                CUdeviceptr kernel_arg_231448 =
                                            ext_mem_222518.mem;
                                CUdeviceptr kernel_arg_231449 = mem_224073.mem;
                                CUdeviceptr kernel_arg_231450 = mem_224087.mem;
                                unsigned int shared_offset_231444 = 0;
                                
                                if ((((((1 && num_groups_216274 != 0) && 1 !=
                                        0) && 1 != 0) &&
                                      segred_group_sizze_216273 != 0) && 1 !=
                                     0) && 1 != 0) {
                                    int perm[3] = {0, 1, 2};
                                    
                                    if (1 >= 1 << 16) {
                                        perm[1] = perm[0];
                                        perm[0] = 1;
                                    }
                                    if (1 >= 1 << 16) {
                                        perm[2] = perm[0];
                                        perm[0] = 2;
                                    }
                                    
                                    size_t grid[3];
                                    
                                    grid[perm[0]] = num_groups_216274;
                                    grid[perm[1]] = 1;
                                    grid[perm[2]] = 1;
                                    
                                    void *kernel_args_231440[] =
                                         {&ctx->global_failure,
                                          &shared_offset_231444, &m_196691,
                                          &n_196692, &q_t_196696,
                                          &jump_t_196702, &t_n_m_196759,
                                          &i_196779, &num_groups_216274,
                                          &segment_sizze_nonzzero_228584,
                                          &kernel_arg_231445,
                                          &kernel_arg_231446,
                                          &kernel_arg_231447,
                                          &kernel_arg_231448,
                                          &kernel_arg_231449,
                                          &kernel_arg_231450};
                                    int64_t time_start_231441 = 0,
                                            time_end_231442 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                "main.segred_small_216280",
                                                (long) num_groups_216274,
                                                (long) 1, (long) 1,
                                                (long) segred_group_sizze_216273,
                                                (long) 1, (long) 1, (int) (0 +
                                                                           (shared_sizze_231443 +
                                                                            (8 -
                                                                             shared_sizze_231443 %
                                                                             8) %
                                                                            8)));
                                        time_start_231441 = get_wall_time();
                                    }
                                    
                                    cudaEvent_t *pevents = NULL;
                                    
                                    if (ctx->profiling &&
                                        !ctx->profiling_paused) {
                                        pevents = cuda_get_events(&ctx->cuda,
                                                                  &ctx->mainzisegred_small_216280_runs,
                                                                  &ctx->mainzisegred_small_216280_total_runtime);
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                           0));
                                    }
                                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_small_216280,
                                                                          grid[0],
                                                                          grid[1],
                                                                          grid[2],
                                                                          segred_group_sizze_216273,
                                                                          1, 1,
                                                                          0 +
                                                                          (shared_sizze_231443 +
                                                                           (8 -
                                                                            shared_sizze_231443 %
                                                                            8) %
                                                                           8),
                                                                          NULL,
                                                                          kernel_args_231440,
                                                                          NULL));
                                    if (pevents != NULL)
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                           0));
                                    if (ctx->debugging) {
                                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                        time_end_231442 = get_wall_time();
                                        fprintf(ctx->log,
                                                "Kernel %s runtime: %ldus\n",
                                                "main.segred_small_216280",
                                                time_end_231442 -
                                                time_start_231441);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                            } else {
                                int64_t groups_per_segment_228613 =
                                        sdiv_up64(num_groups_216274,
                                                  smax64((int64_t) 1, m_196691 *
                                                         t_n_m_196759));
                                int64_t elements_per_thread_228614 =
                                        sdiv_up64(q_t_196696,
                                                  segred_group_sizze_216273 *
                                                  groups_per_segment_228613);
                                int64_t virt_num_groups_228615 =
                                        groups_per_segment_228613 * (m_196691 *
                                                                     t_n_m_196759);
                                int64_t num_threads_228616 = num_groups_216274 *
                                        segred_group_sizze_216273;
                                int64_t threads_per_segment_228617 =
                                        groups_per_segment_228613 *
                                        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_228615,
                                            '\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_228614,
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "groups_per_segment",
                                            (long long) groups_per_segment_228613,
                                            '\n');
                                
                                struct memblock_device segred_tmp_mem_228618;
                                
                                segred_tmp_mem_228618.references = NULL;
                                if (memblock_alloc_device(ctx,
                                                          &segred_tmp_mem_228618,
                                                          (int64_t) 4 *
                                                          virt_num_groups_228615,
                                                          "segred_tmp_mem_228618")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mainzicounter_mem_228620
                                                       =
                                                       ctx->mainzicounter_mem_228620;
                                unsigned int shared_sizze_231455 = 1;
                                unsigned int shared_sizze_231457 = (int64_t) 4 *
                                             segred_group_sizze_216273;
                                CUdeviceptr kernel_arg_231459 =
                                            ext_mem_222256.mem;
                                CUdeviceptr kernel_arg_231460 =
                                            ext_mem_222257.mem;
                                CUdeviceptr kernel_arg_231461 =
                                            ext_mem_222517.mem;
                                CUdeviceptr kernel_arg_231462 =
                                            ext_mem_222518.mem;
                                CUdeviceptr kernel_arg_231463 = mem_224073.mem;
                                CUdeviceptr kernel_arg_231464 = mem_224087.mem;
                                CUdeviceptr kernel_arg_231465 =
                                            segred_tmp_mem_228618.mem;
                                CUdeviceptr kernel_arg_231466 =
                                            mainzicounter_mem_228620.mem;
                                unsigned int shared_offset_231456 = 0;
                                unsigned int shared_offset_231458 = 0 +
                                             (shared_sizze_231455 + (8 -
                                                                     shared_sizze_231455 %
                                                                     8) % 8);
                                
                                if ((((((1 && num_groups_216274 != 0) && 1 !=
                                        0) && 1 != 0) &&
                                      segred_group_sizze_216273 != 0) && 1 !=
                                     0) && 1 != 0) {
                                    int perm[3] = {0, 1, 2};
                                    
                                    if (1 >= 1 << 16) {
                                        perm[1] = perm[0];
                                        perm[0] = 1;
                                    }
                                    if (1 >= 1 << 16) {
                                        perm[2] = perm[0];
                                        perm[0] = 2;
                                    }
                                    
                                    size_t grid[3];
                                    
                                    grid[perm[0]] = num_groups_216274;
                                    grid[perm[1]] = 1;
                                    grid[perm[2]] = 1;
                                    
                                    void *kernel_args_231452[] =
                                         {&ctx->global_failure,
                                          &shared_offset_231456,
                                          &shared_offset_231458, &m_196691,
                                          &n_196692, &q_t_196696,
                                          &jump_t_196702, &t_n_m_196759,
                                          &i_196779, &num_groups_216274,
                                          &groups_per_segment_228613,
                                          &elements_per_thread_228614,
                                          &virt_num_groups_228615,
                                          &threads_per_segment_228617,
                                          &kernel_arg_231459,
                                          &kernel_arg_231460,
                                          &kernel_arg_231461,
                                          &kernel_arg_231462,
                                          &kernel_arg_231463,
                                          &kernel_arg_231464,
                                          &kernel_arg_231465,
                                          &kernel_arg_231466};
                                    int64_t time_start_231453 = 0,
                                            time_end_231454 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                "main.segred_large_216280",
                                                (long) num_groups_216274,
                                                (long) 1, (long) 1,
                                                (long) segred_group_sizze_216273,
                                                (long) 1, (long) 1, (int) (0 +
                                                                           (shared_sizze_231455 +
                                                                            (8 -
                                                                             shared_sizze_231455 %
                                                                             8) %
                                                                            8) +
                                                                           (shared_sizze_231457 +
                                                                            (8 -
                                                                             shared_sizze_231457 %
                                                                             8) %
                                                                            8)));
                                        time_start_231453 = get_wall_time();
                                    }
                                    
                                    cudaEvent_t *pevents = NULL;
                                    
                                    if (ctx->profiling &&
                                        !ctx->profiling_paused) {
                                        pevents = cuda_get_events(&ctx->cuda,
                                                                  &ctx->mainzisegred_large_216280_runs,
                                                                  &ctx->mainzisegred_large_216280_total_runtime);
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                           0));
                                    }
                                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_large_216280,
                                                                          grid[0],
                                                                          grid[1],
                                                                          grid[2],
                                                                          segred_group_sizze_216273,
                                                                          1, 1,
                                                                          0 +
                                                                          (shared_sizze_231455 +
                                                                           (8 -
                                                                            shared_sizze_231455 %
                                                                            8) %
                                                                           8) +
                                                                          (shared_sizze_231457 +
                                                                           (8 -
                                                                            shared_sizze_231457 %
                                                                            8) %
                                                                           8),
                                                                          NULL,
                                                                          kernel_args_231452,
                                                                          NULL));
                                    if (pevents != NULL)
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                           0));
                                    if (ctx->debugging) {
                                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                        time_end_231454 = get_wall_time();
                                        fprintf(ctx->log,
                                                "Kernel %s runtime: %ldus\n",
                                                "main.segred_large_216280",
                                                time_end_231454 -
                                                time_start_231453);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                                if (memblock_unref_device(ctx,
                                                          &segred_tmp_mem_228618,
                                                          "segred_tmp_mem_228618") !=
                                    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");
                            
                            CUdeviceptr kernel_arg_231470 = mem_224087.mem;
                            CUdeviceptr kernel_arg_231471 = mem_224092.mem;
                            
                            if ((((((1 && segmap_usable_groups_216315 != 0) &&
                                    1 != 0) && 1 != 0) &&
                                  segmap_group_sizze_216314 != 0) && 1 != 0) &&
                                1 != 0) {
                                int perm[3] = {0, 1, 2};
                                
                                if (1 >= 1 << 16) {
                                    perm[1] = perm[0];
                                    perm[0] = 1;
                                }
                                if (1 >= 1 << 16) {
                                    perm[2] = perm[0];
                                    perm[0] = 2;
                                }
                                
                                size_t grid[3];
                                
                                grid[perm[0]] = segmap_usable_groups_216315;
                                grid[perm[1]] = 1;
                                grid[perm[2]] = 1;
                                
                                void *kernel_args_231467[] =
                                     {&ctx->global_failure, &m_196691,
                                      &t_n_m_196759, &kernel_arg_231470,
                                      &kernel_arg_231471};
                                int64_t time_start_231468 = 0, time_end_231469 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                            "main.segmap_216319",
                                            (long) segmap_usable_groups_216315,
                                            (long) 1, (long) 1,
                                            (long) segmap_group_sizze_216314,
                                            (long) 1, (long) 1, (int) 0);
                                    time_start_231468 = get_wall_time();
                                }
                                
                                cudaEvent_t *pevents = NULL;
                                
                                if (ctx->profiling && !ctx->profiling_paused) {
                                    pevents = cuda_get_events(&ctx->cuda,
                                                              &ctx->mainzisegmap_216319_runs,
                                                              &ctx->mainzisegmap_216319_total_runtime);
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                       0));
                                }
                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_216319,
                                                                      grid[0],
                                                                      grid[1],
                                                                      grid[2],
                                                                      segmap_group_sizze_216314,
                                                                      1, 1, 0,
                                                                      NULL,
                                                                      kernel_args_231467,
                                                                      NULL));
                                if (pevents != NULL)
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                       0));
                                if (ctx->debugging) {
                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                    time_end_231469 = get_wall_time();
                                    fprintf(ctx->log,
                                            "Kernel %s runtime: %ldus\n",
                                            "main.segmap_216319",
                                            time_end_231469 -
                                            time_start_231468);
                                }
                            }
                            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_228666 =
                                        smax64((int64_t) 1, q_t_196696);
                                int64_t num_threads_228667 = 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_228666),
                                            '\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_228666))),
                                            '\n');
                                
                                unsigned int shared_sizze_231475 = (int64_t) 4 *
                                             segred_group_sizze_216325;
                                CUdeviceptr kernel_arg_231477 =
                                            ext_mem_222256.mem;
                                CUdeviceptr kernel_arg_231478 =
                                            ext_mem_222257.mem;
                                CUdeviceptr kernel_arg_231479 =
                                            ext_mem_222517.mem;
                                CUdeviceptr kernel_arg_231480 =
                                            ext_mem_222518.mem;
                                CUdeviceptr kernel_arg_231481 = mem_224073.mem;
                                CUdeviceptr kernel_arg_231482 = mem_224077.mem;
                                CUdeviceptr kernel_arg_231483 = mem_224092.mem;
                                CUdeviceptr kernel_arg_231484 = mem_224097.mem;
                                unsigned int shared_offset_231476 = 0;
                                
                                if ((((((1 && num_groups_216326 != 0) && 1 !=
                                        0) && 1 != 0) &&
                                      segred_group_sizze_216325 != 0) && 1 !=
                                     0) && 1 != 0) {
                                    int perm[3] = {0, 1, 2};
                                    
                                    if (1 >= 1 << 16) {
                                        perm[1] = perm[0];
                                        perm[0] = 1;
                                    }
                                    if (1 >= 1 << 16) {
                                        perm[2] = perm[0];
                                        perm[0] = 2;
                                    }
                                    
                                    size_t grid[3];
                                    
                                    grid[perm[0]] = num_groups_216326;
                                    grid[perm[1]] = 1;
                                    grid[perm[2]] = 1;
                                    
                                    void *kernel_args_231472[] =
                                         {&ctx->global_failure,
                                          &shared_offset_231476, &m_196691,
                                          &n_196692, &q_t_196696,
                                          &jump_t_196702, &t_n_m_196759,
                                          &i_196779, &num_groups_216326,
                                          &segment_sizze_nonzzero_228666,
                                          &kernel_arg_231477,
                                          &kernel_arg_231478,
                                          &kernel_arg_231479,
                                          &kernel_arg_231480,
                                          &kernel_arg_231481,
                                          &kernel_arg_231482,
                                          &kernel_arg_231483,
                                          &kernel_arg_231484};
                                    int64_t time_start_231473 = 0,
                                            time_end_231474 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                "main.segred_small_216332",
                                                (long) num_groups_216326,
                                                (long) 1, (long) 1,
                                                (long) segred_group_sizze_216325,
                                                (long) 1, (long) 1, (int) (0 +
                                                                           (shared_sizze_231475 +
                                                                            (8 -
                                                                             shared_sizze_231475 %
                                                                             8) %
                                                                            8)));
                                        time_start_231473 = get_wall_time();
                                    }
                                    
                                    cudaEvent_t *pevents = NULL;
                                    
                                    if (ctx->profiling &&
                                        !ctx->profiling_paused) {
                                        pevents = cuda_get_events(&ctx->cuda,
                                                                  &ctx->mainzisegred_small_216332_runs,
                                                                  &ctx->mainzisegred_small_216332_total_runtime);
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                           0));
                                    }
                                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_small_216332,
                                                                          grid[0],
                                                                          grid[1],
                                                                          grid[2],
                                                                          segred_group_sizze_216325,
                                                                          1, 1,
                                                                          0 +
                                                                          (shared_sizze_231475 +
                                                                           (8 -
                                                                            shared_sizze_231475 %
                                                                            8) %
                                                                           8),
                                                                          NULL,
                                                                          kernel_args_231472,
                                                                          NULL));
                                    if (pevents != NULL)
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                           0));
                                    if (ctx->debugging) {
                                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                        time_end_231474 = get_wall_time();
                                        fprintf(ctx->log,
                                                "Kernel %s runtime: %ldus\n",
                                                "main.segred_small_216332",
                                                time_end_231474 -
                                                time_start_231473);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                            } else {
                                int64_t groups_per_segment_228695 =
                                        sdiv_up64(num_groups_216326,
                                                  smax64((int64_t) 1, m_196691 *
                                                         t_n_m_196759));
                                int64_t elements_per_thread_228696 =
                                        sdiv_up64(q_t_196696,
                                                  segred_group_sizze_216325 *
                                                  groups_per_segment_228695);
                                int64_t virt_num_groups_228697 =
                                        groups_per_segment_228695 * (m_196691 *
                                                                     t_n_m_196759);
                                int64_t num_threads_228698 = num_groups_216326 *
                                        segred_group_sizze_216325;
                                int64_t threads_per_segment_228699 =
                                        groups_per_segment_228695 *
                                        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_228697,
                                            '\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_228696,
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "groups_per_segment",
                                            (long long) groups_per_segment_228695,
                                            '\n');
                                
                                struct memblock_device segred_tmp_mem_228700;
                                
                                segred_tmp_mem_228700.references = NULL;
                                if (memblock_alloc_device(ctx,
                                                          &segred_tmp_mem_228700,
                                                          (int64_t) 4 *
                                                          virt_num_groups_228697,
                                                          "segred_tmp_mem_228700")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mainzicounter_mem_228702
                                                       =
                                                       ctx->mainzicounter_mem_228702;
                                unsigned int shared_sizze_231489 = 1;
                                unsigned int shared_sizze_231491 = (int64_t) 4 *
                                             segred_group_sizze_216325;
                                CUdeviceptr kernel_arg_231493 =
                                            ext_mem_222256.mem;
                                CUdeviceptr kernel_arg_231494 =
                                            ext_mem_222257.mem;
                                CUdeviceptr kernel_arg_231495 =
                                            ext_mem_222517.mem;
                                CUdeviceptr kernel_arg_231496 =
                                            ext_mem_222518.mem;
                                CUdeviceptr kernel_arg_231497 = mem_224073.mem;
                                CUdeviceptr kernel_arg_231498 = mem_224077.mem;
                                CUdeviceptr kernel_arg_231499 = mem_224092.mem;
                                CUdeviceptr kernel_arg_231500 = mem_224097.mem;
                                CUdeviceptr kernel_arg_231501 =
                                            segred_tmp_mem_228700.mem;
                                CUdeviceptr kernel_arg_231502 =
                                            mainzicounter_mem_228702.mem;
                                unsigned int shared_offset_231490 = 0;
                                unsigned int shared_offset_231492 = 0 +
                                             (shared_sizze_231489 + (8 -
                                                                     shared_sizze_231489 %
                                                                     8) % 8);
                                
                                if ((((((1 && num_groups_216326 != 0) && 1 !=
                                        0) && 1 != 0) &&
                                      segred_group_sizze_216325 != 0) && 1 !=
                                     0) && 1 != 0) {
                                    int perm[3] = {0, 1, 2};
                                    
                                    if (1 >= 1 << 16) {
                                        perm[1] = perm[0];
                                        perm[0] = 1;
                                    }
                                    if (1 >= 1 << 16) {
                                        perm[2] = perm[0];
                                        perm[0] = 2;
                                    }
                                    
                                    size_t grid[3];
                                    
                                    grid[perm[0]] = num_groups_216326;
                                    grid[perm[1]] = 1;
                                    grid[perm[2]] = 1;
                                    
                                    void *kernel_args_231486[] =
                                         {&ctx->global_failure,
                                          &shared_offset_231490,
                                          &shared_offset_231492, &m_196691,
                                          &n_196692, &q_t_196696,
                                          &jump_t_196702, &t_n_m_196759,
                                          &i_196779, &num_groups_216326,
                                          &groups_per_segment_228695,
                                          &elements_per_thread_228696,
                                          &virt_num_groups_228697,
                                          &threads_per_segment_228699,
                                          &kernel_arg_231493,
                                          &kernel_arg_231494,
                                          &kernel_arg_231495,
                                          &kernel_arg_231496,
                                          &kernel_arg_231497,
                                          &kernel_arg_231498,
                                          &kernel_arg_231499,
                                          &kernel_arg_231500,
                                          &kernel_arg_231501,
                                          &kernel_arg_231502};
                                    int64_t time_start_231487 = 0,
                                            time_end_231488 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                "main.segred_large_216332",
                                                (long) num_groups_216326,
                                                (long) 1, (long) 1,
                                                (long) segred_group_sizze_216325,
                                                (long) 1, (long) 1, (int) (0 +
                                                                           (shared_sizze_231489 +
                                                                            (8 -
                                                                             shared_sizze_231489 %
                                                                             8) %
                                                                            8) +
                                                                           (shared_sizze_231491 +
                                                                            (8 -
                                                                             shared_sizze_231491 %
                                                                             8) %
                                                                            8)));
                                        time_start_231487 = get_wall_time();
                                    }
                                    
                                    cudaEvent_t *pevents = NULL;
                                    
                                    if (ctx->profiling &&
                                        !ctx->profiling_paused) {
                                        pevents = cuda_get_events(&ctx->cuda,
                                                                  &ctx->mainzisegred_large_216332_runs,
                                                                  &ctx->mainzisegred_large_216332_total_runtime);
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                           0));
                                    }
                                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_large_216332,
                                                                          grid[0],
                                                                          grid[1],
                                                                          grid[2],
                                                                          segred_group_sizze_216325,
                                                                          1, 1,
                                                                          0 +
                                                                          (shared_sizze_231489 +
                                                                           (8 -
                                                                            shared_sizze_231489 %
                                                                            8) %
                                                                           8) +
                                                                          (shared_sizze_231491 +
                                                                           (8 -
                                                                            shared_sizze_231491 %
                                                                            8) %
                                                                           8),
                                                                          NULL,
                                                                          kernel_args_231486,
                                                                          NULL));
                                    if (pevents != NULL)
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                           0));
                                    if (ctx->debugging) {
                                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                        time_end_231488 = get_wall_time();
                                        fprintf(ctx->log,
                                                "Kernel %s runtime: %ldus\n",
                                                "main.segred_large_216332",
                                                time_end_231488 -
                                                time_start_231487);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                                if (memblock_unref_device(ctx,
                                                          &segred_tmp_mem_228700,
                                                          "segred_tmp_mem_228700") !=
                                    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_228740;
                        
                        max_num_groups_228740 =
                            *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_228740))));
                        
                        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_228741;
                        
                        max_num_groups_228741 =
                            *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_228741))));
                        
                        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_228742;
                        
                        max_num_groups_228742 =
                            *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_228742))));
                        
                        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_229012;
                        
                        local_memory_capacity_229012 =
                            ctx->cuda.max_shared_memory;
                        if ((sle64((int64_t) 0,
                                   sext_i32_i64(local_memory_capacity_229012)) &&
                             sle64((int64_t) 0,
                                   sext_i32_i64(local_memory_capacity_229012))) &&
                            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_228746;
                            
                            group_sizze_228746 =
                                *ctx->tuning_params.mainzigroup_sizze_228746;
                            
                            int64_t num_groups_228747 = sdiv_up64(m_196691 *
                                                                  n_196692,
                                                                  group_sizze_228746);
                            CUdeviceptr kernel_arg_231506 =
                                        mem_param_222550.mem;
                            CUdeviceptr kernel_arg_231507 = mem_224122.mem;
                            
                            if ((((((1 && num_groups_228747 != 0) && 1 != 0) &&
                                   1 != 0) && group_sizze_228746 != 0) && 1 !=
                                 0) && 1 != 0) {
                                int perm[3] = {0, 1, 2};
                                
                                if (1 >= 1 << 16) {
                                    perm[1] = perm[0];
                                    perm[0] = 1;
                                }
                                if (1 >= 1 << 16) {
                                    perm[2] = perm[0];
                                    perm[0] = 2;
                                }
                                
                                size_t grid[3];
                                
                                grid[perm[0]] = num_groups_228747;
                                grid[perm[1]] = 1;
                                grid[perm[2]] = 1;
                                
                                void *kernel_args_231503[] = {&m_196691,
                                                              &n_196692,
                                                              &ctx_param_ext_222545,
                                                              &ctx_param_ext_222546,
                                                              &ctx_param_ext_222548,
                                                              &kernel_arg_231506,
                                                              &kernel_arg_231507};
                                int64_t time_start_231504 = 0, time_end_231505 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                            "main.copy_228743",
                                            (long) num_groups_228747, (long) 1,
                                            (long) 1, (long) group_sizze_228746,
                                            (long) 1, (long) 1, (int) 0);
                                    time_start_231504 = get_wall_time();
                                }
                                
                                cudaEvent_t *pevents = NULL;
                                
                                if (ctx->profiling && !ctx->profiling_paused) {
                                    pevents = cuda_get_events(&ctx->cuda,
                                                              &ctx->mainzicopy_228743_runs,
                                                              &ctx->mainzicopy_228743_total_runtime);
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                       0));
                                }
                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzicopy_228743,
                                                                      grid[0],
                                                                      grid[1],
                                                                      grid[2],
                                                                      group_sizze_228746,
                                                                      1, 1, 0,
                                                                      NULL,
                                                                      kernel_args_231503,
                                                                      NULL));
                                if (pevents != NULL)
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                       0));
                                if (ctx->debugging) {
                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                    time_end_231505 = get_wall_time();
                                    fprintf(ctx->log,
                                            "Kernel %s runtime: %ldus\n",
                                            "main.copy_228743",
                                            time_end_231505 -
                                            time_start_231504);
                                }
                            }
                            
                            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");
                            
                            CUdeviceptr kernel_arg_231511 = ext_mem_222256.mem;
                            CUdeviceptr kernel_arg_231512 = mem_224107.mem;
                            CUdeviceptr kernel_arg_231513 = mem_224110.mem;
                            CUdeviceptr kernel_arg_231514 = mem_224113.mem;
                            CUdeviceptr kernel_arg_231515 = mem_224116.mem;
                            CUdeviceptr kernel_arg_231516 = mem_224119.mem;
                            CUdeviceptr kernel_arg_231517 = mem_224122.mem;
                            CUdeviceptr kernel_arg_231518 = mem_224201.mem;
                            CUdeviceptr kernel_arg_231519 = mem_224204.mem;
                            CUdeviceptr kernel_arg_231520 = color_225091.mem;
                            CUdeviceptr kernel_arg_231521 = color_225092.mem;
                            CUdeviceptr kernel_arg_231522 = color_225093.mem;
                            CUdeviceptr kernel_arg_231523 = color_225094.mem;
                            
                            if ((((((1 && num_groups_216501 != 0) && 1 != 0) &&
                                   1 != 0) && segmap_group_sizze_216500 != 0) &&
                                 1 != 0) && 1 != 0) {
                                int perm[3] = {0, 1, 2};
                                
                                if (1 >= 1 << 16) {
                                    perm[1] = perm[0];
                                    perm[0] = 1;
                                }
                                if (1 >= 1 << 16) {
                                    perm[2] = perm[0];
                                    perm[0] = 2;
                                }
                                
                                size_t grid[3];
                                
                                grid[perm[0]] = num_groups_216501;
                                grid[perm[1]] = 1;
                                grid[perm[2]] = 1;
                                
                                void *kernel_args_231508[] =
                                     {&ctx->global_failure,
                                      &ctx->failure_is_an_option,
                                      &ctx->global_failure_args, &m_196691,
                                      &n_196692, &q_t_196696, &jump_t_196702,
                                      &t_n_m_196759, &i_196779,
                                      &num_groups_216501, &num_threads_225236,
                                      &kernel_arg_231511, &kernel_arg_231512,
                                      &kernel_arg_231513, &kernel_arg_231514,
                                      &kernel_arg_231515, &kernel_arg_231516,
                                      &kernel_arg_231517, &kernel_arg_231518,
                                      &kernel_arg_231519, &kernel_arg_231520,
                                      &kernel_arg_231521, &kernel_arg_231522,
                                      &kernel_arg_231523};
                                int64_t time_start_231509 = 0, time_end_231510 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                            "main.segmap_216506",
                                            (long) num_groups_216501, (long) 1,
                                            (long) 1,
                                            (long) segmap_group_sizze_216500,
                                            (long) 1, (long) 1, (int) 0);
                                    time_start_231509 = get_wall_time();
                                }
                                
                                cudaEvent_t *pevents = NULL;
                                
                                if (ctx->profiling && !ctx->profiling_paused) {
                                    pevents = cuda_get_events(&ctx->cuda,
                                                              &ctx->mainzisegmap_216506_runs,
                                                              &ctx->mainzisegmap_216506_total_runtime);
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                       0));
                                }
                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_216506,
                                                                      grid[0],
                                                                      grid[1],
                                                                      grid[2],
                                                                      segmap_group_sizze_216500,
                                                                      1, 1, 0,
                                                                      NULL,
                                                                      kernel_args_231508,
                                                                      NULL));
                                if (pevents != NULL)
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                       0));
                                if (ctx->debugging) {
                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                    time_end_231510 = get_wall_time();
                                    fprintf(ctx->log,
                                            "Kernel %s runtime: %ldus\n",
                                            "main.segmap_216506",
                                            time_end_231510 -
                                            time_start_231509);
                                }
                            }
                            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");
                            
                            CUdeviceptr kernel_arg_231527 = Y_mem_222225.mem;
                            CUdeviceptr kernel_arg_231528 = mem_223977.mem;
                            CUdeviceptr kernel_arg_231529 = mem_224209.mem;
                            
                            if ((((((1 && segmap_usable_groups_217152 != 0) &&
                                    1 != 0) && 1 != 0) &&
                                  segmap_group_sizze_217151 != 0) && 1 != 0) &&
                                1 != 0) {
                                int perm[3] = {0, 1, 2};
                                
                                if (1 >= 1 << 16) {
                                    perm[1] = perm[0];
                                    perm[0] = 1;
                                }
                                if (1 >= 1 << 16) {
                                    perm[2] = perm[0];
                                    perm[0] = 2;
                                }
                                
                                size_t grid[3];
                                
                                grid[perm[0]] = segmap_usable_groups_217152;
                                grid[perm[1]] = 1;
                                grid[perm[2]] = 1;
                                
                                void *kernel_args_231524[] =
                                     {&ctx->global_failure, &m_196691,
                                      &n_196692, &kernel_arg_231527,
                                      &kernel_arg_231528, &kernel_arg_231529};
                                int64_t time_start_231525 = 0, time_end_231526 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                            "main.segmap_217156",
                                            (long) segmap_usable_groups_217152,
                                            (long) 1, (long) 1,
                                            (long) segmap_group_sizze_217151,
                                            (long) 1, (long) 1, (int) 0);
                                    time_start_231525 = get_wall_time();
                                }
                                
                                cudaEvent_t *pevents = NULL;
                                
                                if (ctx->profiling && !ctx->profiling_paused) {
                                    pevents = cuda_get_events(&ctx->cuda,
                                                              &ctx->mainzisegmap_217156_runs,
                                                              &ctx->mainzisegmap_217156_total_runtime);
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                       0));
                                }
                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_217156,
                                                                      grid[0],
                                                                      grid[1],
                                                                      grid[2],
                                                                      segmap_group_sizze_217151,
                                                                      1, 1, 0,
                                                                      NULL,
                                                                      kernel_args_231524,
                                                                      NULL));
                                if (pevents != NULL)
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                       0));
                                if (ctx->debugging) {
                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                    time_end_231526 = get_wall_time();
                                    fprintf(ctx->log,
                                            "Kernel %s runtime: %ldus\n",
                                            "main.segmap_217156",
                                            time_end_231526 -
                                            time_start_231525);
                                }
                            }
                            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");
                            
                            CUdeviceptr kernel_arg_231533 = ext_mem_222257.mem;
                            CUdeviceptr kernel_arg_231534 =
                                        mem_param_222550.mem;
                            CUdeviceptr kernel_arg_231535 = mem_224209.mem;
                            CUdeviceptr kernel_arg_231536 = mem_224214.mem;
                            CUdeviceptr kernel_arg_231537 = mem_224218.mem;
                            
                            if ((((((1 && segmap_usable_groups_217168 != 0) &&
                                    1 != 0) && 1 != 0) &&
                                  segmap_group_sizze_217167 != 0) && 1 != 0) &&
                                1 != 0) {
                                int perm[3] = {0, 1, 2};
                                
                                if (1 >= 1 << 16) {
                                    perm[1] = perm[0];
                                    perm[0] = 1;
                                }
                                if (1 >= 1 << 16) {
                                    perm[2] = perm[0];
                                    perm[0] = 2;
                                }
                                
                                size_t grid[3];
                                
                                grid[perm[0]] = segmap_usable_groups_217168;
                                grid[perm[1]] = 1;
                                grid[perm[2]] = 1;
                                
                                void *kernel_args_231530[] =
                                     {&ctx->global_failure,
                                      &ctx->failure_is_an_option,
                                      &ctx->global_failure_args, &m_196691,
                                      &n_196692, &ctx_param_ext_222545,
                                      &ctx_param_ext_222546,
                                      &ctx_param_ext_222548, &kernel_arg_231533,
                                      &kernel_arg_231534, &kernel_arg_231535,
                                      &kernel_arg_231536, &kernel_arg_231537};
                                int64_t time_start_231531 = 0, time_end_231532 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                            "main.segmap_217173",
                                            (long) segmap_usable_groups_217168,
                                            (long) 1, (long) 1,
                                            (long) segmap_group_sizze_217167,
                                            (long) 1, (long) 1, (int) 0);
                                    time_start_231531 = get_wall_time();
                                }
                                
                                cudaEvent_t *pevents = NULL;
                                
                                if (ctx->profiling && !ctx->profiling_paused) {
                                    pevents = cuda_get_events(&ctx->cuda,
                                                              &ctx->mainzisegmap_217173_runs,
                                                              &ctx->mainzisegmap_217173_total_runtime);
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                       0));
                                }
                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_217173,
                                                                      grid[0],
                                                                      grid[1],
                                                                      grid[2],
                                                                      segmap_group_sizze_217167,
                                                                      1, 1, 0,
                                                                      NULL,
                                                                      kernel_args_231530,
                                                                      NULL));
                                if (pevents != NULL)
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                       0));
                                if (ctx->debugging) {
                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                    time_end_231532 = get_wall_time();
                                    fprintf(ctx->log,
                                            "Kernel %s runtime: %ldus\n",
                                            "main.segmap_217173",
                                            time_end_231532 -
                                            time_start_231531);
                                }
                            }
                            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_229011;
                            
                            local_memory_capacity_229011 =
                                ctx->cuda.max_shared_memory;
                            if (sle64((int64_t) 0,
                                      sext_i32_i64(local_memory_capacity_229011)) &&
                                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");
                                
                                CUdeviceptr kernel_arg_231541 =
                                            ext_mem_222256.mem;
                                CUdeviceptr kernel_arg_231542 =
                                            ext_mem_222257.mem;
                                CUdeviceptr kernel_arg_231543 =
                                            ext_mem_222517.mem;
                                CUdeviceptr kernel_arg_231544 =
                                            ext_mem_222518.mem;
                                CUdeviceptr kernel_arg_231545 = mem_224214.mem;
                                CUdeviceptr kernel_arg_231546 = mem_224218.mem;
                                CUdeviceptr kernel_arg_231547 = mem_224223.mem;
                                CUdeviceptr kernel_arg_231548 = mem_224227.mem;
                                
                                if ((((((1 && segmap_usable_groups_217193 !=
                                         0) && 1 != 0) && 1 != 0) &&
                                      segmap_group_sizze_217192 != 0) && 1 !=
                                     0) && 1 != 0) {
                                    int perm[3] = {0, 1, 2};
                                    
                                    if (1 >= 1 << 16) {
                                        perm[1] = perm[0];
                                        perm[0] = 1;
                                    }
                                    if (1 >= 1 << 16) {
                                        perm[2] = perm[0];
                                        perm[0] = 2;
                                    }
                                    
                                    size_t grid[3];
                                    
                                    grid[perm[0]] = segmap_usable_groups_217193;
                                    grid[perm[1]] = 1;
                                    grid[perm[2]] = 1;
                                    
                                    void *kernel_args_231538[] =
                                         {&ctx->global_failure, &m_196691,
                                          &n_196692, &q_t_196696,
                                          &jump_t_196702, &t_n_m_196759,
                                          &i_196779, &kernel_arg_231541,
                                          &kernel_arg_231542,
                                          &kernel_arg_231543,
                                          &kernel_arg_231544,
                                          &kernel_arg_231545,
                                          &kernel_arg_231546,
                                          &kernel_arg_231547,
                                          &kernel_arg_231548};
                                    int64_t time_start_231539 = 0,
                                            time_end_231540 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                "main.segmap_217203",
                                                (long) segmap_usable_groups_217193,
                                                (long) 1, (long) 1,
                                                (long) segmap_group_sizze_217192,
                                                (long) 1, (long) 1, (int) 0);
                                        time_start_231539 = get_wall_time();
                                    }
                                    
                                    cudaEvent_t *pevents = NULL;
                                    
                                    if (ctx->profiling &&
                                        !ctx->profiling_paused) {
                                        pevents = cuda_get_events(&ctx->cuda,
                                                                  &ctx->mainzisegmap_217203_runs,
                                                                  &ctx->mainzisegmap_217203_total_runtime);
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                           0));
                                    }
                                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_217203,
                                                                          grid[0],
                                                                          grid[1],
                                                                          grid[2],
                                                                          segmap_group_sizze_217192,
                                                                          1, 1,
                                                                          0,
                                                                          NULL,
                                                                          kernel_args_231538,
                                                                          NULL));
                                    if (pevents != NULL)
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                           0));
                                    if (ctx->debugging) {
                                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                        time_end_231540 = get_wall_time();
                                        fprintf(ctx->log,
                                                "Kernel %s runtime: %ldus\n",
                                                "main.segmap_217203",
                                                time_end_231540 -
                                                time_start_231539);
                                    }
                                }
                                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_228815 =
                                            smax64((int64_t) 1, q_t_196696);
                                    int64_t num_threads_228816 =
                                            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_228815),
                                                '\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_228815))),
                                                '\n');
                                    
                                    unsigned int shared_sizze_231552 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_217309;
                                    unsigned int shared_sizze_231554 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_217309;
                                    unsigned int shared_sizze_231556 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_217309;
                                    CUdeviceptr kernel_arg_231558 =
                                                ext_mem_222256.mem;
                                    CUdeviceptr kernel_arg_231559 =
                                                ext_mem_222257.mem;
                                    CUdeviceptr kernel_arg_231560 =
                                                ext_mem_222517.mem;
                                    CUdeviceptr kernel_arg_231561 =
                                                ext_mem_222518.mem;
                                    CUdeviceptr kernel_arg_231562 =
                                                mem_224214.mem;
                                    CUdeviceptr kernel_arg_231563 =
                                                mem_224232.mem;
                                    CUdeviceptr kernel_arg_231564 =
                                                mem_224236.mem;
                                    CUdeviceptr kernel_arg_231565 =
                                                mem_224240.mem;
                                    unsigned int shared_offset_231553 = 0;
                                    unsigned int shared_offset_231555 = 0 +
                                                 (shared_sizze_231552 + (8 -
                                                                         shared_sizze_231552 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_231557 = 0 +
                                                 (shared_sizze_231552 + (8 -
                                                                         shared_sizze_231552 %
                                                                         8) %
                                                  8) + (shared_sizze_231554 +
                                                        (8 -
                                                         shared_sizze_231554 %
                                                         8) % 8);
                                    
                                    if ((((((1 && num_groups_217310 != 0) &&
                                            1 != 0) && 1 != 0) &&
                                          segred_group_sizze_217309 != 0) &&
                                         1 != 0) && 1 != 0) {
                                        int perm[3] = {0, 1, 2};
                                        
                                        if (1 >= 1 << 16) {
                                            perm[1] = perm[0];
                                            perm[0] = 1;
                                        }
                                        if (1 >= 1 << 16) {
                                            perm[2] = perm[0];
                                            perm[0] = 2;
                                        }
                                        
                                        size_t grid[3];
                                        
                                        grid[perm[0]] = num_groups_217310;
                                        grid[perm[1]] = 1;
                                        grid[perm[2]] = 1;
                                        
                                        void *kernel_args_231549[] =
                                             {&ctx->global_failure,
                                              &shared_offset_231553,
                                              &shared_offset_231555,
                                              &shared_offset_231557, &m_196691,
                                              &n_196692, &q_t_196696,
                                              &jump_t_196702, &t_n_m_196759,
                                              &i_196779, &num_groups_217310,
                                              &segment_sizze_nonzzero_228815,
                                              &kernel_arg_231558,
                                              &kernel_arg_231559,
                                              &kernel_arg_231560,
                                              &kernel_arg_231561,
                                              &kernel_arg_231562,
                                              &kernel_arg_231563,
                                              &kernel_arg_231564,
                                              &kernel_arg_231565};
                                        int64_t time_start_231550 = 0,
                                                time_end_231551 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                    "main.segred_small_217318",
                                                    (long) num_groups_217310,
                                                    (long) 1, (long) 1,
                                                    (long) segred_group_sizze_217309,
                                                    (long) 1, (long) 1,
                                                    (int) (0 +
                                                           (shared_sizze_231552 +
                                                            (8 -
                                                             shared_sizze_231552 %
                                                             8) % 8) +
                                                           (shared_sizze_231554 +
                                                            (8 -
                                                             shared_sizze_231554 %
                                                             8) % 8) +
                                                           (shared_sizze_231556 +
                                                            (8 -
                                                             shared_sizze_231556 %
                                                             8) % 8)));
                                            time_start_231550 = get_wall_time();
                                        }
                                        
                                        cudaEvent_t *pevents = NULL;
                                        
                                        if (ctx->profiling &&
                                            !ctx->profiling_paused) {
                                            pevents =
                                                cuda_get_events(&ctx->cuda,
                                                                &ctx->mainzisegred_small_217318_runs,
                                                                &ctx->mainzisegred_small_217318_total_runtime);
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                               0));
                                        }
                                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_small_217318,
                                                                              grid[0],
                                                                              grid[1],
                                                                              grid[2],
                                                                              segred_group_sizze_217309,
                                                                              1,
                                                                              1,
                                                                              0 +
                                                                              (shared_sizze_231552 +
                                                                               (8 -
                                                                                shared_sizze_231552 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231554 +
                                                                               (8 -
                                                                                shared_sizze_231554 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231556 +
                                                                               (8 -
                                                                                shared_sizze_231556 %
                                                                                8) %
                                                                               8),
                                                                              NULL,
                                                                              kernel_args_231549,
                                                                              NULL));
                                        if (pevents != NULL)
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                               0));
                                        if (ctx->debugging) {
                                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                            time_end_231551 = get_wall_time();
                                            fprintf(ctx->log,
                                                    "Kernel %s runtime: %ldus\n",
                                                    "main.segred_small_217318",
                                                    time_end_231551 -
                                                    time_start_231550);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                } else {
                                    int64_t groups_per_segment_228856 =
                                            sdiv_up64(num_groups_217310,
                                                      smax64((int64_t) 1,
                                                             m_196691 *
                                                             t_n_m_196759));
                                    int64_t elements_per_thread_228857 =
                                            sdiv_up64(q_t_196696,
                                                      segred_group_sizze_217309 *
                                                      groups_per_segment_228856);
                                    int64_t virt_num_groups_228858 =
                                            groups_per_segment_228856 *
                                            (m_196691 * t_n_m_196759);
                                    int64_t num_threads_228859 =
                                            num_groups_217310 *
                                            segred_group_sizze_217309;
                                    int64_t threads_per_segment_228860 =
                                            groups_per_segment_228856 *
                                            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_228858,
                                                '\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_228857,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "groups_per_segment",
                                                (long long) groups_per_segment_228856,
                                                '\n');
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228861;
                                    
                                    segred_tmp_mem_228861.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228861,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228858,
                                                              "segred_tmp_mem_228861")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228863;
                                    
                                    segred_tmp_mem_228863.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228863,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228858,
                                                              "segred_tmp_mem_228863")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228865;
                                    
                                    segred_tmp_mem_228865.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228865,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228858,
                                                              "segred_tmp_mem_228865")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    mainzicounter_mem_228867 =
                                    ctx->mainzicounter_mem_228867;
                                    unsigned int shared_sizze_231570 = 1;
                                    unsigned int shared_sizze_231572 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_217309;
                                    unsigned int shared_sizze_231574 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_217309;
                                    unsigned int shared_sizze_231576 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_217309;
                                    CUdeviceptr kernel_arg_231578 =
                                                ext_mem_222256.mem;
                                    CUdeviceptr kernel_arg_231579 =
                                                ext_mem_222257.mem;
                                    CUdeviceptr kernel_arg_231580 =
                                                ext_mem_222517.mem;
                                    CUdeviceptr kernel_arg_231581 =
                                                ext_mem_222518.mem;
                                    CUdeviceptr kernel_arg_231582 =
                                                mem_224214.mem;
                                    CUdeviceptr kernel_arg_231583 =
                                                mem_224232.mem;
                                    CUdeviceptr kernel_arg_231584 =
                                                mem_224236.mem;
                                    CUdeviceptr kernel_arg_231585 =
                                                mem_224240.mem;
                                    CUdeviceptr kernel_arg_231586 =
                                                segred_tmp_mem_228861.mem;
                                    CUdeviceptr kernel_arg_231587 =
                                                segred_tmp_mem_228863.mem;
                                    CUdeviceptr kernel_arg_231588 =
                                                segred_tmp_mem_228865.mem;
                                    CUdeviceptr kernel_arg_231589 =
                                                mainzicounter_mem_228867.mem;
                                    unsigned int shared_offset_231571 = 0;
                                    unsigned int shared_offset_231573 = 0 +
                                                 (shared_sizze_231570 + (8 -
                                                                         shared_sizze_231570 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_231575 = 0 +
                                                 (shared_sizze_231570 + (8 -
                                                                         shared_sizze_231570 %
                                                                         8) %
                                                  8) + (shared_sizze_231572 +
                                                        (8 -
                                                         shared_sizze_231572 %
                                                         8) % 8);
                                    unsigned int shared_offset_231577 = 0 +
                                                 (shared_sizze_231570 + (8 -
                                                                         shared_sizze_231570 %
                                                                         8) %
                                                  8) + (shared_sizze_231572 +
                                                        (8 -
                                                         shared_sizze_231572 %
                                                         8) % 8) +
                                                 (shared_sizze_231574 + (8 -
                                                                         shared_sizze_231574 %
                                                                         8) %
                                                  8);
                                    
                                    if ((((((1 && num_groups_217310 != 0) &&
                                            1 != 0) && 1 != 0) &&
                                          segred_group_sizze_217309 != 0) &&
                                         1 != 0) && 1 != 0) {
                                        int perm[3] = {0, 1, 2};
                                        
                                        if (1 >= 1 << 16) {
                                            perm[1] = perm[0];
                                            perm[0] = 1;
                                        }
                                        if (1 >= 1 << 16) {
                                            perm[2] = perm[0];
                                            perm[0] = 2;
                                        }
                                        
                                        size_t grid[3];
                                        
                                        grid[perm[0]] = num_groups_217310;
                                        grid[perm[1]] = 1;
                                        grid[perm[2]] = 1;
                                        
                                        void *kernel_args_231567[] =
                                             {&ctx->global_failure,
                                              &shared_offset_231571,
                                              &shared_offset_231573,
                                              &shared_offset_231575,
                                              &shared_offset_231577, &m_196691,
                                              &n_196692, &q_t_196696,
                                              &jump_t_196702, &t_n_m_196759,
                                              &i_196779, &num_groups_217310,
                                              &groups_per_segment_228856,
                                              &elements_per_thread_228857,
                                              &virt_num_groups_228858,
                                              &threads_per_segment_228860,
                                              &kernel_arg_231578,
                                              &kernel_arg_231579,
                                              &kernel_arg_231580,
                                              &kernel_arg_231581,
                                              &kernel_arg_231582,
                                              &kernel_arg_231583,
                                              &kernel_arg_231584,
                                              &kernel_arg_231585,
                                              &kernel_arg_231586,
                                              &kernel_arg_231587,
                                              &kernel_arg_231588,
                                              &kernel_arg_231589};
                                        int64_t time_start_231568 = 0,
                                                time_end_231569 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                    "main.segred_large_217318",
                                                    (long) num_groups_217310,
                                                    (long) 1, (long) 1,
                                                    (long) segred_group_sizze_217309,
                                                    (long) 1, (long) 1,
                                                    (int) (0 +
                                                           (shared_sizze_231570 +
                                                            (8 -
                                                             shared_sizze_231570 %
                                                             8) % 8) +
                                                           (shared_sizze_231572 +
                                                            (8 -
                                                             shared_sizze_231572 %
                                                             8) % 8) +
                                                           (shared_sizze_231574 +
                                                            (8 -
                                                             shared_sizze_231574 %
                                                             8) % 8) +
                                                           (shared_sizze_231576 +
                                                            (8 -
                                                             shared_sizze_231576 %
                                                             8) % 8)));
                                            time_start_231568 = get_wall_time();
                                        }
                                        
                                        cudaEvent_t *pevents = NULL;
                                        
                                        if (ctx->profiling &&
                                            !ctx->profiling_paused) {
                                            pevents =
                                                cuda_get_events(&ctx->cuda,
                                                                &ctx->mainzisegred_large_217318_runs,
                                                                &ctx->mainzisegred_large_217318_total_runtime);
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                               0));
                                        }
                                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_large_217318,
                                                                              grid[0],
                                                                              grid[1],
                                                                              grid[2],
                                                                              segred_group_sizze_217309,
                                                                              1,
                                                                              1,
                                                                              0 +
                                                                              (shared_sizze_231570 +
                                                                               (8 -
                                                                                shared_sizze_231570 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231572 +
                                                                               (8 -
                                                                                shared_sizze_231572 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231574 +
                                                                               (8 -
                                                                                shared_sizze_231574 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231576 +
                                                                               (8 -
                                                                                shared_sizze_231576 %
                                                                                8) %
                                                                               8),
                                                                              NULL,
                                                                              kernel_args_231567,
                                                                              NULL));
                                        if (pevents != NULL)
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                               0));
                                        if (ctx->debugging) {
                                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                            time_end_231569 = get_wall_time();
                                            fprintf(ctx->log,
                                                    "Kernel %s runtime: %ldus\n",
                                                    "main.segred_large_217318",
                                                    time_end_231569 -
                                                    time_start_231568);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228865,
                                                              "segred_tmp_mem_228865") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228863,
                                                              "segred_tmp_mem_228863") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228861,
                                                              "segred_tmp_mem_228861") !=
                                        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");
                                
                                CUdeviceptr kernel_arg_231593 = mem_224232.mem;
                                CUdeviceptr kernel_arg_231594 = mem_224236.mem;
                                CUdeviceptr kernel_arg_231595 = mem_224240.mem;
                                CUdeviceptr kernel_arg_231596 = mem_224245.mem;
                                CUdeviceptr kernel_arg_231597 = mem_224249.mem;
                                CUdeviceptr kernel_arg_231598 = mem_224253.mem;
                                
                                if ((((((1 && segmap_usable_groups_217361 !=
                                         0) && 1 != 0) && 1 != 0) &&
                                      segmap_group_sizze_217360 != 0) && 1 !=
                                     0) && 1 != 0) {
                                    int perm[3] = {0, 1, 2};
                                    
                                    if (1 >= 1 << 16) {
                                        perm[1] = perm[0];
                                        perm[0] = 1;
                                    }
                                    if (1 >= 1 << 16) {
                                        perm[2] = perm[0];
                                        perm[0] = 2;
                                    }
                                    
                                    size_t grid[3];
                                    
                                    grid[perm[0]] = segmap_usable_groups_217361;
                                    grid[perm[1]] = 1;
                                    grid[perm[2]] = 1;
                                    
                                    void *kernel_args_231590[] =
                                         {&ctx->global_failure, &m_196691,
                                          &t_n_m_196759, &kernel_arg_231593,
                                          &kernel_arg_231594,
                                          &kernel_arg_231595,
                                          &kernel_arg_231596,
                                          &kernel_arg_231597,
                                          &kernel_arg_231598};
                                    int64_t time_start_231591 = 0,
                                            time_end_231592 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                "main.segmap_217367",
                                                (long) segmap_usable_groups_217361,
                                                (long) 1, (long) 1,
                                                (long) segmap_group_sizze_217360,
                                                (long) 1, (long) 1, (int) 0);
                                        time_start_231591 = get_wall_time();
                                    }
                                    
                                    cudaEvent_t *pevents = NULL;
                                    
                                    if (ctx->profiling &&
                                        !ctx->profiling_paused) {
                                        pevents = cuda_get_events(&ctx->cuda,
                                                                  &ctx->mainzisegmap_217367_runs,
                                                                  &ctx->mainzisegmap_217367_total_runtime);
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                           0));
                                    }
                                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_217367,
                                                                          grid[0],
                                                                          grid[1],
                                                                          grid[2],
                                                                          segmap_group_sizze_217360,
                                                                          1, 1,
                                                                          0,
                                                                          NULL,
                                                                          kernel_args_231590,
                                                                          NULL));
                                    if (pevents != NULL)
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                           0));
                                    if (ctx->debugging) {
                                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                        time_end_231592 = get_wall_time();
                                        fprintf(ctx->log,
                                                "Kernel %s runtime: %ldus\n",
                                                "main.segmap_217367",
                                                time_end_231592 -
                                                time_start_231591);
                                    }
                                }
                                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_228925 =
                                            smax64((int64_t) 1, q_t_196696);
                                    int64_t num_threads_228926 =
                                            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_228925),
                                                '\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_228925))),
                                                '\n');
                                    
                                    unsigned int shared_sizze_231602 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_217382;
                                    unsigned int shared_sizze_231604 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_217382;
                                    CUdeviceptr kernel_arg_231606 =
                                                ext_mem_222256.mem;
                                    CUdeviceptr kernel_arg_231607 =
                                                ext_mem_222257.mem;
                                    CUdeviceptr kernel_arg_231608 =
                                                ext_mem_222517.mem;
                                    CUdeviceptr kernel_arg_231609 =
                                                ext_mem_222518.mem;
                                    CUdeviceptr kernel_arg_231610 =
                                                mem_224214.mem;
                                    CUdeviceptr kernel_arg_231611 =
                                                mem_224218.mem;
                                    CUdeviceptr kernel_arg_231612 =
                                                mem_224245.mem;
                                    CUdeviceptr kernel_arg_231613 =
                                                mem_224249.mem;
                                    CUdeviceptr kernel_arg_231614 =
                                                mem_224253.mem;
                                    CUdeviceptr kernel_arg_231615 =
                                                mem_224258.mem;
                                    CUdeviceptr kernel_arg_231616 =
                                                mem_224262.mem;
                                    unsigned int shared_offset_231603 = 0;
                                    unsigned int shared_offset_231605 = 0 +
                                                 (shared_sizze_231602 + (8 -
                                                                         shared_sizze_231602 %
                                                                         8) %
                                                  8);
                                    
                                    if ((((((1 && num_groups_217383 != 0) &&
                                            1 != 0) && 1 != 0) &&
                                          segred_group_sizze_217382 != 0) &&
                                         1 != 0) && 1 != 0) {
                                        int perm[3] = {0, 1, 2};
                                        
                                        if (1 >= 1 << 16) {
                                            perm[1] = perm[0];
                                            perm[0] = 1;
                                        }
                                        if (1 >= 1 << 16) {
                                            perm[2] = perm[0];
                                            perm[0] = 2;
                                        }
                                        
                                        size_t grid[3];
                                        
                                        grid[perm[0]] = num_groups_217383;
                                        grid[perm[1]] = 1;
                                        grid[perm[2]] = 1;
                                        
                                        void *kernel_args_231599[] =
                                             {&ctx->global_failure,
                                              &shared_offset_231603,
                                              &shared_offset_231605, &m_196691,
                                              &n_196692, &q_t_196696,
                                              &jump_t_196702, &t_n_m_196759,
                                              &i_196779, &num_groups_217383,
                                              &segment_sizze_nonzzero_228925,
                                              &kernel_arg_231606,
                                              &kernel_arg_231607,
                                              &kernel_arg_231608,
                                              &kernel_arg_231609,
                                              &kernel_arg_231610,
                                              &kernel_arg_231611,
                                              &kernel_arg_231612,
                                              &kernel_arg_231613,
                                              &kernel_arg_231614,
                                              &kernel_arg_231615,
                                              &kernel_arg_231616};
                                        int64_t time_start_231600 = 0,
                                                time_end_231601 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                    "main.segred_small_217390",
                                                    (long) num_groups_217383,
                                                    (long) 1, (long) 1,
                                                    (long) segred_group_sizze_217382,
                                                    (long) 1, (long) 1,
                                                    (int) (0 +
                                                           (shared_sizze_231602 +
                                                            (8 -
                                                             shared_sizze_231602 %
                                                             8) % 8) +
                                                           (shared_sizze_231604 +
                                                            (8 -
                                                             shared_sizze_231604 %
                                                             8) % 8)));
                                            time_start_231600 = get_wall_time();
                                        }
                                        
                                        cudaEvent_t *pevents = NULL;
                                        
                                        if (ctx->profiling &&
                                            !ctx->profiling_paused) {
                                            pevents =
                                                cuda_get_events(&ctx->cuda,
                                                                &ctx->mainzisegred_small_217390_runs,
                                                                &ctx->mainzisegred_small_217390_total_runtime);
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                               0));
                                        }
                                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_small_217390,
                                                                              grid[0],
                                                                              grid[1],
                                                                              grid[2],
                                                                              segred_group_sizze_217382,
                                                                              1,
                                                                              1,
                                                                              0 +
                                                                              (shared_sizze_231602 +
                                                                               (8 -
                                                                                shared_sizze_231602 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231604 +
                                                                               (8 -
                                                                                shared_sizze_231604 %
                                                                                8) %
                                                                               8),
                                                                              NULL,
                                                                              kernel_args_231599,
                                                                              NULL));
                                        if (pevents != NULL)
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                               0));
                                        if (ctx->debugging) {
                                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                            time_end_231601 = get_wall_time();
                                            fprintf(ctx->log,
                                                    "Kernel %s runtime: %ldus\n",
                                                    "main.segred_small_217390",
                                                    time_end_231601 -
                                                    time_start_231600);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                } else {
                                    int64_t groups_per_segment_228960 =
                                            sdiv_up64(num_groups_217383,
                                                      smax64((int64_t) 1,
                                                             m_196691 *
                                                             t_n_m_196759));
                                    int64_t elements_per_thread_228961 =
                                            sdiv_up64(q_t_196696,
                                                      segred_group_sizze_217382 *
                                                      groups_per_segment_228960);
                                    int64_t virt_num_groups_228962 =
                                            groups_per_segment_228960 *
                                            (m_196691 * t_n_m_196759);
                                    int64_t num_threads_228963 =
                                            num_groups_217383 *
                                            segred_group_sizze_217382;
                                    int64_t threads_per_segment_228964 =
                                            groups_per_segment_228960 *
                                            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_228962,
                                                '\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_228961,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "groups_per_segment",
                                                (long long) groups_per_segment_228960,
                                                '\n');
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228965;
                                    
                                    segred_tmp_mem_228965.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228965,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228962,
                                                              "segred_tmp_mem_228965")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228967;
                                    
                                    segred_tmp_mem_228967.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228967,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228962,
                                                              "segred_tmp_mem_228967")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    mainzicounter_mem_228969 =
                                    ctx->mainzicounter_mem_228969;
                                    unsigned int shared_sizze_231621 = 1;
                                    unsigned int shared_sizze_231623 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_217382;
                                    unsigned int shared_sizze_231625 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_217382;
                                    CUdeviceptr kernel_arg_231627 =
                                                ext_mem_222256.mem;
                                    CUdeviceptr kernel_arg_231628 =
                                                ext_mem_222257.mem;
                                    CUdeviceptr kernel_arg_231629 =
                                                ext_mem_222517.mem;
                                    CUdeviceptr kernel_arg_231630 =
                                                ext_mem_222518.mem;
                                    CUdeviceptr kernel_arg_231631 =
                                                mem_224214.mem;
                                    CUdeviceptr kernel_arg_231632 =
                                                mem_224218.mem;
                                    CUdeviceptr kernel_arg_231633 =
                                                mem_224245.mem;
                                    CUdeviceptr kernel_arg_231634 =
                                                mem_224249.mem;
                                    CUdeviceptr kernel_arg_231635 =
                                                mem_224253.mem;
                                    CUdeviceptr kernel_arg_231636 =
                                                mem_224258.mem;
                                    CUdeviceptr kernel_arg_231637 =
                                                mem_224262.mem;
                                    CUdeviceptr kernel_arg_231638 =
                                                segred_tmp_mem_228965.mem;
                                    CUdeviceptr kernel_arg_231639 =
                                                segred_tmp_mem_228967.mem;
                                    CUdeviceptr kernel_arg_231640 =
                                                mainzicounter_mem_228969.mem;
                                    unsigned int shared_offset_231622 = 0;
                                    unsigned int shared_offset_231624 = 0 +
                                                 (shared_sizze_231621 + (8 -
                                                                         shared_sizze_231621 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_231626 = 0 +
                                                 (shared_sizze_231621 + (8 -
                                                                         shared_sizze_231621 %
                                                                         8) %
                                                  8) + (shared_sizze_231623 +
                                                        (8 -
                                                         shared_sizze_231623 %
                                                         8) % 8);
                                    
                                    if ((((((1 && num_groups_217383 != 0) &&
                                            1 != 0) && 1 != 0) &&
                                          segred_group_sizze_217382 != 0) &&
                                         1 != 0) && 1 != 0) {
                                        int perm[3] = {0, 1, 2};
                                        
                                        if (1 >= 1 << 16) {
                                            perm[1] = perm[0];
                                            perm[0] = 1;
                                        }
                                        if (1 >= 1 << 16) {
                                            perm[2] = perm[0];
                                            perm[0] = 2;
                                        }
                                        
                                        size_t grid[3];
                                        
                                        grid[perm[0]] = num_groups_217383;
                                        grid[perm[1]] = 1;
                                        grid[perm[2]] = 1;
                                        
                                        void *kernel_args_231618[] =
                                             {&ctx->global_failure,
                                              &shared_offset_231622,
                                              &shared_offset_231624,
                                              &shared_offset_231626, &m_196691,
                                              &n_196692, &q_t_196696,
                                              &jump_t_196702, &t_n_m_196759,
                                              &i_196779, &num_groups_217383,
                                              &groups_per_segment_228960,
                                              &elements_per_thread_228961,
                                              &virt_num_groups_228962,
                                              &threads_per_segment_228964,
                                              &kernel_arg_231627,
                                              &kernel_arg_231628,
                                              &kernel_arg_231629,
                                              &kernel_arg_231630,
                                              &kernel_arg_231631,
                                              &kernel_arg_231632,
                                              &kernel_arg_231633,
                                              &kernel_arg_231634,
                                              &kernel_arg_231635,
                                              &kernel_arg_231636,
                                              &kernel_arg_231637,
                                              &kernel_arg_231638,
                                              &kernel_arg_231639,
                                              &kernel_arg_231640};
                                        int64_t time_start_231619 = 0,
                                                time_end_231620 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                    "main.segred_large_217390",
                                                    (long) num_groups_217383,
                                                    (long) 1, (long) 1,
                                                    (long) segred_group_sizze_217382,
                                                    (long) 1, (long) 1,
                                                    (int) (0 +
                                                           (shared_sizze_231621 +
                                                            (8 -
                                                             shared_sizze_231621 %
                                                             8) % 8) +
                                                           (shared_sizze_231623 +
                                                            (8 -
                                                             shared_sizze_231623 %
                                                             8) % 8) +
                                                           (shared_sizze_231625 +
                                                            (8 -
                                                             shared_sizze_231625 %
                                                             8) % 8)));
                                            time_start_231619 = get_wall_time();
                                        }
                                        
                                        cudaEvent_t *pevents = NULL;
                                        
                                        if (ctx->profiling &&
                                            !ctx->profiling_paused) {
                                            pevents =
                                                cuda_get_events(&ctx->cuda,
                                                                &ctx->mainzisegred_large_217390_runs,
                                                                &ctx->mainzisegred_large_217390_total_runtime);
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                               0));
                                        }
                                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_large_217390,
                                                                              grid[0],
                                                                              grid[1],
                                                                              grid[2],
                                                                              segred_group_sizze_217382,
                                                                              1,
                                                                              1,
                                                                              0 +
                                                                              (shared_sizze_231621 +
                                                                               (8 -
                                                                                shared_sizze_231621 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231623 +
                                                                               (8 -
                                                                                shared_sizze_231623 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231625 +
                                                                               (8 -
                                                                                shared_sizze_231625 %
                                                                                8) %
                                                                               8),
                                                                              NULL,
                                                                              kernel_args_231618,
                                                                              NULL));
                                        if (pevents != NULL)
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                               0));
                                        if (ctx->debugging) {
                                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                            time_end_231620 = get_wall_time();
                                            fprintf(ctx->log,
                                                    "Kernel %s runtime: %ldus\n",
                                                    "main.segred_large_217390",
                                                    time_end_231620 -
                                                    time_start_231619);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228967,
                                                              "segred_tmp_mem_228967") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228965,
                                                              "segred_tmp_mem_228965") !=
                                        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_229013;
                        
                        max_num_groups_229013 =
                            *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_229013))));
                        
                        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_229014;
                        
                        max_num_groups_229014 =
                            *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_229014))));
                        
                        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_229015;
                        
                        max_num_groups_229015 =
                            *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_229015))));
                        
                        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_229317;
                        
                        local_memory_capacity_229317 =
                            ctx->cuda.max_shared_memory;
                        if ((sle64((int64_t) 0,
                                   sext_i32_i64(local_memory_capacity_229317)) &&
                             sle64((int64_t) 0,
                                   sext_i32_i64(local_memory_capacity_229317))) &&
                            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_229019;
                            
                            group_sizze_229019 =
                                *ctx->tuning_params.mainzigroup_sizze_229019;
                            
                            int64_t num_groups_229020 = sdiv_up64(m_196691 *
                                                                  n_196692,
                                                                  group_sizze_229019);
                            CUdeviceptr kernel_arg_231644 =
                                        mem_param_222550.mem;
                            CUdeviceptr kernel_arg_231645 = mem_224294.mem;
                            
                            if ((((((1 && num_groups_229020 != 0) && 1 != 0) &&
                                   1 != 0) && group_sizze_229019 != 0) && 1 !=
                                 0) && 1 != 0) {
                                int perm[3] = {0, 1, 2};
                                
                                if (1 >= 1 << 16) {
                                    perm[1] = perm[0];
                                    perm[0] = 1;
                                }
                                if (1 >= 1 << 16) {
                                    perm[2] = perm[0];
                                    perm[0] = 2;
                                }
                                
                                size_t grid[3];
                                
                                grid[perm[0]] = num_groups_229020;
                                grid[perm[1]] = 1;
                                grid[perm[2]] = 1;
                                
                                void *kernel_args_231641[] = {&m_196691,
                                                              &n_196692,
                                                              &ctx_param_ext_222545,
                                                              &ctx_param_ext_222546,
                                                              &ctx_param_ext_222548,
                                                              &kernel_arg_231644,
                                                              &kernel_arg_231645};
                                int64_t time_start_231642 = 0, time_end_231643 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                            "main.copy_229016",
                                            (long) num_groups_229020, (long) 1,
                                            (long) 1, (long) group_sizze_229019,
                                            (long) 1, (long) 1, (int) 0);
                                    time_start_231642 = get_wall_time();
                                }
                                
                                cudaEvent_t *pevents = NULL;
                                
                                if (ctx->profiling && !ctx->profiling_paused) {
                                    pevents = cuda_get_events(&ctx->cuda,
                                                              &ctx->mainzicopy_229016_runs,
                                                              &ctx->mainzicopy_229016_total_runtime);
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                       0));
                                }
                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzicopy_229016,
                                                                      grid[0],
                                                                      grid[1],
                                                                      grid[2],
                                                                      group_sizze_229019,
                                                                      1, 1, 0,
                                                                      NULL,
                                                                      kernel_args_231641,
                                                                      NULL));
                                if (pevents != NULL)
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                       0));
                                if (ctx->debugging) {
                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                    time_end_231643 = get_wall_time();
                                    fprintf(ctx->log,
                                            "Kernel %s runtime: %ldus\n",
                                            "main.copy_229016",
                                            time_end_231643 -
                                            time_start_231642);
                                }
                            }
                            
                            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");
                            
                            CUdeviceptr kernel_arg_231649 = ext_mem_222256.mem;
                            CUdeviceptr kernel_arg_231650 = mem_224279.mem;
                            CUdeviceptr kernel_arg_231651 = mem_224282.mem;
                            CUdeviceptr kernel_arg_231652 = mem_224285.mem;
                            CUdeviceptr kernel_arg_231653 = mem_224288.mem;
                            CUdeviceptr kernel_arg_231654 = mem_224291.mem;
                            CUdeviceptr kernel_arg_231655 = mem_224294.mem;
                            CUdeviceptr kernel_arg_231656 = mem_224373.mem;
                            CUdeviceptr kernel_arg_231657 = mem_224376.mem;
                            CUdeviceptr kernel_arg_231658 = color_225096.mem;
                            CUdeviceptr kernel_arg_231659 = color_225097.mem;
                            CUdeviceptr kernel_arg_231660 = color_225098.mem;
                            CUdeviceptr kernel_arg_231661 = color_225099.mem;
                            
                            if ((((((1 && num_groups_217607 != 0) && 1 != 0) &&
                                   1 != 0) && segmap_group_sizze_217606 != 0) &&
                                 1 != 0) && 1 != 0) {
                                int perm[3] = {0, 1, 2};
                                
                                if (1 >= 1 << 16) {
                                    perm[1] = perm[0];
                                    perm[0] = 1;
                                }
                                if (1 >= 1 << 16) {
                                    perm[2] = perm[0];
                                    perm[0] = 2;
                                }
                                
                                size_t grid[3];
                                
                                grid[perm[0]] = num_groups_217607;
                                grid[perm[1]] = 1;
                                grid[perm[2]] = 1;
                                
                                void *kernel_args_231646[] =
                                     {&ctx->global_failure,
                                      &ctx->failure_is_an_option,
                                      &ctx->global_failure_args, &m_196691,
                                      &n_196692, &q_t_196696, &jump_t_196702,
                                      &t_n_m_196759, &i_196779,
                                      &num_groups_217607, &num_threads_225247,
                                      &kernel_arg_231649, &kernel_arg_231650,
                                      &kernel_arg_231651, &kernel_arg_231652,
                                      &kernel_arg_231653, &kernel_arg_231654,
                                      &kernel_arg_231655, &kernel_arg_231656,
                                      &kernel_arg_231657, &kernel_arg_231658,
                                      &kernel_arg_231659, &kernel_arg_231660,
                                      &kernel_arg_231661};
                                int64_t time_start_231647 = 0, time_end_231648 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                            "main.segmap_217612",
                                            (long) num_groups_217607, (long) 1,
                                            (long) 1,
                                            (long) segmap_group_sizze_217606,
                                            (long) 1, (long) 1, (int) 0);
                                    time_start_231647 = get_wall_time();
                                }
                                
                                cudaEvent_t *pevents = NULL;
                                
                                if (ctx->profiling && !ctx->profiling_paused) {
                                    pevents = cuda_get_events(&ctx->cuda,
                                                              &ctx->mainzisegmap_217612_runs,
                                                              &ctx->mainzisegmap_217612_total_runtime);
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                       0));
                                }
                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_217612,
                                                                      grid[0],
                                                                      grid[1],
                                                                      grid[2],
                                                                      segmap_group_sizze_217606,
                                                                      1, 1, 0,
                                                                      NULL,
                                                                      kernel_args_231646,
                                                                      NULL));
                                if (pevents != NULL)
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                       0));
                                if (ctx->debugging) {
                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                    time_end_231648 = get_wall_time();
                                    fprintf(ctx->log,
                                            "Kernel %s runtime: %ldus\n",
                                            "main.segmap_217612",
                                            time_end_231648 -
                                            time_start_231647);
                                }
                            }
                            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");
                            
                            CUdeviceptr kernel_arg_231665 = Y_mem_222225.mem;
                            CUdeviceptr kernel_arg_231666 = mem_223977.mem;
                            CUdeviceptr kernel_arg_231667 = mem_224381.mem;
                            
                            if ((((((1 && segmap_usable_groups_218406 != 0) &&
                                    1 != 0) && 1 != 0) &&
                                  segmap_group_sizze_218405 != 0) && 1 != 0) &&
                                1 != 0) {
                                int perm[3] = {0, 1, 2};
                                
                                if (1 >= 1 << 16) {
                                    perm[1] = perm[0];
                                    perm[0] = 1;
                                }
                                if (1 >= 1 << 16) {
                                    perm[2] = perm[0];
                                    perm[0] = 2;
                                }
                                
                                size_t grid[3];
                                
                                grid[perm[0]] = segmap_usable_groups_218406;
                                grid[perm[1]] = 1;
                                grid[perm[2]] = 1;
                                
                                void *kernel_args_231662[] =
                                     {&ctx->global_failure, &m_196691,
                                      &n_196692, &kernel_arg_231665,
                                      &kernel_arg_231666, &kernel_arg_231667};
                                int64_t time_start_231663 = 0, time_end_231664 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                            "main.segmap_218410",
                                            (long) segmap_usable_groups_218406,
                                            (long) 1, (long) 1,
                                            (long) segmap_group_sizze_218405,
                                            (long) 1, (long) 1, (int) 0);
                                    time_start_231663 = get_wall_time();
                                }
                                
                                cudaEvent_t *pevents = NULL;
                                
                                if (ctx->profiling && !ctx->profiling_paused) {
                                    pevents = cuda_get_events(&ctx->cuda,
                                                              &ctx->mainzisegmap_218410_runs,
                                                              &ctx->mainzisegmap_218410_total_runtime);
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                       0));
                                }
                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_218410,
                                                                      grid[0],
                                                                      grid[1],
                                                                      grid[2],
                                                                      segmap_group_sizze_218405,
                                                                      1, 1, 0,
                                                                      NULL,
                                                                      kernel_args_231662,
                                                                      NULL));
                                if (pevents != NULL)
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                       0));
                                if (ctx->debugging) {
                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                    time_end_231664 = get_wall_time();
                                    fprintf(ctx->log,
                                            "Kernel %s runtime: %ldus\n",
                                            "main.segmap_218410",
                                            time_end_231664 -
                                            time_start_231663);
                                }
                            }
                            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");
                            
                            CUdeviceptr kernel_arg_231671 = ext_mem_222257.mem;
                            CUdeviceptr kernel_arg_231672 =
                                        mem_param_222550.mem;
                            CUdeviceptr kernel_arg_231673 = mem_224381.mem;
                            CUdeviceptr kernel_arg_231674 = mem_224386.mem;
                            CUdeviceptr kernel_arg_231675 = mem_224390.mem;
                            
                            if ((((((1 && segmap_usable_groups_218422 != 0) &&
                                    1 != 0) && 1 != 0) &&
                                  segmap_group_sizze_218421 != 0) && 1 != 0) &&
                                1 != 0) {
                                int perm[3] = {0, 1, 2};
                                
                                if (1 >= 1 << 16) {
                                    perm[1] = perm[0];
                                    perm[0] = 1;
                                }
                                if (1 >= 1 << 16) {
                                    perm[2] = perm[0];
                                    perm[0] = 2;
                                }
                                
                                size_t grid[3];
                                
                                grid[perm[0]] = segmap_usable_groups_218422;
                                grid[perm[1]] = 1;
                                grid[perm[2]] = 1;
                                
                                void *kernel_args_231668[] =
                                     {&ctx->global_failure,
                                      &ctx->failure_is_an_option,
                                      &ctx->global_failure_args, &m_196691,
                                      &n_196692, &ctx_param_ext_222545,
                                      &ctx_param_ext_222546,
                                      &ctx_param_ext_222548, &kernel_arg_231671,
                                      &kernel_arg_231672, &kernel_arg_231673,
                                      &kernel_arg_231674, &kernel_arg_231675};
                                int64_t time_start_231669 = 0, time_end_231670 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                            "main.segmap_218427",
                                            (long) segmap_usable_groups_218422,
                                            (long) 1, (long) 1,
                                            (long) segmap_group_sizze_218421,
                                            (long) 1, (long) 1, (int) 0);
                                    time_start_231669 = get_wall_time();
                                }
                                
                                cudaEvent_t *pevents = NULL;
                                
                                if (ctx->profiling && !ctx->profiling_paused) {
                                    pevents = cuda_get_events(&ctx->cuda,
                                                              &ctx->mainzisegmap_218427_runs,
                                                              &ctx->mainzisegmap_218427_total_runtime);
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                       0));
                                }
                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_218427,
                                                                      grid[0],
                                                                      grid[1],
                                                                      grid[2],
                                                                      segmap_group_sizze_218421,
                                                                      1, 1, 0,
                                                                      NULL,
                                                                      kernel_args_231668,
                                                                      NULL));
                                if (pevents != NULL)
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                       0));
                                if (ctx->debugging) {
                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                    time_end_231670 = get_wall_time();
                                    fprintf(ctx->log,
                                            "Kernel %s runtime: %ldus\n",
                                            "main.segmap_218427",
                                            time_end_231670 -
                                            time_start_231669);
                                }
                            }
                            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_229316;
                            
                            local_memory_capacity_229316 =
                                ctx->cuda.max_shared_memory;
                            if (sle64((int64_t) 0,
                                      sext_i32_i64(local_memory_capacity_229316)) &&
                                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");
                                
                                CUdeviceptr kernel_arg_231679 =
                                            ext_mem_222256.mem;
                                CUdeviceptr kernel_arg_231680 =
                                            ext_mem_222257.mem;
                                CUdeviceptr kernel_arg_231681 =
                                            ext_mem_222517.mem;
                                CUdeviceptr kernel_arg_231682 =
                                            ext_mem_222518.mem;
                                CUdeviceptr kernel_arg_231683 = mem_224386.mem;
                                CUdeviceptr kernel_arg_231684 = mem_224390.mem;
                                CUdeviceptr kernel_arg_231685 = mem_224395.mem;
                                CUdeviceptr kernel_arg_231686 = mem_224399.mem;
                                
                                if ((((((1 && segmap_usable_groups_218447 !=
                                         0) && 1 != 0) && 1 != 0) &&
                                      segmap_group_sizze_218446 != 0) && 1 !=
                                     0) && 1 != 0) {
                                    int perm[3] = {0, 1, 2};
                                    
                                    if (1 >= 1 << 16) {
                                        perm[1] = perm[0];
                                        perm[0] = 1;
                                    }
                                    if (1 >= 1 << 16) {
                                        perm[2] = perm[0];
                                        perm[0] = 2;
                                    }
                                    
                                    size_t grid[3];
                                    
                                    grid[perm[0]] = segmap_usable_groups_218447;
                                    grid[perm[1]] = 1;
                                    grid[perm[2]] = 1;
                                    
                                    void *kernel_args_231676[] =
                                         {&ctx->global_failure, &m_196691,
                                          &n_196692, &q_t_196696,
                                          &jump_t_196702, &t_n_m_196759,
                                          &i_196779, &kernel_arg_231679,
                                          &kernel_arg_231680,
                                          &kernel_arg_231681,
                                          &kernel_arg_231682,
                                          &kernel_arg_231683,
                                          &kernel_arg_231684,
                                          &kernel_arg_231685,
                                          &kernel_arg_231686};
                                    int64_t time_start_231677 = 0,
                                            time_end_231678 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                "main.segmap_218457",
                                                (long) segmap_usable_groups_218447,
                                                (long) 1, (long) 1,
                                                (long) segmap_group_sizze_218446,
                                                (long) 1, (long) 1, (int) 0);
                                        time_start_231677 = get_wall_time();
                                    }
                                    
                                    cudaEvent_t *pevents = NULL;
                                    
                                    if (ctx->profiling &&
                                        !ctx->profiling_paused) {
                                        pevents = cuda_get_events(&ctx->cuda,
                                                                  &ctx->mainzisegmap_218457_runs,
                                                                  &ctx->mainzisegmap_218457_total_runtime);
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                           0));
                                    }
                                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_218457,
                                                                          grid[0],
                                                                          grid[1],
                                                                          grid[2],
                                                                          segmap_group_sizze_218446,
                                                                          1, 1,
                                                                          0,
                                                                          NULL,
                                                                          kernel_args_231676,
                                                                          NULL));
                                    if (pevents != NULL)
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                           0));
                                    if (ctx->debugging) {
                                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                        time_end_231678 = get_wall_time();
                                        fprintf(ctx->log,
                                                "Kernel %s runtime: %ldus\n",
                                                "main.segmap_218457",
                                                time_end_231678 -
                                                time_start_231677);
                                    }
                                }
                                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_229092 =
                                            smax64((int64_t) 1, q_t_196696);
                                    int64_t num_threads_229093 =
                                            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_229092),
                                                '\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_229092))),
                                                '\n');
                                    
                                    unsigned int shared_sizze_231690 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_218595;
                                    unsigned int shared_sizze_231692 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_218595;
                                    unsigned int shared_sizze_231694 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_218595;
                                    unsigned int shared_sizze_231696 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_218595;
                                    unsigned int shared_sizze_231698 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_218595;
                                    CUdeviceptr kernel_arg_231700 =
                                                ext_mem_222256.mem;
                                    CUdeviceptr kernel_arg_231701 =
                                                ext_mem_222257.mem;
                                    CUdeviceptr kernel_arg_231702 =
                                                ext_mem_222517.mem;
                                    CUdeviceptr kernel_arg_231703 =
                                                ext_mem_222518.mem;
                                    CUdeviceptr kernel_arg_231704 =
                                                mem_224386.mem;
                                    CUdeviceptr kernel_arg_231705 =
                                                mem_224404.mem;
                                    CUdeviceptr kernel_arg_231706 =
                                                mem_224408.mem;
                                    CUdeviceptr kernel_arg_231707 =
                                                mem_224412.mem;
                                    CUdeviceptr kernel_arg_231708 =
                                                mem_224416.mem;
                                    CUdeviceptr kernel_arg_231709 =
                                                mem_224420.mem;
                                    unsigned int shared_offset_231691 = 0;
                                    unsigned int shared_offset_231693 = 0 +
                                                 (shared_sizze_231690 + (8 -
                                                                         shared_sizze_231690 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_231695 = 0 +
                                                 (shared_sizze_231690 + (8 -
                                                                         shared_sizze_231690 %
                                                                         8) %
                                                  8) + (shared_sizze_231692 +
                                                        (8 -
                                                         shared_sizze_231692 %
                                                         8) % 8);
                                    unsigned int shared_offset_231697 = 0 +
                                                 (shared_sizze_231690 + (8 -
                                                                         shared_sizze_231690 %
                                                                         8) %
                                                  8) + (shared_sizze_231692 +
                                                        (8 -
                                                         shared_sizze_231692 %
                                                         8) % 8) +
                                                 (shared_sizze_231694 + (8 -
                                                                         shared_sizze_231694 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_231699 = 0 +
                                                 (shared_sizze_231690 + (8 -
                                                                         shared_sizze_231690 %
                                                                         8) %
                                                  8) + (shared_sizze_231692 +
                                                        (8 -
                                                         shared_sizze_231692 %
                                                         8) % 8) +
                                                 (shared_sizze_231694 + (8 -
                                                                         shared_sizze_231694 %
                                                                         8) %
                                                  8) + (shared_sizze_231696 +
                                                        (8 -
                                                         shared_sizze_231696 %
                                                         8) % 8);
                                    
                                    if ((((((1 && num_groups_218596 != 0) &&
                                            1 != 0) && 1 != 0) &&
                                          segred_group_sizze_218595 != 0) &&
                                         1 != 0) && 1 != 0) {
                                        int perm[3] = {0, 1, 2};
                                        
                                        if (1 >= 1 << 16) {
                                            perm[1] = perm[0];
                                            perm[0] = 1;
                                        }
                                        if (1 >= 1 << 16) {
                                            perm[2] = perm[0];
                                            perm[0] = 2;
                                        }
                                        
                                        size_t grid[3];
                                        
                                        grid[perm[0]] = num_groups_218596;
                                        grid[perm[1]] = 1;
                                        grid[perm[2]] = 1;
                                        
                                        void *kernel_args_231687[] =
                                             {&ctx->global_failure,
                                              &shared_offset_231691,
                                              &shared_offset_231693,
                                              &shared_offset_231695,
                                              &shared_offset_231697,
                                              &shared_offset_231699, &m_196691,
                                              &n_196692, &q_t_196696,
                                              &jump_t_196702, &t_n_m_196759,
                                              &i_196779, &num_groups_218596,
                                              &segment_sizze_nonzzero_229092,
                                              &kernel_arg_231700,
                                              &kernel_arg_231701,
                                              &kernel_arg_231702,
                                              &kernel_arg_231703,
                                              &kernel_arg_231704,
                                              &kernel_arg_231705,
                                              &kernel_arg_231706,
                                              &kernel_arg_231707,
                                              &kernel_arg_231708,
                                              &kernel_arg_231709};
                                        int64_t time_start_231688 = 0,
                                                time_end_231689 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                    "main.segred_small_218606",
                                                    (long) num_groups_218596,
                                                    (long) 1, (long) 1,
                                                    (long) segred_group_sizze_218595,
                                                    (long) 1, (long) 1,
                                                    (int) (0 +
                                                           (shared_sizze_231690 +
                                                            (8 -
                                                             shared_sizze_231690 %
                                                             8) % 8) +
                                                           (shared_sizze_231692 +
                                                            (8 -
                                                             shared_sizze_231692 %
                                                             8) % 8) +
                                                           (shared_sizze_231694 +
                                                            (8 -
                                                             shared_sizze_231694 %
                                                             8) % 8) +
                                                           (shared_sizze_231696 +
                                                            (8 -
                                                             shared_sizze_231696 %
                                                             8) % 8) +
                                                           (shared_sizze_231698 +
                                                            (8 -
                                                             shared_sizze_231698 %
                                                             8) % 8)));
                                            time_start_231688 = get_wall_time();
                                        }
                                        
                                        cudaEvent_t *pevents = NULL;
                                        
                                        if (ctx->profiling &&
                                            !ctx->profiling_paused) {
                                            pevents =
                                                cuda_get_events(&ctx->cuda,
                                                                &ctx->mainzisegred_small_218606_runs,
                                                                &ctx->mainzisegred_small_218606_total_runtime);
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                               0));
                                        }
                                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_small_218606,
                                                                              grid[0],
                                                                              grid[1],
                                                                              grid[2],
                                                                              segred_group_sizze_218595,
                                                                              1,
                                                                              1,
                                                                              0 +
                                                                              (shared_sizze_231690 +
                                                                               (8 -
                                                                                shared_sizze_231690 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231692 +
                                                                               (8 -
                                                                                shared_sizze_231692 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231694 +
                                                                               (8 -
                                                                                shared_sizze_231694 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231696 +
                                                                               (8 -
                                                                                shared_sizze_231696 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231698 +
                                                                               (8 -
                                                                                shared_sizze_231698 %
                                                                                8) %
                                                                               8),
                                                                              NULL,
                                                                              kernel_args_231687,
                                                                              NULL));
                                        if (pevents != NULL)
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                               0));
                                        if (ctx->debugging) {
                                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                            time_end_231689 = get_wall_time();
                                            fprintf(ctx->log,
                                                    "Kernel %s runtime: %ldus\n",
                                                    "main.segred_small_218606",
                                                    time_end_231689 -
                                                    time_start_231688);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                } else {
                                    int64_t groups_per_segment_229145 =
                                            sdiv_up64(num_groups_218596,
                                                      smax64((int64_t) 1,
                                                             m_196691 *
                                                             t_n_m_196759));
                                    int64_t elements_per_thread_229146 =
                                            sdiv_up64(q_t_196696,
                                                      segred_group_sizze_218595 *
                                                      groups_per_segment_229145);
                                    int64_t virt_num_groups_229147 =
                                            groups_per_segment_229145 *
                                            (m_196691 * t_n_m_196759);
                                    int64_t num_threads_229148 =
                                            num_groups_218596 *
                                            segred_group_sizze_218595;
                                    int64_t threads_per_segment_229149 =
                                            groups_per_segment_229145 *
                                            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_229147,
                                                '\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_229146,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "groups_per_segment",
                                                (long long) groups_per_segment_229145,
                                                '\n');
                                    
                                    struct memblock_device
                                    segred_tmp_mem_229150;
                                    
                                    segred_tmp_mem_229150.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_229150,
                                                              (int64_t) 4 *
                                                              virt_num_groups_229147,
                                                              "segred_tmp_mem_229150")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_229152;
                                    
                                    segred_tmp_mem_229152.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_229152,
                                                              (int64_t) 4 *
                                                              virt_num_groups_229147,
                                                              "segred_tmp_mem_229152")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_229154;
                                    
                                    segred_tmp_mem_229154.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_229154,
                                                              (int64_t) 4 *
                                                              virt_num_groups_229147,
                                                              "segred_tmp_mem_229154")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_229156;
                                    
                                    segred_tmp_mem_229156.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_229156,
                                                              (int64_t) 4 *
                                                              virt_num_groups_229147,
                                                              "segred_tmp_mem_229156")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_229158;
                                    
                                    segred_tmp_mem_229158.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_229158,
                                                              (int64_t) 4 *
                                                              virt_num_groups_229147,
                                                              "segred_tmp_mem_229158")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    mainzicounter_mem_229160 =
                                    ctx->mainzicounter_mem_229160;
                                    unsigned int shared_sizze_231714 = 1;
                                    unsigned int shared_sizze_231716 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_218595;
                                    unsigned int shared_sizze_231718 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_218595;
                                    unsigned int shared_sizze_231720 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_218595;
                                    unsigned int shared_sizze_231722 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_218595;
                                    unsigned int shared_sizze_231724 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_218595;
                                    CUdeviceptr kernel_arg_231726 =
                                                ext_mem_222256.mem;
                                    CUdeviceptr kernel_arg_231727 =
                                                ext_mem_222257.mem;
                                    CUdeviceptr kernel_arg_231728 =
                                                ext_mem_222517.mem;
                                    CUdeviceptr kernel_arg_231729 =
                                                ext_mem_222518.mem;
                                    CUdeviceptr kernel_arg_231730 =
                                                mem_224386.mem;
                                    CUdeviceptr kernel_arg_231731 =
                                                mem_224404.mem;
                                    CUdeviceptr kernel_arg_231732 =
                                                mem_224408.mem;
                                    CUdeviceptr kernel_arg_231733 =
                                                mem_224412.mem;
                                    CUdeviceptr kernel_arg_231734 =
                                                mem_224416.mem;
                                    CUdeviceptr kernel_arg_231735 =
                                                mem_224420.mem;
                                    CUdeviceptr kernel_arg_231736 =
                                                segred_tmp_mem_229150.mem;
                                    CUdeviceptr kernel_arg_231737 =
                                                segred_tmp_mem_229152.mem;
                                    CUdeviceptr kernel_arg_231738 =
                                                segred_tmp_mem_229154.mem;
                                    CUdeviceptr kernel_arg_231739 =
                                                segred_tmp_mem_229156.mem;
                                    CUdeviceptr kernel_arg_231740 =
                                                segred_tmp_mem_229158.mem;
                                    CUdeviceptr kernel_arg_231741 =
                                                mainzicounter_mem_229160.mem;
                                    unsigned int shared_offset_231715 = 0;
                                    unsigned int shared_offset_231717 = 0 +
                                                 (shared_sizze_231714 + (8 -
                                                                         shared_sizze_231714 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_231719 = 0 +
                                                 (shared_sizze_231714 + (8 -
                                                                         shared_sizze_231714 %
                                                                         8) %
                                                  8) + (shared_sizze_231716 +
                                                        (8 -
                                                         shared_sizze_231716 %
                                                         8) % 8);
                                    unsigned int shared_offset_231721 = 0 +
                                                 (shared_sizze_231714 + (8 -
                                                                         shared_sizze_231714 %
                                                                         8) %
                                                  8) + (shared_sizze_231716 +
                                                        (8 -
                                                         shared_sizze_231716 %
                                                         8) % 8) +
                                                 (shared_sizze_231718 + (8 -
                                                                         shared_sizze_231718 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_231723 = 0 +
                                                 (shared_sizze_231714 + (8 -
                                                                         shared_sizze_231714 %
                                                                         8) %
                                                  8) + (shared_sizze_231716 +
                                                        (8 -
                                                         shared_sizze_231716 %
                                                         8) % 8) +
                                                 (shared_sizze_231718 + (8 -
                                                                         shared_sizze_231718 %
                                                                         8) %
                                                  8) + (shared_sizze_231720 +
                                                        (8 -
                                                         shared_sizze_231720 %
                                                         8) % 8);
                                    unsigned int shared_offset_231725 = 0 +
                                                 (shared_sizze_231714 + (8 -
                                                                         shared_sizze_231714 %
                                                                         8) %
                                                  8) + (shared_sizze_231716 +
                                                        (8 -
                                                         shared_sizze_231716 %
                                                         8) % 8) +
                                                 (shared_sizze_231718 + (8 -
                                                                         shared_sizze_231718 %
                                                                         8) %
                                                  8) + (shared_sizze_231720 +
                                                        (8 -
                                                         shared_sizze_231720 %
                                                         8) % 8) +
                                                 (shared_sizze_231722 + (8 -
                                                                         shared_sizze_231722 %
                                                                         8) %
                                                  8);
                                    
                                    if ((((((1 && num_groups_218596 != 0) &&
                                            1 != 0) && 1 != 0) &&
                                          segred_group_sizze_218595 != 0) &&
                                         1 != 0) && 1 != 0) {
                                        int perm[3] = {0, 1, 2};
                                        
                                        if (1 >= 1 << 16) {
                                            perm[1] = perm[0];
                                            perm[0] = 1;
                                        }
                                        if (1 >= 1 << 16) {
                                            perm[2] = perm[0];
                                            perm[0] = 2;
                                        }
                                        
                                        size_t grid[3];
                                        
                                        grid[perm[0]] = num_groups_218596;
                                        grid[perm[1]] = 1;
                                        grid[perm[2]] = 1;
                                        
                                        void *kernel_args_231711[] =
                                             {&ctx->global_failure,
                                              &shared_offset_231715,
                                              &shared_offset_231717,
                                              &shared_offset_231719,
                                              &shared_offset_231721,
                                              &shared_offset_231723,
                                              &shared_offset_231725, &m_196691,
                                              &n_196692, &q_t_196696,
                                              &jump_t_196702, &t_n_m_196759,
                                              &i_196779, &num_groups_218596,
                                              &groups_per_segment_229145,
                                              &elements_per_thread_229146,
                                              &virt_num_groups_229147,
                                              &threads_per_segment_229149,
                                              &kernel_arg_231726,
                                              &kernel_arg_231727,
                                              &kernel_arg_231728,
                                              &kernel_arg_231729,
                                              &kernel_arg_231730,
                                              &kernel_arg_231731,
                                              &kernel_arg_231732,
                                              &kernel_arg_231733,
                                              &kernel_arg_231734,
                                              &kernel_arg_231735,
                                              &kernel_arg_231736,
                                              &kernel_arg_231737,
                                              &kernel_arg_231738,
                                              &kernel_arg_231739,
                                              &kernel_arg_231740,
                                              &kernel_arg_231741};
                                        int64_t time_start_231712 = 0,
                                                time_end_231713 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                    "main.segred_large_218606",
                                                    (long) num_groups_218596,
                                                    (long) 1, (long) 1,
                                                    (long) segred_group_sizze_218595,
                                                    (long) 1, (long) 1,
                                                    (int) (0 +
                                                           (shared_sizze_231714 +
                                                            (8 -
                                                             shared_sizze_231714 %
                                                             8) % 8) +
                                                           (shared_sizze_231716 +
                                                            (8 -
                                                             shared_sizze_231716 %
                                                             8) % 8) +
                                                           (shared_sizze_231718 +
                                                            (8 -
                                                             shared_sizze_231718 %
                                                             8) % 8) +
                                                           (shared_sizze_231720 +
                                                            (8 -
                                                             shared_sizze_231720 %
                                                             8) % 8) +
                                                           (shared_sizze_231722 +
                                                            (8 -
                                                             shared_sizze_231722 %
                                                             8) % 8) +
                                                           (shared_sizze_231724 +
                                                            (8 -
                                                             shared_sizze_231724 %
                                                             8) % 8)));
                                            time_start_231712 = get_wall_time();
                                        }
                                        
                                        cudaEvent_t *pevents = NULL;
                                        
                                        if (ctx->profiling &&
                                            !ctx->profiling_paused) {
                                            pevents =
                                                cuda_get_events(&ctx->cuda,
                                                                &ctx->mainzisegred_large_218606_runs,
                                                                &ctx->mainzisegred_large_218606_total_runtime);
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                               0));
                                        }
                                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_large_218606,
                                                                              grid[0],
                                                                              grid[1],
                                                                              grid[2],
                                                                              segred_group_sizze_218595,
                                                                              1,
                                                                              1,
                                                                              0 +
                                                                              (shared_sizze_231714 +
                                                                               (8 -
                                                                                shared_sizze_231714 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231716 +
                                                                               (8 -
                                                                                shared_sizze_231716 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231718 +
                                                                               (8 -
                                                                                shared_sizze_231718 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231720 +
                                                                               (8 -
                                                                                shared_sizze_231720 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231722 +
                                                                               (8 -
                                                                                shared_sizze_231722 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231724 +
                                                                               (8 -
                                                                                shared_sizze_231724 %
                                                                                8) %
                                                                               8),
                                                                              NULL,
                                                                              kernel_args_231711,
                                                                              NULL));
                                        if (pevents != NULL)
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                               0));
                                        if (ctx->debugging) {
                                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                            time_end_231713 = get_wall_time();
                                            fprintf(ctx->log,
                                                    "Kernel %s runtime: %ldus\n",
                                                    "main.segred_large_218606",
                                                    time_end_231713 -
                                                    time_start_231712);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_229158,
                                                              "segred_tmp_mem_229158") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_229156,
                                                              "segred_tmp_mem_229156") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_229154,
                                                              "segred_tmp_mem_229154") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_229152,
                                                              "segred_tmp_mem_229152") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_229150,
                                                              "segred_tmp_mem_229150") !=
                                        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");
                                
                                CUdeviceptr kernel_arg_231745 = mem_224404.mem;
                                CUdeviceptr kernel_arg_231746 = mem_224408.mem;
                                CUdeviceptr kernel_arg_231747 = mem_224412.mem;
                                CUdeviceptr kernel_arg_231748 = mem_224416.mem;
                                CUdeviceptr kernel_arg_231749 = mem_224420.mem;
                                CUdeviceptr kernel_arg_231750 = mem_224425.mem;
                                CUdeviceptr kernel_arg_231751 = mem_224429.mem;
                                CUdeviceptr kernel_arg_231752 = mem_224433.mem;
                                CUdeviceptr kernel_arg_231753 = mem_224437.mem;
                                CUdeviceptr kernel_arg_231754 = mem_224441.mem;
                                
                                if ((((((1 && segmap_usable_groups_218657 !=
                                         0) && 1 != 0) && 1 != 0) &&
                                      segmap_group_sizze_218656 != 0) && 1 !=
                                     0) && 1 != 0) {
                                    int perm[3] = {0, 1, 2};
                                    
                                    if (1 >= 1 << 16) {
                                        perm[1] = perm[0];
                                        perm[0] = 1;
                                    }
                                    if (1 >= 1 << 16) {
                                        perm[2] = perm[0];
                                        perm[0] = 2;
                                    }
                                    
                                    size_t grid[3];
                                    
                                    grid[perm[0]] = segmap_usable_groups_218657;
                                    grid[perm[1]] = 1;
                                    grid[perm[2]] = 1;
                                    
                                    void *kernel_args_231742[] =
                                         {&ctx->global_failure, &m_196691,
                                          &t_n_m_196759, &kernel_arg_231745,
                                          &kernel_arg_231746,
                                          &kernel_arg_231747,
                                          &kernel_arg_231748,
                                          &kernel_arg_231749,
                                          &kernel_arg_231750,
                                          &kernel_arg_231751,
                                          &kernel_arg_231752,
                                          &kernel_arg_231753,
                                          &kernel_arg_231754};
                                    int64_t time_start_231743 = 0,
                                            time_end_231744 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                "main.segmap_218665",
                                                (long) segmap_usable_groups_218657,
                                                (long) 1, (long) 1,
                                                (long) segmap_group_sizze_218656,
                                                (long) 1, (long) 1, (int) 0);
                                        time_start_231743 = get_wall_time();
                                    }
                                    
                                    cudaEvent_t *pevents = NULL;
                                    
                                    if (ctx->profiling &&
                                        !ctx->profiling_paused) {
                                        pevents = cuda_get_events(&ctx->cuda,
                                                                  &ctx->mainzisegmap_218665_runs,
                                                                  &ctx->mainzisegmap_218665_total_runtime);
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                           0));
                                    }
                                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_218665,
                                                                          grid[0],
                                                                          grid[1],
                                                                          grid[2],
                                                                          segmap_group_sizze_218656,
                                                                          1, 1,
                                                                          0,
                                                                          NULL,
                                                                          kernel_args_231742,
                                                                          NULL));
                                    if (pevents != NULL)
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                           0));
                                    if (ctx->debugging) {
                                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                        time_end_231744 = get_wall_time();
                                        fprintf(ctx->log,
                                                "Kernel %s runtime: %ldus\n",
                                                "main.segmap_218665",
                                                time_end_231744 -
                                                time_start_231743);
                                    }
                                }
                                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_229230 =
                                            smax64((int64_t) 1, q_t_196696);
                                    int64_t num_threads_229231 =
                                            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_229230),
                                                '\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_229230))),
                                                '\n');
                                    
                                    unsigned int shared_sizze_231758 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_218699;
                                    unsigned int shared_sizze_231760 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_218699;
                                    CUdeviceptr kernel_arg_231762 =
                                                ext_mem_222256.mem;
                                    CUdeviceptr kernel_arg_231763 =
                                                ext_mem_222257.mem;
                                    CUdeviceptr kernel_arg_231764 =
                                                ext_mem_222517.mem;
                                    CUdeviceptr kernel_arg_231765 =
                                                ext_mem_222518.mem;
                                    CUdeviceptr kernel_arg_231766 =
                                                mem_224386.mem;
                                    CUdeviceptr kernel_arg_231767 =
                                                mem_224390.mem;
                                    CUdeviceptr kernel_arg_231768 =
                                                mem_224425.mem;
                                    CUdeviceptr kernel_arg_231769 =
                                                mem_224429.mem;
                                    CUdeviceptr kernel_arg_231770 =
                                                mem_224433.mem;
                                    CUdeviceptr kernel_arg_231771 =
                                                mem_224437.mem;
                                    CUdeviceptr kernel_arg_231772 =
                                                mem_224441.mem;
                                    CUdeviceptr kernel_arg_231773 =
                                                mem_224446.mem;
                                    CUdeviceptr kernel_arg_231774 =
                                                mem_224450.mem;
                                    unsigned int shared_offset_231759 = 0;
                                    unsigned int shared_offset_231761 = 0 +
                                                 (shared_sizze_231758 + (8 -
                                                                         shared_sizze_231758 %
                                                                         8) %
                                                  8);
                                    
                                    if ((((((1 && num_groups_218700 != 0) &&
                                            1 != 0) && 1 != 0) &&
                                          segred_group_sizze_218699 != 0) &&
                                         1 != 0) && 1 != 0) {
                                        int perm[3] = {0, 1, 2};
                                        
                                        if (1 >= 1 << 16) {
                                            perm[1] = perm[0];
                                            perm[0] = 1;
                                        }
                                        if (1 >= 1 << 16) {
                                            perm[2] = perm[0];
                                            perm[0] = 2;
                                        }
                                        
                                        size_t grid[3];
                                        
                                        grid[perm[0]] = num_groups_218700;
                                        grid[perm[1]] = 1;
                                        grid[perm[2]] = 1;
                                        
                                        void *kernel_args_231755[] =
                                             {&ctx->global_failure,
                                              &shared_offset_231759,
                                              &shared_offset_231761, &m_196691,
                                              &n_196692, &q_t_196696,
                                              &jump_t_196702, &t_n_m_196759,
                                              &i_196779, &num_groups_218700,
                                              &segment_sizze_nonzzero_229230,
                                              &kernel_arg_231762,
                                              &kernel_arg_231763,
                                              &kernel_arg_231764,
                                              &kernel_arg_231765,
                                              &kernel_arg_231766,
                                              &kernel_arg_231767,
                                              &kernel_arg_231768,
                                              &kernel_arg_231769,
                                              &kernel_arg_231770,
                                              &kernel_arg_231771,
                                              &kernel_arg_231772,
                                              &kernel_arg_231773,
                                              &kernel_arg_231774};
                                        int64_t time_start_231756 = 0,
                                                time_end_231757 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                    "main.segred_small_218707",
                                                    (long) num_groups_218700,
                                                    (long) 1, (long) 1,
                                                    (long) segred_group_sizze_218699,
                                                    (long) 1, (long) 1,
                                                    (int) (0 +
                                                           (shared_sizze_231758 +
                                                            (8 -
                                                             shared_sizze_231758 %
                                                             8) % 8) +
                                                           (shared_sizze_231760 +
                                                            (8 -
                                                             shared_sizze_231760 %
                                                             8) % 8)));
                                            time_start_231756 = get_wall_time();
                                        }
                                        
                                        cudaEvent_t *pevents = NULL;
                                        
                                        if (ctx->profiling &&
                                            !ctx->profiling_paused) {
                                            pevents =
                                                cuda_get_events(&ctx->cuda,
                                                                &ctx->mainzisegred_small_218707_runs,
                                                                &ctx->mainzisegred_small_218707_total_runtime);
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                               0));
                                        }
                                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_small_218707,
                                                                              grid[0],
                                                                              grid[1],
                                                                              grid[2],
                                                                              segred_group_sizze_218699,
                                                                              1,
                                                                              1,
                                                                              0 +
                                                                              (shared_sizze_231758 +
                                                                               (8 -
                                                                                shared_sizze_231758 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231760 +
                                                                               (8 -
                                                                                shared_sizze_231760 %
                                                                                8) %
                                                                               8),
                                                                              NULL,
                                                                              kernel_args_231755,
                                                                              NULL));
                                        if (pevents != NULL)
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                               0));
                                        if (ctx->debugging) {
                                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                            time_end_231757 = get_wall_time();
                                            fprintf(ctx->log,
                                                    "Kernel %s runtime: %ldus\n",
                                                    "main.segred_small_218707",
                                                    time_end_231757 -
                                                    time_start_231756);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                } else {
                                    int64_t groups_per_segment_229265 =
                                            sdiv_up64(num_groups_218700,
                                                      smax64((int64_t) 1,
                                                             m_196691 *
                                                             t_n_m_196759));
                                    int64_t elements_per_thread_229266 =
                                            sdiv_up64(q_t_196696,
                                                      segred_group_sizze_218699 *
                                                      groups_per_segment_229265);
                                    int64_t virt_num_groups_229267 =
                                            groups_per_segment_229265 *
                                            (m_196691 * t_n_m_196759);
                                    int64_t num_threads_229268 =
                                            num_groups_218700 *
                                            segred_group_sizze_218699;
                                    int64_t threads_per_segment_229269 =
                                            groups_per_segment_229265 *
                                            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_229267,
                                                '\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_229266,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "groups_per_segment",
                                                (long long) groups_per_segment_229265,
                                                '\n');
                                    
                                    struct memblock_device
                                    segred_tmp_mem_229270;
                                    
                                    segred_tmp_mem_229270.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_229270,
                                                              (int64_t) 4 *
                                                              virt_num_groups_229267,
                                                              "segred_tmp_mem_229270")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_229272;
                                    
                                    segred_tmp_mem_229272.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_229272,
                                                              (int64_t) 4 *
                                                              virt_num_groups_229267,
                                                              "segred_tmp_mem_229272")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    mainzicounter_mem_229274 =
                                    ctx->mainzicounter_mem_229274;
                                    unsigned int shared_sizze_231779 = 1;
                                    unsigned int shared_sizze_231781 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_218699;
                                    unsigned int shared_sizze_231783 =
                                                 (int64_t) 4 *
                                                 segred_group_sizze_218699;
                                    CUdeviceptr kernel_arg_231785 =
                                                ext_mem_222256.mem;
                                    CUdeviceptr kernel_arg_231786 =
                                                ext_mem_222257.mem;
                                    CUdeviceptr kernel_arg_231787 =
                                                ext_mem_222517.mem;
                                    CUdeviceptr kernel_arg_231788 =
                                                ext_mem_222518.mem;
                                    CUdeviceptr kernel_arg_231789 =
                                                mem_224386.mem;
                                    CUdeviceptr kernel_arg_231790 =
                                                mem_224390.mem;
                                    CUdeviceptr kernel_arg_231791 =
                                                mem_224425.mem;
                                    CUdeviceptr kernel_arg_231792 =
                                                mem_224429.mem;
                                    CUdeviceptr kernel_arg_231793 =
                                                mem_224433.mem;
                                    CUdeviceptr kernel_arg_231794 =
                                                mem_224437.mem;
                                    CUdeviceptr kernel_arg_231795 =
                                                mem_224441.mem;
                                    CUdeviceptr kernel_arg_231796 =
                                                mem_224446.mem;
                                    CUdeviceptr kernel_arg_231797 =
                                                mem_224450.mem;
                                    CUdeviceptr kernel_arg_231798 =
                                                segred_tmp_mem_229270.mem;
                                    CUdeviceptr kernel_arg_231799 =
                                                segred_tmp_mem_229272.mem;
                                    CUdeviceptr kernel_arg_231800 =
                                                mainzicounter_mem_229274.mem;
                                    unsigned int shared_offset_231780 = 0;
                                    unsigned int shared_offset_231782 = 0 +
                                                 (shared_sizze_231779 + (8 -
                                                                         shared_sizze_231779 %
                                                                         8) %
                                                  8);
                                    unsigned int shared_offset_231784 = 0 +
                                                 (shared_sizze_231779 + (8 -
                                                                         shared_sizze_231779 %
                                                                         8) %
                                                  8) + (shared_sizze_231781 +
                                                        (8 -
                                                         shared_sizze_231781 %
                                                         8) % 8);
                                    
                                    if ((((((1 && num_groups_218700 != 0) &&
                                            1 != 0) && 1 != 0) &&
                                          segred_group_sizze_218699 != 0) &&
                                         1 != 0) && 1 != 0) {
                                        int perm[3] = {0, 1, 2};
                                        
                                        if (1 >= 1 << 16) {
                                            perm[1] = perm[0];
                                            perm[0] = 1;
                                        }
                                        if (1 >= 1 << 16) {
                                            perm[2] = perm[0];
                                            perm[0] = 2;
                                        }
                                        
                                        size_t grid[3];
                                        
                                        grid[perm[0]] = num_groups_218700;
                                        grid[perm[1]] = 1;
                                        grid[perm[2]] = 1;
                                        
                                        void *kernel_args_231776[] =
                                             {&ctx->global_failure,
                                              &shared_offset_231780,
                                              &shared_offset_231782,
                                              &shared_offset_231784, &m_196691,
                                              &n_196692, &q_t_196696,
                                              &jump_t_196702, &t_n_m_196759,
                                              &i_196779, &num_groups_218700,
                                              &groups_per_segment_229265,
                                              &elements_per_thread_229266,
                                              &virt_num_groups_229267,
                                              &threads_per_segment_229269,
                                              &kernel_arg_231785,
                                              &kernel_arg_231786,
                                              &kernel_arg_231787,
                                              &kernel_arg_231788,
                                              &kernel_arg_231789,
                                              &kernel_arg_231790,
                                              &kernel_arg_231791,
                                              &kernel_arg_231792,
                                              &kernel_arg_231793,
                                              &kernel_arg_231794,
                                              &kernel_arg_231795,
                                              &kernel_arg_231796,
                                              &kernel_arg_231797,
                                              &kernel_arg_231798,
                                              &kernel_arg_231799,
                                              &kernel_arg_231800};
                                        int64_t time_start_231777 = 0,
                                                time_end_231778 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                    "main.segred_large_218707",
                                                    (long) num_groups_218700,
                                                    (long) 1, (long) 1,
                                                    (long) segred_group_sizze_218699,
                                                    (long) 1, (long) 1,
                                                    (int) (0 +
                                                           (shared_sizze_231779 +
                                                            (8 -
                                                             shared_sizze_231779 %
                                                             8) % 8) +
                                                           (shared_sizze_231781 +
                                                            (8 -
                                                             shared_sizze_231781 %
                                                             8) % 8) +
                                                           (shared_sizze_231783 +
                                                            (8 -
                                                             shared_sizze_231783 %
                                                             8) % 8)));
                                            time_start_231777 = get_wall_time();
                                        }
                                        
                                        cudaEvent_t *pevents = NULL;
                                        
                                        if (ctx->profiling &&
                                            !ctx->profiling_paused) {
                                            pevents =
                                                cuda_get_events(&ctx->cuda,
                                                                &ctx->mainzisegred_large_218707_runs,
                                                                &ctx->mainzisegred_large_218707_total_runtime);
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                               0));
                                        }
                                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_large_218707,
                                                                              grid[0],
                                                                              grid[1],
                                                                              grid[2],
                                                                              segred_group_sizze_218699,
                                                                              1,
                                                                              1,
                                                                              0 +
                                                                              (shared_sizze_231779 +
                                                                               (8 -
                                                                                shared_sizze_231779 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231781 +
                                                                               (8 -
                                                                                shared_sizze_231781 %
                                                                                8) %
                                                                               8) +
                                                                              (shared_sizze_231783 +
                                                                               (8 -
                                                                                shared_sizze_231783 %
                                                                                8) %
                                                                               8),
                                                                              NULL,
                                                                              kernel_args_231776,
                                                                              NULL));
                                        if (pevents != NULL)
                                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                               0));
                                        if (ctx->debugging) {
                                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                            time_end_231778 = get_wall_time();
                                            fprintf(ctx->log,
                                                    "Kernel %s runtime: %ldus\n",
                                                    "main.segred_large_218707",
                                                    time_end_231778 -
                                                    time_start_231777);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_229272,
                                                              "segred_tmp_mem_229272") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_229270,
                                                              "segred_tmp_mem_229270") !=
                                        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");
                    
                    CUdeviceptr kernel_arg_231804 = Y_mem_222225.mem;
                    CUdeviceptr kernel_arg_231805 = mem_223977.mem;
                    CUdeviceptr kernel_arg_231806 = mem_224477.mem;
                    
                    if ((((((1 && segmap_usable_groups_218952 != 0) && 1 !=
                            0) && 1 != 0) && segmap_group_sizze_218951 != 0) &&
                         1 != 0) && 1 != 0) {
                        int perm[3] = {0, 1, 2};
                        
                        if (1 >= 1 << 16) {
                            perm[1] = perm[0];
                            perm[0] = 1;
                        }
                        if (1 >= 1 << 16) {
                            perm[2] = perm[0];
                            perm[0] = 2;
                        }
                        
                        size_t grid[3];
                        
                        grid[perm[0]] = segmap_usable_groups_218952;
                        grid[perm[1]] = 1;
                        grid[perm[2]] = 1;
                        
                        void *kernel_args_231801[] = {&ctx->global_failure,
                                                      &m_196691, &n_196692,
                                                      &kernel_arg_231804,
                                                      &kernel_arg_231805,
                                                      &kernel_arg_231806};
                        int64_t time_start_231802 = 0, time_end_231803 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                    "main.segmap_218956",
                                    (long) segmap_usable_groups_218952,
                                    (long) 1, (long) 1,
                                    (long) segmap_group_sizze_218951, (long) 1,
                                    (long) 1, (int) 0);
                            time_start_231802 = get_wall_time();
                        }
                        
                        cudaEvent_t *pevents = NULL;
                        
                        if (ctx->profiling && !ctx->profiling_paused) {
                            pevents = cuda_get_events(&ctx->cuda,
                                                      &ctx->mainzisegmap_218956_runs,
                                                      &ctx->mainzisegmap_218956_total_runtime);
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                        }
                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_218956,
                                                              grid[0], grid[1],
                                                              grid[2],
                                                              segmap_group_sizze_218951,
                                                              1, 1, 0, NULL,
                                                              kernel_args_231801,
                                                              NULL));
                        if (pevents != NULL)
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                        if (ctx->debugging) {
                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                            time_end_231803 = get_wall_time();
                            fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                    "main.segmap_218956", time_end_231803 -
                                    time_start_231802);
                        }
                    }
                    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");
                    
                    CUdeviceptr kernel_arg_231810 = ext_mem_222257.mem;
                    CUdeviceptr kernel_arg_231811 = mem_param_222550.mem;
                    CUdeviceptr kernel_arg_231812 = mem_224477.mem;
                    CUdeviceptr kernel_arg_231813 = mem_224482.mem;
                    CUdeviceptr kernel_arg_231814 = mem_224486.mem;
                    
                    if ((((((1 && segmap_usable_groups_218968 != 0) && 1 !=
                            0) && 1 != 0) && segmap_group_sizze_218967 != 0) &&
                         1 != 0) && 1 != 0) {
                        int perm[3] = {0, 1, 2};
                        
                        if (1 >= 1 << 16) {
                            perm[1] = perm[0];
                            perm[0] = 1;
                        }
                        if (1 >= 1 << 16) {
                            perm[2] = perm[0];
                            perm[0] = 2;
                        }
                        
                        size_t grid[3];
                        
                        grid[perm[0]] = segmap_usable_groups_218968;
                        grid[perm[1]] = 1;
                        grid[perm[2]] = 1;
                        
                        void *kernel_args_231807[] = {&ctx->global_failure,
                                                      &ctx->failure_is_an_option,
                                                      &ctx->global_failure_args,
                                                      &m_196691, &n_196692,
                                                      &ctx_param_ext_222545,
                                                      &ctx_param_ext_222546,
                                                      &ctx_param_ext_222548,
                                                      &kernel_arg_231810,
                                                      &kernel_arg_231811,
                                                      &kernel_arg_231812,
                                                      &kernel_arg_231813,
                                                      &kernel_arg_231814};
                        int64_t time_start_231808 = 0, time_end_231809 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                    "main.segmap_218973",
                                    (long) segmap_usable_groups_218968,
                                    (long) 1, (long) 1,
                                    (long) segmap_group_sizze_218967, (long) 1,
                                    (long) 1, (int) 0);
                            time_start_231808 = get_wall_time();
                        }
                        
                        cudaEvent_t *pevents = NULL;
                        
                        if (ctx->profiling && !ctx->profiling_paused) {
                            pevents = cuda_get_events(&ctx->cuda,
                                                      &ctx->mainzisegmap_218973_runs,
                                                      &ctx->mainzisegmap_218973_total_runtime);
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                        }
                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_218973,
                                                              grid[0], grid[1],
                                                              grid[2],
                                                              segmap_group_sizze_218967,
                                                              1, 1, 0, NULL,
                                                              kernel_args_231807,
                                                              NULL));
                        if (pevents != NULL)
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                        if (ctx->debugging) {
                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                            time_end_231809 = get_wall_time();
                            fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                    "main.segmap_218973", time_end_231809 -
                                    time_start_231808);
                        }
                    }
                    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");
                    
                    unsigned int shared_sizze_231818 = (int64_t) 4 * q_t_196696;
                    unsigned int shared_sizze_231820 = (int64_t) 4 * q_t_196696;
                    unsigned int shared_sizze_231822 = bytes_224490;
                    CUdeviceptr kernel_arg_231824 = ext_mem_222256.mem;
                    CUdeviceptr kernel_arg_231825 = ext_mem_222257.mem;
                    CUdeviceptr kernel_arg_231826 = ext_mem_222517.mem;
                    CUdeviceptr kernel_arg_231827 = ext_mem_222518.mem;
                    CUdeviceptr kernel_arg_231828 = mem_224482.mem;
                    CUdeviceptr kernel_arg_231829 = mem_224486.mem;
                    CUdeviceptr kernel_arg_231830 = mem_224496.mem;
                    unsigned int shared_offset_231819 = 0;
                    unsigned int shared_offset_231821 = 0 +
                                 (shared_sizze_231818 + (8 -
                                                         shared_sizze_231818 %
                                                         8) % 8);
                    unsigned int shared_offset_231823 = 0 +
                                 (shared_sizze_231818 + (8 -
                                                         shared_sizze_231818 %
                                                         8) % 8) +
                                 (shared_sizze_231820 + (8 -
                                                         shared_sizze_231820 %
                                                         8) % 8);
                    
                    if ((((((1 && nest_sizze_203201 != 0) && 1 != 0) && 1 !=
                           0) && q_t_196696 != 0) && 1 != 0) && 1 != 0) {
                        int perm[3] = {0, 1, 2};
                        
                        if (1 >= 1 << 16) {
                            perm[1] = perm[0];
                            perm[0] = 1;
                        }
                        if (1 >= 1 << 16) {
                            perm[2] = perm[0];
                            perm[0] = 2;
                        }
                        
                        size_t grid[3];
                        
                        grid[perm[0]] = nest_sizze_203201;
                        grid[perm[1]] = 1;
                        grid[perm[2]] = 1;
                        
                        void *kernel_args_231815[] = {&ctx->global_failure,
                                                      &shared_offset_231819,
                                                      &shared_offset_231821,
                                                      &shared_offset_231823,
                                                      &m_196691, &n_196692,
                                                      &q_t_196696,
                                                      &jump_t_196702,
                                                      &t_n_m_196759, &i_196779,
                                                      &kernel_arg_231824,
                                                      &kernel_arg_231825,
                                                      &kernel_arg_231826,
                                                      &kernel_arg_231827,
                                                      &kernel_arg_231828,
                                                      &kernel_arg_231829,
                                                      &kernel_arg_231830};
                        int64_t time_start_231816 = 0, time_end_231817 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                    "main.segmap_intragroup_219000",
                                    (long) nest_sizze_203201, (long) 1,
                                    (long) 1, (long) q_t_196696, (long) 1,
                                    (long) 1, (int) (0 + (shared_sizze_231818 +
                                                          (8 -
                                                           shared_sizze_231818 %
                                                           8) % 8) +
                                                     (shared_sizze_231820 + (8 -
                                                                             shared_sizze_231820 %
                                                                             8) %
                                                      8) +
                                                     (shared_sizze_231822 + (8 -
                                                                             shared_sizze_231822 %
                                                                             8) %
                                                      8)));
                            time_start_231816 = get_wall_time();
                        }
                        
                        cudaEvent_t *pevents = NULL;
                        
                        if (ctx->profiling && !ctx->profiling_paused) {
                            pevents = cuda_get_events(&ctx->cuda,
                                                      &ctx->mainzisegmap_intragroup_219000_runs,
                                                      &ctx->mainzisegmap_intragroup_219000_total_runtime);
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                        }
                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_intragroup_219000,
                                                              grid[0], grid[1],
                                                              grid[2],
                                                              q_t_196696, 1, 1,
                                                              0 +
                                                              (shared_sizze_231818 +
                                                               (8 -
                                                                shared_sizze_231818 %
                                                                8) % 8) +
                                                              (shared_sizze_231820 +
                                                               (8 -
                                                                shared_sizze_231820 %
                                                                8) % 8) +
                                                              (shared_sizze_231822 +
                                                               (8 -
                                                                shared_sizze_231822 %
                                                                8) % 8), NULL,
                                                              kernel_args_231815,
                                                              NULL));
                        if (pevents != NULL)
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                        if (ctx->debugging) {
                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                            time_end_231817 = get_wall_time();
                            fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                    "main.segmap_intragroup_219000",
                                    time_end_231817 - time_start_231816);
                        }
                    }
                    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");
                        
                        CUdeviceptr kernel_arg_231834 = Y_mem_222225.mem;
                        CUdeviceptr kernel_arg_231835 = mem_223977.mem;
                        CUdeviceptr kernel_arg_231836 = mem_224501.mem;
                        
                        if ((((((1 && segmap_usable_groups_219264 != 0) && 1 !=
                                0) && 1 != 0) && segmap_group_sizze_219263 !=
                              0) && 1 != 0) && 1 != 0) {
                            int perm[3] = {0, 1, 2};
                            
                            if (1 >= 1 << 16) {
                                perm[1] = perm[0];
                                perm[0] = 1;
                            }
                            if (1 >= 1 << 16) {
                                perm[2] = perm[0];
                                perm[0] = 2;
                            }
                            
                            size_t grid[3];
                            
                            grid[perm[0]] = segmap_usable_groups_219264;
                            grid[perm[1]] = 1;
                            grid[perm[2]] = 1;
                            
                            void *kernel_args_231831[] = {&ctx->global_failure,
                                                          &m_196691, &n_196692,
                                                          &kernel_arg_231834,
                                                          &kernel_arg_231835,
                                                          &kernel_arg_231836};
                            int64_t time_start_231832 = 0, time_end_231833 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                        "main.segmap_219268",
                                        (long) segmap_usable_groups_219264,
                                        (long) 1, (long) 1,
                                        (long) segmap_group_sizze_219263,
                                        (long) 1, (long) 1, (int) 0);
                                time_start_231832 = get_wall_time();
                            }
                            
                            cudaEvent_t *pevents = NULL;
                            
                            if (ctx->profiling && !ctx->profiling_paused) {
                                pevents = cuda_get_events(&ctx->cuda,
                                                          &ctx->mainzisegmap_219268_runs,
                                                          &ctx->mainzisegmap_219268_total_runtime);
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                   0));
                            }
                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_219268,
                                                                  grid[0],
                                                                  grid[1],
                                                                  grid[2],
                                                                  segmap_group_sizze_219263,
                                                                  1, 1, 0, NULL,
                                                                  kernel_args_231831,
                                                                  NULL));
                            if (pevents != NULL)
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                   0));
                            if (ctx->debugging) {
                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                time_end_231833 = get_wall_time();
                                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                        "main.segmap_219268", time_end_231833 -
                                        time_start_231832);
                            }
                        }
                        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");
                        
                        CUdeviceptr kernel_arg_231840 = ext_mem_222257.mem;
                        CUdeviceptr kernel_arg_231841 = mem_param_222550.mem;
                        CUdeviceptr kernel_arg_231842 = mem_224501.mem;
                        CUdeviceptr kernel_arg_231843 = mem_224506.mem;
                        CUdeviceptr kernel_arg_231844 = mem_224510.mem;
                        
                        if ((((((1 && segmap_usable_groups_219280 != 0) && 1 !=
                                0) && 1 != 0) && segmap_group_sizze_219279 !=
                              0) && 1 != 0) && 1 != 0) {
                            int perm[3] = {0, 1, 2};
                            
                            if (1 >= 1 << 16) {
                                perm[1] = perm[0];
                                perm[0] = 1;
                            }
                            if (1 >= 1 << 16) {
                                perm[2] = perm[0];
                                perm[0] = 2;
                            }
                            
                            size_t grid[3];
                            
                            grid[perm[0]] = segmap_usable_groups_219280;
                            grid[perm[1]] = 1;
                            grid[perm[2]] = 1;
                            
                            void *kernel_args_231837[] = {&ctx->global_failure,
                                                          &ctx->failure_is_an_option,
                                                          &ctx->global_failure_args,
                                                          &m_196691, &n_196692,
                                                          &ctx_param_ext_222545,
                                                          &ctx_param_ext_222546,
                                                          &ctx_param_ext_222548,
                                                          &kernel_arg_231840,
                                                          &kernel_arg_231841,
                                                          &kernel_arg_231842,
                                                          &kernel_arg_231843,
                                                          &kernel_arg_231844};
                            int64_t time_start_231838 = 0, time_end_231839 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                        "main.segmap_219285",
                                        (long) segmap_usable_groups_219280,
                                        (long) 1, (long) 1,
                                        (long) segmap_group_sizze_219279,
                                        (long) 1, (long) 1, (int) 0);
                                time_start_231838 = get_wall_time();
                            }
                            
                            cudaEvent_t *pevents = NULL;
                            
                            if (ctx->profiling && !ctx->profiling_paused) {
                                pevents = cuda_get_events(&ctx->cuda,
                                                          &ctx->mainzisegmap_219285_runs,
                                                          &ctx->mainzisegmap_219285_total_runtime);
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                   0));
                            }
                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_219285,
                                                                  grid[0],
                                                                  grid[1],
                                                                  grid[2],
                                                                  segmap_group_sizze_219279,
                                                                  1, 1, 0, NULL,
                                                                  kernel_args_231837,
                                                                  NULL));
                            if (pevents != NULL)
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                   0));
                            if (ctx->debugging) {
                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                time_end_231839 = get_wall_time();
                                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                        "main.segmap_219285", time_end_231839 -
                                        time_start_231838);
                            }
                        }
                        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");
                        
                        unsigned int shared_sizze_231848 = (int64_t) 4 *
                                     q_t_196696;
                        unsigned int shared_sizze_231850 = (int64_t) 4 *
                                     q_t_196696;
                        unsigned int shared_sizze_231852 = (int64_t) 4 *
                                     q_t_196696;
                        unsigned int shared_sizze_231854 = (int64_t) 4 *
                                     q_t_196696;
                        unsigned int shared_sizze_231856 = (int64_t) 4 *
                                     q_t_196696;
                        unsigned int shared_sizze_231858 = bytes_224490;
                        unsigned int shared_sizze_231860 = bytes_224490;
                        CUdeviceptr kernel_arg_231862 = ext_mem_222256.mem;
                        CUdeviceptr kernel_arg_231863 = ext_mem_222257.mem;
                        CUdeviceptr kernel_arg_231864 = ext_mem_222517.mem;
                        CUdeviceptr kernel_arg_231865 = ext_mem_222518.mem;
                        CUdeviceptr kernel_arg_231866 = mem_224506.mem;
                        CUdeviceptr kernel_arg_231867 = mem_224510.mem;
                        CUdeviceptr kernel_arg_231868 = mem_224523.mem;
                        CUdeviceptr kernel_arg_231869 = mem_224527.mem;
                        unsigned int shared_offset_231849 = 0;
                        unsigned int shared_offset_231851 = 0 +
                                     (shared_sizze_231848 + (8 -
                                                             shared_sizze_231848 %
                                                             8) % 8);
                        unsigned int shared_offset_231853 = 0 +
                                     (shared_sizze_231848 + (8 -
                                                             shared_sizze_231848 %
                                                             8) % 8) +
                                     (shared_sizze_231850 + (8 -
                                                             shared_sizze_231850 %
                                                             8) % 8);
                        unsigned int shared_offset_231855 = 0 +
                                     (shared_sizze_231848 + (8 -
                                                             shared_sizze_231848 %
                                                             8) % 8) +
                                     (shared_sizze_231850 + (8 -
                                                             shared_sizze_231850 %
                                                             8) % 8) +
                                     (shared_sizze_231852 + (8 -
                                                             shared_sizze_231852 %
                                                             8) % 8);
                        unsigned int shared_offset_231857 = 0 +
                                     (shared_sizze_231848 + (8 -
                                                             shared_sizze_231848 %
                                                             8) % 8) +
                                     (shared_sizze_231850 + (8 -
                                                             shared_sizze_231850 %
                                                             8) % 8) +
                                     (shared_sizze_231852 + (8 -
                                                             shared_sizze_231852 %
                                                             8) % 8) +
                                     (shared_sizze_231854 + (8 -
                                                             shared_sizze_231854 %
                                                             8) % 8);
                        unsigned int shared_offset_231859 = 0 +
                                     (shared_sizze_231848 + (8 -
                                                             shared_sizze_231848 %
                                                             8) % 8) +
                                     (shared_sizze_231850 + (8 -
                                                             shared_sizze_231850 %
                                                             8) % 8) +
                                     (shared_sizze_231852 + (8 -
                                                             shared_sizze_231852 %
                                                             8) % 8) +
                                     (shared_sizze_231854 + (8 -
                                                             shared_sizze_231854 %
                                                             8) % 8) +
                                     (shared_sizze_231856 + (8 -
                                                             shared_sizze_231856 %
                                                             8) % 8);
                        unsigned int shared_offset_231861 = 0 +
                                     (shared_sizze_231848 + (8 -
                                                             shared_sizze_231848 %
                                                             8) % 8) +
                                     (shared_sizze_231850 + (8 -
                                                             shared_sizze_231850 %
                                                             8) % 8) +
                                     (shared_sizze_231852 + (8 -
                                                             shared_sizze_231852 %
                                                             8) % 8) +
                                     (shared_sizze_231854 + (8 -
                                                             shared_sizze_231854 %
                                                             8) % 8) +
                                     (shared_sizze_231856 + (8 -
                                                             shared_sizze_231856 %
                                                             8) % 8) +
                                     (shared_sizze_231858 + (8 -
                                                             shared_sizze_231858 %
                                                             8) % 8);
                        
                        if ((((((1 && nest_sizze_203201 != 0) && 1 != 0) && 1 !=
                               0) && q_t_196696 != 0) && 1 != 0) && 1 != 0) {
                            int perm[3] = {0, 1, 2};
                            
                            if (1 >= 1 << 16) {
                                perm[1] = perm[0];
                                perm[0] = 1;
                            }
                            if (1 >= 1 << 16) {
                                perm[2] = perm[0];
                                perm[0] = 2;
                            }
                            
                            size_t grid[3];
                            
                            grid[perm[0]] = nest_sizze_203201;
                            grid[perm[1]] = 1;
                            grid[perm[2]] = 1;
                            
                            void *kernel_args_231845[] = {&ctx->global_failure,
                                                          &shared_offset_231849,
                                                          &shared_offset_231851,
                                                          &shared_offset_231853,
                                                          &shared_offset_231855,
                                                          &shared_offset_231857,
                                                          &shared_offset_231859,
                                                          &shared_offset_231861,
                                                          &m_196691, &n_196692,
                                                          &q_t_196696,
                                                          &jump_t_196702,
                                                          &t_n_m_196759,
                                                          &i_196779,
                                                          &kernel_arg_231862,
                                                          &kernel_arg_231863,
                                                          &kernel_arg_231864,
                                                          &kernel_arg_231865,
                                                          &kernel_arg_231866,
                                                          &kernel_arg_231867,
                                                          &kernel_arg_231868,
                                                          &kernel_arg_231869};
                            int64_t time_start_231846 = 0, time_end_231847 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                        "main.segmap_intragroup_219313",
                                        (long) nest_sizze_203201, (long) 1,
                                        (long) 1, (long) q_t_196696, (long) 1,
                                        (long) 1, (int) (0 +
                                                         (shared_sizze_231848 +
                                                          (8 -
                                                           shared_sizze_231848 %
                                                           8) % 8) +
                                                         (shared_sizze_231850 +
                                                          (8 -
                                                           shared_sizze_231850 %
                                                           8) % 8) +
                                                         (shared_sizze_231852 +
                                                          (8 -
                                                           shared_sizze_231852 %
                                                           8) % 8) +
                                                         (shared_sizze_231854 +
                                                          (8 -
                                                           shared_sizze_231854 %
                                                           8) % 8) +
                                                         (shared_sizze_231856 +
                                                          (8 -
                                                           shared_sizze_231856 %
                                                           8) % 8) +
                                                         (shared_sizze_231858 +
                                                          (8 -
                                                           shared_sizze_231858 %
                                                           8) % 8) +
                                                         (shared_sizze_231860 +
                                                          (8 -
                                                           shared_sizze_231860 %
                                                           8) % 8)));
                                time_start_231846 = get_wall_time();
                            }
                            
                            cudaEvent_t *pevents = NULL;
                            
                            if (ctx->profiling && !ctx->profiling_paused) {
                                pevents = cuda_get_events(&ctx->cuda,
                                                          &ctx->mainzisegmap_intragroup_219313_runs,
                                                          &ctx->mainzisegmap_intragroup_219313_total_runtime);
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                   0));
                            }
                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_intragroup_219313,
                                                                  grid[0],
                                                                  grid[1],
                                                                  grid[2],
                                                                  q_t_196696, 1,
                                                                  1, 0 +
                                                                  (shared_sizze_231848 +
                                                                   (8 -
                                                                    shared_sizze_231848 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231850 +
                                                                   (8 -
                                                                    shared_sizze_231850 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231852 +
                                                                   (8 -
                                                                    shared_sizze_231852 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231854 +
                                                                   (8 -
                                                                    shared_sizze_231854 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231856 +
                                                                   (8 -
                                                                    shared_sizze_231856 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231858 +
                                                                   (8 -
                                                                    shared_sizze_231858 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231860 +
                                                                   (8 -
                                                                    shared_sizze_231860 %
                                                                    8) % 8),
                                                                  NULL,
                                                                  kernel_args_231845,
                                                                  NULL));
                            if (pevents != NULL)
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                   0));
                            if (ctx->debugging) {
                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                time_end_231847 = get_wall_time();
                                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                        "main.segmap_intragroup_219313",
                                        time_end_231847 - time_start_231846);
                            }
                        }
                        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");
                        
                        CUdeviceptr kernel_arg_231873 = Y_mem_222225.mem;
                        CUdeviceptr kernel_arg_231874 = mem_223977.mem;
                        CUdeviceptr kernel_arg_231875 = mem_224532.mem;
                        
                        if ((((((1 && segmap_usable_groups_219668 != 0) && 1 !=
                                0) && 1 != 0) && segmap_group_sizze_219667 !=
                              0) && 1 != 0) && 1 != 0) {
                            int perm[3] = {0, 1, 2};
                            
                            if (1 >= 1 << 16) {
                                perm[1] = perm[0];
                                perm[0] = 1;
                            }
                            if (1 >= 1 << 16) {
                                perm[2] = perm[0];
                                perm[0] = 2;
                            }
                            
                            size_t grid[3];
                            
                            grid[perm[0]] = segmap_usable_groups_219668;
                            grid[perm[1]] = 1;
                            grid[perm[2]] = 1;
                            
                            void *kernel_args_231870[] = {&ctx->global_failure,
                                                          &m_196691, &n_196692,
                                                          &kernel_arg_231873,
                                                          &kernel_arg_231874,
                                                          &kernel_arg_231875};
                            int64_t time_start_231871 = 0, time_end_231872 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                        "main.segmap_219672",
                                        (long) segmap_usable_groups_219668,
                                        (long) 1, (long) 1,
                                        (long) segmap_group_sizze_219667,
                                        (long) 1, (long) 1, (int) 0);
                                time_start_231871 = get_wall_time();
                            }
                            
                            cudaEvent_t *pevents = NULL;
                            
                            if (ctx->profiling && !ctx->profiling_paused) {
                                pevents = cuda_get_events(&ctx->cuda,
                                                          &ctx->mainzisegmap_219672_runs,
                                                          &ctx->mainzisegmap_219672_total_runtime);
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                   0));
                            }
                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_219672,
                                                                  grid[0],
                                                                  grid[1],
                                                                  grid[2],
                                                                  segmap_group_sizze_219667,
                                                                  1, 1, 0, NULL,
                                                                  kernel_args_231870,
                                                                  NULL));
                            if (pevents != NULL)
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                   0));
                            if (ctx->debugging) {
                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                time_end_231872 = get_wall_time();
                                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                        "main.segmap_219672", time_end_231872 -
                                        time_start_231871);
                            }
                        }
                        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");
                        
                        CUdeviceptr kernel_arg_231879 = ext_mem_222257.mem;
                        CUdeviceptr kernel_arg_231880 = mem_param_222550.mem;
                        CUdeviceptr kernel_arg_231881 = mem_224532.mem;
                        CUdeviceptr kernel_arg_231882 = mem_224537.mem;
                        CUdeviceptr kernel_arg_231883 = mem_224541.mem;
                        
                        if ((((((1 && segmap_usable_groups_219684 != 0) && 1 !=
                                0) && 1 != 0) && segmap_group_sizze_219683 !=
                              0) && 1 != 0) && 1 != 0) {
                            int perm[3] = {0, 1, 2};
                            
                            if (1 >= 1 << 16) {
                                perm[1] = perm[0];
                                perm[0] = 1;
                            }
                            if (1 >= 1 << 16) {
                                perm[2] = perm[0];
                                perm[0] = 2;
                            }
                            
                            size_t grid[3];
                            
                            grid[perm[0]] = segmap_usable_groups_219684;
                            grid[perm[1]] = 1;
                            grid[perm[2]] = 1;
                            
                            void *kernel_args_231876[] = {&ctx->global_failure,
                                                          &ctx->failure_is_an_option,
                                                          &ctx->global_failure_args,
                                                          &m_196691, &n_196692,
                                                          &ctx_param_ext_222545,
                                                          &ctx_param_ext_222546,
                                                          &ctx_param_ext_222548,
                                                          &kernel_arg_231879,
                                                          &kernel_arg_231880,
                                                          &kernel_arg_231881,
                                                          &kernel_arg_231882,
                                                          &kernel_arg_231883};
                            int64_t time_start_231877 = 0, time_end_231878 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                        "main.segmap_219689",
                                        (long) segmap_usable_groups_219684,
                                        (long) 1, (long) 1,
                                        (long) segmap_group_sizze_219683,
                                        (long) 1, (long) 1, (int) 0);
                                time_start_231877 = get_wall_time();
                            }
                            
                            cudaEvent_t *pevents = NULL;
                            
                            if (ctx->profiling && !ctx->profiling_paused) {
                                pevents = cuda_get_events(&ctx->cuda,
                                                          &ctx->mainzisegmap_219689_runs,
                                                          &ctx->mainzisegmap_219689_total_runtime);
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                   0));
                            }
                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_219689,
                                                                  grid[0],
                                                                  grid[1],
                                                                  grid[2],
                                                                  segmap_group_sizze_219683,
                                                                  1, 1, 0, NULL,
                                                                  kernel_args_231876,
                                                                  NULL));
                            if (pevents != NULL)
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                   0));
                            if (ctx->debugging) {
                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                time_end_231878 = get_wall_time();
                                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                        "main.segmap_219689", time_end_231878 -
                                        time_start_231877);
                            }
                        }
                        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");
                        
                        unsigned int shared_sizze_231887 = (int64_t) 4 *
                                     q_t_196696;
                        unsigned int shared_sizze_231889 = (int64_t) 4 *
                                     q_t_196696;
                        unsigned int shared_sizze_231891 = (int64_t) 4 *
                                     q_t_196696;
                        unsigned int shared_sizze_231893 = (int64_t) 4 *
                                     q_t_196696;
                        unsigned int shared_sizze_231895 = (int64_t) 4 *
                                     q_t_196696;
                        unsigned int shared_sizze_231897 = (int64_t) 4 *
                                     q_t_196696;
                        unsigned int shared_sizze_231899 = (int64_t) 4 *
                                     q_t_196696;
                        unsigned int shared_sizze_231901 = bytes_224490;
                        unsigned int shared_sizze_231903 = bytes_224490;
                        unsigned int shared_sizze_231905 = bytes_224490;
                        unsigned int shared_sizze_231907 = bytes_224490;
                        CUdeviceptr kernel_arg_231909 = ext_mem_222256.mem;
                        CUdeviceptr kernel_arg_231910 = ext_mem_222257.mem;
                        CUdeviceptr kernel_arg_231911 = ext_mem_222517.mem;
                        CUdeviceptr kernel_arg_231912 = ext_mem_222518.mem;
                        CUdeviceptr kernel_arg_231913 = mem_224537.mem;
                        CUdeviceptr kernel_arg_231914 = mem_224541.mem;
                        CUdeviceptr kernel_arg_231915 = mem_224561.mem;
                        CUdeviceptr kernel_arg_231916 = mem_224565.mem;
                        unsigned int shared_offset_231888 = 0;
                        unsigned int shared_offset_231890 = 0 +
                                     (shared_sizze_231887 + (8 -
                                                             shared_sizze_231887 %
                                                             8) % 8);
                        unsigned int shared_offset_231892 = 0 +
                                     (shared_sizze_231887 + (8 -
                                                             shared_sizze_231887 %
                                                             8) % 8) +
                                     (shared_sizze_231889 + (8 -
                                                             shared_sizze_231889 %
                                                             8) % 8);
                        unsigned int shared_offset_231894 = 0 +
                                     (shared_sizze_231887 + (8 -
                                                             shared_sizze_231887 %
                                                             8) % 8) +
                                     (shared_sizze_231889 + (8 -
                                                             shared_sizze_231889 %
                                                             8) % 8) +
                                     (shared_sizze_231891 + (8 -
                                                             shared_sizze_231891 %
                                                             8) % 8);
                        unsigned int shared_offset_231896 = 0 +
                                     (shared_sizze_231887 + (8 -
                                                             shared_sizze_231887 %
                                                             8) % 8) +
                                     (shared_sizze_231889 + (8 -
                                                             shared_sizze_231889 %
                                                             8) % 8) +
                                     (shared_sizze_231891 + (8 -
                                                             shared_sizze_231891 %
                                                             8) % 8) +
                                     (shared_sizze_231893 + (8 -
                                                             shared_sizze_231893 %
                                                             8) % 8);
                        unsigned int shared_offset_231898 = 0 +
                                     (shared_sizze_231887 + (8 -
                                                             shared_sizze_231887 %
                                                             8) % 8) +
                                     (shared_sizze_231889 + (8 -
                                                             shared_sizze_231889 %
                                                             8) % 8) +
                                     (shared_sizze_231891 + (8 -
                                                             shared_sizze_231891 %
                                                             8) % 8) +
                                     (shared_sizze_231893 + (8 -
                                                             shared_sizze_231893 %
                                                             8) % 8) +
                                     (shared_sizze_231895 + (8 -
                                                             shared_sizze_231895 %
                                                             8) % 8);
                        unsigned int shared_offset_231900 = 0 +
                                     (shared_sizze_231887 + (8 -
                                                             shared_sizze_231887 %
                                                             8) % 8) +
                                     (shared_sizze_231889 + (8 -
                                                             shared_sizze_231889 %
                                                             8) % 8) +
                                     (shared_sizze_231891 + (8 -
                                                             shared_sizze_231891 %
                                                             8) % 8) +
                                     (shared_sizze_231893 + (8 -
                                                             shared_sizze_231893 %
                                                             8) % 8) +
                                     (shared_sizze_231895 + (8 -
                                                             shared_sizze_231895 %
                                                             8) % 8) +
                                     (shared_sizze_231897 + (8 -
                                                             shared_sizze_231897 %
                                                             8) % 8);
                        unsigned int shared_offset_231902 = 0 +
                                     (shared_sizze_231887 + (8 -
                                                             shared_sizze_231887 %
                                                             8) % 8) +
                                     (shared_sizze_231889 + (8 -
                                                             shared_sizze_231889 %
                                                             8) % 8) +
                                     (shared_sizze_231891 + (8 -
                                                             shared_sizze_231891 %
                                                             8) % 8) +
                                     (shared_sizze_231893 + (8 -
                                                             shared_sizze_231893 %
                                                             8) % 8) +
                                     (shared_sizze_231895 + (8 -
                                                             shared_sizze_231895 %
                                                             8) % 8) +
                                     (shared_sizze_231897 + (8 -
                                                             shared_sizze_231897 %
                                                             8) % 8) +
                                     (shared_sizze_231899 + (8 -
                                                             shared_sizze_231899 %
                                                             8) % 8);
                        unsigned int shared_offset_231904 = 0 +
                                     (shared_sizze_231887 + (8 -
                                                             shared_sizze_231887 %
                                                             8) % 8) +
                                     (shared_sizze_231889 + (8 -
                                                             shared_sizze_231889 %
                                                             8) % 8) +
                                     (shared_sizze_231891 + (8 -
                                                             shared_sizze_231891 %
                                                             8) % 8) +
                                     (shared_sizze_231893 + (8 -
                                                             shared_sizze_231893 %
                                                             8) % 8) +
                                     (shared_sizze_231895 + (8 -
                                                             shared_sizze_231895 %
                                                             8) % 8) +
                                     (shared_sizze_231897 + (8 -
                                                             shared_sizze_231897 %
                                                             8) % 8) +
                                     (shared_sizze_231899 + (8 -
                                                             shared_sizze_231899 %
                                                             8) % 8) +
                                     (shared_sizze_231901 + (8 -
                                                             shared_sizze_231901 %
                                                             8) % 8);
                        unsigned int shared_offset_231906 = 0 +
                                     (shared_sizze_231887 + (8 -
                                                             shared_sizze_231887 %
                                                             8) % 8) +
                                     (shared_sizze_231889 + (8 -
                                                             shared_sizze_231889 %
                                                             8) % 8) +
                                     (shared_sizze_231891 + (8 -
                                                             shared_sizze_231891 %
                                                             8) % 8) +
                                     (shared_sizze_231893 + (8 -
                                                             shared_sizze_231893 %
                                                             8) % 8) +
                                     (shared_sizze_231895 + (8 -
                                                             shared_sizze_231895 %
                                                             8) % 8) +
                                     (shared_sizze_231897 + (8 -
                                                             shared_sizze_231897 %
                                                             8) % 8) +
                                     (shared_sizze_231899 + (8 -
                                                             shared_sizze_231899 %
                                                             8) % 8) +
                                     (shared_sizze_231901 + (8 -
                                                             shared_sizze_231901 %
                                                             8) % 8) +
                                     (shared_sizze_231903 + (8 -
                                                             shared_sizze_231903 %
                                                             8) % 8);
                        unsigned int shared_offset_231908 = 0 +
                                     (shared_sizze_231887 + (8 -
                                                             shared_sizze_231887 %
                                                             8) % 8) +
                                     (shared_sizze_231889 + (8 -
                                                             shared_sizze_231889 %
                                                             8) % 8) +
                                     (shared_sizze_231891 + (8 -
                                                             shared_sizze_231891 %
                                                             8) % 8) +
                                     (shared_sizze_231893 + (8 -
                                                             shared_sizze_231893 %
                                                             8) % 8) +
                                     (shared_sizze_231895 + (8 -
                                                             shared_sizze_231895 %
                                                             8) % 8) +
                                     (shared_sizze_231897 + (8 -
                                                             shared_sizze_231897 %
                                                             8) % 8) +
                                     (shared_sizze_231899 + (8 -
                                                             shared_sizze_231899 %
                                                             8) % 8) +
                                     (shared_sizze_231901 + (8 -
                                                             shared_sizze_231901 %
                                                             8) % 8) +
                                     (shared_sizze_231903 + (8 -
                                                             shared_sizze_231903 %
                                                             8) % 8) +
                                     (shared_sizze_231905 + (8 -
                                                             shared_sizze_231905 %
                                                             8) % 8);
                        
                        if ((((((1 && nest_sizze_203201 != 0) && 1 != 0) && 1 !=
                               0) && q_t_196696 != 0) && 1 != 0) && 1 != 0) {
                            int perm[3] = {0, 1, 2};
                            
                            if (1 >= 1 << 16) {
                                perm[1] = perm[0];
                                perm[0] = 1;
                            }
                            if (1 >= 1 << 16) {
                                perm[2] = perm[0];
                                perm[0] = 2;
                            }
                            
                            size_t grid[3];
                            
                            grid[perm[0]] = nest_sizze_203201;
                            grid[perm[1]] = 1;
                            grid[perm[2]] = 1;
                            
                            void *kernel_args_231884[] = {&ctx->global_failure,
                                                          &shared_offset_231888,
                                                          &shared_offset_231890,
                                                          &shared_offset_231892,
                                                          &shared_offset_231894,
                                                          &shared_offset_231896,
                                                          &shared_offset_231898,
                                                          &shared_offset_231900,
                                                          &shared_offset_231902,
                                                          &shared_offset_231904,
                                                          &shared_offset_231906,
                                                          &shared_offset_231908,
                                                          &m_196691, &n_196692,
                                                          &q_t_196696,
                                                          &jump_t_196702,
                                                          &t_n_m_196759,
                                                          &i_196779,
                                                          &kernel_arg_231909,
                                                          &kernel_arg_231910,
                                                          &kernel_arg_231911,
                                                          &kernel_arg_231912,
                                                          &kernel_arg_231913,
                                                          &kernel_arg_231914,
                                                          &kernel_arg_231915,
                                                          &kernel_arg_231916};
                            int64_t time_start_231885 = 0, time_end_231886 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                        "main.segmap_intragroup_219717",
                                        (long) nest_sizze_203201, (long) 1,
                                        (long) 1, (long) q_t_196696, (long) 1,
                                        (long) 1, (int) (0 +
                                                         (shared_sizze_231887 +
                                                          (8 -
                                                           shared_sizze_231887 %
                                                           8) % 8) +
                                                         (shared_sizze_231889 +
                                                          (8 -
                                                           shared_sizze_231889 %
                                                           8) % 8) +
                                                         (shared_sizze_231891 +
                                                          (8 -
                                                           shared_sizze_231891 %
                                                           8) % 8) +
                                                         (shared_sizze_231893 +
                                                          (8 -
                                                           shared_sizze_231893 %
                                                           8) % 8) +
                                                         (shared_sizze_231895 +
                                                          (8 -
                                                           shared_sizze_231895 %
                                                           8) % 8) +
                                                         (shared_sizze_231897 +
                                                          (8 -
                                                           shared_sizze_231897 %
                                                           8) % 8) +
                                                         (shared_sizze_231899 +
                                                          (8 -
                                                           shared_sizze_231899 %
                                                           8) % 8) +
                                                         (shared_sizze_231901 +
                                                          (8 -
                                                           shared_sizze_231901 %
                                                           8) % 8) +
                                                         (shared_sizze_231903 +
                                                          (8 -
                                                           shared_sizze_231903 %
                                                           8) % 8) +
                                                         (shared_sizze_231905 +
                                                          (8 -
                                                           shared_sizze_231905 %
                                                           8) % 8) +
                                                         (shared_sizze_231907 +
                                                          (8 -
                                                           shared_sizze_231907 %
                                                           8) % 8)));
                                time_start_231885 = get_wall_time();
                            }
                            
                            cudaEvent_t *pevents = NULL;
                            
                            if (ctx->profiling && !ctx->profiling_paused) {
                                pevents = cuda_get_events(&ctx->cuda,
                                                          &ctx->mainzisegmap_intragroup_219717_runs,
                                                          &ctx->mainzisegmap_intragroup_219717_total_runtime);
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                   0));
                            }
                            CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_intragroup_219717,
                                                                  grid[0],
                                                                  grid[1],
                                                                  grid[2],
                                                                  q_t_196696, 1,
                                                                  1, 0 +
                                                                  (shared_sizze_231887 +
                                                                   (8 -
                                                                    shared_sizze_231887 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231889 +
                                                                   (8 -
                                                                    shared_sizze_231889 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231891 +
                                                                   (8 -
                                                                    shared_sizze_231891 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231893 +
                                                                   (8 -
                                                                    shared_sizze_231893 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231895 +
                                                                   (8 -
                                                                    shared_sizze_231895 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231897 +
                                                                   (8 -
                                                                    shared_sizze_231897 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231899 +
                                                                   (8 -
                                                                    shared_sizze_231899 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231901 +
                                                                   (8 -
                                                                    shared_sizze_231901 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231903 +
                                                                   (8 -
                                                                    shared_sizze_231903 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231905 +
                                                                   (8 -
                                                                    shared_sizze_231905 %
                                                                    8) % 8) +
                                                                  (shared_sizze_231907 +
                                                                   (8 -
                                                                    shared_sizze_231907 %
                                                                    8) % 8),
                                                                  NULL,
                                                                  kernel_args_231884,
                                                                  NULL));
                            if (pevents != NULL)
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                   0));
                            if (ctx->debugging) {
                                CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                time_end_231886 = get_wall_time();
                                fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                        "main.segmap_intragroup_219717",
                                        time_end_231886 - time_start_231885);
                            }
                        }
                        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");
                
                CUdeviceptr kernel_arg_231920 = ext_mem_224570.mem;
                CUdeviceptr kernel_arg_231921 = ext_mem_224571.mem;
                CUdeviceptr kernel_arg_231922 = mem_224576.mem;
                
                if ((((((1 && segmap_usable_groups_219973 != 0) && 1 != 0) &&
                       1 != 0) && segmap_group_sizze_219972 != 0) && 1 != 0) &&
                    1 != 0) {
                    int perm[3] = {0, 1, 2};
                    
                    if (1 >= 1 << 16) {
                        perm[1] = perm[0];
                        perm[0] = 1;
                    }
                    if (1 >= 1 << 16) {
                        perm[2] = perm[0];
                        perm[0] = 2;
                    }
                    
                    size_t grid[3];
                    
                    grid[perm[0]] = segmap_usable_groups_219973;
                    grid[perm[1]] = 1;
                    grid[perm[2]] = 1;
                    
                    void *kernel_args_231917[] = {&ctx->global_failure,
                                                  &ctx->failure_is_an_option,
                                                  &ctx->global_failure_args,
                                                  &m_196691, &n_196692,
                                                  &jump_t_196702, &t_n_m_196759,
                                                  &i_196779, &y_199696,
                                                  &kernel_arg_231920,
                                                  &kernel_arg_231921,
                                                  &kernel_arg_231922};
                    int64_t time_start_231918 = 0, time_end_231919 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                "main.segmap_219977",
                                (long) segmap_usable_groups_219973, (long) 1,
                                (long) 1, (long) segmap_group_sizze_219972,
                                (long) 1, (long) 1, (int) 0);
                        time_start_231918 = get_wall_time();
                    }
                    
                    cudaEvent_t *pevents = NULL;
                    
                    if (ctx->profiling && !ctx->profiling_paused) {
                        pevents = cuda_get_events(&ctx->cuda,
                                                  &ctx->mainzisegmap_219977_runs,
                                                  &ctx->mainzisegmap_219977_total_runtime);
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                    }
                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_219977,
                                                          grid[0], grid[1],
                                                          grid[2],
                                                          segmap_group_sizze_219972,
                                                          1, 1, 0, NULL,
                                                          kernel_args_231917,
                                                          NULL));
                    if (pevents != NULL)
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                    if (ctx->debugging) {
                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                        time_end_231919 = get_wall_time();
                        fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                "main.segmap_219977", time_end_231919 -
                                time_start_231918);
                    }
                }
                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_225926 = ext_224578;
            int64_t ctx_param_ext_tmp_225927 = ext_224578;
            struct memblock_device mem_param_tmp_225928;
            
            mem_param_tmp_225928.references = NULL;
            if (memblock_set_device(ctx, &mem_param_tmp_225928, &mem_223977,
                                    "mem_223977") != 0)
                return 1;
            
            struct memblock_device mem_param_tmp_225929;
            
            mem_param_tmp_225929.references = NULL;
            if (memblock_set_device(ctx, &mem_param_tmp_225929, &ext_mem_224577,
                                    "ext_mem_224577") != 0)
                return 1;
            ctx_param_ext_222566 = ctx_param_ext_tmp_225926;
            ctx_param_ext_222568 = ctx_param_ext_tmp_225927;
            if (memblock_set_device(ctx, &mem_param_222564,
                                    &mem_param_tmp_225928,
                                    "mem_param_tmp_225928") != 0)
                return 1;
            if (memblock_set_device(ctx, &mem_param_222572,
                                    &mem_param_tmp_225929,
                                    "mem_param_tmp_225929") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_param_tmp_225929,
                                      "mem_param_tmp_225929") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_param_tmp_225928,
                                      "mem_param_tmp_225928") != 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_229496;
            
            local_memory_capacity_229496 = ctx->cuda.max_shared_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_229496)) &&
                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");
                
                unsigned int shared_sizze_231926 = bytes_224602;
                unsigned int shared_sizze_231928 = bytes_224602;
                CUdeviceptr kernel_arg_231930 = Y_mem_222225.mem;
                CUdeviceptr kernel_arg_231931 = ext_mem_222257.mem;
                CUdeviceptr kernel_arg_231932 = ext_mem_224583.mem;
                CUdeviceptr kernel_arg_231933 = ext_mem_224584.mem;
                CUdeviceptr kernel_arg_231934 = mem_224611.mem;
                CUdeviceptr kernel_arg_231935 = mem_224615.mem;
                unsigned int shared_offset_231927 = 0;
                unsigned int shared_offset_231929 = 0 + (shared_sizze_231926 +
                                                         (8 -
                                                          shared_sizze_231926 %
                                                          8) % 8);
                
                if ((((((1 && m_196691 != 0) && 1 != 0) && 1 != 0) &&
                      n_196692 != 0) && 1 != 0) && 1 != 0) {
                    int perm[3] = {0, 1, 2};
                    
                    if (1 >= 1 << 16) {
                        perm[1] = perm[0];
                        perm[0] = 1;
                    }
                    if (1 >= 1 << 16) {
                        perm[2] = perm[0];
                        perm[0] = 2;
                    }
                    
                    size_t grid[3];
                    
                    grid[perm[0]] = m_196691;
                    grid[perm[1]] = 1;
                    grid[perm[2]] = 1;
                    
                    void *kernel_args_231923[] = {&ctx->global_failure,
                                                  &ctx->failure_is_an_option,
                                                  &ctx->global_failure_args,
                                                  &shared_offset_231927,
                                                  &shared_offset_231929,
                                                  &m_196691, &n_196692,
                                                  &ext_224588,
                                                  &kernel_arg_231930,
                                                  &kernel_arg_231931,
                                                  &kernel_arg_231932,
                                                  &kernel_arg_231933,
                                                  &kernel_arg_231934,
                                                  &kernel_arg_231935};
                    int64_t time_start_231924 = 0, time_end_231925 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                "main.segmap_intragroup_220067",
                                (long) m_196691, (long) 1, (long) 1,
                                (long) n_196692, (long) 1, (long) 1, (int) (0 +
                                                                            (shared_sizze_231926 +
                                                                             (8 -
                                                                              shared_sizze_231926 %
                                                                              8) %
                                                                             8) +
                                                                            (shared_sizze_231928 +
                                                                             (8 -
                                                                              shared_sizze_231928 %
                                                                              8) %
                                                                             8)));
                        time_start_231924 = get_wall_time();
                    }
                    
                    cudaEvent_t *pevents = NULL;
                    
                    if (ctx->profiling && !ctx->profiling_paused) {
                        pevents = cuda_get_events(&ctx->cuda,
                                                  &ctx->mainzisegmap_intragroup_220067_runs,
                                                  &ctx->mainzisegmap_intragroup_220067_total_runtime);
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                    }
                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_intragroup_220067,
                                                          grid[0], grid[1],
                                                          grid[2], n_196692, 1,
                                                          1, 0 +
                                                          (shared_sizze_231926 +
                                                           (8 -
                                                            shared_sizze_231926 %
                                                            8) % 8) +
                                                          (shared_sizze_231928 +
                                                           (8 -
                                                            shared_sizze_231928 %
                                                            8) % 8), NULL,
                                                          kernel_args_231923,
                                                          NULL));
                    if (pevents != NULL)
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                    if (ctx->debugging) {
                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                        time_end_231925 = get_wall_time();
                        fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                "main.segmap_intragroup_220067",
                                time_end_231925 - time_start_231924);
                    }
                }
                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");
                
                CUdeviceptr kernel_arg_231939 = Y_mem_222225.mem;
                CUdeviceptr kernel_arg_231940 = ext_mem_224583.mem;
                CUdeviceptr kernel_arg_231941 = ext_mem_224584.mem;
                CUdeviceptr kernel_arg_231942 = mem_224620.mem;
                
                if ((((((1 && segmap_usable_groups_220190 != 0) && 1 != 0) &&
                       1 != 0) && segmap_group_sizze_220189 != 0) && 1 != 0) &&
                    1 != 0) {
                    int perm[3] = {0, 1, 2};
                    
                    if (1 >= 1 << 16) {
                        perm[1] = perm[0];
                        perm[0] = 1;
                    }
                    if (1 >= 1 << 16) {
                        perm[2] = perm[0];
                        perm[0] = 2;
                    }
                    
                    size_t grid[3];
                    
                    grid[perm[0]] = segmap_usable_groups_220190;
                    grid[perm[1]] = 1;
                    grid[perm[2]] = 1;
                    
                    void *kernel_args_231936[] = {&ctx->global_failure,
                                                  &m_196691, &n_196692,
                                                  &ext_224588,
                                                  &kernel_arg_231939,
                                                  &kernel_arg_231940,
                                                  &kernel_arg_231941,
                                                  &kernel_arg_231942};
                    int64_t time_start_231937 = 0, time_end_231938 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                "main.segmap_220194",
                                (long) segmap_usable_groups_220190, (long) 1,
                                (long) 1, (long) segmap_group_sizze_220189,
                                (long) 1, (long) 1, (int) 0);
                        time_start_231937 = get_wall_time();
                    }
                    
                    cudaEvent_t *pevents = NULL;
                    
                    if (ctx->profiling && !ctx->profiling_paused) {
                        pevents = cuda_get_events(&ctx->cuda,
                                                  &ctx->mainzisegmap_220194_runs,
                                                  &ctx->mainzisegmap_220194_total_runtime);
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                    }
                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_220194,
                                                          grid[0], grid[1],
                                                          grid[2],
                                                          segmap_group_sizze_220189,
                                                          1, 1, 0, NULL,
                                                          kernel_args_231936,
                                                          NULL));
                    if (pevents != NULL)
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                    if (ctx->debugging) {
                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                        time_end_231938 = get_wall_time();
                        fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                "main.segmap_220194", time_end_231938 -
                                time_start_231937);
                    }
                }
                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");
                
                CUdeviceptr kernel_arg_231946 = ext_mem_222257.mem;
                CUdeviceptr kernel_arg_231947 = mem_224620.mem;
                CUdeviceptr kernel_arg_231948 = mem_224625.mem;
                
                if ((((((1 && segmap_usable_groups_220211 != 0) && 1 != 0) &&
                       1 != 0) && segmap_group_sizze_220210 != 0) && 1 != 0) &&
                    1 != 0) {
                    int perm[3] = {0, 1, 2};
                    
                    if (1 >= 1 << 16) {
                        perm[1] = perm[0];
                        perm[0] = 1;
                    }
                    if (1 >= 1 << 16) {
                        perm[2] = perm[0];
                        perm[0] = 2;
                    }
                    
                    size_t grid[3];
                    
                    grid[perm[0]] = segmap_usable_groups_220211;
                    grid[perm[1]] = 1;
                    grid[perm[2]] = 1;
                    
                    void *kernel_args_231943[] = {&ctx->global_failure,
                                                  &ctx->failure_is_an_option,
                                                  &ctx->global_failure_args,
                                                  &m_196691, &n_196692,
                                                  &kernel_arg_231946,
                                                  &kernel_arg_231947,
                                                  &kernel_arg_231948};
                    int64_t time_start_231944 = 0, time_end_231945 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                "main.segmap_220215",
                                (long) segmap_usable_groups_220211, (long) 1,
                                (long) 1, (long) segmap_group_sizze_220210,
                                (long) 1, (long) 1, (int) 0);
                        time_start_231944 = get_wall_time();
                    }
                    
                    cudaEvent_t *pevents = NULL;
                    
                    if (ctx->profiling && !ctx->profiling_paused) {
                        pevents = cuda_get_events(&ctx->cuda,
                                                  &ctx->mainzisegmap_220215_runs,
                                                  &ctx->mainzisegmap_220215_total_runtime);
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                    }
                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_220215,
                                                          grid[0], grid[1],
                                                          grid[2],
                                                          segmap_group_sizze_220210,
                                                          1, 1, 0, NULL,
                                                          kernel_args_231943,
                                                          NULL));
                    if (pevents != NULL)
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                    if (ctx->debugging) {
                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                        time_end_231945 = get_wall_time();
                        fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                "main.segmap_220215", time_end_231945 -
                                time_start_231944);
                    }
                }
                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_229497;
            
            max_num_groups_229497 =
                *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_229497))));
            
            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_229498;
            
            max_num_groups_229498 =
                *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_229498))));
            
            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_229886;
            
            local_memory_capacity_229886 = ctx->cuda.max_shared_memory;
            if (sle64((int64_t) 0,
                      sext_i32_i64(local_memory_capacity_229886)) &&
                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");
                
                CUdeviceptr kernel_arg_231952 = mem_224630.mem;
                CUdeviceptr kernel_arg_231953 = mem_224740.mem;
                CUdeviceptr kernel_arg_231954 = color_225109.mem;
                CUdeviceptr kernel_arg_231955 = color_225110.mem;
                CUdeviceptr kernel_arg_231956 = color_225111.mem;
                CUdeviceptr kernel_arg_231957 = color_225112.mem;
                CUdeviceptr kernel_arg_231958 = color_225113.mem;
                CUdeviceptr kernel_arg_231959 = color_225114.mem;
                CUdeviceptr kernel_arg_231960 = color_225115.mem;
                
                if ((((((1 && num_groups_220335 != 0) && 1 != 0) && 1 != 0) &&
                      segmap_group_sizze_220334 != 0) && 1 != 0) && 1 != 0) {
                    int perm[3] = {0, 1, 2};
                    
                    if (1 >= 1 << 16) {
                        perm[1] = perm[0];
                        perm[0] = 1;
                    }
                    if (1 >= 1 << 16) {
                        perm[2] = perm[0];
                        perm[0] = 2;
                    }
                    
                    size_t grid[3];
                    
                    grid[perm[0]] = num_groups_220335;
                    grid[perm[1]] = 1;
                    grid[perm[2]] = 1;
                    
                    void *kernel_args_231949[] = {&ctx->global_failure,
                                                  &m_196691, &n_196692,
                                                  &i_196779, &iters_199778,
                                                  &num_groups_220335,
                                                  &num_threads_225271,
                                                  &kernel_arg_231952,
                                                  &kernel_arg_231953,
                                                  &kernel_arg_231954,
                                                  &kernel_arg_231955,
                                                  &kernel_arg_231956,
                                                  &kernel_arg_231957,
                                                  &kernel_arg_231958,
                                                  &kernel_arg_231959,
                                                  &kernel_arg_231960};
                    int64_t time_start_231950 = 0, time_end_231951 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                "main.segmap_220339", (long) num_groups_220335,
                                (long) 1, (long) 1,
                                (long) segmap_group_sizze_220334, (long) 1,
                                (long) 1, (int) 0);
                        time_start_231950 = get_wall_time();
                    }
                    
                    cudaEvent_t *pevents = NULL;
                    
                    if (ctx->profiling && !ctx->profiling_paused) {
                        pevents = cuda_get_events(&ctx->cuda,
                                                  &ctx->mainzisegmap_220339_runs,
                                                  &ctx->mainzisegmap_220339_total_runtime);
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                    }
                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_220339,
                                                          grid[0], grid[1],
                                                          grid[2],
                                                          segmap_group_sizze_220334,
                                                          1, 1, 0, NULL,
                                                          kernel_args_231949,
                                                          NULL));
                    if (pevents != NULL)
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                    if (ctx->debugging) {
                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                        time_end_231951 = get_wall_time();
                        fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                "main.segmap_220339", time_end_231951 -
                                time_start_231950);
                    }
                }
                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_229885;
                
                local_memory_capacity_229885 = ctx->cuda.max_shared_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_229885)) &&
                    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");
                    
                    unsigned int shared_sizze_231964 = bytes_222229;
                    unsigned int shared_sizze_231966 = bytes_222229;
                    unsigned int shared_sizze_231968 = bytes_222229;
                    unsigned int shared_sizze_231970 = bytes_222229;
                    unsigned int shared_sizze_231972 = bytes_224602;
                    unsigned int shared_sizze_231974 = bytes_224602;
                    CUdeviceptr kernel_arg_231976 = ext_mem_224627.mem;
                    CUdeviceptr kernel_arg_231977 = mem_224787.mem;
                    CUdeviceptr kernel_arg_231978 = color_225116.mem;
                    CUdeviceptr kernel_arg_231979 = color_225117.mem;
                    unsigned int shared_offset_231965 = 0;
                    unsigned int shared_offset_231967 = 0 +
                                 (shared_sizze_231964 + (8 -
                                                         shared_sizze_231964 %
                                                         8) % 8);
                    unsigned int shared_offset_231969 = 0 +
                                 (shared_sizze_231964 + (8 -
                                                         shared_sizze_231964 %
                                                         8) % 8) +
                                 (shared_sizze_231966 + (8 -
                                                         shared_sizze_231966 %
                                                         8) % 8);
                    unsigned int shared_offset_231971 = 0 +
                                 (shared_sizze_231964 + (8 -
                                                         shared_sizze_231964 %
                                                         8) % 8) +
                                 (shared_sizze_231966 + (8 -
                                                         shared_sizze_231966 %
                                                         8) % 8) +
                                 (shared_sizze_231968 + (8 -
                                                         shared_sizze_231968 %
                                                         8) % 8);
                    unsigned int shared_offset_231973 = 0 +
                                 (shared_sizze_231964 + (8 -
                                                         shared_sizze_231964 %
                                                         8) % 8) +
                                 (shared_sizze_231966 + (8 -
                                                         shared_sizze_231966 %
                                                         8) % 8) +
                                 (shared_sizze_231968 + (8 -
                                                         shared_sizze_231968 %
                                                         8) % 8) +
                                 (shared_sizze_231970 + (8 -
                                                         shared_sizze_231970 %
                                                         8) % 8);
                    unsigned int shared_offset_231975 = 0 +
                                 (shared_sizze_231964 + (8 -
                                                         shared_sizze_231964 %
                                                         8) % 8) +
                                 (shared_sizze_231966 + (8 -
                                                         shared_sizze_231966 %
                                                         8) % 8) +
                                 (shared_sizze_231968 + (8 -
                                                         shared_sizze_231968 %
                                                         8) % 8) +
                                 (shared_sizze_231970 + (8 -
                                                         shared_sizze_231970 %
                                                         8) % 8) +
                                 (shared_sizze_231972 + (8 -
                                                         shared_sizze_231972 %
                                                         8) % 8);
                    
                    if ((((((1 && m_196691 != 0) && 1 != 0) && 1 != 0) &&
                          n_196692 != 0) && 1 != 0) && 1 != 0) {
                        int perm[3] = {0, 1, 2};
                        
                        if (1 >= 1 << 16) {
                            perm[1] = perm[0];
                            perm[0] = 1;
                        }
                        if (1 >= 1 << 16) {
                            perm[2] = perm[0];
                            perm[0] = 2;
                        }
                        
                        size_t grid[3];
                        
                        grid[perm[0]] = m_196691;
                        grid[perm[1]] = 1;
                        grid[perm[2]] = 1;
                        
                        void *kernel_args_231961[] = {&ctx->global_failure,
                                                      &shared_offset_231965,
                                                      &shared_offset_231967,
                                                      &shared_offset_231969,
                                                      &shared_offset_231971,
                                                      &shared_offset_231973,
                                                      &shared_offset_231975,
                                                      &m_196691, &n_196692,
                                                      &i_196779, &iters_199778,
                                                      &kernel_arg_231976,
                                                      &kernel_arg_231977,
                                                      &kernel_arg_231978,
                                                      &kernel_arg_231979};
                        int64_t time_start_231962 = 0, time_end_231963 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                    "main.segmap_intragroup_220432",
                                    (long) m_196691, (long) 1, (long) 1,
                                    (long) n_196692, (long) 1, (long) 1,
                                    (int) (0 + (shared_sizze_231964 + (8 -
                                                                       shared_sizze_231964 %
                                                                       8) % 8) +
                                           (shared_sizze_231966 + (8 -
                                                                   shared_sizze_231966 %
                                                                   8) % 8) +
                                           (shared_sizze_231968 + (8 -
                                                                   shared_sizze_231968 %
                                                                   8) % 8) +
                                           (shared_sizze_231970 + (8 -
                                                                   shared_sizze_231970 %
                                                                   8) % 8) +
                                           (shared_sizze_231972 + (8 -
                                                                   shared_sizze_231972 %
                                                                   8) % 8) +
                                           (shared_sizze_231974 + (8 -
                                                                   shared_sizze_231974 %
                                                                   8) % 8)));
                            time_start_231962 = get_wall_time();
                        }
                        
                        cudaEvent_t *pevents = NULL;
                        
                        if (ctx->profiling && !ctx->profiling_paused) {
                            pevents = cuda_get_events(&ctx->cuda,
                                                      &ctx->mainzisegmap_intragroup_220432_runs,
                                                      &ctx->mainzisegmap_intragroup_220432_total_runtime);
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                        }
                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_intragroup_220432,
                                                              grid[0], grid[1],
                                                              grid[2], n_196692,
                                                              1, 1, 0 +
                                                              (shared_sizze_231964 +
                                                               (8 -
                                                                shared_sizze_231964 %
                                                                8) % 8) +
                                                              (shared_sizze_231966 +
                                                               (8 -
                                                                shared_sizze_231966 %
                                                                8) % 8) +
                                                              (shared_sizze_231968 +
                                                               (8 -
                                                                shared_sizze_231968 %
                                                                8) % 8) +
                                                              (shared_sizze_231970 +
                                                               (8 -
                                                                shared_sizze_231970 %
                                                                8) % 8) +
                                                              (shared_sizze_231972 +
                                                               (8 -
                                                                shared_sizze_231972 %
                                                                8) % 8) +
                                                              (shared_sizze_231974 +
                                                               (8 -
                                                                shared_sizze_231974 %
                                                                8) % 8), NULL,
                                                              kernel_args_231961,
                                                              NULL));
                        if (pevents != NULL)
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                        if (ctx->debugging) {
                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                            time_end_231963 = get_wall_time();
                            fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                    "main.segmap_intragroup_220432",
                                    time_end_231963 - time_start_231962);
                        }
                    }
                    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;
                    }
                    {
                        cudaEvent_t *pevents = NULL;
                        
                        if (ctx->profiling && !ctx->profiling_paused) {
                            pevents = cuda_get_events(&ctx->cuda,
                                                      &ctx->copy_dev_to_dev_runs,
                                                      &ctx->copy_dev_to_dev_total_runtime);
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                        }
                        CUDA_SUCCEED_OR_RETURN(cuMemcpy(mem_224791.mem +
                                                        (int64_t) 0,
                                                        ext_mem_224627.mem +
                                                        (int64_t) 0, m_196691 *
                                                        n_196692 *
                                                        (int64_t) 4));
                        if (pevents != NULL)
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                    }
                    
                    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;
                        }
                        {
                            cudaEvent_t *pevents = NULL;
                            
                            if (ctx->profiling && !ctx->profiling_paused) {
                                pevents = cuda_get_events(&ctx->cuda,
                                                          &ctx->copy_dev_to_dev_runs,
                                                          &ctx->copy_dev_to_dev_total_runtime);
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                   0));
                            }
                            CUDA_SUCCEED_OR_RETURN(cuMemcpy(mem_224805.mem +
                                                            (int64_t) 0,
                                                            mem_param_224799.mem +
                                                            (int64_t) 0,
                                                            m_196691 *
                                                            n_196692 *
                                                            (int64_t) 4));
                            if (pevents != NULL)
                                CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                   0));
                        }
                        
                        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_229884;
                        
                        local_memory_capacity_229884 =
                            ctx->cuda.max_shared_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_229884)) &&
                            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");
                            
                            unsigned int shared_sizze_231983 = bytes_224602;
                            unsigned int shared_sizze_231985 = bytes_222229;
                            unsigned int shared_sizze_231987 = bytes_222229;
                            unsigned int shared_sizze_231989 = bytes_222229;
                            unsigned int shared_sizze_231991 = bytes_222229;
                            unsigned int shared_sizze_231993 = bytes_224602;
                            CUdeviceptr kernel_arg_231995 =
                                        mem_param_224799.mem;
                            CUdeviceptr kernel_arg_231996 = mem_224830.mem;
                            unsigned int shared_offset_231984 = 0;
                            unsigned int shared_offset_231986 = 0 +
                                         (shared_sizze_231983 + (8 -
                                                                 shared_sizze_231983 %
                                                                 8) % 8);
                            unsigned int shared_offset_231988 = 0 +
                                         (shared_sizze_231983 + (8 -
                                                                 shared_sizze_231983 %
                                                                 8) % 8) +
                                         (shared_sizze_231985 + (8 -
                                                                 shared_sizze_231985 %
                                                                 8) % 8);
                            unsigned int shared_offset_231990 = 0 +
                                         (shared_sizze_231983 + (8 -
                                                                 shared_sizze_231983 %
                                                                 8) % 8) +
                                         (shared_sizze_231985 + (8 -
                                                                 shared_sizze_231985 %
                                                                 8) % 8) +
                                         (shared_sizze_231987 + (8 -
                                                                 shared_sizze_231987 %
                                                                 8) % 8);
                            unsigned int shared_offset_231992 = 0 +
                                         (shared_sizze_231983 + (8 -
                                                                 shared_sizze_231983 %
                                                                 8) % 8) +
                                         (shared_sizze_231985 + (8 -
                                                                 shared_sizze_231985 %
                                                                 8) % 8) +
                                         (shared_sizze_231987 + (8 -
                                                                 shared_sizze_231987 %
                                                                 8) % 8) +
                                         (shared_sizze_231989 + (8 -
                                                                 shared_sizze_231989 %
                                                                 8) % 8);
                            unsigned int shared_offset_231994 = 0 +
                                         (shared_sizze_231983 + (8 -
                                                                 shared_sizze_231983 %
                                                                 8) % 8) +
                                         (shared_sizze_231985 + (8 -
                                                                 shared_sizze_231985 %
                                                                 8) % 8) +
                                         (shared_sizze_231987 + (8 -
                                                                 shared_sizze_231987 %
                                                                 8) % 8) +
                                         (shared_sizze_231989 + (8 -
                                                                 shared_sizze_231989 %
                                                                 8) % 8) +
                                         (shared_sizze_231991 + (8 -
                                                                 shared_sizze_231991 %
                                                                 8) % 8);
                            
                            if ((((((1 && m_196691 != 0) && 1 != 0) && 1 !=
                                   0) && n_196692 != 0) && 1 != 0) && 1 != 0) {
                                int perm[3] = {0, 1, 2};
                                
                                if (1 >= 1 << 16) {
                                    perm[1] = perm[0];
                                    perm[0] = 1;
                                }
                                if (1 >= 1 << 16) {
                                    perm[2] = perm[0];
                                    perm[0] = 2;
                                }
                                
                                size_t grid[3];
                                
                                grid[perm[0]] = m_196691;
                                grid[perm[1]] = 1;
                                grid[perm[2]] = 1;
                                
                                void *kernel_args_231980[] =
                                     {&ctx->global_failure,
                                      &shared_offset_231984,
                                      &shared_offset_231986,
                                      &shared_offset_231988,
                                      &shared_offset_231990,
                                      &shared_offset_231992,
                                      &shared_offset_231994, &m_196691,
                                      &n_196692, &i_196779,
                                      &defunc_2_radix_sort_step_arg_220858,
                                      &defunc_0_get_bit_arg_220859,
                                      &cond_f_res_220860, &cond_f_res_220861,
                                      &kernel_arg_231995, &kernel_arg_231996};
                                int64_t time_start_231981 = 0, time_end_231982 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                            "main.segmap_intragroup_220872",
                                            (long) m_196691, (long) 1, (long) 1,
                                            (long) n_196692, (long) 1, (long) 1,
                                            (int) (0 + (shared_sizze_231983 +
                                                        (8 -
                                                         shared_sizze_231983 %
                                                         8) % 8) +
                                                   (shared_sizze_231985 + (8 -
                                                                           shared_sizze_231985 %
                                                                           8) %
                                                    8) + (shared_sizze_231987 +
                                                          (8 -
                                                           shared_sizze_231987 %
                                                           8) % 8) +
                                                   (shared_sizze_231989 + (8 -
                                                                           shared_sizze_231989 %
                                                                           8) %
                                                    8) + (shared_sizze_231991 +
                                                          (8 -
                                                           shared_sizze_231991 %
                                                           8) % 8) +
                                                   (shared_sizze_231993 + (8 -
                                                                           shared_sizze_231993 %
                                                                           8) %
                                                    8)));
                                    time_start_231981 = get_wall_time();
                                }
                                
                                cudaEvent_t *pevents = NULL;
                                
                                if (ctx->profiling && !ctx->profiling_paused) {
                                    pevents = cuda_get_events(&ctx->cuda,
                                                              &ctx->mainzisegmap_intragroup_220872_runs,
                                                              &ctx->mainzisegmap_intragroup_220872_total_runtime);
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                       0));
                                }
                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_intragroup_220872,
                                                                      grid[0],
                                                                      grid[1],
                                                                      grid[2],
                                                                      n_196692,
                                                                      1, 1, 0 +
                                                                      (shared_sizze_231983 +
                                                                       (8 -
                                                                        shared_sizze_231983 %
                                                                        8) %
                                                                       8) +
                                                                      (shared_sizze_231985 +
                                                                       (8 -
                                                                        shared_sizze_231985 %
                                                                        8) %
                                                                       8) +
                                                                      (shared_sizze_231987 +
                                                                       (8 -
                                                                        shared_sizze_231987 %
                                                                        8) %
                                                                       8) +
                                                                      (shared_sizze_231989 +
                                                                       (8 -
                                                                        shared_sizze_231989 %
                                                                        8) %
                                                                       8) +
                                                                      (shared_sizze_231991 +
                                                                       (8 -
                                                                        shared_sizze_231991 %
                                                                        8) %
                                                                       8) +
                                                                      (shared_sizze_231993 +
                                                                       (8 -
                                                                        shared_sizze_231993 %
                                                                        8) % 8),
                                                                      NULL,
                                                                      kernel_args_231980,
                                                                      NULL));
                                if (pevents != NULL)
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                       0));
                                if (ctx->debugging) {
                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                    time_end_231982 = get_wall_time();
                                    fprintf(ctx->log,
                                            "Kernel %s runtime: %ldus\n",
                                            "main.segmap_intragroup_220872",
                                            time_end_231982 -
                                            time_start_231981);
                                }
                            }
                            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");
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "SegScan: number of elements processed sequentially per thread is m:",
                                            (long long) 3, '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "SegScan: memory constraints is: ",
                                            (long long) 11, '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "SegScan: register constraints is: ",
                                            (long long) 3, '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "SegScan: sumT' is: ",
                                            (long long) 8, '\n');
                                
                                int64_t numThreads_229615 = sdiv_up64(m_196691 *
                                                                      n_196692,
                                                                      segscan_group_sizze_220959 *
                                                                      (int64_t) 3) *
                                        segscan_group_sizze_220959;
                                int64_t numGroups_229616 = sdiv_up64(m_196691 *
                                                                     n_196692,
                                                                     segscan_group_sizze_220959 *
                                                                     (int64_t) 3);
                                struct memblock_device
                                mainziid_counter_mem_229617 =
                                ctx->mainziid_counter_mem_229617;
                                struct memblock_device status_flags_mem_229619;
                                
                                status_flags_mem_229619.references = NULL;
                                if (memblock_alloc_device(ctx,
                                                          &status_flags_mem_229619,
                                                          numGroups_229616,
                                                          "status_flags_mem_229619")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device aggregates_mem_229621;
                                
                                aggregates_mem_229621.references = NULL;
                                if (memblock_alloc_device(ctx,
                                                          &aggregates_mem_229621,
                                                          (int64_t) 8 *
                                                          numGroups_229616,
                                                          "aggregates_mem_229621")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device incprefixes_mem_229623;
                                
                                incprefixes_mem_229623.references = NULL;
                                if (memblock_alloc_device(ctx,
                                                          &incprefixes_mem_229623,
                                                          (int64_t) 8 *
                                                          numGroups_229616,
                                                          "incprefixes_mem_229623")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device aggregates_mem_229625;
                                
                                aggregates_mem_229625.references = NULL;
                                if (memblock_alloc_device(ctx,
                                                          &aggregates_mem_229625,
                                                          (int64_t) 8 *
                                                          numGroups_229616,
                                                          "aggregates_mem_229625")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device incprefixes_mem_229627;
                                
                                incprefixes_mem_229627.references = NULL;
                                if (memblock_alloc_device(ctx,
                                                          &incprefixes_mem_229627,
                                                          (int64_t) 8 *
                                                          numGroups_229616,
                                                          "incprefixes_mem_229627")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device aggregates_mem_229629;
                                
                                aggregates_mem_229629.references = NULL;
                                if (memblock_alloc_device(ctx,
                                                          &aggregates_mem_229629,
                                                          (int64_t) 8 *
                                                          numGroups_229616,
                                                          "aggregates_mem_229629")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device incprefixes_mem_229631;
                                
                                incprefixes_mem_229631.references = NULL;
                                if (memblock_alloc_device(ctx,
                                                          &incprefixes_mem_229631,
                                                          (int64_t) 8 *
                                                          numGroups_229616,
                                                          "incprefixes_mem_229631")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device aggregates_mem_229633;
                                
                                aggregates_mem_229633.references = NULL;
                                if (memblock_alloc_device(ctx,
                                                          &aggregates_mem_229633,
                                                          (int64_t) 8 *
                                                          numGroups_229616,
                                                          "aggregates_mem_229633")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device incprefixes_mem_229635;
                                
                                incprefixes_mem_229635.references = NULL;
                                if (memblock_alloc_device(ctx,
                                                          &incprefixes_mem_229635,
                                                          (int64_t) 8 *
                                                          numGroups_229616,
                                                          "incprefixes_mem_229635")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (futrts_builtinzhreplicate_i8(ctx,
                                                                 status_flags_mem_229619,
                                                                 numGroups_229616,
                                                                 (int8_t) 0) !=
                                    0) {
                                    if (memblock_unref_device(ctx,
                                                              &incprefixes_mem_229635,
                                                              "incprefixes_mem_229635") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &aggregates_mem_229633,
                                                              "aggregates_mem_229633") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &incprefixes_mem_229631,
                                                              "incprefixes_mem_229631") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &aggregates_mem_229629,
                                                              "aggregates_mem_229629") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &incprefixes_mem_229627,
                                                              "incprefixes_mem_229627") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &aggregates_mem_229625,
                                                              "aggregates_mem_229625") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &incprefixes_mem_229623,
                                                              "incprefixes_mem_229623") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &aggregates_mem_229621,
                                                              "aggregates_mem_229621") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &status_flags_mem_229619,
                                                              "status_flags_mem_229619") !=
                                        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,
                                                              &ext_mem_224853,
                                                              "ext_mem_224853") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_224805,
                                                              "mem_224805") !=
                                        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;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224864,
                                                              "ext_mem_224864") !=
                                        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;
                                }
                                
                                unsigned int shared_sizze_232001 =
                                             smax64(smax64((int64_t) 1056,
                                                           sdiv_up64(sdiv_up64(sdiv_up64((int64_t) 8 *
                                                                                         segscan_group_sizze_220959,
                                                                                         (int64_t) 8) *
                                                                               (int64_t) 8 +
                                                                               (int64_t) 8 *
                                                                               segscan_group_sizze_220959,
                                                                               (int64_t) 8) *
                                                                     (int64_t) 8 +
                                                                     (int64_t) 8 *
                                                                     segscan_group_sizze_220959,
                                                                     (int64_t) 8) *
                                                           (int64_t) 8 +
                                                           (int64_t) 8 *
                                                           segscan_group_sizze_220959),
                                                    smax64(smax64(smax64((int64_t) 3 *
                                                                         segscan_group_sizze_220959 *
                                                                         (int64_t) 8,
                                                                         (int64_t) 3 *
                                                                         segscan_group_sizze_220959 *
                                                                         (int64_t) 8),
                                                                  (int64_t) 3 *
                                                                  segscan_group_sizze_220959 *
                                                                  (int64_t) 8),
                                                           (int64_t) 3 *
                                                           segscan_group_sizze_220959 *
                                                           (int64_t) 8));
                                CUdeviceptr kernel_arg_232003 =
                                            mem_param_224799.mem;
                                CUdeviceptr kernel_arg_232004 = mem_224835.mem;
                                CUdeviceptr kernel_arg_232005 = mem_224839.mem;
                                CUdeviceptr kernel_arg_232006 = mem_224843.mem;
                                CUdeviceptr kernel_arg_232007 = mem_224847.mem;
                                CUdeviceptr kernel_arg_232008 = mem_224851.mem;
                                CUdeviceptr kernel_arg_232009 =
                                            mainziid_counter_mem_229617.mem;
                                CUdeviceptr kernel_arg_232010 =
                                            status_flags_mem_229619.mem;
                                CUdeviceptr kernel_arg_232011 =
                                            aggregates_mem_229621.mem;
                                CUdeviceptr kernel_arg_232012 =
                                            incprefixes_mem_229623.mem;
                                CUdeviceptr kernel_arg_232013 =
                                            aggregates_mem_229625.mem;
                                CUdeviceptr kernel_arg_232014 =
                                            incprefixes_mem_229627.mem;
                                CUdeviceptr kernel_arg_232015 =
                                            aggregates_mem_229629.mem;
                                CUdeviceptr kernel_arg_232016 =
                                            incprefixes_mem_229631.mem;
                                CUdeviceptr kernel_arg_232017 =
                                            aggregates_mem_229633.mem;
                                CUdeviceptr kernel_arg_232018 =
                                            incprefixes_mem_229635.mem;
                                unsigned int shared_offset_232002 = 0;
                                
                                if ((((((1 && sdiv_up64(m_196691 * n_196692,
                                                        segscan_group_sizze_220959 *
                                                        (int64_t) 3) != 0) &&
                                        1 != 0) && 1 != 0) &&
                                      segscan_group_sizze_220959 != 0) && 1 !=
                                     0) && 1 != 0) {
                                    int perm[3] = {0, 1, 2};
                                    
                                    if (1 >= 1 << 16) {
                                        perm[1] = perm[0];
                                        perm[0] = 1;
                                    }
                                    if (1 >= 1 << 16) {
                                        perm[2] = perm[0];
                                        perm[0] = 2;
                                    }
                                    
                                    size_t grid[3];
                                    
                                    grid[perm[0]] = sdiv_up64(m_196691 *
                                                              n_196692,
                                                              segscan_group_sizze_220959 *
                                                              (int64_t) 3);
                                    grid[perm[1]] = 1;
                                    grid[perm[2]] = 1;
                                    
                                    void *kernel_args_231998[] =
                                         {&ctx->global_failure,
                                          &shared_offset_232002, &m_196691,
                                          &n_196692,
                                          &defunc_2_radix_sort_step_arg_220858,
                                          &defunc_0_get_bit_arg_220859,
                                          &cond_f_res_220860,
                                          &cond_f_res_220861,
                                          &kernel_arg_232003,
                                          &kernel_arg_232004,
                                          &kernel_arg_232005,
                                          &kernel_arg_232006,
                                          &kernel_arg_232007,
                                          &kernel_arg_232008,
                                          &kernel_arg_232009,
                                          &kernel_arg_232010,
                                          &kernel_arg_232011,
                                          &kernel_arg_232012,
                                          &kernel_arg_232013,
                                          &kernel_arg_232014,
                                          &kernel_arg_232015,
                                          &kernel_arg_232016,
                                          &kernel_arg_232017,
                                          &kernel_arg_232018};
                                    int64_t time_start_231999 = 0,
                                            time_end_232000 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                                "main.segscan_220969",
                                                (long) sdiv_up64(m_196691 *
                                                                 n_196692,
                                                                 segscan_group_sizze_220959 *
                                                                 (int64_t) 3),
                                                (long) 1, (long) 1,
                                                (long) segscan_group_sizze_220959,
                                                (long) 1, (long) 1, (int) (0 +
                                                                           (shared_sizze_232001 +
                                                                            (8 -
                                                                             shared_sizze_232001 %
                                                                             8) %
                                                                            8)));
                                        time_start_231999 = get_wall_time();
                                    }
                                    
                                    cudaEvent_t *pevents = NULL;
                                    
                                    if (ctx->profiling &&
                                        !ctx->profiling_paused) {
                                        pevents = cuda_get_events(&ctx->cuda,
                                                                  &ctx->mainzisegscan_220969_runs,
                                                                  &ctx->mainzisegscan_220969_total_runtime);
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                           0));
                                    }
                                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegscan_220969,
                                                                          grid[0],
                                                                          grid[1],
                                                                          grid[2],
                                                                          segscan_group_sizze_220959,
                                                                          1, 1,
                                                                          0 +
                                                                          (shared_sizze_232001 +
                                                                           (8 -
                                                                            shared_sizze_232001 %
                                                                            8) %
                                                                           8),
                                                                          NULL,
                                                                          kernel_args_231998,
                                                                          NULL));
                                    if (pevents != NULL)
                                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                           0));
                                    if (ctx->debugging) {
                                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                        time_end_232000 = get_wall_time();
                                        fprintf(ctx->log,
                                                "Kernel %s runtime: %ldus\n",
                                                "main.segscan_220969",
                                                time_end_232000 -
                                                time_start_231999);
                                    }
                                }
                                if (memblock_unref_device(ctx,
                                                          &incprefixes_mem_229635,
                                                          "incprefixes_mem_229635") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &aggregates_mem_229633,
                                                          "aggregates_mem_229633") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &incprefixes_mem_229631,
                                                          "incprefixes_mem_229631") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &aggregates_mem_229629,
                                                          "aggregates_mem_229629") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &incprefixes_mem_229627,
                                                          "incprefixes_mem_229627") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &aggregates_mem_229625,
                                                          "aggregates_mem_229625") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &incprefixes_mem_229623,
                                                          "incprefixes_mem_229623") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &aggregates_mem_229621,
                                                          "aggregates_mem_229621") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &status_flags_mem_229619,
                                                          "status_flags_mem_229619") !=
                                    0)
                                    return 1;
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "\n# SegMap");
                            
                            CUdeviceptr kernel_arg_232022 =
                                        mem_param_224799.mem;
                            CUdeviceptr kernel_arg_232023 = mem_224805.mem;
                            CUdeviceptr kernel_arg_232024 = mem_224835.mem;
                            CUdeviceptr kernel_arg_232025 = mem_224839.mem;
                            CUdeviceptr kernel_arg_232026 = mem_224843.mem;
                            CUdeviceptr kernel_arg_232027 = mem_224847.mem;
                            CUdeviceptr kernel_arg_232028 = mem_224851.mem;
                            
                            if ((((((1 && segmap_usable_groups_221033 != 0) &&
                                    1 != 0) && 1 != 0) &&
                                  segmap_group_sizze_221032 != 0) && 1 != 0) &&
                                1 != 0) {
                                int perm[3] = {0, 1, 2};
                                
                                if (1 >= 1 << 16) {
                                    perm[1] = perm[0];
                                    perm[0] = 1;
                                }
                                if (1 >= 1 << 16) {
                                    perm[2] = perm[0];
                                    perm[0] = 2;
                                }
                                
                                size_t grid[3];
                                
                                grid[perm[0]] = segmap_usable_groups_221033;
                                grid[perm[1]] = 1;
                                grid[perm[2]] = 1;
                                
                                void *kernel_args_232019[] =
                                     {&ctx->global_failure, &m_196691,
                                      &n_196692, &i_196779, &kernel_arg_232022,
                                      &kernel_arg_232023, &kernel_arg_232024,
                                      &kernel_arg_232025, &kernel_arg_232026,
                                      &kernel_arg_232027, &kernel_arg_232028};
                                int64_t time_start_232020 = 0, time_end_232021 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                            "main.segmap_221037",
                                            (long) segmap_usable_groups_221033,
                                            (long) 1, (long) 1,
                                            (long) segmap_group_sizze_221032,
                                            (long) 1, (long) 1, (int) 0);
                                    time_start_232020 = get_wall_time();
                                }
                                
                                cudaEvent_t *pevents = NULL;
                                
                                if (ctx->profiling && !ctx->profiling_paused) {
                                    pevents = cuda_get_events(&ctx->cuda,
                                                              &ctx->mainzisegmap_221037_runs,
                                                              &ctx->mainzisegmap_221037_total_runtime);
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0],
                                                                       0));
                                }
                                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_221037,
                                                                      grid[0],
                                                                      grid[1],
                                                                      grid[2],
                                                                      segmap_group_sizze_221032,
                                                                      1, 1, 0,
                                                                      NULL,
                                                                      kernel_args_232019,
                                                                      NULL));
                                if (pevents != NULL)
                                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1],
                                                                       0));
                                if (ctx->debugging) {
                                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                                    time_end_232021 = get_wall_time();
                                    fprintf(ctx->log,
                                            "Kernel %s runtime: %ldus\n",
                                            "main.segmap_221037",
                                            time_end_232021 -
                                            time_start_232020);
                                }
                            }
                            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_229575;
                        
                        mem_param_tmp_229575.references = NULL;
                        if (memblock_set_device(ctx, &mem_param_tmp_229575,
                                                &ext_mem_224853,
                                                "ext_mem_224853") != 0)
                            return 1;
                        if (memblock_set_device(ctx, &mem_param_224799,
                                                &mem_param_tmp_229575,
                                                "mem_param_tmp_229575") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_tmp_229575,
                                                  "mem_param_tmp_229575") != 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;
                }
                {
                    cudaEvent_t *pevents = NULL;
                    
                    if (ctx->profiling && !ctx->profiling_paused) {
                        pevents = cuda_get_events(&ctx->cuda,
                                                  &ctx->copy_dev_to_dev_runs,
                                                  &ctx->copy_dev_to_dev_total_runtime);
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                    }
                    CUDA_SUCCEED_OR_RETURN(cuMemcpy(mem_224880.mem +
                                                    (int64_t) 0,
                                                    ext_mem_224864.mem +
                                                    (int64_t) 0, m_196691 *
                                                    n_196692 * (int64_t) 4));
                    if (pevents != NULL)
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                }
                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_229887;
            
            max_num_groups_229887 =
                *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_229887))));
            
            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_229973;
            
            local_memory_capacity_229973 = ctx->cuda.max_shared_memory;
            if (sle64((int64_t) 0,
                      sext_i32_i64(local_memory_capacity_229973)) &&
                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");
                
                CUdeviceptr kernel_arg_232032 = mem_224885.mem;
                CUdeviceptr kernel_arg_232033 = mem_224889.mem;
                CUdeviceptr kernel_arg_232034 = mem_224892.mem;
                CUdeviceptr kernel_arg_232035 = mem_224895.mem;
                
                if ((((((1 && segmap_usable_groups_221087 != 0) && 1 != 0) &&
                       1 != 0) && segmap_group_sizze_221086 != 0) && 1 != 0) &&
                    1 != 0) {
                    int perm[3] = {0, 1, 2};
                    
                    if (1 >= 1 << 16) {
                        perm[1] = perm[0];
                        perm[0] = 1;
                    }
                    if (1 >= 1 << 16) {
                        perm[2] = perm[0];
                        perm[0] = 2;
                    }
                    
                    size_t grid[3];
                    
                    grid[perm[0]] = segmap_usable_groups_221087;
                    grid[perm[1]] = 1;
                    grid[perm[2]] = 1;
                    
                    void *kernel_args_232029[] = {&ctx->global_failure,
                                                  &m_196691, &stl_res_196773,
                                                  &j_m_i_197246,
                                                  &kernel_arg_232032,
                                                  &kernel_arg_232033,
                                                  &kernel_arg_232034,
                                                  &kernel_arg_232035};
                    int64_t time_start_232030 = 0, time_end_232031 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                "main.segmap_221092",
                                (long) segmap_usable_groups_221087, (long) 1,
                                (long) 1, (long) segmap_group_sizze_221086,
                                (long) 1, (long) 1, (int) 0);
                        time_start_232030 = get_wall_time();
                    }
                    
                    cudaEvent_t *pevents = NULL;
                    
                    if (ctx->profiling && !ctx->profiling_paused) {
                        pevents = cuda_get_events(&ctx->cuda,
                                                  &ctx->mainzisegmap_221092_runs,
                                                  &ctx->mainzisegmap_221092_total_runtime);
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                    }
                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_221092,
                                                          grid[0], grid[1],
                                                          grid[2],
                                                          segmap_group_sizze_221086,
                                                          1, 1, 0, NULL,
                                                          kernel_args_232029,
                                                          NULL));
                    if (pevents != NULL)
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                    if (ctx->debugging) {
                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                        time_end_232031 = get_wall_time();
                        fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                "main.segmap_221092", time_end_232031 -
                                time_start_232030);
                    }
                }
                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_229897 = smax64((int64_t) 1,
                                                                   j_m_i_197246);
                    int64_t num_threads_229898 = 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_229897),
                                '\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_229897))),
                                '\n');
                    
                    unsigned int shared_sizze_232039 = (int64_t) 4 *
                                 segred_group_sizze_221135;
                    CUdeviceptr kernel_arg_232041 = ext_mem_224882.mem;
                    CUdeviceptr kernel_arg_232042 = mem_224899.mem;
                    unsigned int shared_offset_232040 = 0;
                    
                    if ((((((1 && num_groups_221136 != 0) && 1 != 0) && 1 !=
                           0) && segred_group_sizze_221135 != 0) && 1 != 0) &&
                        1 != 0) {
                        int perm[3] = {0, 1, 2};
                        
                        if (1 >= 1 << 16) {
                            perm[1] = perm[0];
                            perm[0] = 1;
                        }
                        if (1 >= 1 << 16) {
                            perm[2] = perm[0];
                            perm[0] = 2;
                        }
                        
                        size_t grid[3];
                        
                        grid[perm[0]] = num_groups_221136;
                        grid[perm[1]] = 1;
                        grid[perm[2]] = 1;
                        
                        void *kernel_args_232036[] = {&ctx->global_failure,
                                                      &shared_offset_232040,
                                                      &m_196691, &n_196692,
                                                      &stl_res_196773,
                                                      &j_m_i_197246,
                                                      &num_groups_221136,
                                                      &segment_sizze_nonzzero_229897,
                                                      &kernel_arg_232041,
                                                      &kernel_arg_232042};
                        int64_t time_start_232037 = 0, time_end_232038 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                    "main.segred_small_221141",
                                    (long) num_groups_221136, (long) 1,
                                    (long) 1, (long) segred_group_sizze_221135,
                                    (long) 1, (long) 1, (int) (0 +
                                                               (shared_sizze_232039 +
                                                                (8 -
                                                                 shared_sizze_232039 %
                                                                 8) % 8)));
                            time_start_232037 = get_wall_time();
                        }
                        
                        cudaEvent_t *pevents = NULL;
                        
                        if (ctx->profiling && !ctx->profiling_paused) {
                            pevents = cuda_get_events(&ctx->cuda,
                                                      &ctx->mainzisegred_small_221141_runs,
                                                      &ctx->mainzisegred_small_221141_total_runtime);
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                        }
                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_small_221141,
                                                              grid[0], grid[1],
                                                              grid[2],
                                                              segred_group_sizze_221135,
                                                              1, 1, 0 +
                                                              (shared_sizze_232039 +
                                                               (8 -
                                                                shared_sizze_232039 %
                                                                8) % 8), NULL,
                                                              kernel_args_232036,
                                                              NULL));
                        if (pevents != NULL)
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                        if (ctx->debugging) {
                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                            time_end_232038 = get_wall_time();
                            fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                    "main.segred_small_221141",
                                    time_end_232038 - time_start_232037);
                        }
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "");
                } else {
                    int64_t groups_per_segment_229924 =
                            sdiv_up64(num_groups_221136, smax64((int64_t) 1,
                                                                m_196691));
                    int64_t elements_per_thread_229925 = sdiv_up64(j_m_i_197246,
                                                                   segred_group_sizze_221135 *
                                                                   groups_per_segment_229924);
                    int64_t virt_num_groups_229926 = groups_per_segment_229924 *
                            m_196691;
                    int64_t num_threads_229927 = num_groups_221136 *
                            segred_group_sizze_221135;
                    int64_t threads_per_segment_229928 =
                            groups_per_segment_229924 *
                            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_229926, '\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_229925, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "groups_per_segment",
                                (long long) groups_per_segment_229924, '\n');
                    
                    struct memblock_device segred_tmp_mem_229929;
                    
                    segred_tmp_mem_229929.references = NULL;
                    if (memblock_alloc_device(ctx, &segred_tmp_mem_229929,
                                              (int64_t) 4 *
                                              virt_num_groups_229926,
                                              "segred_tmp_mem_229929")) {
                        err = 1;
                        goto cleanup;
                    }
                    
                    struct memblock_device mainzicounter_mem_229931 =
                                           ctx->mainzicounter_mem_229931;
                    unsigned int shared_sizze_232047 = 1;
                    unsigned int shared_sizze_232049 = (int64_t) 4 *
                                 segred_group_sizze_221135;
                    CUdeviceptr kernel_arg_232051 = ext_mem_224882.mem;
                    CUdeviceptr kernel_arg_232052 = mem_224899.mem;
                    CUdeviceptr kernel_arg_232053 = segred_tmp_mem_229929.mem;
                    CUdeviceptr kernel_arg_232054 =
                                mainzicounter_mem_229931.mem;
                    unsigned int shared_offset_232048 = 0;
                    unsigned int shared_offset_232050 = 0 +
                                 (shared_sizze_232047 + (8 -
                                                         shared_sizze_232047 %
                                                         8) % 8);
                    
                    if ((((((1 && num_groups_221136 != 0) && 1 != 0) && 1 !=
                           0) && segred_group_sizze_221135 != 0) && 1 != 0) &&
                        1 != 0) {
                        int perm[3] = {0, 1, 2};
                        
                        if (1 >= 1 << 16) {
                            perm[1] = perm[0];
                            perm[0] = 1;
                        }
                        if (1 >= 1 << 16) {
                            perm[2] = perm[0];
                            perm[0] = 2;
                        }
                        
                        size_t grid[3];
                        
                        grid[perm[0]] = num_groups_221136;
                        grid[perm[1]] = 1;
                        grid[perm[2]] = 1;
                        
                        void *kernel_args_232044[] = {&ctx->global_failure,
                                                      &shared_offset_232048,
                                                      &shared_offset_232050,
                                                      &m_196691, &n_196692,
                                                      &stl_res_196773,
                                                      &j_m_i_197246,
                                                      &num_groups_221136,
                                                      &groups_per_segment_229924,
                                                      &elements_per_thread_229925,
                                                      &virt_num_groups_229926,
                                                      &threads_per_segment_229928,
                                                      &kernel_arg_232051,
                                                      &kernel_arg_232052,
                                                      &kernel_arg_232053,
                                                      &kernel_arg_232054};
                        int64_t time_start_232045 = 0, time_end_232046 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                    "main.segred_large_221141",
                                    (long) num_groups_221136, (long) 1,
                                    (long) 1, (long) segred_group_sizze_221135,
                                    (long) 1, (long) 1, (int) (0 +
                                                               (shared_sizze_232047 +
                                                                (8 -
                                                                 shared_sizze_232047 %
                                                                 8) % 8) +
                                                               (shared_sizze_232049 +
                                                                (8 -
                                                                 shared_sizze_232049 %
                                                                 8) % 8)));
                            time_start_232045 = get_wall_time();
                        }
                        
                        cudaEvent_t *pevents = NULL;
                        
                        if (ctx->profiling && !ctx->profiling_paused) {
                            pevents = cuda_get_events(&ctx->cuda,
                                                      &ctx->mainzisegred_large_221141_runs,
                                                      &ctx->mainzisegred_large_221141_total_runtime);
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                        }
                        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegred_large_221141,
                                                              grid[0], grid[1],
                                                              grid[2],
                                                              segred_group_sizze_221135,
                                                              1, 1, 0 +
                                                              (shared_sizze_232047 +
                                                               (8 -
                                                                shared_sizze_232047 %
                                                                8) % 8) +
                                                              (shared_sizze_232049 +
                                                               (8 -
                                                                shared_sizze_232049 %
                                                                8) % 8), NULL,
                                                              kernel_args_232044,
                                                              NULL));
                        if (pevents != NULL)
                            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                        if (ctx->debugging) {
                            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                            time_end_232046 = get_wall_time();
                            fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                    "main.segred_large_221141",
                                    time_end_232046 - time_start_232045);
                        }
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "");
                    if (memblock_unref_device(ctx, &segred_tmp_mem_229929,
                                              "segred_tmp_mem_229929") != 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");
                
                CUdeviceptr kernel_arg_232058 = mem_224899.mem;
                CUdeviceptr kernel_arg_232059 = mem_224903.mem;
                CUdeviceptr kernel_arg_232060 = mem_224906.mem;
                CUdeviceptr kernel_arg_232061 = mem_224909.mem;
                
                if ((((((1 && segmap_usable_groups_221149 != 0) && 1 != 0) &&
                       1 != 0) && segmap_group_sizze_221148 != 0) && 1 != 0) &&
                    1 != 0) {
                    int perm[3] = {0, 1, 2};
                    
                    if (1 >= 1 << 16) {
                        perm[1] = perm[0];
                        perm[0] = 1;
                    }
                    if (1 >= 1 << 16) {
                        perm[2] = perm[0];
                        perm[0] = 2;
                    }
                    
                    size_t grid[3];
                    
                    grid[perm[0]] = segmap_usable_groups_221149;
                    grid[perm[1]] = 1;
                    grid[perm[2]] = 1;
                    
                    void *kernel_args_232055[] = {&ctx->global_failure,
                                                  &m_196691, &kernel_arg_232058,
                                                  &kernel_arg_232059,
                                                  &kernel_arg_232060,
                                                  &kernel_arg_232061};
                    int64_t time_start_232056 = 0, time_end_232057 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                                "main.segmap_221154",
                                (long) segmap_usable_groups_221149, (long) 1,
                                (long) 1, (long) segmap_group_sizze_221148,
                                (long) 1, (long) 1, (int) 0);
                        time_start_232056 = get_wall_time();
                    }
                    
                    cudaEvent_t *pevents = NULL;
                    
                    if (ctx->profiling && !ctx->profiling_paused) {
                        pevents = cuda_get_events(&ctx->cuda,
                                                  &ctx->mainzisegmap_221154_runs,
                                                  &ctx->mainzisegmap_221154_total_runtime);
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                    }
                    CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_221154,
                                                          grid[0], grid[1],
                                                          grid[2],
                                                          segmap_group_sizze_221148,
                                                          1, 1, 0, NULL,
                                                          kernel_args_232055,
                                                          NULL));
                    if (pevents != NULL)
                        CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                    if (ctx->debugging) {
                        CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                        time_end_232057 = get_wall_time();
                        fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                                "main.segmap_221154", time_end_232057 -
                                time_start_232056);
                    }
                }
                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");
            
            CUdeviceptr kernel_arg_232065 = ext_mem_224626.mem;
            CUdeviceptr kernel_arg_232066 = ext_mem_224910.mem;
            CUdeviceptr kernel_arg_232067 = ext_mem_224911.mem;
            CUdeviceptr kernel_arg_232068 = ext_mem_224912.mem;
            CUdeviceptr kernel_arg_232069 = mem_224917.mem;
            
            if ((((((1 && segmap_usable_groups_221236 != 0) && 1 != 0) && 1 !=
                   0) && segmap_group_sizze_221235 != 0) && 1 != 0) && 1 != 0) {
                int perm[3] = {0, 1, 2};
                
                if (1 >= 1 << 16) {
                    perm[1] = perm[0];
                    perm[0] = 1;
                }
                if (1 >= 1 << 16) {
                    perm[2] = perm[0];
                    perm[0] = 2;
                }
                
                size_t grid[3];
                
                grid[perm[0]] = segmap_usable_groups_221236;
                grid[perm[1]] = 1;
                grid[perm[2]] = 1;
                
                void *kernel_args_232062[] = {&ctx->global_failure, &m_196691,
                                              &n_196692, &kernel_arg_232065,
                                              &kernel_arg_232066,
                                              &kernel_arg_232067,
                                              &kernel_arg_232068,
                                              &kernel_arg_232069};
                int64_t time_start_232063 = 0, time_end_232064 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                            "main.segmap_221240",
                            (long) segmap_usable_groups_221236, (long) 1,
                            (long) 1, (long) segmap_group_sizze_221235,
                            (long) 1, (long) 1, (int) 0);
                    time_start_232063 = get_wall_time();
                }
                
                cudaEvent_t *pevents = NULL;
                
                if (ctx->profiling && !ctx->profiling_paused) {
                    pevents = cuda_get_events(&ctx->cuda,
                                              &ctx->mainzisegmap_221240_runs,
                                              &ctx->mainzisegmap_221240_total_runtime);
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
                }
                CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_221240,
                                                      grid[0], grid[1], grid[2],
                                                      segmap_group_sizze_221235,
                                                      1, 1, 0, NULL,
                                                      kernel_args_232062,
                                                      NULL));
                if (pevents != NULL)
                    CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
                if (ctx->debugging) {
                    CUDA_SUCCEED_FATAL(cuCtxSynchronize());
                    time_end_232064 = get_wall_time();
                    fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                            "main.segmap_221240", time_end_232064 -
                            time_start_232063);
                }
            }
            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_225911 = ext_224590;
        int64_t ctx_param_ext_tmp_225912 = ext_224588;
        int64_t ctx_param_ext_tmp_225913 = ext_224923;
        int64_t ctx_param_ext_tmp_225914 = ext_224922;
        int64_t ctx_param_ext_tmp_225915 = ext_224919;
        int64_t ctx_param_ext_tmp_225916 = ext_224921;
        int64_t ctx_param_ext_tmp_225917 = ext_224925;
        int64_t ctx_param_ext_tmp_225918 = ext_224920;
        int64_t ctx_param_ext_tmp_225919 = ext_224924;
        struct memblock_device mem_param_tmp_225920;
        
        mem_param_tmp_225920.references = NULL;
        if (memblock_set_device(ctx, &mem_param_tmp_225920, &ext_mem_224584,
                                "ext_mem_224584") != 0)
            return 1;
        
        struct memblock_device mem_param_tmp_225921;
        
        mem_param_tmp_225921.references = NULL;
        if (memblock_set_device(ctx, &mem_param_tmp_225921, &ext_mem_224583,
                                "ext_mem_224583") != 0)
            return 1;
        
        struct memblock_device mem_param_tmp_225922;
        
        mem_param_tmp_225922.references = NULL;
        if (memblock_set_device(ctx, &mem_param_tmp_225922, &ext_mem_224918,
                                "ext_mem_224918") != 0)
            return 1;
        ctx_param_ext_222536 = ctx_param_ext_tmp_225911;
        ctx_param_ext_222538 = ctx_param_ext_tmp_225912;
        ctx_param_ext_222543 = ctx_param_ext_tmp_225913;
        ctx_param_ext_222544 = ctx_param_ext_tmp_225914;
        ctx_param_ext_222545 = ctx_param_ext_tmp_225915;
        ctx_param_ext_222546 = ctx_param_ext_tmp_225916;
        ctx_param_ext_222547 = ctx_param_ext_tmp_225917;
        ctx_param_ext_222548 = ctx_param_ext_tmp_225918;
        ctx_param_ext_222549 = ctx_param_ext_tmp_225919;
        if (memblock_set_device(ctx, &mem_param_222534, &mem_param_tmp_225920,
                                "mem_param_tmp_225920") != 0)
            return 1;
        if (memblock_set_device(ctx, &mem_param_222542, &mem_param_tmp_225921,
                                "mem_param_tmp_225921") != 0)
            return 1;
        if (memblock_set_device(ctx, &mem_param_222550, &mem_param_tmp_225922,
                                "mem_param_tmp_225922") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_param_tmp_225922,
                                  "mem_param_tmp_225922") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_param_tmp_225921,
                                  "mem_param_tmp_225921") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_param_tmp_225920,
                                  "mem_param_tmp_225920") != 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");
    
    CUdeviceptr kernel_arg_232073 = Y_mem_222225.mem;
    CUdeviceptr kernel_arg_232074 = ext_mem_224927.mem;
    CUdeviceptr kernel_arg_232075 = ext_mem_224928.mem;
    CUdeviceptr kernel_arg_232076 = mem_224954.mem;
    
    if ((((((1 && segmap_usable_groups_221306 != 0) && 1 != 0) && 1 != 0) &&
          segmap_group_sizze_221305 != 0) && 1 != 0) && 1 != 0) {
        int perm[3] = {0, 1, 2};
        
        if (1 >= 1 << 16) {
            perm[1] = perm[0];
            perm[0] = 1;
        }
        if (1 >= 1 << 16) {
            perm[2] = perm[0];
            perm[0] = 2;
        }
        
        size_t grid[3];
        
        grid[perm[0]] = segmap_usable_groups_221306;
        grid[perm[1]] = 1;
        grid[perm[2]] = 1;
        
        void *kernel_args_232070[] = {&ctx->global_failure, &m_196691,
                                      &n_196692, &ext_224939,
                                      &kernel_arg_232073, &kernel_arg_232074,
                                      &kernel_arg_232075, &kernel_arg_232076};
        int64_t time_start_232071 = 0, time_end_232072 = 0;
        
        if (ctx->debugging) {
            fprintf(ctx->log,
                    "Launching %s with grid size [%ld, %ld, %ld] and block size [%ld, %ld, %ld]; shared memory: %d bytes.\n",
                    "main.segmap_221310", (long) segmap_usable_groups_221306,
                    (long) 1, (long) 1, (long) segmap_group_sizze_221305,
                    (long) 1, (long) 1, (int) 0);
            time_start_232071 = get_wall_time();
        }
        
        cudaEvent_t *pevents = NULL;
        
        if (ctx->profiling && !ctx->profiling_paused) {
            pevents = cuda_get_events(&ctx->cuda,
                                      &ctx->mainzisegmap_221310_runs,
                                      &ctx->mainzisegmap_221310_total_runtime);
            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
        }
        CUDA_SUCCEED_OR_RETURN(cuLaunchKernel(ctx->mainzisegmap_221310, grid[0],
                                              grid[1], grid[2],
                                              segmap_group_sizze_221305, 1, 1,
                                              0, NULL, kernel_args_232070,
                                              NULL));
        if (pevents != NULL)
            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
        if (ctx->debugging) {
            CUDA_SUCCEED_FATAL(cuCtxSynchronize());
            time_end_232072 = get_wall_time();
            fprintf(ctx->log, "Kernel %s runtime: %ldus\n",
                    "main.segmap_221310", time_end_232072 - time_start_232071);
        }
    }
    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;
    }
    {
        cudaEvent_t *pevents = NULL;
        
        if (ctx->profiling && !ctx->profiling_paused) {
            pevents = cuda_get_events(&ctx->cuda, &ctx->copy_dev_to_dev_runs,
                                      &ctx->copy_dev_to_dev_total_runtime);
            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
        }
        CUDA_SUCCEED_OR_RETURN(cuMemcpy(mem_224958.mem + (int64_t) 0,
                                        ext_mem_224928.mem + (int64_t) 0,
                                        m_196691 * n_196692 * (int64_t) 4));
        if (pevents != NULL)
            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
    }
    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;
    }
    {
        cudaEvent_t *pevents = NULL;
        
        if (ctx->profiling && !ctx->profiling_paused) {
            pevents = cuda_get_events(&ctx->cuda, &ctx->copy_dev_to_dev_runs,
                                      &ctx->copy_dev_to_dev_total_runtime);
            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[0], 0));
        }
        CUDA_SUCCEED_OR_RETURN(cuMemcpy(mem_224963.mem + (int64_t) 0,
                                        ext_mem_224927.mem + (int64_t) 0,
                                        m_196691 * n_196692 * (int64_t) 4));
        if (pevents != NULL)
            CUDA_SUCCEED_FATAL(cudaEventRecord(pevents[1], 0));
    }
    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_230062).references = NULL;
    if (memblock_set_device(ctx, &*mem_out_p_230062, &mem_out_225290,
                            "mem_out_225290") != 0)
        return 1;
    (*mem_out_p_230063).references = NULL;
    if (memblock_set_device(ctx, &*mem_out_p_230063, &mem_out_225291,
                            "mem_out_225291") != 0)
        return 1;
    (*mem_out_p_230064).references = NULL;
    if (memblock_set_device(ctx, &*mem_out_p_230064, &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);
    CUDA_SUCCEED_FATAL(cuCtxPushCurrent(ctx->cuda.cu_ctx));
    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;
        }
    }
    CUDA_SUCCEED_FATAL(cuCtxPopCurrent(&ctx->cuda.cu_ctx));
    lock_unlock(&ctx->lock);
    return ret;
}
  
