#include <stdio.h>
#include <curand_kernel.h>
#include <chrono>

#define host_t float
#define device_t float*
#define t_size sizeof(host_t)

#define size_t unsigned long
#define time_point_t std::chrono::time_point<std::chrono::high_resolution_clock> 

template<typename A, typename B>
struct pair_t { A first; B second; };

host_t fZero(size_t x, size_t y, size_t w) { return 0; }
host_t fIndex(size_t x, size_t y, size_t w) { return (y * w + x); }

void printMatrix(FILE* file, host_t* matrix, size_t width, size_t height) {
  for (size_t y = 0; y < height; y++) {
    for (size_t x = 0; x < width; x++)
      fprintf(file, "%03.0f ", matrix[y * width + x]);
    fprintf(file, "\n");
  }
  fprintf(file, "\n");
}

void fillMatrix(host_t* matrix, size_t width, size_t height, host_t(*function)(size_t, size_t, size_t)) {
  for (size_t y = 0; y < height; y++) 
    for (size_t x = 0; x < width; x++)
      matrix[y * width + x] = function(x, y, width); 
}

pair_t<size_t, size_t> compare(host_t* a, host_t* b, size_t width, size_t height) {
  for (size_t y = 0; y < height; y++) {
    for (size_t x = 0; x < width; x++) {
      if (a[y * width + x] != b[y * width + x]) { 
        printf("missmatch %f %f\n", a[y * width + x], b[y * width + x]);
        return pair_t<size_t, size_t>{x, y};
      }
    }
  }
  return pair_t<size_t, size_t>{width, height};
}
 
void printWindow(FILE* file, host_t* matrix, size_t width, size_t w_start, size_t h_start, size_t w_width, size_t w_height) {
  for (size_t y = w_start; y < w_height; y++) {
    for (size_t x = h_start; x < w_width; x++)
      fprintf(file, "%03.0f ", matrix[y * width + x]);
    fprintf(file, "\n");
  }
  fprintf(file, "\n");
}

struct shared_t {
  device_t device_ptr;
  host_t *host_ptr;

  size_t count;
  size_t bytes;

  shared_t(size_t element_count, bool cuda): 
  host_ptr{(host_t*) malloc(element_count * t_size)},
  device_ptr{nullptr},
  count{element_count},
  bytes{element_count * t_size} {
    if (cuda) {
      cudaMalloc(&device_ptr, bytes); 
    }
    printf("[shared_t] host:%p device:%p count:%lu bytes:%lu\n",
           host_ptr, device_ptr, element_count, bytes);
  }

  ~shared_t() {
    printf("[shared_t] dispose %p %p\n", host_ptr, device_ptr);
    if (host_ptr != nullptr) 
      free(host_ptr);
    if (device_ptr != nullptr)
      cudaFree(device_ptr);
  }

  int sync(cudaMemcpyKind kind) {
    if (host_ptr == nullptr) {
      printf("[shared_t] host_ptr is nullptr (host:%p, device:%p)\n", host_ptr, device_ptr);
      return 1;
    }

    if (device_ptr == nullptr) {
      printf("[shared_t] device_ptr is nullptr (host:%p, device:%p)\n", host_ptr, device_ptr);
      return 2;
    }
    if (kind == cudaMemcpyDeviceToHost)
      return cudaMemcpy(host_ptr, device_ptr, bytes, kind); 
    else 
      return cudaMemcpy(device_ptr, host_ptr, bytes, kind);
  }

  int upload() {
    auto result = sync(cudaMemcpyHostToDevice);
    if (result == cudaSuccess)
      return 0;

    printf("[shared_t] upload of (%p, %p, %lu) failed %d\n", 
           device_ptr, host_ptr, bytes, result);
    return result;
  }

  int download() {
    auto result = sync(cudaMemcpyDeviceToHost);
    if (result == cudaSuccess)
      return 0;

    printf("[shared_t] download of (%p, %p, %lu) failed %d\n", 
           device_ptr, host_ptr, bytes, result);
    return result;
  }

  int randomize() {
    if (device_ptr == nullptr) {
      printf("[shared_t] device_ptr is nullptr for randomize (host:%p, device:%p)\n",
             host_ptr, device_ptr);
      return 1;
    }

    curandGenerator_t generator;
    auto r_gen_create = curandCreateGenerator(&generator, CURAND_RNG_PSEUDO_DEFAULT);
    if (r_gen_create != CURAND_STATUS_SUCCESS) {
      printf("[shared_t] create generator failed %d\n", r_gen_create);
      return r_gen_create;
    }

    auto r_gen = curandGenerateNormal(generator, device_ptr, count, 40, 20); 
    if (r_gen != CURAND_STATUS_SUCCESS) {
      printf("[shared_t] generate failed %d\n", r_gen);
    }

    auto r_destroy = curandDestroyGenerator(generator);
    if (r_destroy != CURAND_STATUS_SUCCESS) {
      printf("[shared_t] destroy generator failed %d\n", r_destroy);
      return r_destroy;
    }

    return 0;
  }

  device_t device() const {
    if (device_ptr == nullptr)
      printf("[shared_t] device() has to return nullptr (host:%p, device:%p)\n", 
             host_ptr, device_ptr);
    return device_ptr;
  }

  host_t* host() const {
    if (host_ptr == nullptr)
      printf("[shared_t] host() has to return nullptr (host:%p, device:%p)\n",
             host_ptr, device_ptr);
    return host_ptr;
  }
};

struct measure_t {
  bool use_cuda;
  time_point_t tp_start;
  time_point_t tp_end;

  cudaEvent_t e_start;
  cudaEvent_t e_end;

  float mcs_value;
  float cuda_mcs_value;

  measure_t(bool cuda): 
  use_cuda{cuda} { 
    if (use_cuda) {
      auto r_start = cudaEventCreate(&e_start);
      auto r_end = cudaEventCreate(&e_end);
      printf("[measure_t] create cuda events start:%d end:%d\n", r_start, r_end);
      if (r_start != cudaSuccess || r_end != cudaSuccess) {
        if (r_start != cudaSuccess && r_end == cudaSuccess)
          cudaEventDestroy(e_end);
        if (r_start == cudaSuccess && r_end != cudaSuccess)
          cudaEventDestroy(e_start);
        printf("[measure_t] disabling cuda events\n");
        use_cuda = false;
      }
    }
  }
  ~measure_t() {
    if (use_cuda) {
        auto r_end = cudaEventDestroy(e_end);
        auto r_start = cudaEventDestroy(e_start);
        printf("[measure_t] dispose cuda events start:%d end:%d\n", r_start, r_end);
    }
  }

  void start() {
    tp_start = std::chrono::high_resolution_clock::now();
    if (use_cuda) 
      cudaEventRecord(e_start, 0);
  }

  void end() {
    tp_end = std::chrono::high_resolution_clock::now();
    mcs_value = std::chrono::duration_cast<std::chrono::microseconds>(tp_end - tp_start).count() * 1.0; 
    if (use_cuda) {
      auto r_record = cudaEventRecord(e_end, 0);
      auto r_sync = cudaEventSynchronize(e_end);

      float elapsed = 0;
      auto r_time = cudaEventElapsedTime(&elapsed, e_start, e_end);

      if (r_record != cudaSuccess || r_sync != cudaSuccess || r_time != cudaSuccess) {
        printf("[measure_t] cuda stop event is failed record:%d sync:%d time:%d\n", 
               r_record, r_sync, r_time);
        return;
      }
     
      cuda_mcs_value = elapsed * 1000.0;
    }
  }

  float mcs() const { return mcs_value; }
  float cuda_mcs() const { return cuda_mcs_value; }
  float ms() const { return mcs_value / 1000.0; }
  float cuda_ms() { return cuda_mcs_value / 1000.0; }
};

__global__ void transformKernel(const device_t input, device_t output, size_t width, size_t threads) {
  const size_t i = blockIdx.x * threads + threadIdx.x; 

  /* *block* vector index is equal to linear index */
  /* but *block* index is 4 linear indecices */
  const size_t y = i * 4 / width;

  /* every *block* index is 4 linear indices */
  const size_t x = 4 * (i % (width / 4));
  
  /* every input vector is 2 output vectors */
  const size_t oy = y * 2;

  /* every *block* index is 2 linear indices */
  const size_t ox = i * 2 % (width / 2);

  /* aligned view into *block* */
  output[(1 + oy) * width / 2 + ox + 0] = input[y * width + x + 0];
  output[(1 + oy) * width / 2 + ox + 1] = input[y * width + x + 1];
  output[(0 + oy) * width / 2 + ox + 0] = input[y * width + x + 2];
  output[(0 + oy) * width / 2 + ox + 1] = input[y * width + x + 3];
}

__host__ void transformCpu(const host_t* input, host_t* output, size_t width, size_t height) {
  const size_t iter = width * height / 4;
  for (size_t i = 0; i < iter; i++) {
    const size_t y = i * 4 / width;
    const size_t x = 4 * (i % (width / 4));
    const size_t oy = y * 2;
    const size_t ox = i * 2 % (width / 2);
    output[(1 + oy) * width / 2 + ox + 0] = input[y * width + x + 0];
    output[(1 + oy) * width / 2 + ox + 1] = input[y * width + x + 1];
    output[(0 + oy) * width / 2 + ox + 0] = input[y * width + x + 2];
    output[(0 + oy) * width / 2 + ox + 1] = input[y * width + x + 3];
  }
}

int main() {
  const size_t height = 8444;
  const size_t width = 4213;
  const size_t count = height * width;
  
  const size_t o_width = width / 2;
  const size_t o_height = height * 2;

  FILE* matrix_file = stdout;
  if (width > 32 || height > 32) {
    printf("[warning] matrix will not be printed because sizes are too big\n");
    matrix_file = fopen("/dev/null", "w");
  }

  shared_t input{count, true};
  shared_t output{count, true};
  shared_t check{count, false};
  measure_t measure{true};
  measure_t cpu_measure{false};

  /* generate random numbers in device memory */
  if (input.randomize() != 0)
    return 4;

  /* copy it to host memory */
  if (input.download() != 0)
    return 3;

  fillMatrix(output.host(), width, height, fZero);
  fillMatrix(check.host(), width, height, fZero);

  /* copy data into the device */
  if (input.upload() != 0)
    return 1;

  /* output copy isn't necessary */
  if (output.upload() != 0)
    return 1;

  /* calculate kernel start params */
  const size_t iter_count = count / 4;
  size_t thread_count = iter_count < 1024 ? iter_count : 1024;

  for (; thread_count >= 2; thread_count--)
    if (iter_count % thread_count == 0)
      break;

  printf("thread count: %lu\n", thread_count);

  /* execute kernel on the device */
  measure.start();
  transformKernel<<<iter_count / thread_count, thread_count>>>(
    input.device(),
    output.device(),
    width,
    thread_count
  );
  measure.end();

  cpu_measure.start();
  transformCpu(input.host(), check.host(), width, height); 
  cpu_measure.end();

  /* copy data from the device */
  if (output.download() != 0)
    return 2;

  /* input copy isn't necessary */
  if (input.download() != 0)
    return 2;

  fprintf(matrix_file, "input: \n");
  printMatrix(matrix_file, input.host(), width, height);
  fprintf(matrix_file, "output: \n");
  printMatrix(matrix_file, output.host(), o_width, o_height);
  fprintf(matrix_file, "check: \n");
  printMatrix(matrix_file, check.host(), o_width, o_height);
  
  printf("measure device: %f mcs\n", measure.cuda_mcs());
  printf("measure host: %f mcs\n", cpu_measure.mcs());

  auto result = compare(output.host(), check.host(), o_width, o_height);
  if (result.first < o_width || result.second < o_height) {
    printf("compare missmatch on %lu %lu\n", result.first, result.second);
  } else {
    printf("compare check passed!\n");
  }

  printf("input window: \n");
  printWindow(stdout, input.host(), o_width, 0, 0, 4, 1);
  printf("output window: \n");
  printWindow(stdout, output.host(), o_width, 0, 0, 2, 2); 
  printf("check window: \n");
  printWindow(stdout, check.host(), o_width, 0, 0, 2, 2);

  /* all shared_t objects is allocated on the stack */
  /* so, destructor will automatically free all memory */
  return 0;
}

	.file	"tmpxft_002873bf_00000000-6_kernel.cudafe1.cpp"
	.text
#APP

#NO_APP
	.globl	_Z5fZerommm
	.type	_Z5fZerommm, @function
_Z5fZerommm:
.LFB2340:
	.cfi_startproc
	endbr64
	xorps	%xmm0, %xmm0
	ret
	.cfi_endproc
.LFE2340:
	.size	_Z5fZerommm, .-_Z5fZerommm
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2375:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2375:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z6fIndexmmm
	.type	_Z6fIndexmmm, @function
_Z6fIndexmmm:
.LFB2341:
	.cfi_startproc
	endbr64
	imulq	%rdx, %rsi
	addq	%rdi, %rsi
	js	.L4
	cvtsi2ssq	%rsi, %xmm0
	ret
.L4:
	movq	%rsi, %rax
	andl	$1, %esi
	shrq	%rax
	orq	%rsi, %rax
	cvtsi2ssq	%rax, %xmm0
	addss	%xmm0, %xmm0
	ret
	.cfi_endproc
.LFE2341:
	.size	_Z6fIndexmmm, .-_Z6fIndexmmm
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%03.0f "
.LC2:
	.string	"\n"
	.text
	.globl	_Z11printMatrixP8_IO_FILEPfmm
	.type	_Z11printMatrixP8_IO_FILEPfmm, @function
_Z11printMatrixP8_IO_FILEPfmm:
.LFB2342:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rcx, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	xorl	%r13d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdx, %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%rdi, (%rsp)
.L8:
	cmpq	%r14, %r13
	je	.L10
	leaq	0(%rbp,%r12,4), %r8
	xorl	%r15d, %r15d
.L11:
	cmpq	%rbx, %r15
	je	.L13
	movq	(%rsp), %rdi
	movl	$2, %esi
	movb	$1, %al
	movq	%r8, 8(%rsp)
	leaq	.LC1(%rip), %rdx
	cvtss2sd	(%r8,%r15,4), %xmm0
	incq	%r15
	call	__fprintf_chk@PLT
	movq	8(%rsp), %r8
	jmp	.L11
.L13:
	movq	(%rsp), %rdi
	leaq	.LC2(%rip), %rdx
	xorl	%eax, %eax
	incq	%r13
	movl	$2, %esi
	addq	%rbx, %r12
	call	__fprintf_chk@PLT
	jmp	.L8
.L10:
	movq	(%rsp), %rdi
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	leaq	.LC2(%rip), %rdx
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	movl	$2, %esi
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	__fprintf_chk@PLT
	.cfi_endproc
.LFE2342:
	.size	_Z11printMatrixP8_IO_FILEPfmm, .-_Z11printMatrixP8_IO_FILEPfmm
	.globl	_Z10fillMatrixPfmmPFfmmmE
	.type	_Z10fillMatrixPfmmPFfmmmE, @function
_Z10fillMatrixPfmmPFfmmmE:
.LFB2343:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdx, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
.L15:
	cmpq	%r15, %r12
	je	.L14
	leaq	0(%r13,%r14,4), %rax
	xorl	%ebx, %ebx
.L18:
	cmpq	%rbp, %rbx
	je	.L20
	movq	%rax, 8(%rsp)
	movq	%rbx, %rdi
	movq	%rbp, %rdx
	movq	%r12, %rsi
	movq	%rcx, (%rsp)
	call	*%rcx
	movq	8(%rsp), %rax
	movq	(%rsp), %rcx
	movss	%xmm0, (%rax,%rbx,4)
	incq	%rbx
	jmp	.L18
.L20:
	incq	%r12
	addq	%rbp, %r14
	jmp	.L15
.L14:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2343:
	.size	_Z10fillMatrixPfmmPFfmmmE, .-_Z10fillMatrixPfmmPFfmmmE
	.section	.rodata.str1.1
.LC3:
	.string	"missmatch %f %f\n"
	.text
	.globl	_Z7comparePfS_mm
	.type	_Z7comparePfS_mm, @function
_Z7comparePfS_mm:
.LFB2344:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdx, %rax
	xorl	%ebp, %ebp
	movq	%rcx, %rdx
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	pushq	%r8
	.cfi_def_cfa_offset 32
	xorl	%r8d, %r8d
.L22:
	cmpq	%rdx, %rbp
	je	.L25
	leaq	0(,%r8,4), %rcx
	xorl	%ebx, %ebx
	leaq	(%rdi,%rcx), %r9
	addq	%rsi, %rcx
.L27:
	cmpq	%rax, %rbx
	je	.L30
	movss	(%r9,%rbx,4), %xmm0
	movss	(%rcx,%rbx,4), %xmm1
	ucomiss	%xmm1, %xmm0
	jp	.L28
	je	.L23
.L28:
	movl	$2, %edi
	movb	$2, %al
	cvtss2sd	%xmm0, %xmm0
	cvtss2sd	%xmm1, %xmm1
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	movq	%rbx, %rax
	movq	%rbp, %rdx
	jmp	.L25
.L23:
	incq	%rbx
	jmp	.L27
.L30:
	incq	%rbp
	addq	%rax, %r8
	jmp	.L22
.L25:
	popq	%rcx
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2344:
	.size	_Z7comparePfS_mm, .-_Z7comparePfS_mm
	.globl	_Z11printWindowP8_IO_FILEPfmmmmm
	.type	_Z11printWindowP8_IO_FILEPfmmmmm, @function
_Z11printWindowP8_IO_FILEPfmmmmm:
.LFB2345:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%r9, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rcx, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	imulq	%rdx, %r13
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdx, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rcx, %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%rdi, (%rsp)
	movq	96(%rsp), %r15
	movq	%r8, 8(%rsp)
.L32:
	cmpq	%r15, %rbx
	jnb	.L34
	movq	8(%rsp), %rcx
	leaq	(%r12,%r13,4), %r8
.L35:
	cmpq	%r14, %rcx
	jnb	.L37
	movq	(%rsp), %rdi
	movl	$2, %esi
	movb	$1, %al
	movq	%r8, 24(%rsp)
	leaq	.LC1(%rip), %rdx
	cvtss2sd	(%r8,%rcx,4), %xmm0
	movq	%rcx, 16(%rsp)
	call	__fprintf_chk@PLT
	movq	16(%rsp), %rcx
	movq	24(%rsp), %r8
	incq	%rcx
	jmp	.L35
.L37:
	movq	(%rsp), %rdi
	leaq	.LC2(%rip), %rdx
	xorl	%eax, %eax
	incq	%rbx
	movl	$2, %esi
	addq	%rbp, %r13
	call	__fprintf_chk@PLT
	jmp	.L32
.L34:
	movq	(%rsp), %rdi
	addq	$40, %rsp
	.cfi_def_cfa_offset 56
	leaq	.LC2(%rip), %rdx
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	movl	$2, %esi
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	__fprintf_chk@PLT
	.cfi_endproc
.LFE2345:
	.size	_Z11printWindowP8_IO_FILEPfmmmmm, .-_Z11printWindowP8_IO_FILEPfmmmmm
	.section	.rodata._ZN8shared_tC2Emb.str1.1,"aMS",@progbits,1
.LC4:
	.string	"[shared_t] host:%p device:%p count:%lu bytes:%lu\n"
	.section	.text._ZN8shared_tC2Emb,"axG",@progbits,_ZN8shared_tC5Emb,comdat
	.align 2
	.weak	_ZN8shared_tC2Emb
	.type	_ZN8shared_tC2Emb, @function
_ZN8shared_tC2Emb:
.LFB2347:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	%edx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rdi, %rbx
	pushq	%r11
	.cfi_def_cfa_offset 48
	movq	%r12, (%rdi)
	leaq	0(,%rsi,4), %r12
	movq	%r12, %rdi
	call	malloc@PLT
	movq	%rbp, 16(%rbx)
	movq	%rax, 8(%rbx)
	movq	%r12, 24(%rbx)
	testb	%r13b, %r13b
	je	.L39
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	cudaMalloc@PLT
.L39:
	movq	8(%rbx), %rdx
	movq	24(%rbx), %r9
	movq	%rbp, %r8
	movl	$2, %edi
	movq	(%rbx), %rcx
	leaq	.LC4(%rip), %rsi
	popq	%r10
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE2347:
	.size	_ZN8shared_tC2Emb, .-_ZN8shared_tC2Emb
	.weak	_ZN8shared_tC1Emb
	.set	_ZN8shared_tC1Emb,_ZN8shared_tC2Emb
	.section	.rodata._ZN8shared_tD2Ev.str1.1,"aMS",@progbits,1
.LC5:
	.string	"[shared_t] dispose %p %p\n"
	.section	.text._ZN8shared_tD2Ev,"axG",@progbits,_ZN8shared_tD5Ev,comdat
	.align 2
	.weak	_ZN8shared_tD2Ev
	.type	_ZN8shared_tD2Ev, @function
_ZN8shared_tD2Ev:
.LFB2350:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA2350
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	8(%rdi), %rdx
	movq	%rdi, %rbx
	leaq	.LC5(%rip), %rsi
	movq	(%rdi), %rcx
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	.L42
	call	free@PLT
.L42:
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	.L41
	call	cudaFree@PLT
.L41:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2350:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table._ZN8shared_tD2Ev,"aG",@progbits,_ZN8shared_tD5Ev,comdat
.LLSDA2350:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE2350-.LLSDACSB2350
.LLSDACSB2350:
.LLSDACSE2350:
	.section	.text._ZN8shared_tD2Ev,"axG",@progbits,_ZN8shared_tD5Ev,comdat
	.size	_ZN8shared_tD2Ev, .-_ZN8shared_tD2Ev
	.weak	_ZN8shared_tD1Ev
	.set	_ZN8shared_tD1Ev,_ZN8shared_tD2Ev
	.section	.rodata._ZN8shared_t4syncE14cudaMemcpyKind.str1.1,"aMS",@progbits,1
.LC6:
	.string	"[shared_t] host_ptr is nullptr (host:%p, device:%p)\n"
.LC7:
	.string	"[shared_t] device_ptr is nullptr (host:%p, device:%p)\n"
	.section	.text._ZN8shared_t4syncE14cudaMemcpyKind,"axG",@progbits,_ZN8shared_t4syncE14cudaMemcpyKind,comdat
	.align 2
	.weak	_ZN8shared_t4syncE14cudaMemcpyKind
	.type	_ZN8shared_t4syncE14cudaMemcpyKind, @function
_ZN8shared_t4syncE14cudaMemcpyKind:
.LFB2352:
	.cfi_startproc
	endbr64
	pushq	%r9
	.cfi_def_cfa_offset 16
	movq	8(%rdi), %rax
	testq	%rax, %rax
	jne	.L52
	movq	(%rdi), %rcx
	xorl	%edx, %edx
	leaq	.LC6(%rip), %rsi
	movl	$2, %edi
	call	__printf_chk@PLT
	movl	$1, %eax
	jmp	.L51
.L52:
	movq	(%rdi), %r8
	testq	%r8, %r8
	jne	.L54
	movq	%rax, %rdx
	xorl	%ecx, %ecx
	leaq	.LC7(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
	movl	$2, %eax
	jmp	.L51
.L54:
	movq	24(%rdi), %rdx
	movl	%esi, %ecx
	cmpl	$2, %esi
	jne	.L55
	movq	%r8, %rsi
	movq	%rax, %rdi
	jmp	.L57
.L55:
	movq	%rax, %rsi
	movq	%r8, %rdi
.L57:
	popq	%r8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	cudaMemcpy@PLT
.L51:
	.cfi_restore_state
	popq	%rdx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2352:
	.size	_ZN8shared_t4syncE14cudaMemcpyKind, .-_ZN8shared_t4syncE14cudaMemcpyKind
	.section	.rodata._ZN8shared_t6uploadEv.str1.1,"aMS",@progbits,1
.LC8:
	.string	"[shared_t] upload of (%p, %p, %lu) failed %d\n"
	.section	.text._ZN8shared_t6uploadEv,"axG",@progbits,_ZN8shared_t6uploadEv,comdat
	.align 2
	.weak	_ZN8shared_t6uploadEv
	.type	_ZN8shared_t6uploadEv, @function
_ZN8shared_t6uploadEv:
.LFB2353:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$1, %esi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rbx
	pushq	%rcx
	.cfi_def_cfa_offset 32
	call	_ZN8shared_t4syncE14cudaMemcpyKind
	movl	%eax, %ebp
	testl	%eax, %eax
	je	.L58
	movq	8(%rbx), %rcx
	movq	24(%rbx), %r8
	movl	%eax, %r9d
	movl	$2, %edi
	movq	(%rbx), %rdx
	leaq	.LC8(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L58:
	movl	%ebp, %eax
	popq	%rdx
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2353:
	.size	_ZN8shared_t6uploadEv, .-_ZN8shared_t6uploadEv
	.section	.rodata._ZN8shared_t8downloadEv.str1.1,"aMS",@progbits,1
.LC9:
	.string	"[shared_t] download of (%p, %p, %lu) failed %d\n"
	.section	.text._ZN8shared_t8downloadEv,"axG",@progbits,_ZN8shared_t8downloadEv,comdat
	.align 2
	.weak	_ZN8shared_t8downloadEv
	.type	_ZN8shared_t8downloadEv, @function
_ZN8shared_t8downloadEv:
.LFB2354:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$2, %esi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rbx
	pushq	%rcx
	.cfi_def_cfa_offset 32
	call	_ZN8shared_t4syncE14cudaMemcpyKind
	movl	%eax, %ebp
	testl	%eax, %eax
	je	.L64
	movq	8(%rbx), %rcx
	movq	24(%rbx), %r8
	movl	%eax, %r9d
	movl	$2, %edi
	movq	(%rbx), %rdx
	leaq	.LC9(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L64:
	movl	%ebp, %eax
	popq	%rdx
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2354:
	.size	_ZN8shared_t8downloadEv, .-_ZN8shared_t8downloadEv
	.section	.rodata._ZN8shared_t9randomizeEv.str1.1,"aMS",@progbits,1
.LC10:
	.string	"[shared_t] device_ptr is nullptr for randomize (host:%p, device:%p)\n"
.LC11:
	.string	"[shared_t] create generator failed %d\n"
.LC14:
	.string	"[shared_t] generate failed %d\n"
.LC15:
	.string	"[shared_t] destroy generator failed %d\n"
	.section	.text._ZN8shared_t9randomizeEv,"axG",@progbits,_ZN8shared_t9randomizeEv,comdat
	.align 2
	.weak	_ZN8shared_t9randomizeEv
	.type	_ZN8shared_t9randomizeEv, @function
_ZN8shared_t9randomizeEv:
.LFB2355:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	cmpq	$0, (%rdi)
	jne	.L71
	movq	8(%rdi), %rdx
	xorl	%ecx, %ecx
	movl	$2, %edi
	leaq	.LC10(%rip), %rsi
	movl	$1, %ebx
	call	__printf_chk@PLT
	jmp	.L70
.L71:
	movl	$100, %esi
	movq	%rsp, %rdi
	call	curandCreateGenerator@PLT
	leaq	.LC11(%rip), %rsi
	movl	%eax, %ebx
	movl	%eax, %edx
	testl	%eax, %eax
	jne	.L82
	movq	16(%rbp), %rdx
	movss	.LC12(%rip), %xmm1
	movss	.LC13(%rip), %xmm0
	movq	0(%rbp), %rsi
	movq	(%rsp), %rdi
	call	curandGenerateNormal@PLT
	movl	%eax, %edx
	testl	%eax, %eax
	je	.L74
	leaq	.LC14(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L74:
	movq	(%rsp), %rdi
	xorl	%ebx, %ebx
	call	curandDestroyGenerator@PLT
	testl	%eax, %eax
	je	.L70
	movl	%eax, %ebx
	movl	%eax, %edx
	leaq	.LC15(%rip), %rsi
.L82:
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L70:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	je	.L75
	call	__stack_chk_fail@PLT
.L75:
	addq	$24, %rsp
	.cfi_def_cfa_offset 24
	movl	%ebx, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2355:
	.size	_ZN8shared_t9randomizeEv, .-_ZN8shared_t9randomizeEv
	.section	.rodata._ZNK8shared_t6deviceEv.str1.1,"aMS",@progbits,1
.LC16:
	.string	"[shared_t] device() has to return nullptr (host:%p, device:%p)\n"
	.section	.text._ZNK8shared_t6deviceEv,"axG",@progbits,_ZNK8shared_t6deviceEv,comdat
	.align 2
	.weak	_ZNK8shared_t6deviceEv
	.type	_ZNK8shared_t6deviceEv, @function
_ZNK8shared_t6deviceEv:
.LFB2356:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	cmpq	$0, (%rdi)
	movq	%rdi, %rbx
	jne	.L84
	movq	8(%rdi), %rdx
	xorl	%ecx, %ecx
	leaq	.LC16(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
.L84:
	movq	(%rbx), %rax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2356:
	.size	_ZNK8shared_t6deviceEv, .-_ZNK8shared_t6deviceEv
	.section	.rodata._ZNK8shared_t4hostEv.str1.1,"aMS",@progbits,1
.LC17:
	.string	"[shared_t] host() has to return nullptr (host:%p, device:%p)\n"
	.section	.text._ZNK8shared_t4hostEv,"axG",@progbits,_ZNK8shared_t4hostEv,comdat
	.align 2
	.weak	_ZNK8shared_t4hostEv
	.type	_ZNK8shared_t4hostEv, @function
_ZNK8shared_t4hostEv:
.LFB2357:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	cmpq	$0, 8(%rdi)
	movq	%rdi, %rbx
	jne	.L87
	movq	(%rdi), %rcx
	xorl	%edx, %edx
	leaq	.LC17(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
.L87:
	movq	8(%rbx), %rax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2357:
	.size	_ZNK8shared_t4hostEv, .-_ZNK8shared_t4hostEv
	.section	.rodata._ZN9measure_tC2Eb.str1.1,"aMS",@progbits,1
.LC18:
	.string	"[measure_t] create cuda events start:%d end:%d\n"
.LC19:
	.string	"[measure_t] disabling cuda events\n"
	.section	.text._ZN9measure_tC2Eb,"axG",@progbits,_ZN9measure_tC5Eb,comdat
	.align 2
	.weak	_ZN9measure_tC2Eb
	.type	_ZN9measure_tC2Eb, @function
_ZN9measure_tC2Eb:
.LFB2360:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	movb	%sil, (%rdi)
	movq	%rax, 8(%rdi)
	movq	%rax, 16(%rdi)
	testb	%sil, %sil
	je	.L112
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rdi, %rbx
	leaq	24(%rdi), %rdi
	call	cudaEventCreate@PLT
	leaq	32(%rbx), %rdi
	movl	%eax, %r12d
	call	cudaEventCreate@PLT
	movl	%r12d, %edx
	movl	$2, %edi
	leaq	.LC18(%rip), %rsi
	movl	%eax, %ebp
	movl	%eax, %ecx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	%r12d, %eax
	orl	%ebp, %eax
	je	.L89
	testl	%r12d, %r12d
	je	.L110
	testl	%ebp, %ebp
	jne	.L93
	movq	32(%rbx), %rdi
	jmp	.L115
.L93:
	testl	%r12d, %r12d
	jne	.L94
.L110:
	testl	%ebp, %ebp
	je	.L94
	movq	24(%rbx), %rdi
.L115:
	call	cudaEventDestroy@PLT
.L94:
	leaq	.LC19(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movb	$0, (%rbx)
.L89:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L112:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	ret
	.cfi_endproc
.LFE2360:
	.size	_ZN9measure_tC2Eb, .-_ZN9measure_tC2Eb
	.weak	_ZN9measure_tC1Eb
	.set	_ZN9measure_tC1Eb,_ZN9measure_tC2Eb
	.section	.rodata._ZN9measure_tD2Ev.str1.1,"aMS",@progbits,1
.LC20:
	.string	"[measure_t] dispose cuda events start:%d end:%d\n"
	.section	.text._ZN9measure_tD2Ev,"axG",@progbits,_ZN9measure_tD5Ev,comdat
	.align 2
	.weak	_ZN9measure_tD2Ev
	.type	_ZN9measure_tD2Ev, @function
_ZN9measure_tD2Ev:
.LFB2363:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA2363
	endbr64
	cmpb	$0, (%rdi)
	je	.L119
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rbx
	pushq	%rax
	.cfi_def_cfa_offset 32
	movq	32(%rdi), %rdi
	call	cudaEventDestroy@PLT
	movq	24(%rbx), %rdi
	movl	%eax, %ebp
	call	cudaEventDestroy@PLT
	movl	%ebp, %ecx
	movl	$2, %edi
	leaq	.LC20(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rdx
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L119:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE2363:
	.section	.gcc_except_table._ZN9measure_tD2Ev,"aG",@progbits,_ZN9measure_tD5Ev,comdat
.LLSDA2363:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE2363-.LLSDACSB2363
.LLSDACSB2363:
.LLSDACSE2363:
	.section	.text._ZN9measure_tD2Ev,"axG",@progbits,_ZN9measure_tD5Ev,comdat
	.size	_ZN9measure_tD2Ev, .-_ZN9measure_tD2Ev
	.weak	_ZN9measure_tD1Ev
	.set	_ZN9measure_tD1Ev,_ZN9measure_tD2Ev
	.section	.text._ZN9measure_t5startEv,"axG",@progbits,_ZN9measure_t5startEv,comdat
	.align 2
	.weak	_ZN9measure_t5startEv
	.type	_ZN9measure_t5startEv, @function
_ZN9measure_t5startEv:
.LFB2365:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	call	_ZNSt6chrono3_V212system_clock3nowEv@PLT
	cmpb	$0, (%rbx)
	movq	%rax, 8(%rbx)
	je	.L122
	movq	24(%rbx), %rdi
	xorl	%esi, %esi
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	cudaEventRecord@PLT
.L122:
	.cfi_restore_state
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2365:
	.size	_ZN9measure_t5startEv, .-_ZN9measure_t5startEv
	.section	.rodata._ZN9measure_t3endEv.str1.1,"aMS",@progbits,1
.LC21:
	.string	"[measure_t] cuda stop event is failed record:%d sync:%d time:%d\n"
	.section	.text._ZN9measure_t3endEv,"axG",@progbits,_ZN9measure_t3endEv,comdat
	.align 2
	.weak	_ZN9measure_t3endEv
	.type	_ZN9measure_t3endEv, @function
_ZN9measure_t3endEv:
.LFB2366:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rdi, %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	call	_ZNSt6chrono3_V212system_clock3nowEv@PLT
	movl	$1000, %ecx
	movq	%rax, 16(%rbx)
	subq	8(%rbx), %rax
	cqto
	idivq	%rcx
	cmpb	$0, (%rbx)
	cvtsi2sdq	%rax, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, 40(%rbx)
	je	.L125
	movq	32(%rbx), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	32(%rbx), %rdi
	movl	%eax, %ebp
	call	cudaEventSynchronize@PLT
	movq	32(%rbx), %rdx
	movq	24(%rbx), %rsi
	leaq	4(%rsp), %rdi
	movl	%eax, %r12d
	movl	$0x00000000, 4(%rsp)
	call	cudaEventElapsedTime@PLT
	movl	%eax, %r8d
	movl	%ebp, %eax
	orl	%r12d, %eax
	orl	%r8d, %eax
	je	.L127
	movl	%r12d, %ecx
	movl	%ebp, %edx
	leaq	.LC21(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
	jmp	.L125
.L127:
	movss	.LC22(%rip), %xmm0
	mulss	4(%rsp), %xmm0
	movss	%xmm0, 44(%rbx)
.L125:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	je	.L128
	call	__stack_chk_fail@PLT
.L128:
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2366:
	.size	_ZN9measure_t3endEv, .-_ZN9measure_t3endEv
	.text
	.globl	_Z12transformCpuPKfPfmm
	.type	_Z12transformCpuPKfPfmm, @function
_Z12transformCpuPKfPfmm:
.LFB2371:
	.cfi_startproc
	endbr64
	imulq	%rdx, %rcx
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rdx, %r11
	movq	%rdi, %r9
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rsi, %r10
	movq	%rdx, %rdi
	shrq	$2, %r11
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rdx, %rbx
	xorl	%r8d, %r8d
	shrq	$2, %rcx
	shrq	%rbx
.L131:
	cmpq	%rcx, %r8
	je	.L134
	leaq	0(,%r8,4), %rax
	xorl	%edx, %edx
	divq	%rdi
	xorl	%edx, %edx
	movq	%rax, %rsi
	leaq	(%r8,%r8), %rax
	divq	%rbx
	movq	%r8, %rax
	incq	%r8
	movq	%rdx, %rbp
	xorl	%edx, %edx
	divq	%r11
	movq	%rdi, %rax
	imulq	%rsi, %rax
	leaq	(%rax,%rdx,4), %r12
	leaq	(%rsi,%rsi), %rdx
	incq	%rdx
	movss	(%r9,%r12,4), %xmm0
	leaq	0(,%r12,4), %rax
	imulq	%rdi, %rdx
	movq	%rdx, %rsi
	subq	%rdi, %rdx
	shrq	%rsi
	shrq	%rdx
	addq	%rbp, %rsi
	addq	%rbp, %rdx
	movss	%xmm0, (%r10,%rsi,4)
	movss	4(%r9,%rax), %xmm0
	movss	%xmm0, 4(%r10,%rsi,4)
	movss	8(%r9,%rax), %xmm0
	movss	%xmm0, (%r10,%rdx,4)
	movss	12(%r9,%rax), %xmm0
	movss	%xmm0, 4(%r10,%rdx,4)
	jmp	.L131
.L134:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2371:
	.size	_Z12transformCpuPKfPfmm, .-_Z12transformCpuPKfPfmm
	.globl	_Z40__device_stub__Z15transformKernelPKfPfmmPKfPfmm
	.type	_Z40__device_stub__Z15transformKernelPKfPfmmPKfPfmm, @function
_Z40__device_stub__Z15transformKernelPKfPfmmPKfPfmm:
.LFB2397:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	56(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	68(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	40(%rsp), %rdx
	movq	%rcx, (%rsp)
	leaq	48(%rsp), %rcx
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 64(%rsp)
	movq	%rax, 104(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 120(%rsp)
	movq	%rsp, %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L135
	pushq	48(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z15transformKernelPKfPfmm(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L135:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L137
	call	__stack_chk_fail@PLT
.L137:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2397:
	.size	_Z40__device_stub__Z15transformKernelPKfPfmmPKfPfmm, .-_Z40__device_stub__Z15transformKernelPKfPfmmPKfPfmm
	.globl	_Z15transformKernelPKfPfmm
	.type	_Z15transformKernelPKfPfmm, @function
_Z15transformKernelPKfPfmm:
.LFB2398:
	.cfi_startproc
	endbr64
	jmp	_Z40__device_stub__Z15transformKernelPKfPfmmPKfPfmm
	.cfi_endproc
.LFE2398:
	.size	_Z15transformKernelPKfPfmm, .-_Z15transformKernelPKfPfmm
	.section	.rodata.str1.1
.LC23:
	.string	"[warning] matrix will not be printed because sizes are too big\n"
.LC24:
	.string	"w"
.LC25:
	.string	"/dev/null"
.LC26:
	.string	"thread count: %lu\n"
.LC27:
	.string	"input: \n"
.LC28:
	.string	"output: \n"
.LC29:
	.string	"check: \n"
.LC30:
	.string	"measure device: %f mcs\n"
.LC31:
	.string	"measure host: %f mcs\n"
.LC32:
	.string	"compare missmatch on %lu %lu\n"
.LC33:
	.string	"compare check passed!\n"
.LC34:
	.string	"input window: \n"
.LC35:
	.string	"output window: \n"
.LC36:
	.string	"check window: \n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2372:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA2372
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC23(%rip), %rsi
	movl	$2, %edi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$280, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
.LEHB0:
	call	__printf_chk@PLT
	leaq	.LC24(%rip), %rsi
	leaq	.LC25(%rip), %rdi
	call	fopen@PLT
	movl	$1, %edx
	movl	$35574572, %esi
	movq	%rax, -296(%rbp)
	leaq	-248(%rbp), %rax
	movq	%rax, %rdi
	movq	%rax, -280(%rbp)
	call	_ZN8shared_tC1Emb
.LEHE0:
	movl	$1, %edx
	movl	$35574572, %esi
	leaq	-216(%rbp), %rax
	movq	%rax, %rdi
	movq	%rax, -288(%rbp)
.LEHB1:
	call	_ZN8shared_tC1Emb
.LEHE1:
	leaq	-184(%rbp), %rax
	xorl	%edx, %edx
	movl	$35574572, %esi
	movq	%rax, %rdi
	movq	%rax, -304(%rbp)
.LEHB2:
	call	_ZN8shared_tC1Emb
.LEHE2:
	leaq	-152(%rbp), %rax
	movl	$1, %esi
	movq	%rax, %rdi
	movq	%rax, -312(%rbp)
.LEHB3:
	call	_ZN9measure_tC1Eb
.LEHE3:
	leaq	-104(%rbp), %r12
	xorl	%esi, %esi
	movq	%r12, %rdi
.LEHB4:
	call	_ZN9measure_tC1Eb
.LEHE4:
	movq	-280(%rbp), %rdi
.LEHB5:
	call	_ZN8shared_t9randomizeEv
	testl	%eax, %eax
	jne	.L160
	movq	-280(%rbp), %rdi
	call	_ZN8shared_t8downloadEv
	testl	%eax, %eax
	jne	.L161
	movq	-288(%rbp), %rdi
	call	_ZNK8shared_t4hostEv
	leaq	_Z5fZerommm(%rip), %rbx
	movq	%rax, %rdi
	movl	$8444, %edx
	movl	$4213, %esi
	movq	%rbx, %rcx
	call	_Z10fillMatrixPfmmPFfmmmE
	movq	-304(%rbp), %rdi
	call	_ZNK8shared_t4hostEv
	movq	%rax, %rdi
	movq	%rbx, %rcx
	movl	$8444, %edx
	movl	$4213, %esi
	call	_Z10fillMatrixPfmmPFfmmmE
	movq	-280(%rbp), %rdi
	call	_ZN8shared_t6uploadEv
	testl	%eax, %eax
	je	.L142
.L143:
	movl	$1, %ebx
	jmp	.L141
.L142:
	movq	-288(%rbp), %rdi
	call	_ZN8shared_t6uploadEv
	testl	%eax, %eax
	jne	.L143
	movl	$1024, %ebx
	movl	$8893643, %ecx
.L144:
	decq	%rbx
	cmpq	$1, %rbx
	je	.L145
	movq	%rcx, %rax
	xorl	%edx, %edx
	divq	%rbx
	testq	%rdx, %rdx
	jne	.L144
.L145:
	movq	%rbx, %rdx
	leaq	.LC26(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	-312(%rbp), %rdi
	call	_ZN9measure_t5startEv
	movl	$8893643, %eax
	xorl	%edx, %edx
	movl	%ebx, -260(%rbp)
	xorl	%r9d, %r9d
	divq	%rbx
	movabsq	$4294967297, %rcx
	xorl	%r8d, %r8d
	movq	%rcx, -268(%rbp)
	movl	-264(%rbp), %esi
	movq	%rcx, -256(%rbp)
	movl	-252(%rbp), %ecx
	movq	-260(%rbp), %rdx
	movl	%eax, -272(%rbp)
	movq	-272(%rbp), %rdi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L147
	movq	-288(%rbp), %rdi
	call	_ZNK8shared_t6deviceEv
	movq	-280(%rbp), %rdi
	movq	%rax, %r13
	call	_ZNK8shared_t6deviceEv
	movq	%rax, %rdi
	movq	%rbx, %rcx
	movl	$4213, %edx
	movq	%r13, %rsi
	call	_Z40__device_stub__Z15transformKernelPKfPfmmPKfPfmm
.L147:
	movq	-312(%rbp), %rdi
	call	_ZN9measure_t3endEv
	movq	%r12, %rdi
	call	_ZN9measure_t5startEv
	movq	-304(%rbp), %rdi
	call	_ZNK8shared_t4hostEv
	movq	-280(%rbp), %rdi
	movq	%rax, %rbx
	call	_ZNK8shared_t4hostEv
	movq	%rax, %rdi
	movl	$8444, %ecx
	movl	$4213, %edx
	movq	%rbx, %rsi
	call	_Z12transformCpuPKfPfmm
	movq	%r12, %rdi
	call	_ZN9measure_t3endEv
	movq	-288(%rbp), %rdi
	call	_ZN8shared_t8downloadEv
	testl	%eax, %eax
	je	.L148
.L149:
	movl	$2, %ebx
	jmp	.L141
.L148:
	movq	-280(%rbp), %rdi
	call	_ZN8shared_t8downloadEv
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	.L149
	movq	-296(%rbp), %rdi
	leaq	.LC27(%rip), %rdx
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	leaq	-248(%rbp), %r15
	movq	%r15, %rdi
	call	_ZNK8shared_t4hostEv
	movq	-296(%rbp), %rdi
	movq	%rax, %rsi
	movl	$8444, %ecx
	movl	$4213, %edx
	call	_Z11printMatrixP8_IO_FILEPfmm
	movq	-296(%rbp), %rdi
	leaq	.LC28(%rip), %rdx
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	leaq	-216(%rbp), %r14
	movq	%r14, %rdi
	call	_ZNK8shared_t4hostEv
	movq	-296(%rbp), %rdi
	movq	%rax, %rsi
	movl	$16888, %ecx
	movl	$2106, %edx
	call	_Z11printMatrixP8_IO_FILEPfmm
	movq	-296(%rbp), %rdi
	leaq	.LC29(%rip), %rdx
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	leaq	-184(%rbp), %r13
	movq	%r13, %rdi
	call	_ZNK8shared_t4hostEv
	movq	-296(%rbp), %rdi
	movq	%rax, %rsi
	movl	$16888, %ecx
	movl	$2106, %edx
	call	_Z11printMatrixP8_IO_FILEPfmm
	leaq	.LC30(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	-108(%rbp), %xmm0
	call	__printf_chk@PLT
	leaq	.LC31(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	-64(%rbp), %xmm0
	call	__printf_chk@PLT
	movq	%r13, %rdi
	call	_ZNK8shared_t4hostEv
	movq	%r14, %rdi
	movq	%rax, -296(%rbp)
	call	_ZNK8shared_t4hostEv
	movq	-296(%rbp), %rsi
	movq	%rax, %rdi
	movl	$16888, %ecx
	movl	$2106, %edx
	call	_Z7comparePfS_mm
	movq	%rdx, %rcx
	cmpq	$16887, %rdx
	jbe	.L167
	cmpq	$2105, %rax
	ja	.L150
.L167:
	movq	%rax, %rdx
	leaq	.LC32(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L152
.L150:
	leaq	.LC33(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L152:
	leaq	.LC34(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%r15, %rdi
	call	_ZNK8shared_t4hostEv
	pushq	%r11
	movq	stdout(%rip), %rdi
	movq	%rax, %rsi
	xorl	%r8d, %r8d
	pushq	$1
	movl	$4, %r9d
	xorl	%ecx, %ecx
	movl	$2106, %edx
	.cfi_escape 0x2e,0x10
	call	_Z11printWindowP8_IO_FILEPfmmmmm
	popq	%r9
	leaq	.LC35(%rip), %rsi
	popq	%r10
	movl	$2, %edi
	xorl	%eax, %eax
	.cfi_escape 0x2e,0
	call	__printf_chk@PLT
	movq	%r14, %rdi
	call	_ZNK8shared_t4hostEv
	pushq	%r8
	movq	stdout(%rip), %rdi
	movq	%rax, %rsi
	xorl	%r8d, %r8d
	pushq	$2
	movl	$2, %r9d
	xorl	%ecx, %ecx
	movl	$2106, %edx
	.cfi_escape 0x2e,0x10
	call	_Z11printWindowP8_IO_FILEPfmmmmm
	popq	%rsi
	xorl	%eax, %eax
	leaq	.LC36(%rip), %rsi
	popq	%rdi
	movl	$2, %edi
	.cfi_escape 0x2e,0
	call	__printf_chk@PLT
	movq	%r13, %rdi
	call	_ZNK8shared_t4hostEv
	pushq	%rcx
	movq	stdout(%rip), %rdi
	movq	%rax, %rsi
	xorl	%r8d, %r8d
	pushq	$2
	movl	$2, %r9d
	xorl	%ecx, %ecx
	movl	$2106, %edx
	.cfi_escape 0x2e,0x10
	call	_Z11printWindowP8_IO_FILEPfmmmmm
.LEHE5:
	popq	%rax
	popq	%rdx
	jmp	.L141
.L160:
	movl	$4, %ebx
	jmp	.L141
.L161:
	movl	$3, %ebx
.L141:
	movq	%r12, %rdi
	call	_ZN9measure_tD1Ev
	movq	-312(%rbp), %rdi
	call	_ZN9measure_tD1Ev
	movq	-304(%rbp), %rdi
	call	_ZN8shared_tD1Ev
	movq	-288(%rbp), %rdi
	call	_ZN8shared_tD1Ev
	movq	-280(%rbp), %rdi
	call	_ZN8shared_tD1Ev
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	je	.L159
	jmp	.L171
.L166:
	endbr64
	movq	%rax, %rbx
.L153:
	movq	%r12, %rdi
	call	_ZN9measure_tD1Ev
	jmp	.L154
.L165:
	endbr64
	movq	%rax, %rbx
.L154:
	movq	-312(%rbp), %rdi
	call	_ZN9measure_tD1Ev
	jmp	.L155
.L164:
	endbr64
	movq	%rax, %rbx
.L155:
	movq	-304(%rbp), %rdi
	call	_ZN8shared_tD1Ev
	jmp	.L156
.L163:
	endbr64
	movq	%rax, %rbx
.L156:
	movq	-288(%rbp), %rdi
	call	_ZN8shared_tD1Ev
	jmp	.L157
.L162:
	endbr64
	movq	%rax, %rbx
.L157:
	movq	-280(%rbp), %rdi
	call	_ZN8shared_tD1Ev
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L171
	movq	%rbx, %rdi
.LEHB6:
	call	_Unwind_Resume@PLT
.LEHE6:
.L171:
	call	__stack_chk_fail@PLT
.L159:
	leaq	-40(%rbp), %rsp
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2372:
	.section	.gcc_except_table,"a",@progbits
.LLSDA2372:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE2372-.LLSDACSB2372
.LLSDACSB2372:
	.uleb128 .LEHB0-.LFB2372
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB2372
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L162-.LFB2372
	.uleb128 0
	.uleb128 .LEHB2-.LFB2372
	.uleb128 .LEHE2-.LEHB2
	.uleb128 .L163-.LFB2372
	.uleb128 0
	.uleb128 .LEHB3-.LFB2372
	.uleb128 .LEHE3-.LEHB3
	.uleb128 .L164-.LFB2372
	.uleb128 0
	.uleb128 .LEHB4-.LFB2372
	.uleb128 .LEHE4-.LEHB4
	.uleb128 .L165-.LFB2372
	.uleb128 0
	.uleb128 .LEHB5-.LFB2372
	.uleb128 .LEHE5-.LEHB5
	.uleb128 .L166-.LFB2372
	.uleb128 0
	.uleb128 .LEHB6-.LFB2372
	.uleb128 .LEHE6-.LEHB6
	.uleb128 0
	.uleb128 0
.LLSDACSE2372:
	.section	.text.startup
	.size	main, .-main
	.section	.rodata.str1.1
.LC37:
	.string	"_Z15transformKernelPKfPfmm"
.LC38:
	.string	"precalc_xorwow_matrix"
.LC39:
	.string	"precalc_xorwow_offset_matrix"
.LC40:
	.string	"mrg32k3aM1"
.LC41:
	.string	"mrg32k3aM2"
.LC42:
	.string	"mrg32k3aM1SubSeq"
.LC43:
	.string	"mrg32k3aM2SubSeq"
.LC44:
	.string	"mrg32k3aM1Seq"
.LC45:
	.string	"mrg32k3aM2Seq"
.LC46:
	.string	"__cr_lgamma_table"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2400:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	pushq	$0
	.cfi_def_cfa_offset 24
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC37(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z15transformKernelPKfPfmm(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC38(%rip), %rdx
	movl	$102400, %r9d
	leaq	_ZL21precalc_xorwow_matrix(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	call	__cudaRegisterVar@PLT
	popq	%rax
	.cfi_def_cfa_offset 24
	popq	%rdx
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC39(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$102400, %r9d
	leaq	_ZL28precalc_xorwow_offset_matrix(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%rcx
	.cfi_def_cfa_offset 24
	popq	%rsi
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC40(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$2304, %r9d
	leaq	_ZL10mrg32k3aM1(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%rdi
	.cfi_def_cfa_offset 24
	popq	%r8
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC41(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$2304, %r9d
	leaq	_ZL10mrg32k3aM2(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%r9
	.cfi_def_cfa_offset 24
	popq	%r10
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC42(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$2016, %r9d
	leaq	_ZL16mrg32k3aM1SubSeq(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%r11
	.cfi_def_cfa_offset 24
	popq	%rax
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC43(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$2016, %r9d
	leaq	_ZL16mrg32k3aM2SubSeq(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%rax
	.cfi_def_cfa_offset 24
	popq	%rdx
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC44(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$2304, %r9d
	leaq	_ZL13mrg32k3aM1Seq(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%rcx
	.cfi_def_cfa_offset 24
	popq	%rsi
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC45(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$2304, %r9d
	leaq	_ZL13mrg32k3aM2Seq(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%rdi
	.cfi_def_cfa_offset 24
	popq	%r8
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$1
	.cfi_def_cfa_offset 32
	leaq	.LC46(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movl	$72, %r9d
	movq	%rdx, %rcx
	leaq	_ZL17__cr_lgamma_table(%rip), %rsi
	call	__cudaRegisterVar@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	popq	%r9
	.cfi_def_cfa_offset 24
	popq	%r10
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE2400:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.local	_ZL17__cr_lgamma_table
	.comm	_ZL17__cr_lgamma_table,72,32
	.local	_ZL13mrg32k3aM2Seq
	.comm	_ZL13mrg32k3aM2Seq,2304,32
	.local	_ZL13mrg32k3aM1Seq
	.comm	_ZL13mrg32k3aM1Seq,2304,32
	.local	_ZL16mrg32k3aM2SubSeq
	.comm	_ZL16mrg32k3aM2SubSeq,2016,32
	.local	_ZL16mrg32k3aM1SubSeq
	.comm	_ZL16mrg32k3aM1SubSeq,2016,32
	.local	_ZL10mrg32k3aM2
	.comm	_ZL10mrg32k3aM2,2304,32
	.local	_ZL10mrg32k3aM1
	.comm	_ZL10mrg32k3aM1,2304,32
	.local	_ZL28precalc_xorwow_offset_matrix
	.comm	_ZL28precalc_xorwow_offset_matrix,102400,32
	.local	_ZL21precalc_xorwow_matrix
	.comm	_ZL21precalc_xorwow_matrix,102400,32
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC12:
	.long	1101004800
	.align 4
.LC13:
	.long	1109393408
	.align 4
.LC22:
	.long	1148846080
	.hidden	DW.ref.__gxx_personality_v0
	.weak	DW.ref.__gxx_personality_v0
	.section	.data.rel.local.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
	.align 8
	.type	DW.ref.__gxx_personality_v0, @object
	.size	DW.ref.__gxx_personality_v0, 8
DW.ref.__gxx_personality_v0:
	.quad	__gxx_personality_v0
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


#include <hip/hip_runtime.h>
#include <stdio.h>
#include <hiprand/hiprand_kernel.h>
#include <chrono>

#define host_t float
#define device_t float*
#define t_size sizeof(host_t)

#define size_t unsigned long
#define time_point_t std::chrono::time_point<std::chrono::high_resolution_clock> 

template<typename A, typename B>
struct pair_t { A first; B second; };

host_t fZero(size_t x, size_t y, size_t w) { return 0; }
host_t fIndex(size_t x, size_t y, size_t w) { return (y * w + x); }

void printMatrix(FILE* file, host_t* matrix, size_t width, size_t height) {
  for (size_t y = 0; y < height; y++) {
    for (size_t x = 0; x < width; x++)
      fprintf(file, "%03.0f ", matrix[y * width + x]);
    fprintf(file, "\n");
  }
  fprintf(file, "\n");
}

void fillMatrix(host_t* matrix, size_t width, size_t height, host_t(*function)(size_t, size_t, size_t)) {
  for (size_t y = 0; y < height; y++) 
    for (size_t x = 0; x < width; x++)
      matrix[y * width + x] = function(x, y, width); 
}

pair_t<size_t, size_t> compare(host_t* a, host_t* b, size_t width, size_t height) {
  for (size_t y = 0; y < height; y++) {
    for (size_t x = 0; x < width; x++) {
      if (a[y * width + x] != b[y * width + x]) { 
        printf("missmatch %f %f\n", a[y * width + x], b[y * width + x]);
        return pair_t<size_t, size_t>{x, y};
      }
    }
  }
  return pair_t<size_t, size_t>{width, height};
}
 
void printWindow(FILE* file, host_t* matrix, size_t width, size_t w_start, size_t h_start, size_t w_width, size_t w_height) {
  for (size_t y = w_start; y < w_height; y++) {
    for (size_t x = h_start; x < w_width; x++)
      fprintf(file, "%03.0f ", matrix[y * width + x]);
    fprintf(file, "\n");
  }
  fprintf(file, "\n");
}

struct shared_t {
  device_t device_ptr;
  host_t *host_ptr;

  size_t count;
  size_t bytes;

  shared_t(size_t element_count, bool cuda): 
  host_ptr{(host_t*) malloc(element_count * t_size)},
  device_ptr{nullptr},
  count{element_count},
  bytes{element_count * t_size} {
    if (cuda) {
      hipMalloc(&device_ptr, bytes); 
    }
    printf("[shared_t] host:%p device:%p count:%lu bytes:%lu\n",
           host_ptr, device_ptr, element_count, bytes);
  }

  ~shared_t() {
    printf("[shared_t] dispose %p %p\n", host_ptr, device_ptr);
    if (host_ptr != nullptr) 
      free(host_ptr);
    if (device_ptr != nullptr)
      hipFree(device_ptr);
  }

  int sync(hipMemcpyKind kind) {
    if (host_ptr == nullptr) {
      printf("[shared_t] host_ptr is nullptr (host:%p, device:%p)\n", host_ptr, device_ptr);
      return 1;
    }

    if (device_ptr == nullptr) {
      printf("[shared_t] device_ptr is nullptr (host:%p, device:%p)\n", host_ptr, device_ptr);
      return 2;
    }
    if (kind == hipMemcpyDeviceToHost)
      return hipMemcpy(host_ptr, device_ptr, bytes, kind); 
    else 
      return hipMemcpy(device_ptr, host_ptr, bytes, kind);
  }

  int upload() {
    auto result = sync(hipMemcpyHostToDevice);
    if (result == hipSuccess)
      return 0;

    printf("[shared_t] upload of (%p, %p, %lu) failed %d\n", 
           device_ptr, host_ptr, bytes, result);
    return result;
  }

  int download() {
    auto result = sync(hipMemcpyDeviceToHost);
    if (result == hipSuccess)
      return 0;

    printf("[shared_t] download of (%p, %p, %lu) failed %d\n", 
           device_ptr, host_ptr, bytes, result);
    return result;
  }

  int randomize() {
    if (device_ptr == nullptr) {
      printf("[shared_t] device_ptr is nullptr for randomize (host:%p, device:%p)\n",
             host_ptr, device_ptr);
      return 1;
    }

    hiprandGenerator_t generator;
    auto r_gen_create = hiprandCreateGenerator(&generator, HIPRAND_RNG_PSEUDO_DEFAULT);
    if (r_gen_create != HIPRAND_STATUS_SUCCESS) {
      printf("[shared_t] create generator failed %d\n", r_gen_create);
      return r_gen_create;
    }

    auto r_gen = hiprandGenerateNormal(generator, device_ptr, count, 40, 20); 
    if (r_gen != HIPRAND_STATUS_SUCCESS) {
      printf("[shared_t] generate failed %d\n", r_gen);
    }

    auto r_destroy = hiprandDestroyGenerator(generator);
    if (r_destroy != HIPRAND_STATUS_SUCCESS) {
      printf("[shared_t] destroy generator failed %d\n", r_destroy);
      return r_destroy;
    }

    return 0;
  }

  device_t device() const {
    if (device_ptr == nullptr)
      printf("[shared_t] device() has to return nullptr (host:%p, device:%p)\n", 
             host_ptr, device_ptr);
    return device_ptr;
  }

  host_t* host() const {
    if (host_ptr == nullptr)
      printf("[shared_t] host() has to return nullptr (host:%p, device:%p)\n",
             host_ptr, device_ptr);
    return host_ptr;
  }
};

struct measure_t {
  bool use_cuda;
  time_point_t tp_start;
  time_point_t tp_end;

  hipEvent_t e_start;
  hipEvent_t e_end;

  float mcs_value;
  float cuda_mcs_value;

  measure_t(bool cuda): 
  use_cuda{cuda} { 
    if (use_cuda) {
      auto r_start = hipEventCreate(&e_start);
      auto r_end = hipEventCreate(&e_end);
      printf("[measure_t] create cuda events start:%d end:%d\n", r_start, r_end);
      if (r_start != hipSuccess || r_end != hipSuccess) {
        if (r_start != hipSuccess && r_end == hipSuccess)
          hipEventDestroy(e_end);
        if (r_start == hipSuccess && r_end != hipSuccess)
          hipEventDestroy(e_start);
        printf("[measure_t] disabling cuda events\n");
        use_cuda = false;
      }
    }
  }
  ~measure_t() {
    if (use_cuda) {
        auto r_end = hipEventDestroy(e_end);
        auto r_start = hipEventDestroy(e_start);
        printf("[measure_t] dispose cuda events start:%d end:%d\n", r_start, r_end);
    }
  }

  void start() {
    tp_start = std::chrono::high_resolution_clock::now();
    if (use_cuda) 
      hipEventRecord(e_start, 0);
  }

  void end() {
    tp_end = std::chrono::high_resolution_clock::now();
    mcs_value = std::chrono::duration_cast<std::chrono::microseconds>(tp_end - tp_start).count() * 1.0; 
    if (use_cuda) {
      auto r_record = hipEventRecord(e_end, 0);
      auto r_sync = hipEventSynchronize(e_end);

      float elapsed = 0;
      auto r_time = hipEventElapsedTime(&elapsed, e_start, e_end);

      if (r_record != hipSuccess || r_sync != hipSuccess || r_time != hipSuccess) {
        printf("[measure_t] cuda stop event is failed record:%d sync:%d time:%d\n", 
               r_record, r_sync, r_time);
        return;
      }
     
      cuda_mcs_value = elapsed * 1000.0;
    }
  }

  float mcs() const { return mcs_value; }
  float cuda_mcs() const { return cuda_mcs_value; }
  float ms() const { return mcs_value / 1000.0; }
  float cuda_ms() { return cuda_mcs_value / 1000.0; }
};

__global__ void transformKernel(const device_t input, device_t output, size_t width, size_t threads) {
  const size_t i = blockIdx.x * threads + threadIdx.x; 

  /* *block* vector index is equal to linear index */
  /* but *block* index is 4 linear indecices */
  const size_t y = i * 4 / width;

  /* every *block* index is 4 linear indices */
  const size_t x = 4 * (i % (width / 4));
  
  /* every input vector is 2 output vectors */
  const size_t oy = y * 2;

  /* every *block* index is 2 linear indices */
  const size_t ox = i * 2 % (width / 2);

  /* aligned view into *block* */
  output[(1 + oy) * width / 2 + ox + 0] = input[y * width + x + 0];
  output[(1 + oy) * width / 2 + ox + 1] = input[y * width + x + 1];
  output[(0 + oy) * width / 2 + ox + 0] = input[y * width + x + 2];
  output[(0 + oy) * width / 2 + ox + 1] = input[y * width + x + 3];
}

__host__ void transformCpu(const host_t* input, host_t* output, size_t width, size_t height) {
  const size_t iter = width * height / 4;
  for (size_t i = 0; i < iter; i++) {
    const size_t y = i * 4 / width;
    const size_t x = 4 * (i % (width / 4));
    const size_t oy = y * 2;
    const size_t ox = i * 2 % (width / 2);
    output[(1 + oy) * width / 2 + ox + 0] = input[y * width + x + 0];
    output[(1 + oy) * width / 2 + ox + 1] = input[y * width + x + 1];
    output[(0 + oy) * width / 2 + ox + 0] = input[y * width + x + 2];
    output[(0 + oy) * width / 2 + ox + 1] = input[y * width + x + 3];
  }
}

int main() {
  const size_t height = 8444;
  const size_t width = 4213;
  const size_t count = height * width;
  
  const size_t o_width = width / 2;
  const size_t o_height = height * 2;

  FILE* matrix_file = stdout;
  if (width > 32 || height > 32) {
    printf("[warning] matrix will not be printed because sizes are too big\n");
    matrix_file = fopen("/dev/null", "w");
  }

  shared_t input{count, true};
  shared_t output{count, true};
  shared_t check{count, false};
  measure_t measure{true};
  measure_t cpu_measure{false};

  /* generate random numbers in device memory */
  if (input.randomize() != 0)
    return 4;

  /* copy it to host memory */
  if (input.download() != 0)
    return 3;

  fillMatrix(output.host(), width, height, fZero);
  fillMatrix(check.host(), width, height, fZero);

  /* copy data into the device */
  if (input.upload() != 0)
    return 1;

  /* output copy isn't necessary */
  if (output.upload() != 0)
    return 1;

  /* calculate kernel start params */
  const size_t iter_count = count / 4;
  size_t thread_count = iter_count < 1024 ? iter_count : 1024;

  for (; thread_count >= 2; thread_count--)
    if (iter_count % thread_count == 0)
      break;

  printf("thread count: %lu\n", thread_count);

  /* execute kernel on the device */
  measure.start();
  transformKernel<<<iter_count / thread_count, thread_count>>>(
    input.device(),
    output.device(),
    width,
    thread_count
  );
  measure.end();

  cpu_measure.start();
  transformCpu(input.host(), check.host(), width, height); 
  cpu_measure.end();

  /* copy data from the device */
  if (output.download() != 0)
    return 2;

  /* input copy isn't necessary */
  if (input.download() != 0)
    return 2;

  fprintf(matrix_file, "input: \n");
  printMatrix(matrix_file, input.host(), width, height);
  fprintf(matrix_file, "output: \n");
  printMatrix(matrix_file, output.host(), o_width, o_height);
  fprintf(matrix_file, "check: \n");
  printMatrix(matrix_file, check.host(), o_width, o_height);
  
  printf("measure device: %f mcs\n", measure.cuda_mcs());
  printf("measure host: %f mcs\n", cpu_measure.mcs());

  auto result = compare(output.host(), check.host(), o_width, o_height);
  if (result.first < o_width || result.second < o_height) {
    printf("compare missmatch on %lu %lu\n", result.first, result.second);
  } else {
    printf("compare check passed!\n");
  }

  printf("input window: \n");
  printWindow(stdout, input.host(), o_width, 0, 0, 4, 1);
  printf("output window: \n");
  printWindow(stdout, output.host(), o_width, 0, 0, 2, 2); 
  printf("check window: \n");
  printWindow(stdout, check.host(), o_width, 0, 0, 2, 2);

  /* all shared_t objects is allocated on the stack */
  /* so, destructor will automatically free all memory */
  return 0;
}

	.text
	.file	"kernel.hip"
	.globl	_Z5fZerommm                     # -- Begin function _Z5fZerommm
	.type	_Z5fZerommm,@function
_Z5fZerommm:                            # @_Z5fZerommm
	.cfi_startproc
# %bb.0:
	xorps	%xmm0, %xmm0
	retq
.Lfunc_end0:
	.size	_Z5fZerommm, .Lfunc_end0-_Z5fZerommm
	.cfi_endproc
                                        # -- End function
	.globl	_Z6fIndexmmm                    # -- Begin function _Z6fIndexmmm
	.type	_Z6fIndexmmm,@function
_Z6fIndexmmm:                           # @_Z6fIndexmmm
	.cfi_startproc
# %bb.0:
	imulq	%rdx, %rsi
	addq	%rdi, %rsi
	js	.LBB1_1
# %bb.2:
	cvtsi2ss	%rsi, %xmm0
	retq
.LBB1_1:
	movq	%rsi, %rax
	shrq	%rax
	andl	$1, %esi
	orq	%rax, %rsi
	cvtsi2ss	%rsi, %xmm0
	addss	%xmm0, %xmm0
	retq
.Lfunc_end1:
	.size	_Z6fIndexmmm, .Lfunc_end1-_Z6fIndexmmm
	.cfi_endproc
                                        # -- End function
	.globl	_Z11printMatrixP8_IO_FILEPfmm   # -- Begin function _Z11printMatrixP8_IO_FILEPfmm
	.type	_Z11printMatrixP8_IO_FILEPfmm,@function
_Z11printMatrixP8_IO_FILEPfmm:          # @_Z11printMatrixP8_IO_FILEPfmm
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	pushq	%rax
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdi, %r14
	movq	%rcx, (%rsp)                    # 8-byte Spill
	testq	%rcx, %rcx
	je	.LBB2_6
# %bb.1:                                # %.preheader.lr.ph
	movq	%rdx, %r15
	movq	%rsi, %r12
	leaq	(,%rdx,4), %r13
	xorl	%ebp, %ebp
.LBB2_2:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_4 Depth 2
	testq	%r15, %r15
	je	.LBB2_5
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB2_2 Depth=1
	xorl	%ebx, %ebx
.LBB2_4:                                #   Parent Loop BB2_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	xorps	%xmm0, %xmm0
	cvtss2sd	(%r12,%rbx,4), %xmm0
	movl	$.L.str, %esi
	movq	%r14, %rdi
	movb	$1, %al
	callq	fprintf
	incq	%rbx
	cmpq	%rbx, %r15
	jne	.LBB2_4
.LBB2_5:                                # %._crit_edge
                                        #   in Loop: Header=BB2_2 Depth=1
	movl	$10, %edi
	movq	%r14, %rsi
	callq	fputc@PLT
	incq	%rbp
	addq	%r13, %r12
	cmpq	(%rsp), %rbp                    # 8-byte Folded Reload
	jne	.LBB2_2
.LBB2_6:                                # %._crit_edge17
	movl	$10, %edi
	movq	%r14, %rsi
	addq	$8, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	fputc@PLT                       # TAILCALL
.Lfunc_end2:
	.size	_Z11printMatrixP8_IO_FILEPfmm, .Lfunc_end2-_Z11printMatrixP8_IO_FILEPfmm
	.cfi_endproc
                                        # -- End function
	.globl	_Z10fillMatrixPfmmPFfmmmE       # -- Begin function _Z10fillMatrixPfmmPFfmmmE
	.type	_Z10fillMatrixPfmmPFfmmmE,@function
_Z10fillMatrixPfmmPFfmmmE:              # @_Z10fillMatrixPfmmPFfmmmE
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	pushq	%rax
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdx, (%rsp)                    # 8-byte Spill
	testq	%rdx, %rdx
	je	.LBB3_6
# %bb.1:                                # %.preheader.lr.ph
	movq	%rcx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r12
	leaq	(,%rsi,4), %r14
	xorl	%r13d, %r13d
.LBB3_2:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB3_4 Depth 2
	testq	%r15, %r15
	je	.LBB3_5
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB3_2 Depth=1
	xorl	%ebp, %ebp
.LBB3_4:                                #   Parent Loop BB3_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movq	%rbp, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	callq	*%rbx
	movss	%xmm0, (%r12,%rbp,4)
	incq	%rbp
	cmpq	%rbp, %r15
	jne	.LBB3_4
.LBB3_5:                                # %._crit_edge
                                        #   in Loop: Header=BB3_2 Depth=1
	incq	%r13
	addq	%r14, %r12
	cmpq	(%rsp), %r13                    # 8-byte Folded Reload
	jne	.LBB3_2
.LBB3_6:                                # %._crit_edge17
	addq	$8, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end3:
	.size	_Z10fillMatrixPfmmPFfmmmE, .Lfunc_end3-_Z10fillMatrixPfmmPFfmmmE
	.cfi_endproc
                                        # -- End function
	.globl	_Z7comparePfS_mm                # -- Begin function _Z7comparePfS_mm
	.type	_Z7comparePfS_mm,@function
_Z7comparePfS_mm:                       # @_Z7comparePfS_mm
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rcx, %rbx
	movq	%rdx, %rax
	testq	%rcx, %rcx
	je	.LBB4_1
# %bb.2:                                # %.preheader.lr.ph
	leaq	(,%rax,4), %rcx
	xorl	%r14d, %r14d
.LBB4_3:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB4_5 Depth 2
	testq	%rax, %rax
	je	.LBB4_8
# %bb.4:                                # %.lr.ph
                                        #   in Loop: Header=BB4_3 Depth=1
	xorl	%r15d, %r15d
.LBB4_5:                                #   Parent Loop BB4_3 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rdi,%r15,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	movss	(%rsi,%r15,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm1, %xmm0
	jne	.LBB4_6
	jp	.LBB4_6
# %bb.7:                                #   in Loop: Header=BB4_5 Depth=2
	incq	%r15
	cmpq	%r15, %rax
	jne	.LBB4_5
.LBB4_8:                                # %._crit_edge
                                        #   in Loop: Header=BB4_3 Depth=1
	incq	%r14
	addq	%rcx, %rsi
	addq	%rcx, %rdi
	cmpq	%rbx, %r14
	jne	.LBB4_3
# %bb.9:
	movq	%rbx, %r14
	jmp	.LBB4_10
.LBB4_6:                                # %.thread
	cvtss2sd	%xmm0, %xmm0
	cvtss2sd	%xmm1, %xmm1
	movl	$.L.str.2, %edi
	movb	$2, %al
	callq	printf
	movq	%r15, %rax
	jmp	.LBB4_10
.LBB4_1:
	xorl	%r14d, %r14d
.LBB4_10:                               # %.loopexit
	cmpq	%rbx, %r14
	cmovbq	%r14, %rbx
	movq	%rbx, %rdx
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end4:
	.size	_Z7comparePfS_mm, .Lfunc_end4-_Z7comparePfS_mm
	.cfi_endproc
                                        # -- End function
	.globl	_Z11printWindowP8_IO_FILEPfmmmmm # -- Begin function _Z11printWindowP8_IO_FILEPfmmmmm
	.type	_Z11printWindowP8_IO_FILEPfmmmmm,@function
_Z11printWindowP8_IO_FILEPfmmmmm:       # @_Z11printWindowP8_IO_FILEPfmmmmm
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdi, %r12
	movq	80(%rsp), %rax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	cmpq	%rax, %rcx
	jae	.LBB5_4
# %bb.1:                                # %.preheader.lr.ph
	movq	%r9, %rbx
	movq	%r8, %r13
	movq	%rcx, %r15
	movq	%rcx, %rax
	imulq	%rdx, %rax
	leaq	(%rsi,%rax,4), %rbp
	shlq	$2, %rdx
	movq	%rdx, 8(%rsp)                   # 8-byte Spill
.LBB5_2:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB5_5 Depth 2
	movq	%r13, %r14
	cmpq	%rbx, %r13
	jae	.LBB5_3
.LBB5_5:                                #   Parent Loop BB5_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	xorps	%xmm0, %xmm0
	cvtss2sd	(%rbp,%r14,4), %xmm0
	movl	$.L.str, %esi
	movq	%r12, %rdi
	movb	$1, %al
	callq	fprintf
	incq	%r14
	cmpq	%r14, %rbx
	jne	.LBB5_5
.LBB5_3:                                # %._crit_edge
                                        #   in Loop: Header=BB5_2 Depth=1
	movl	$10, %edi
	movq	%r12, %rsi
	callq	fputc@PLT
	incq	%r15
	addq	8(%rsp), %rbp                   # 8-byte Folded Reload
	cmpq	16(%rsp), %r15                  # 8-byte Folded Reload
	jne	.LBB5_2
.LBB5_4:                                # %._crit_edge18
	movl	$10, %edi
	movq	%r12, %rsi
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	fputc@PLT                       # TAILCALL
.Lfunc_end5:
	.size	_Z11printWindowP8_IO_FILEPfmmmmm, .Lfunc_end5-_Z11printWindowP8_IO_FILEPfmmmmm
	.cfi_endproc
                                        # -- End function
	.globl	_Z30__device_stub__transformKernelPKfPfmm # -- Begin function _Z30__device_stub__transformKernelPKfPfmm
	.type	_Z30__device_stub__transformKernelPKfPfmm,@function
_Z30__device_stub__transformKernelPKfPfmm: # @_Z30__device_stub__transformKernelPKfPfmm
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	24(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	16(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	8(%rsp), %r12
	movq	%rsp, %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z15transformKernelPKfPfmm, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end6:
	.size	_Z30__device_stub__transformKernelPKfPfmm, .Lfunc_end6-_Z30__device_stub__transformKernelPKfPfmm
	.cfi_endproc
                                        # -- End function
	.globl	_Z12transformCpuPKfPfmm         # -- Begin function _Z12transformCpuPKfPfmm
	.type	_Z12transformCpuPKfPfmm,@function
_Z12transformCpuPKfPfmm:                # @_Z12transformCpuPKfPfmm
	.cfi_startproc
# %bb.0:
	imulq	%rdx, %rcx
	cmpq	$4, %rcx
	jb	.LBB7_4
# %bb.1:                                # %.lr.ph
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdx, %r8
	shrq	$2, %rcx
	movq	%rdx, %r15
	shrq	$2, %r15
	movq	%rdx, %r12
	shrq	%r12
	xorl	%r9d, %r9d
	xorl	%r10d, %r10d
	xorl	%r11d, %r11d
.LBB7_2:                                # =>This Inner Loop Header: Depth=1
	movq	%r10, %rax
	xorl	%edx, %edx
	divq	%r8
	movq	%rax, %rbx
	leaq	(%rax,%rax), %r13
	leaq	1(,%rax,2), %rbp
	imulq	%r8, %rbx
	movq	%r11, %rax
	xorl	%edx, %edx
	divq	%r15
	movq	%rdx, %r14
	movq	%r9, %rax
	xorl	%edx, %edx
	divq	%r12
	leaq	(%rdi,%rbx,4), %rax
	shlq	$4, %r14
	movss	(%r14,%rax), %xmm0              # xmm0 = mem[0],zero,zero,zero
	imulq	%r8, %rbp
	andq	$-2, %rbp
	leaq	(%rsi,%rbp,2), %rbx
	movss	%xmm0, (%rbx,%rdx,4)
	movss	4(%r14,%rax), %xmm0             # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 4(%rbx,%rdx,4)
	movss	8(%r14,%rax), %xmm0             # xmm0 = mem[0],zero,zero,zero
	imulq	%r8, %r13
	leaq	(%rsi,%r13,2), %rbx
	movss	%xmm0, (%rbx,%rdx,4)
	movss	12(%r14,%rax), %xmm0            # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 4(%rbx,%rdx,4)
	incq	%r11
	addq	$4, %r10
	addq	$2, %r9
	cmpq	%r11, %rcx
	jne	.LBB7_2
# %bb.3:
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
	.cfi_restore %r12
	.cfi_restore %r13
	.cfi_restore %r14
	.cfi_restore %r15
	.cfi_restore %rbp
.LBB7_4:                                # %._crit_edge
	retq
.Lfunc_end7:
	.size	_Z12transformCpuPKfPfmm, .Lfunc_end7-_Z12transformCpuPKfPfmm
	.cfi_endproc
                                        # -- End function
	.globl	main                            # -- Begin function main
	.type	main,@function
main:                                   # @main
.Lfunc_begin0:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception0
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	subq	$208, %rsp
	.cfi_def_cfa_offset 240
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movl	$.Lstr, %edi
	callq	puts@PLT
	movl	$.L.str.4, %edi
	movl	$.L.str.5, %esi
	callq	fopen
	movq	%rax, %rbx
	leaq	80(%rsp), %rdi
	movl	$35574572, %esi                 # imm = 0x21ED32C
	movl	$1, %edx
	callq	_ZN8shared_tC2Emb
.Ltmp0:
	leaq	48(%rsp), %rdi
	movl	$35574572, %esi                 # imm = 0x21ED32C
	movl	$1, %edx
	callq	_ZN8shared_tC2Emb
.Ltmp1:
# %bb.1:
	movq	$0, 16(%rsp)
	movl	$142298288, %edi                # imm = 0x87B4CB0
	callq	malloc
	movq	%rax, 24(%rsp)
	movq	$35574572, 32(%rsp)             # imm = 0x21ED32C
	movq	$142298288, 40(%rsp)            # imm = 0x87B4CB0
	movl	$.L.str.17, %edi
	movl	$35574572, %ecx                 # imm = 0x21ED32C
	movl	$142298288, %r8d                # imm = 0x87B4CB0
	movq	%rax, %rsi
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	printf
.Ltmp3:
	leaq	160(%rsp), %rdi
	movl	$1, %esi
	callq	_ZN9measure_tC2Eb
.Ltmp4:
# %bb.2:
	movb	$0, 112(%rsp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 120(%rsp)
.Ltmp6:
	leaq	80(%rsp), %rdi
	callq	_ZN8shared_t9randomizeEv
.Ltmp7:
# %bb.3:
	movl	$4, %r14d
	testl	%eax, %eax
	jne	.LBB8_61
# %bb.4:
.Ltmp8:
	leaq	80(%rsp), %rdi
	callq	_ZN8shared_t8downloadEv
.Ltmp9:
# %bb.5:
	movl	$3, %r14d
	testl	%eax, %eax
	jne	.LBB8_61
# %bb.6:
	movq	56(%rsp), %rdi
	testq	%rdi, %rdi
	jne	.LBB8_8
# %bb.7:
	movq	48(%rsp), %rdx
	movl	$.L.str.27, %edi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	printf
	movq	56(%rsp), %rdi
.LBB8_8:                                # %_ZNK8shared_t4hostEv.exit
	movl	$142298288, %edx                # imm = 0x87B4CB0
	xorl	%esi, %esi
	callq	memset@PLT
	movq	24(%rsp), %rdi
	testq	%rdi, %rdi
	jne	.LBB8_10
# %bb.9:
	movq	16(%rsp), %rdx
	movl	$.L.str.27, %edi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	printf
	movq	24(%rsp), %rdi
.LBB8_10:                               # %_ZNK8shared_t4hostEv.exit48
	movl	$142298288, %edx                # imm = 0x87B4CB0
	xorl	%esi, %esi
	callq	memset@PLT
.Ltmp10:
	leaq	80(%rsp), %rdi
	callq	_ZN8shared_t6uploadEv
.Ltmp11:
# %bb.11:
	movl	$1, %r14d
	testl	%eax, %eax
	jne	.LBB8_61
# %bb.12:
.Ltmp12:
	leaq	48(%rsp), %rdi
	callq	_ZN8shared_t6uploadEv
.Ltmp13:
# %bb.13:
	testl	%eax, %eax
	jne	.LBB8_61
# %bb.14:                               # %.preheader.preheader
	movl	$1024, %r14d                    # imm = 0x400
.LBB8_15:                               # %.preheader
                                        # =>This Inner Loop Header: Depth=1
	movl	$8893643, %eax                  # imm = 0x87B4CB
	xorl	%edx, %edx
	divq	%r14
	testq	%rdx, %rdx
	je	.LBB8_18
# %bb.16:                               #   in Loop: Header=BB8_15 Depth=1
	decq	%r14
	cmpq	$1, %r14
	ja	.LBB8_15
# %bb.17:
	movl	$1, %r14d
.LBB8_18:
	movl	$.L.str.6, %edi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	printf
.Ltmp15:
	leaq	160(%rsp), %rdi
	callq	_ZN9measure_t5startEv
.Ltmp16:
# %bb.19:
	movl	$8893643, %eax                  # imm = 0x87B4CB
	xorl	%edx, %edx
	divq	%r14
	btsq	$32, %rax
	movl	%r14d, %edx
	btsq	$32, %rdx
.Ltmp17:
	movq	%rax, %rdi
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp18:
# %bb.20:
	testl	%eax, %eax
	jne	.LBB8_26
# %bb.21:
	movq	80(%rsp), %r15
	testq	%r15, %r15
	jne	.LBB8_23
# %bb.22:
	movq	88(%rsp), %rsi
	movl	$.L.str.29, %edi
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	printf
	movq	80(%rsp), %r15
.LBB8_23:                               # %_ZNK8shared_t6deviceEv.exit
	movq	48(%rsp), %rsi
	testq	%rsi, %rsi
	jne	.LBB8_25
# %bb.24:
	movq	56(%rsp), %rsi
	movl	$.L.str.29, %edi
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	printf
	movq	48(%rsp), %rsi
.LBB8_25:                               # %_ZNK8shared_t6deviceEv.exit58
.Ltmp19:
	movl	$4213, %edx                     # imm = 0x1075
	movq	%r15, %rdi
	movq	%r14, %rcx
	callq	_Z30__device_stub__transformKernelPKfPfmm
.Ltmp20:
.LBB8_26:
.Ltmp21:
	leaq	160(%rsp), %rdi
	callq	_ZN9measure_t3endEv
.Ltmp22:
# %bb.27:
.Ltmp23:
	leaq	112(%rsp), %rdi
	callq	_ZN9measure_t5startEv
.Ltmp24:
# %bb.28:
	movq	88(%rsp), %r14
	testq	%r14, %r14
	jne	.LBB8_30
# %bb.29:
	movq	80(%rsp), %rdx
	movl	$.L.str.27, %edi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	printf
	movq	88(%rsp), %r14
.LBB8_30:                               # %_ZNK8shared_t4hostEv.exit60
	movq	24(%rsp), %rsi
	testq	%rsi, %rsi
	jne	.LBB8_32
# %bb.31:
	movq	16(%rsp), %rdx
	movl	$.L.str.27, %edi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	printf
	movq	24(%rsp), %rsi
.LBB8_32:                               # %_ZNK8shared_t4hostEv.exit62
	movl	$4213, %edx                     # imm = 0x1075
	movl	$8444, %ecx                     # imm = 0x20FC
	movq	%r14, %rdi
	callq	_Z12transformCpuPKfPfmm
.Ltmp25:
	leaq	112(%rsp), %rdi
	callq	_ZN9measure_t3endEv
.Ltmp26:
# %bb.33:
.Ltmp27:
	leaq	48(%rsp), %rdi
	callq	_ZN8shared_t8downloadEv
.Ltmp28:
# %bb.34:
	movl	$2, %r14d
	testl	%eax, %eax
	jne	.LBB8_61
# %bb.35:
.Ltmp29:
	leaq	80(%rsp), %rdi
	callq	_ZN8shared_t8downloadEv
.Ltmp30:
# %bb.36:
	testl	%eax, %eax
	jne	.LBB8_61
# %bb.37:
	movl	$.L.str.7, %edi
	movl	$8, %esi
	movl	$1, %edx
	movq	%rbx, %rcx
	callq	fwrite@PLT
	movq	88(%rsp), %rsi
	testq	%rsi, %rsi
	jne	.LBB8_39
# %bb.38:
	movq	80(%rsp), %rdx
	movl	$.L.str.27, %edi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	printf
	movq	88(%rsp), %rsi
.LBB8_39:                               # %_ZNK8shared_t4hostEv.exit64
	movl	$4213, %edx                     # imm = 0x1075
	movl	$8444, %ecx                     # imm = 0x20FC
	movq	%rbx, %rdi
	callq	_Z11printMatrixP8_IO_FILEPfmm
	movl	$.L.str.8, %edi
	movl	$9, %esi
	movl	$1, %edx
	movq	%rbx, %rcx
	callq	fwrite@PLT
	movq	56(%rsp), %rsi
	testq	%rsi, %rsi
	jne	.LBB8_41
# %bb.40:
	movq	48(%rsp), %rdx
	movl	$.L.str.27, %edi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	printf
	movq	56(%rsp), %rsi
.LBB8_41:                               # %_ZNK8shared_t4hostEv.exit66
	movl	$2106, %edx                     # imm = 0x83A
	movl	$16888, %ecx                    # imm = 0x41F8
	movq	%rbx, %rdi
	callq	_Z11printMatrixP8_IO_FILEPfmm
	movl	$.L.str.9, %edi
	movl	$8, %esi
	movl	$1, %edx
	movq	%rbx, %rcx
	callq	fwrite@PLT
	movq	24(%rsp), %rsi
	testq	%rsi, %rsi
	jne	.LBB8_43
# %bb.42:
	movq	16(%rsp), %rdx
	movl	$.L.str.27, %edi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	printf
	movq	24(%rsp), %rsi
.LBB8_43:                               # %_ZNK8shared_t4hostEv.exit68
	movl	$2106, %edx                     # imm = 0x83A
	movl	$16888, %ecx                    # imm = 0x41F8
	movq	%rbx, %rdi
	callq	_Z11printMatrixP8_IO_FILEPfmm
	cvtss2sd	204(%rsp), %xmm0
	movl	$.L.str.10, %edi
	movb	$1, %al
	callq	printf
	xorps	%xmm0, %xmm0
	cvtss2sd	152(%rsp), %xmm0
	movl	$.L.str.11, %edi
	movb	$1, %al
	callq	printf
	movq	56(%rsp), %rbx
	testq	%rbx, %rbx
	jne	.LBB8_45
# %bb.44:
	movq	48(%rsp), %rdx
	movl	$.L.str.27, %edi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	printf
	movq	56(%rsp), %rbx
.LBB8_45:                               # %_ZNK8shared_t4hostEv.exit70
	movq	24(%rsp), %rsi
	testq	%rsi, %rsi
	jne	.LBB8_47
# %bb.46:
	movq	16(%rsp), %rdx
	movl	$.L.str.27, %edi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	printf
	movq	24(%rsp), %rsi
.LBB8_47:                               # %_ZNK8shared_t4hostEv.exit72
	movl	$2106, %edx                     # imm = 0x83A
	movl	$16888, %ecx                    # imm = 0x41F8
	movq	%rbx, %rdi
	callq	_Z7comparePfS_mm
	cmpq	$2106, %rax                     # imm = 0x83A
	jb	.LBB8_49
# %bb.48:                               # %_ZNK8shared_t4hostEv.exit72
	cmpq	$16887, %rdx                    # imm = 0x41F7
	jbe	.LBB8_49
# %bb.53:
	movl	$.Lstr.1, %edi
	callq	puts@PLT
	jmp	.LBB8_54
.LBB8_49:
	movl	$.L.str.12, %edi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	printf
.LBB8_54:
	movl	$.Lstr.2, %edi
	callq	puts@PLT
	movq	stdout(%rip), %rbx
	movq	88(%rsp), %rsi
	testq	%rsi, %rsi
	jne	.LBB8_56
# %bb.55:
	movq	80(%rsp), %rdx
	movl	$.L.str.27, %edi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	printf
	movq	88(%rsp), %rsi
.LBB8_56:                               # %_ZNK8shared_t4hostEv.exit74
	movq	$1, (%rsp)
	movl	$2106, %edx                     # imm = 0x83A
	movl	$4, %r9d
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_Z11printWindowP8_IO_FILEPfmmmmm
	movl	$.Lstr.3, %edi
	callq	puts@PLT
	movq	stdout(%rip), %rbx
	movq	56(%rsp), %rsi
	testq	%rsi, %rsi
	jne	.LBB8_58
# %bb.57:
	movq	48(%rsp), %rdx
	movl	$.L.str.27, %edi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	printf
	movq	56(%rsp), %rsi
.LBB8_58:                               # %_ZNK8shared_t4hostEv.exit76
	movq	$2, (%rsp)
	xorl	%r14d, %r14d
	movl	$2106, %edx                     # imm = 0x83A
	movl	$2, %r9d
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_Z11printWindowP8_IO_FILEPfmmmmm
	movl	$.Lstr.4, %edi
	callq	puts@PLT
	movq	stdout(%rip), %rbx
	movq	24(%rsp), %rsi
	testq	%rsi, %rsi
	jne	.LBB8_60
# %bb.59:
	movq	16(%rsp), %rdx
	movl	$.L.str.27, %edi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	printf
	movq	24(%rsp), %rsi
.LBB8_60:                               # %_ZNK8shared_t4hostEv.exit78
	movq	$2, (%rsp)
	movl	$2106, %edx                     # imm = 0x83A
	movl	$2, %r9d
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_Z11printWindowP8_IO_FILEPfmmmmm
.LBB8_61:
	leaq	112(%rsp), %rdi
	callq	_ZN9measure_tD2Ev
	leaq	160(%rsp), %rdi
	callq	_ZN9measure_tD2Ev
	leaq	16(%rsp), %rdi
	callq	_ZN8shared_tD2Ev
	leaq	48(%rsp), %rdi
	callq	_ZN8shared_tD2Ev
	leaq	80(%rsp), %rdi
	callq	_ZN8shared_tD2Ev
	movl	%r14d, %eax
	addq	$208, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.LBB8_52:
	.cfi_def_cfa_offset 240
.Ltmp31:
	jmp	.LBB8_63
.LBB8_51:
.Ltmp5:
	movq	%rax, %rbx
	jmp	.LBB8_64
.LBB8_50:
.Ltmp2:
	movq	%rax, %rbx
	jmp	.LBB8_65
.LBB8_62:
.Ltmp14:
.LBB8_63:
	movq	%rax, %rbx
	leaq	112(%rsp), %rdi
	callq	_ZN9measure_tD2Ev
	leaq	160(%rsp), %rdi
	callq	_ZN9measure_tD2Ev
.LBB8_64:
	leaq	16(%rsp), %rdi
	callq	_ZN8shared_tD2Ev
	leaq	48(%rsp), %rdi
	callq	_ZN8shared_tD2Ev
.LBB8_65:
	leaq	80(%rsp), %rdi
	callq	_ZN8shared_tD2Ev
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end8:
	.size	main, .Lfunc_end8-main
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table8:
.Lexception0:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end0-.Lcst_begin0
.Lcst_begin0:
	.uleb128 .Lfunc_begin0-.Lfunc_begin0    # >> Call Site 1 <<
	.uleb128 .Ltmp0-.Lfunc_begin0           #   Call between .Lfunc_begin0 and .Ltmp0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp0-.Lfunc_begin0           # >> Call Site 2 <<
	.uleb128 .Ltmp1-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp1
	.uleb128 .Ltmp2-.Lfunc_begin0           #     jumps to .Ltmp2
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp3-.Lfunc_begin0           # >> Call Site 3 <<
	.uleb128 .Ltmp4-.Ltmp3                  #   Call between .Ltmp3 and .Ltmp4
	.uleb128 .Ltmp5-.Lfunc_begin0           #     jumps to .Ltmp5
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp6-.Lfunc_begin0           # >> Call Site 4 <<
	.uleb128 .Ltmp9-.Ltmp6                  #   Call between .Ltmp6 and .Ltmp9
	.uleb128 .Ltmp14-.Lfunc_begin0          #     jumps to .Ltmp14
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp9-.Lfunc_begin0           # >> Call Site 5 <<
	.uleb128 .Ltmp10-.Ltmp9                 #   Call between .Ltmp9 and .Ltmp10
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp10-.Lfunc_begin0          # >> Call Site 6 <<
	.uleb128 .Ltmp13-.Ltmp10                #   Call between .Ltmp10 and .Ltmp13
	.uleb128 .Ltmp14-.Lfunc_begin0          #     jumps to .Ltmp14
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp15-.Lfunc_begin0          # >> Call Site 7 <<
	.uleb128 .Ltmp30-.Ltmp15                #   Call between .Ltmp15 and .Ltmp30
	.uleb128 .Ltmp31-.Lfunc_begin0          #     jumps to .Ltmp31
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp30-.Lfunc_begin0          # >> Call Site 8 <<
	.uleb128 .Lfunc_end8-.Ltmp30            #   Call between .Ltmp30 and .Lfunc_end8
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZN8shared_tC2Emb,"axG",@progbits,_ZN8shared_tC2Emb,comdat
	.weak	_ZN8shared_tC2Emb               # -- Begin function _ZN8shared_tC2Emb
	.p2align	1, 0x90
	.type	_ZN8shared_tC2Emb,@function
_ZN8shared_tC2Emb:                      # @_ZN8shared_tC2Emb
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%edx, %ebp
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	$0, (%rdi)
	leaq	(,%rsi,4), %r14
	movq	%r14, %rdi
	callq	malloc
	movq	%rax, 8(%r15)
	movq	%rbx, 16(%r15)
	movq	%r14, 24(%r15)
	testl	%ebp, %ebp
	je	.LBB9_1
# %bb.2:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	movq	(%r15), %rdx
	movq	8(%r15), %rax
	movq	24(%r15), %r14
	jmp	.LBB9_3
.LBB9_1:
	xorl	%edx, %edx
.LBB9_3:
	movl	$.L.str.17, %edi
	movq	%rax, %rsi
	movq	%rbx, %rcx
	movq	%r14, %r8
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	printf                          # TAILCALL
.Lfunc_end9:
	.size	_ZN8shared_tC2Emb, .Lfunc_end9-_ZN8shared_tC2Emb
	.cfi_endproc
                                        # -- End function
	.section	.text._ZN9measure_tC2Eb,"axG",@progbits,_ZN9measure_tC2Eb,comdat
	.weak	_ZN9measure_tC2Eb               # -- Begin function _ZN9measure_tC2Eb
	.p2align	1, 0x90
	.type	_ZN9measure_tC2Eb,@function
_ZN9measure_tC2Eb:                      # @_ZN9measure_tC2Eb
	.cfi_startproc
# %bb.0:
	movb	%sil, (%rdi)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rdi)
	testl	%esi, %esi
	je	.LBB10_9
# %bb.1:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdi, %rbx
	leaq	24(%rdi), %r14
	movq	%r14, %rdi
	callq	hipEventCreate
	movl	%eax, %ebp
	leaq	32(%rbx), %r15
	movq	%r15, %rdi
	callq	hipEventCreate
	movl	%eax, %r12d
	movl	$.L.str.18, %edi
	movl	%ebp, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	printf
	movl	%r12d, %eax
	orl	%ebp, %eax
	je	.LBB10_8
# %bb.2:
	testl	%ebp, %ebp
	je	.LBB10_4
# %bb.3:
	testl	%r12d, %r12d
	je	.LBB10_6
.LBB10_4:
	testl	%ebp, %ebp
	jne	.LBB10_7
# %bb.5:
	movq	%r14, %r15
	testl	%r12d, %r12d
	je	.LBB10_7
.LBB10_6:                               # %.sink.split
	movq	(%r15), %rdi
	callq	hipEventDestroy
.LBB10_7:
	movl	$.Lstr.5, %edi
	callq	puts@PLT
	movb	$0, (%rbx)
.LBB10_8:
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
	.cfi_restore %r12
	.cfi_restore %r14
	.cfi_restore %r15
	.cfi_restore %rbp
.LBB10_9:
	retq
.Lfunc_end10:
	.size	_ZN9measure_tC2Eb, .Lfunc_end10-_ZN9measure_tC2Eb
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _ZN8shared_t9randomizeEv
.LCPI11_0:
	.long	0x42200000                      # float 40
.LCPI11_1:
	.long	0x41a00000                      # float 20
	.section	.text._ZN8shared_t9randomizeEv,"axG",@progbits,_ZN8shared_t9randomizeEv,comdat
	.weak	_ZN8shared_t9randomizeEv
	.p2align	1, 0x90
	.type	_ZN8shared_t9randomizeEv,@function
_ZN8shared_t9randomizeEv:               # @_ZN8shared_t9randomizeEv
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movq	%rdi, %r14
	cmpq	$0, (%rdi)
	je	.LBB11_1
# %bb.2:
	movq	%rsp, %rdi
	movl	$400, %esi                      # imm = 0x190
	callq	hiprandCreateGenerator
	testl	%eax, %eax
	je	.LBB11_4
# %bb.3:
	movl	%eax, %ebx
	movl	$.L.str.21, %edi
	jmp	.LBB11_9
.LBB11_1:
	movq	8(%r14), %rsi
	movl	$.L.str.20, %edi
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	printf
	movl	$1, %ebx
	jmp	.LBB11_10
.LBB11_4:
	movq	(%rsp), %rdi
	movq	(%r14), %rsi
	movq	16(%r14), %rdx
	movss	.LCPI11_0(%rip), %xmm0          # xmm0 = mem[0],zero,zero,zero
	movss	.LCPI11_1(%rip), %xmm1          # xmm1 = mem[0],zero,zero,zero
	callq	hiprandGenerateNormal
	testl	%eax, %eax
	je	.LBB11_6
# %bb.5:
	movl	$.L.str.22, %edi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	printf
.LBB11_6:
	movq	(%rsp), %rdi
	callq	hiprandDestroyGenerator
	testl	%eax, %eax
	je	.LBB11_7
# %bb.8:
	movl	%eax, %ebx
	movl	$.L.str.23, %edi
.LBB11_9:
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	printf
.LBB11_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.LBB11_7:
	.cfi_def_cfa_offset 32
	xorl	%ebx, %ebx
	jmp	.LBB11_10
.Lfunc_end11:
	.size	_ZN8shared_t9randomizeEv, .Lfunc_end11-_ZN8shared_t9randomizeEv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZN8shared_t8downloadEv,"axG",@progbits,_ZN8shared_t8downloadEv,comdat
	.weak	_ZN8shared_t8downloadEv         # -- Begin function _ZN8shared_t8downloadEv
	.p2align	1, 0x90
	.type	_ZN8shared_t8downloadEv,@function
_ZN8shared_t8downloadEv:                # @_ZN8shared_t8downloadEv
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movq	%rdi, %r14
	movl	$2, %esi
	callq	_ZN8shared_t4syncE13hipMemcpyKind
	movl	%eax, %ebx
	testl	%eax, %eax
	je	.LBB12_2
# %bb.1:
	movq	(%r14), %rsi
	movq	8(%r14), %rdx
	movq	24(%r14), %rcx
	movl	$.L.str.24, %edi
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	printf
.LBB12_2:
	movl	%ebx, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end12:
	.size	_ZN8shared_t8downloadEv, .Lfunc_end12-_ZN8shared_t8downloadEv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZN8shared_t6uploadEv,"axG",@progbits,_ZN8shared_t6uploadEv,comdat
	.weak	_ZN8shared_t6uploadEv           # -- Begin function _ZN8shared_t6uploadEv
	.p2align	1, 0x90
	.type	_ZN8shared_t6uploadEv,@function
_ZN8shared_t6uploadEv:                  # @_ZN8shared_t6uploadEv
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movq	%rdi, %r14
	movl	$1, %esi
	callq	_ZN8shared_t4syncE13hipMemcpyKind
	movl	%eax, %ebx
	testl	%eax, %eax
	je	.LBB13_2
# %bb.1:
	movq	(%r14), %rsi
	movq	8(%r14), %rdx
	movq	24(%r14), %rcx
	movl	$.L.str.28, %edi
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	printf
.LBB13_2:
	movl	%ebx, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end13:
	.size	_ZN8shared_t6uploadEv, .Lfunc_end13-_ZN8shared_t6uploadEv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZN9measure_t5startEv,"axG",@progbits,_ZN9measure_t5startEv,comdat
	.weak	_ZN9measure_t5startEv           # -- Begin function _ZN9measure_t5startEv
	.p2align	1, 0x90
	.type	_ZN9measure_t5startEv,@function
_ZN9measure_t5startEv:                  # @_ZN9measure_t5startEv
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	%rdi, %rbx
	callq	_ZNSt6chrono3_V212system_clock3nowEv
	movq	%rax, 8(%rbx)
	cmpb	$0, (%rbx)
	je	.LBB14_1
# %bb.2:
	movq	24(%rbx), %rdi
	xorl	%esi, %esi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	hipEventRecord                  # TAILCALL
.LBB14_1:
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end14:
	.size	_ZN9measure_t5startEv, .Lfunc_end14-_ZN9measure_t5startEv
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _ZN9measure_t3endEv
.LCPI15_0:
	.long	0x447a0000                      # float 1000
	.section	.text._ZN9measure_t3endEv,"axG",@progbits,_ZN9measure_t3endEv,comdat
	.weak	_ZN9measure_t3endEv
	.p2align	1, 0x90
	.type	_ZN9measure_t3endEv,@function
_ZN9measure_t3endEv:                    # @_ZN9measure_t3endEv
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %rbp, -16
	movq	%rdi, %rbx
	callq	_ZNSt6chrono3_V212system_clock3nowEv
	movq	%rax, 16(%rbx)
	subq	8(%rbx), %rax
	movabsq	$2361183241434822607, %rcx      # imm = 0x20C49BA5E353F7CF
	imulq	%rcx
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$7, %rdx
	addq	%rax, %rdx
	cvtsi2sd	%rdx, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, 40(%rbx)
	cmpb	$0, (%rbx)
	je	.LBB15_6
# %bb.1:
	movq	32(%rbx), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movl	%eax, %ebp
	movq	32(%rbx), %rdi
	callq	hipEventSynchronize
	movl	%eax, %r14d
	leaq	12(%rsp), %rdi
	movl	$0, (%rdi)
	movq	24(%rbx), %rsi
	movq	32(%rbx), %rdx
	callq	hipEventElapsedTime
	testl	%ebp, %ebp
	jne	.LBB15_4
# %bb.2:
	testl	%r14d, %r14d
	jne	.LBB15_4
# %bb.3:
	testl	%eax, %eax
	jne	.LBB15_4
# %bb.5:
	movss	12(%rsp), %xmm0                 # xmm0 = mem[0],zero,zero,zero
	mulss	.LCPI15_0(%rip), %xmm0
	movss	%xmm0, 44(%rbx)
	jmp	.LBB15_6
.LBB15_4:
	movl	$.L.str.30, %edi
	movl	%ebp, %esi
	movl	%r14d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	printf
.LBB15_6:
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end15:
	.size	_ZN9measure_t3endEv, .Lfunc_end15-_ZN9measure_t3endEv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZN9measure_tD2Ev,"axG",@progbits,_ZN9measure_tD2Ev,comdat
	.weak	_ZN9measure_tD2Ev               # -- Begin function _ZN9measure_tD2Ev
	.p2align	1, 0x90
	.type	_ZN9measure_tD2Ev,@function
_ZN9measure_tD2Ev:                      # @_ZN9measure_tD2Ev
.Lfunc_begin1:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception1
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	cmpb	$0, (%rdi)
	je	.LBB16_4
# %bb.1:
	movq	%rdi, %r14
	movq	32(%rdi), %rdi
.Ltmp32:
	callq	hipEventDestroy
.Ltmp33:
# %bb.2:
	movl	%eax, %ebx
	movq	24(%r14), %rdi
.Ltmp34:
	callq	hipEventDestroy
.Ltmp35:
# %bb.3:
	movl	$.L.str.31, %edi
	movl	%eax, %esi
	movl	%ebx, %edx
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	jmp	printf                          # TAILCALL
.LBB16_4:
	.cfi_def_cfa_offset 32
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.LBB16_5:
	.cfi_def_cfa_offset 32
.Ltmp36:
	movq	%rax, %rdi
	callq	__clang_call_terminate
.Lfunc_end16:
	.size	_ZN9measure_tD2Ev, .Lfunc_end16-_ZN9measure_tD2Ev
	.cfi_endproc
	.section	.gcc_except_table._ZN9measure_tD2Ev,"aG",@progbits,_ZN9measure_tD2Ev,comdat
	.p2align	2, 0x0
GCC_except_table16:
.Lexception1:
	.byte	255                             # @LPStart Encoding = omit
	.byte	3                               # @TType Encoding = udata4
	.uleb128 .Lttbase0-.Lttbaseref0
.Lttbaseref0:
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end1-.Lcst_begin1
.Lcst_begin1:
	.uleb128 .Ltmp32-.Lfunc_begin1          # >> Call Site 1 <<
	.uleb128 .Ltmp35-.Ltmp32                #   Call between .Ltmp32 and .Ltmp35
	.uleb128 .Ltmp36-.Lfunc_begin1          #     jumps to .Ltmp36
	.byte	1                               #   On action: 1
.Lcst_end1:
	.byte	1                               # >> Action Record 1 <<
                                        #   Catch TypeInfo 1
	.byte	0                               #   No further actions
	.p2align	2, 0x0
                                        # >> Catch TypeInfos <<
	.long	0                               # TypeInfo 1
.Lttbase0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZN8shared_tD2Ev,"axG",@progbits,_ZN8shared_tD2Ev,comdat
	.weak	_ZN8shared_tD2Ev                # -- Begin function _ZN8shared_tD2Ev
	.p2align	1, 0x90
	.type	_ZN8shared_tD2Ev,@function
_ZN8shared_tD2Ev:                       # @_ZN8shared_tD2Ev
.Lfunc_begin2:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception2
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	%rdi, %rbx
	movq	(%rdi), %rdx
	movq	8(%rdi), %rsi
	movl	$.L.str.32, %edi
	xorl	%eax, %eax
	callq	printf
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	.LBB17_2
# %bb.1:
	callq	free
.LBB17_2:
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	.LBB17_4
# %bb.3:
.Ltmp37:
	callq	hipFree
.Ltmp38:
.LBB17_4:
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.LBB17_5:
	.cfi_def_cfa_offset 16
.Ltmp39:
	movq	%rax, %rdi
	callq	__clang_call_terminate
.Lfunc_end17:
	.size	_ZN8shared_tD2Ev, .Lfunc_end17-_ZN8shared_tD2Ev
	.cfi_endproc
	.section	.gcc_except_table._ZN8shared_tD2Ev,"aG",@progbits,_ZN8shared_tD2Ev,comdat
	.p2align	2, 0x0
GCC_except_table17:
.Lexception2:
	.byte	255                             # @LPStart Encoding = omit
	.byte	3                               # @TType Encoding = udata4
	.uleb128 .Lttbase1-.Lttbaseref1
.Lttbaseref1:
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end2-.Lcst_begin2
.Lcst_begin2:
	.uleb128 .Ltmp37-.Lfunc_begin2          # >> Call Site 1 <<
	.uleb128 .Ltmp38-.Ltmp37                #   Call between .Ltmp37 and .Ltmp38
	.uleb128 .Ltmp39-.Lfunc_begin2          #     jumps to .Ltmp39
	.byte	1                               #   On action: 1
.Lcst_end2:
	.byte	1                               # >> Action Record 1 <<
                                        #   Catch TypeInfo 1
	.byte	0                               #   No further actions
	.p2align	2, 0x0
                                        # >> Catch TypeInfos <<
	.long	0                               # TypeInfo 1
.Lttbase1:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text.__clang_call_terminate,"axG",@progbits,__clang_call_terminate,comdat
	.hidden	__clang_call_terminate          # -- Begin function __clang_call_terminate
	.weak	__clang_call_terminate
	.type	__clang_call_terminate,@function
__clang_call_terminate:                 # @__clang_call_terminate
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	__cxa_begin_catch
	callq	_ZSt9terminatev
.Lfunc_end18:
	.size	__clang_call_terminate, .Lfunc_end18-__clang_call_terminate
	.cfi_endproc
                                        # -- End function
	.section	.text._ZN8shared_t4syncE13hipMemcpyKind,"axG",@progbits,_ZN8shared_t4syncE13hipMemcpyKind,comdat
	.weak	_ZN8shared_t4syncE13hipMemcpyKind # -- Begin function _ZN8shared_t4syncE13hipMemcpyKind
	.p2align	1, 0x90
	.type	_ZN8shared_t4syncE13hipMemcpyKind,@function
_ZN8shared_t4syncE13hipMemcpyKind:      # @_ZN8shared_t4syncE13hipMemcpyKind
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movl	%esi, %ecx
	movq	(%rdi), %rdx
	movq	8(%rdi), %rsi
	testq	%rsi, %rsi
	je	.LBB19_4
# %bb.1:
	testq	%rdx, %rdx
	je	.LBB19_5
# %bb.2:
	movq	24(%rdi), %rax
	cmpl	$2, %ecx
	jne	.LBB19_7
# %bb.3:
	movq	%rsi, %rdi
	movq	%rdx, %rsi
	movq	%rax, %rdx
	movl	$2, %ecx
	jmp	.LBB19_8
.LBB19_4:
	movl	$.L.str.25, %edi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$1, %eax
	jmp	.LBB19_6
.LBB19_5:
	movl	$.L.str.26, %edi
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	printf
	movl	$2, %eax
.LBB19_6:
	popq	%rcx
	.cfi_def_cfa_offset 8
	retq
.LBB19_7:
	.cfi_def_cfa_offset 16
	movq	%rdx, %rdi
	movq	%rax, %rdx
.LBB19_8:
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	hipMemcpy                       # TAILCALL
.Lfunc_end19:
	.size	_ZN8shared_t4syncE13hipMemcpyKind, .Lfunc_end19-_ZN8shared_t4syncE13hipMemcpyKind
	.cfi_endproc
                                        # -- End function
	.text
	.p2align	4, 0x90                         # -- Begin function __hip_module_ctor
	.type	__hip_module_ctor,@function
__hip_module_ctor:                      # @__hip_module_ctor
	.cfi_startproc
# %bb.0:
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	jne	.LBB20_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rdi
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB20_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z15transformKernelPKfPfmm, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$40, %rsp
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end20:
	.size	__hip_module_ctor, .Lfunc_end20-__hip_module_ctor
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_dtor
	.type	__hip_module_dtor,@function
__hip_module_dtor:                      # @__hip_module_dtor
	.cfi_startproc
# %bb.0:
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB21_2
# %bb.1:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	__hipUnregisterFatBinary
	movq	$0, __hip_gpubin_handle(%rip)
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
.LBB21_2:
	retq
.Lfunc_end21:
	.size	__hip_module_dtor, .Lfunc_end21-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"%03.0f "
	.size	.L.str, 8

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"missmatch %f %f\n"
	.size	.L.str.2, 17

	.type	_Z15transformKernelPKfPfmm,@object # @_Z15transformKernelPKfPfmm
	.section	.rodata,"a",@progbits
	.globl	_Z15transformKernelPKfPfmm
	.p2align	3, 0x0
_Z15transformKernelPKfPfmm:
	.quad	_Z30__device_stub__transformKernelPKfPfmm
	.size	_Z15transformKernelPKfPfmm, 8

	.type	.L.str.4,@object                # @.str.4
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.4:
	.asciz	"/dev/null"
	.size	.L.str.4, 10

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"w"
	.size	.L.str.5, 2

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"thread count: %lu\n"
	.size	.L.str.6, 19

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"input: \n"
	.size	.L.str.7, 9

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"output: \n"
	.size	.L.str.8, 10

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"check: \n"
	.size	.L.str.9, 9

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"measure device: %f mcs\n"
	.size	.L.str.10, 24

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"measure host: %f mcs\n"
	.size	.L.str.11, 22

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"compare missmatch on %lu %lu\n"
	.size	.L.str.12, 30

	.type	.L.str.17,@object               # @.str.17
.L.str.17:
	.asciz	"[shared_t] host:%p device:%p count:%lu bytes:%lu\n"
	.size	.L.str.17, 50

	.type	.L.str.18,@object               # @.str.18
.L.str.18:
	.asciz	"[measure_t] create cuda events start:%d end:%d\n"
	.size	.L.str.18, 48

	.type	.L.str.20,@object               # @.str.20
.L.str.20:
	.asciz	"[shared_t] device_ptr is nullptr for randomize (host:%p, device:%p)\n"
	.size	.L.str.20, 69

	.type	.L.str.21,@object               # @.str.21
.L.str.21:
	.asciz	"[shared_t] create generator failed %d\n"
	.size	.L.str.21, 39

	.type	.L.str.22,@object               # @.str.22
.L.str.22:
	.asciz	"[shared_t] generate failed %d\n"
	.size	.L.str.22, 31

	.type	.L.str.23,@object               # @.str.23
.L.str.23:
	.asciz	"[shared_t] destroy generator failed %d\n"
	.size	.L.str.23, 40

	.type	.L.str.24,@object               # @.str.24
.L.str.24:
	.asciz	"[shared_t] download of (%p, %p, %lu) failed %d\n"
	.size	.L.str.24, 48

	.type	.L.str.25,@object               # @.str.25
.L.str.25:
	.asciz	"[shared_t] host_ptr is nullptr (host:%p, device:%p)\n"
	.size	.L.str.25, 53

	.type	.L.str.26,@object               # @.str.26
.L.str.26:
	.asciz	"[shared_t] device_ptr is nullptr (host:%p, device:%p)\n"
	.size	.L.str.26, 55

	.type	.L.str.27,@object               # @.str.27
.L.str.27:
	.asciz	"[shared_t] host() has to return nullptr (host:%p, device:%p)\n"
	.size	.L.str.27, 62

	.type	.L.str.28,@object               # @.str.28
.L.str.28:
	.asciz	"[shared_t] upload of (%p, %p, %lu) failed %d\n"
	.size	.L.str.28, 46

	.type	.L.str.29,@object               # @.str.29
.L.str.29:
	.asciz	"[shared_t] device() has to return nullptr (host:%p, device:%p)\n"
	.size	.L.str.29, 64

	.type	.L.str.30,@object               # @.str.30
.L.str.30:
	.asciz	"[measure_t] cuda stop event is failed record:%d sync:%d time:%d\n"
	.size	.L.str.30, 65

	.type	.L.str.31,@object               # @.str.31
.L.str.31:
	.asciz	"[measure_t] dispose cuda events start:%d end:%d\n"
	.size	.L.str.31, 49

	.type	.L.str.32,@object               # @.str.32
.L.str.32:
	.asciz	"[shared_t] dispose %p %p\n"
	.size	.L.str.32, 26

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z15transformKernelPKfPfmm"
	.size	.L__unnamed_1, 27

	.type	__hip_fatbin_wrapper,@object    # @__hip_fatbin_wrapper
	.section	.hipFatBinSegment,"a",@progbits
	.p2align	3, 0x0
__hip_fatbin_wrapper:
	.long	1212764230                      # 0x48495046
	.long	1                               # 0x1
	.quad	__hip_fatbin
	.quad	0
	.size	__hip_fatbin_wrapper, 24

	.type	__hip_gpubin_handle,@object     # @__hip_gpubin_handle
	.local	__hip_gpubin_handle
	.comm	__hip_gpubin_handle,8,8
	.section	.init_array,"aw",@init_array
	.p2align	3, 0x0
	.quad	__hip_module_ctor
	.type	__hip_cuid_,@object             # @__hip_cuid_
	.bss
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               # 0x0
	.size	__hip_cuid_, 1

	.type	.Lstr,@object                   # @str
	.section	.rodata.str1.1,"aMS",@progbits,1
.Lstr:
	.asciz	"[warning] matrix will not be printed because sizes are too big"
	.size	.Lstr, 63

	.type	.Lstr.1,@object                 # @str.1
.Lstr.1:
	.asciz	"compare check passed!"
	.size	.Lstr.1, 22

	.type	.Lstr.2,@object                 # @str.2
.Lstr.2:
	.asciz	"input window: "
	.size	.Lstr.2, 15

	.type	.Lstr.3,@object                 # @str.3
.Lstr.3:
	.asciz	"output window: "
	.size	.Lstr.3, 16

	.type	.Lstr.4,@object                 # @str.4
.Lstr.4:
	.asciz	"check window: "
	.size	.Lstr.4, 15

	.type	.Lstr.5,@object                 # @str.5
.Lstr.5:
	.asciz	"[measure_t] disabling cuda events"
	.size	.Lstr.5, 34

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym _Z30__device_stub__transformKernelPKfPfmm
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Unwind_Resume
	.addrsig_sym _Z15transformKernelPKfPfmm
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z15transformKernelPKfPfmm ; -- Begin function _Z15transformKernelPKfPfmm
	.globl	_Z15transformKernelPKfPfmm
	.p2align	8
	.type	_Z15transformKernelPKfPfmm,@function
_Z15transformKernelPKfPfmm:             ; @_Z15transformKernelPKfPfmm
; %bb.0:
	s_load_b256 s[4:11], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	v_cvt_f32_u32_e32 v1, s8
	v_cvt_f32_u32_e32 v2, s9
	s_sub_u32 s0, 0, s8
	v_alignbit_b32 v10, s9, s8, 2
	s_subb_u32 s12, 0, s9
	s_lshr_b32 s1, s9, 2
	v_fmac_f32_e32 v1, 0x4f800000, v2
	s_lshr_b64 s[2:3], s[8:9], 2
	v_cvt_f32_u32_e32 v7, v10
	s_sub_u32 s2, 0, s2
	s_subb_u32 s3, 0, s3
	v_rcp_f32_e32 v1, v1
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v1, 0x5f7ffffc, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v2, 0x2f800000, v1
	v_trunc_f32_e32 v2, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_fmac_f32_e32 v1, 0xcf800000, v2
	v_cvt_u32_f32_e32 v4, v2
	v_cvt_f32_u32_e32 v2, s1
	v_cvt_u32_f32_e32 v5, v1
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_4)
	v_mul_lo_u32 v3, s0, v4
	v_mov_b32_e32 v1, 0
	v_fmac_f32_e32 v7, 0x4f800000, v2
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_mul_hi_u32 v6, s0, v5
	v_mul_lo_u32 v8, s12, v5
	v_mul_lo_u32 v9, s0, v5
	v_add_nc_u32_e32 v6, v6, v3
	v_mad_u64_u32 v[2:3], null, s15, s10, v[0:1]
	v_rcp_f32_e32 v1, v7
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_mul_hi_u32 v7, v5, v9
	v_add_nc_u32_e32 v6, v6, v8
	v_mul_hi_u32 v11, v4, v9
	v_mul_lo_u32 v9, v4, v9
	v_mov_b32_e32 v0, v3
	s_delay_alu instid0(VALU_DEP_4)
	v_mul_lo_u32 v8, v5, v6
	v_mul_hi_u32 v3, v5, v6
	v_mul_hi_u32 v12, v4, v6
	v_mul_lo_u32 v6, v4, v6
	v_dual_mul_f32 v1, 0x5f7ffffc, v1 :: v_dual_lshlrev_b32 v14, 2, v2
	v_add_co_u32 v7, vcc_lo, v7, v8
	v_add_co_ci_u32_e32 v3, vcc_lo, 0, v3, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_mul_f32_e32 v8, 0x2f800000, v1
	v_add_co_u32 v7, vcc_lo, v7, v9
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_co_ci_u32_e32 v3, vcc_lo, v3, v11, vcc_lo
	v_add_co_ci_u32_e32 v7, vcc_lo, 0, v12, vcc_lo
	v_add_co_u32 v3, vcc_lo, v3, v6
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e32 v6, vcc_lo, 0, v7, vcc_lo
	v_trunc_f32_e32 v7, v8
	v_add_co_u32 v5, vcc_lo, v5, v3
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e32 v6, vcc_lo, v4, v6, vcc_lo
	v_mad_u64_u32 v[3:4], null, s15, s11, v[0:1]
	v_mul_hi_u32 v4, s0, v5
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_4)
	v_mul_lo_u32 v8, s0, v6
	v_cvt_u32_f32_e32 v11, v7
	v_mov_b32_e32 v0, v3
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_mul_lo_u32 v9, s2, v11
	v_dual_fmac_f32 v1, 0xcf800000, v7 :: v_dual_add_nc_u32 v4, v4, v8
	v_mul_lo_u32 v7, s12, v5
	v_mul_lo_u32 v8, s0, v5
	v_alignbit_b32 v15, v0, v2, 30
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_cvt_u32_f32_e32 v1, v1
	v_add_nc_u32_e32 v4, v4, v7
	s_delay_alu instid0(VALU_DEP_2)
	v_mul_hi_u32 v12, s2, v1
	v_mul_hi_u32 v20, v6, v8
	v_mul_lo_u32 v7, s3, v1
	v_mul_lo_u32 v13, s2, v1
	v_mul_lo_u32 v16, v5, v4
	v_mul_hi_u32 v18, v5, v4
	v_mul_hi_u32 v21, v6, v4
	v_mul_lo_u32 v4, v6, v4
	v_add_nc_u32_e32 v9, v12, v9
	v_mul_hi_u32 v12, v5, v8
	v_mul_lo_u32 v8, v6, v8
	v_mul_hi_u32 v17, v1, v13
	v_mul_hi_u32 v19, v11, v13
	v_add_nc_u32_e32 v7, v9, v7
	v_mul_lo_u32 v13, v11, v13
	v_add_co_u32 v12, vcc_lo, v12, v16
	v_add_co_ci_u32_e32 v16, vcc_lo, 0, v18, vcc_lo
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_mul_lo_u32 v18, v1, v7
	v_add_co_u32 v8, vcc_lo, v12, v8
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e32 v8, vcc_lo, v16, v20, vcc_lo
	v_add_co_ci_u32_e32 v12, vcc_lo, 0, v21, vcc_lo
	v_mul_hi_u32 v16, v1, v7
	v_add_co_u32 v4, vcc_lo, v8, v4
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e32 v8, vcc_lo, 0, v12, vcc_lo
	v_mul_hi_u32 v21, v11, v7
	v_add_co_u32 v9, vcc_lo, v5, v4
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e32 v12, vcc_lo, v6, v8, vcc_lo
	v_mul_lo_u32 v22, v11, v7
	v_mul_hi_u32 v20, v14, v9
	v_mad_u64_u32 v[6:7], null, v15, v9, 0
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_mad_u64_u32 v[4:5], null, v14, v12, 0
	v_mad_u64_u32 v[8:9], null, v15, v12, 0
	v_add_co_u32 v4, vcc_lo, v20, v4
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_2) | instid1(VALU_DEP_4)
	v_add_co_ci_u32_e32 v5, vcc_lo, 0, v5, vcc_lo
	v_add_co_u32 v12, vcc_lo, v17, v18
	v_add_co_ci_u32_e32 v16, vcc_lo, 0, v16, vcc_lo
	v_add_co_u32 v4, vcc_lo, v4, v6
	s_delay_alu instid0(VALU_DEP_4)
	v_add_co_ci_u32_e32 v4, vcc_lo, v5, v7, vcc_lo
	v_add_co_ci_u32_e32 v5, vcc_lo, 0, v9, vcc_lo
	v_add_co_u32 v6, vcc_lo, v12, v13
	v_add_co_ci_u32_e32 v6, vcc_lo, v16, v19, vcc_lo
	v_add_co_ci_u32_e32 v7, vcc_lo, 0, v21, vcc_lo
	v_add_co_u32 v12, s0, v4, v8
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v6, vcc_lo, v6, v22
	v_add_co_ci_u32_e32 v7, vcc_lo, 0, v7, vcc_lo
	v_add_co_ci_u32_e64 v13, s0, 0, v5, s0
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v1, vcc_lo, v1, v6
	v_add_co_ci_u32_e32 v6, vcc_lo, v11, v7, vcc_lo
	v_mul_lo_u32 v8, s9, v12
	v_mad_u64_u32 v[4:5], null, s8, v12, 0
	v_mul_lo_u32 v9, s8, v13
	v_mul_hi_u32 v7, s2, v1
	v_mul_lo_u32 v17, s2, v6
	v_add_co_u32 v11, vcc_lo, v12, 2
	v_add_co_ci_u32_e32 v16, vcc_lo, 0, v13, vcc_lo
	v_add_co_u32 v18, vcc_lo, v12, 1
	v_add3_u32 v5, v5, v9, v8
	v_mul_lo_u32 v9, s3, v1
	v_add_nc_u32_e32 v7, v7, v17
	v_mul_lo_u32 v8, s2, v1
	v_add_co_ci_u32_e32 v19, vcc_lo, 0, v13, vcc_lo
	v_sub_nc_u32_e32 v17, v15, v5
	v_sub_co_u32 v4, vcc_lo, v14, v4
	v_add_nc_u32_e32 v7, v7, v9
	s_lshr_b32 s2, s9, 1
	v_mul_hi_u32 v20, v6, v8
	v_mul_lo_u32 v21, v6, v8
	v_mul_hi_u32 v8, v1, v8
	v_mul_lo_u32 v14, v1, v7
	v_subrev_co_ci_u32_e64 v9, s0, s9, v17, vcc_lo
	v_mul_hi_u32 v17, v1, v7
	v_sub_co_ci_u32_e32 v15, vcc_lo, v15, v5, vcc_lo
	v_cmp_le_u32_e32 vcc_lo, s8, v4
	v_mul_hi_u32 v5, v6, v7
	v_mul_lo_u32 v7, v6, v7
	v_cndmask_b32_e64 v22, 0, -1, vcc_lo
	v_add_co_u32 v8, vcc_lo, v8, v14
	v_add_co_ci_u32_e32 v14, vcc_lo, 0, v17, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v8, vcc_lo, v8, v21
	v_add_co_ci_u32_e32 v8, vcc_lo, v14, v20, vcc_lo
	v_add_co_ci_u32_e32 v5, vcc_lo, 0, v5, vcc_lo
	v_sub_co_u32 v4, vcc_lo, v4, s8
	v_subrev_co_ci_u32_e32 v14, vcc_lo, 0, v9, vcc_lo
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v7, vcc_lo, v8, v7
	v_add_co_ci_u32_e32 v5, vcc_lo, 0, v5, vcc_lo
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_1) | instid1(VALU_DEP_4)
	v_cmp_le_u32_e32 vcc_lo, s8, v4
	v_cndmask_b32_e64 v17, 0, -1, vcc_lo
	v_add_co_u32 v1, vcc_lo, v1, v7
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e32 v20, vcc_lo, v6, v5, vcc_lo
	v_cmp_le_u32_e32 vcc_lo, s9, v15
	v_mul_hi_u32 v23, v2, v1
	v_mad_u64_u32 v[6:7], null, v3, v1, 0
	s_delay_alu instid0(VALU_DEP_4)
	v_mad_u64_u32 v[4:5], null, v2, v20, 0
	v_cndmask_b32_e64 v21, 0, -1, vcc_lo
	v_cmp_le_u32_e32 vcc_lo, s9, v14
	v_mad_u64_u32 v[8:9], null, v3, v20, 0
	v_cndmask_b32_e64 v24, 0, -1, vcc_lo
	v_add_co_u32 v1, vcc_lo, v23, v4
	v_add_co_ci_u32_e32 v4, vcc_lo, 0, v5, vcc_lo
	v_cmp_eq_u32_e32 vcc_lo, s9, v15
	v_cndmask_b32_e32 v15, v21, v22, vcc_lo
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v1, vcc_lo, v1, v6
	v_add_co_ci_u32_e32 v1, vcc_lo, v4, v7, vcc_lo
	v_add_co_ci_u32_e32 v4, vcc_lo, 0, v9, vcc_lo
	v_cmp_eq_u32_e32 vcc_lo, s9, v14
	v_cndmask_b32_e32 v5, v24, v17, vcc_lo
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v1, vcc_lo, v1, v8
	v_add_co_ci_u32_e32 v6, vcc_lo, 0, v4, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cmp_ne_u32_e32 vcc_lo, 0, v5
	v_mul_lo_u32 v8, s1, v1
	v_mad_u64_u32 v[4:5], null, v10, v1, 0
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_mul_lo_u32 v1, v10, v6
	v_dual_cndmask_b32 v7, v19, v16 :: v_dual_cndmask_b32 v6, v18, v11
	v_cmp_ne_u32_e32 vcc_lo, 0, v15
	v_add3_u32 v1, v5, v1, v8
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_dual_cndmask_b32 v6, v12, v6 :: v_dual_cndmask_b32 v7, v13, v7
	v_sub_co_u32 v13, vcc_lo, v2, v4
	v_sub_nc_u32_e32 v12, v3, v1
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_mul_lo_u32 v11, v6, s9
	v_mul_lo_u32 v5, v7, s8
	v_mad_u64_u32 v[8:9], null, v6, s8, 0
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_subrev_co_ci_u32_e64 v4, s0, s1, v12, vcc_lo
	v_sub_co_ci_u32_e32 v1, vcc_lo, v3, v1, vcc_lo
	v_sub_co_u32 v3, vcc_lo, v13, v10
	v_subrev_co_ci_u32_e64 v12, s0, 0, v4, vcc_lo
	v_cmp_ge_u32_e64 s0, v13, v10
	v_subrev_co_ci_u32_e32 v4, vcc_lo, s1, v4, vcc_lo
	v_cmp_le_u32_e32 vcc_lo, s1, v1
	v_add3_u32 v9, v9, v11, v5
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_4) | instid1(VALU_DEP_4)
	v_cndmask_b32_e64 v14, 0, -1, s0
	v_cmp_ge_u32_e64 s0, v3, v10
	v_cndmask_b32_e64 v17, 0, -1, vcc_lo
	v_cmp_eq_u32_e32 vcc_lo, s1, v12
	v_lshlrev_b64 v[8:9], 2, v[8:9]
	v_cndmask_b32_e64 v15, 0, -1, s0
	v_cmp_le_u32_e64 s0, s1, v12
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_cndmask_b32_e64 v16, 0, -1, s0
	v_cmp_eq_u32_e64 s0, s1, v1
	v_cndmask_b32_e32 v15, v16, v15, vcc_lo
	v_sub_co_u32 v10, vcc_lo, v3, v10
	v_subrev_co_ci_u32_e32 v4, vcc_lo, 0, v4, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_2) | instid1(SALU_CYCLE_1)
	v_cmp_ne_u32_e32 vcc_lo, 0, v15
	v_cndmask_b32_e64 v14, v17, v14, s0
	s_lshr_b64 s[0:1], s[8:9], 1
	s_sub_u32 s0, 0, s0
	v_dual_cndmask_b32 v4, v12, v4 :: v_dual_cndmask_b32 v3, v3, v10
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_cmp_ne_u32_e32 vcc_lo, 0, v14
	v_alignbit_b32 v12, s9, s8, 1
	s_subb_u32 s1, 0, s1
	v_cndmask_b32_e32 v4, v1, v4, vcc_lo
	v_cndmask_b32_e32 v3, v13, v3, vcc_lo
	v_add_co_u32 v1, vcc_lo, s4, v8
	v_add_co_ci_u32_e32 v5, vcc_lo, s5, v9, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[3:4], 4, v[3:4]
	v_cvt_f32_u32_e32 v8, s2
	v_add_co_u32 v3, vcc_lo, v1, v3
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_add_co_ci_u32_e32 v4, vcc_lo, v5, v4, vcc_lo
	v_cvt_f32_u32_e32 v1, v12
	global_load_b32 v5, v[3:4], off
	v_fmac_f32_e32 v1, 0x4f800000, v8
	v_rcp_f32_e32 v1, v1
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v1, 0x5f7ffffc, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v8, 0x2f800000, v1
	v_trunc_f32_e32 v8, v8
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_fmac_f32_e32 v1, 0xcf800000, v8
	v_cvt_u32_f32_e32 v8, v8
	v_cvt_u32_f32_e32 v1, v1
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_lo_u32 v10, s0, v8
	v_mul_hi_u32 v9, s0, v1
	v_mul_lo_u32 v11, s1, v1
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v9, v9, v10
	v_mul_lo_u32 v10, s0, v1
	v_add_nc_u32_e32 v9, v9, v11
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_hi_u32 v13, v1, v10
	v_mul_lo_u32 v11, v1, v9
	v_mul_hi_u32 v14, v1, v9
	v_mul_lo_u32 v16, v8, v10
	v_mul_hi_u32 v10, v8, v10
	v_mul_hi_u32 v15, v8, v9
	v_mul_lo_u32 v9, v8, v9
	v_add_co_u32 v11, vcc_lo, v13, v11
	v_add_co_ci_u32_e32 v13, vcc_lo, 0, v14, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v11, vcc_lo, v11, v16
	v_add_co_ci_u32_e32 v10, vcc_lo, v13, v10, vcc_lo
	v_add_co_ci_u32_e32 v11, vcc_lo, 0, v15, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v9, vcc_lo, v10, v9
	v_add_co_ci_u32_e32 v10, vcc_lo, 0, v11, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v1, vcc_lo, v1, v9
	v_add_co_ci_u32_e32 v8, vcc_lo, v8, v10, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_mul_hi_u32 v10, s0, v1
	v_mul_lo_u32 v11, s1, v1
	v_mul_lo_u32 v9, s0, v8
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v9, v10, v9
	v_mul_lo_u32 v10, s0, v1
	v_add_nc_u32_e32 v9, v9, v11
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_hi_u32 v13, v1, v10
	v_mul_lo_u32 v11, v1, v9
	v_mul_hi_u32 v14, v1, v9
	v_mul_lo_u32 v16, v8, v10
	v_mul_hi_u32 v10, v8, v10
	v_mul_hi_u32 v15, v8, v9
	v_mul_lo_u32 v9, v8, v9
	v_add_co_u32 v11, vcc_lo, v13, v11
	v_add_co_ci_u32_e32 v13, vcc_lo, 0, v14, vcc_lo
	v_lshlrev_b32_e32 v14, 1, v2
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v11, vcc_lo, v11, v16
	v_add_co_ci_u32_e32 v10, vcc_lo, v13, v10, vcc_lo
	v_add_co_ci_u32_e32 v11, vcc_lo, 0, v15, vcc_lo
	v_alignbit_b32 v2, v0, v2, 31
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v9, vcc_lo, v10, v9
	v_add_co_ci_u32_e32 v10, vcc_lo, 0, v11, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v11, vcc_lo, v1, v9
	v_add_co_ci_u32_e32 v13, vcc_lo, v8, v10, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_mul_hi_u32 v15, v14, v11
	v_mad_u64_u32 v[0:1], null, v2, v11, 0
	v_mad_u64_u32 v[8:9], null, v14, v13, 0
	v_mad_u64_u32 v[10:11], null, v2, v13, 0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v8, vcc_lo, v15, v8
	v_add_co_ci_u32_e32 v9, vcc_lo, 0, v9, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, v8, v0
	v_add_co_ci_u32_e32 v0, vcc_lo, v9, v1, vcc_lo
	v_add_co_ci_u32_e32 v1, vcc_lo, 0, v11, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v8, vcc_lo, v0, v10
	v_add_co_ci_u32_e32 v0, vcc_lo, 0, v1, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_lo_u32 v9, s2, v8
	v_mul_lo_u32 v10, v12, v0
	v_mad_u64_u32 v[0:1], null, v12, v8, 0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add3_u32 v8, v1, v10, v9
	v_sub_co_u32 v10, vcc_lo, v14, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_nc_u32_e32 v1, v2, v8
	v_subrev_co_ci_u32_e64 v9, s0, s2, v1, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_sub_co_u32 v11, s0, v10, v12
	v_sub_co_ci_u32_e32 v8, vcc_lo, v2, v8, vcc_lo
	v_subrev_co_ci_u32_e64 v13, s1, 0, v9, s0
	v_lshlrev_b64 v[0:1], 1, v[6:7]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_cmp_le_u32_e64 s1, s2, v13
	v_cmp_eq_u32_e32 vcc_lo, s2, v13
	v_mul_lo_u32 v18, v1, s8
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_cndmask_b32_e64 v14, 0, -1, s1
	v_cmp_ge_u32_e64 s1, v11, v12
	v_cndmask_b32_e64 v15, 0, -1, s1
	s_delay_alu instid0(VALU_DEP_1)
	v_cndmask_b32_e32 v14, v14, v15, vcc_lo
	v_subrev_co_ci_u32_e64 v9, vcc_lo, s2, v9, s0
	v_cmp_le_u32_e32 vcc_lo, s2, v8
	v_or_b32_e32 v15, 1, v0
	v_cmp_eq_u32_e64 s0, s2, v8
	v_cndmask_b32_e64 v16, 0, -1, vcc_lo
	v_cmp_ge_u32_e32 vcc_lo, v10, v12
	s_delay_alu instid0(VALU_DEP_4)
	v_mul_lo_u32 v19, v15, s9
	v_mad_u64_u32 v[1:2], null, v15, s8, 0
	v_cndmask_b32_e64 v17, 0, -1, vcc_lo
	v_sub_co_u32 v12, vcc_lo, v11, v12
	v_subrev_co_ci_u32_e32 v9, vcc_lo, 0, v9, vcc_lo
	v_cmp_ne_u32_e32 vcc_lo, 0, v14
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_1) | instid1(VALU_DEP_4)
	v_cndmask_b32_e64 v14, v16, v17, s0
	v_add3_u32 v2, v2, v19, v18
	v_cndmask_b32_e32 v9, v13, v9, vcc_lo
	v_cndmask_b32_e32 v11, v11, v12, vcc_lo
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_cmp_ne_u32_e32 vcc_lo, 0, v14
	v_lshlrev_b64 v[1:2], 1, v[1:2]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_dual_cndmask_b32 v9, v8, v9 :: v_dual_cndmask_b32 v8, v10, v11
	v_and_b32_e32 v1, -4, v1
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[8:9], 2, v[8:9]
	v_add_co_u32 v1, vcc_lo, s6, v1
	v_add_co_ci_u32_e32 v2, vcc_lo, s7, v2, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v1, vcc_lo, v1, v8
	v_add_co_ci_u32_e32 v2, vcc_lo, v2, v9, vcc_lo
	s_waitcnt vmcnt(0)
	global_store_b32 v[1:2], v5, off
	global_load_b32 v5, v[3:4], off offset:4
	s_waitcnt vmcnt(0)
	global_store_b32 v[1:2], v5, off offset:4
	global_load_b32 v5, v[3:4], off offset:8
	v_alignbit_b32 v1, v7, v6, 31
	v_mul_lo_u32 v7, v0, s9
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v6, v1, s8
	v_mad_u64_u32 v[1:2], null, v0, s8, 0
	v_add3_u32 v2, v2, v7, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[0:1], 1, v[1:2]
	v_add_co_u32 v0, vcc_lo, s6, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_ci_u32_e32 v1, vcc_lo, s7, v1, vcc_lo
	v_add_co_u32 v0, vcc_lo, v0, v8
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v1, vcc_lo, v1, v9, vcc_lo
	s_waitcnt vmcnt(0)
	global_store_b32 v[0:1], v5, off
	global_load_b32 v2, v[3:4], off offset:12
	s_waitcnt vmcnt(0)
	global_store_b32 v[0:1], v2, off offset:4
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z15transformKernelPKfPfmm
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 32
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 25
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z15transformKernelPKfPfmm, .Lfunc_end0-_Z15transformKernelPKfPfmm
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 2604
; NumSgprs: 18
; NumVgprs: 25
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 3
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 25
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .offset:         16
        .size:           8
        .value_kind:     by_value
      - .offset:         24
        .size:           8
        .value_kind:     by_value
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 32
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z15transformKernelPKfPfmm
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z15transformKernelPKfPfmm.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     25
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
