#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ buffer_compute(int, char **, char **, char **, char **);
int /*<<< orphan*/ buffer_load(int, char *, char **, char *, char **);
int /*<<< orphan*/ buffer_store(int, char *, char **, char *, char **);
void workload(char *SEQA, char *SEQB, char *alignedA, char *alignedB,
              int num_jobs) {
#pragma HLS INTERFACE m_axi port = SEQA offset = slave bundle = gmem
#pragma HLS INTERFACE m_axi port = SEQB offset = slave bundle = gmem
#pragma HLS INTERFACE m_axi port = alignedA offset = slave bundle = gmem
#pragma HLS INTERFACE m_axi port = alignedB offset = slave bundle = gmem
#pragma HLS INTERFACE s_axilite port = SEQA bundle = control
#pragma HLS INTERFACE s_axilite port = SEQB bundle = control
#pragma HLS INTERFACE s_axilite port = alignedA bundle = control
#pragma HLS INTERFACE s_axilite port = alignedB bundle = control
#pragma HLS INTERFACE s_axilite port = num_jobs bundle = control
#pragma HLS INTERFACE s_axilite port = return bundle = control
  int num_batches = num_jobs / 256;
  char seqA_buf_x[64][128 * ((256) / (64))];
#pragma HLS ARRAY_PARTITION variable = seqA_buf_x complete dim = 1
  char seqA_buf_y[64][128 * ((256) / (64))];
#pragma HLS ARRAY_PARTITION variable = seqA_buf_y complete dim = 1
  char seqB_buf_x[64][128 * ((256) / (64))];
#pragma HLS ARRAY_PARTITION variable = seqB_buf_x complete dim = 1
  char seqB_buf_y[64][128 * ((256) / (64))];
#pragma HLS ARRAY_PARTITION variable = seqB_buf_y complete dim = 1
  char alignedA_buf_x[64][(128 + 128) * ((256) / (64))];
#pragma HLS ARRAY_PARTITION variable = alignedA_buf_x complete dim = 1
  char alignedA_buf_y[64][(128 + 128) * ((256) / (64))];
#pragma HLS ARRAY_PARTITION variable = alignedA_buf_y complete dim = 1
  char alignedB_buf_x[64][(128 + 128) * ((256) / (64))];
#pragma HLS ARRAY_PARTITION variable = alignedB_buf_x complete dim = 1
  char alignedB_buf_y[64][(128 + 128) * ((256) / (64))];
#pragma HLS ARRAY_PARTITION variable = alignedB_buf_y complete dim = 1
  int i;
  for (i = 0; i < num_batches + 2; i++) {
    int load_flag = i >= 0 && i < num_batches;
    int compute_flag = i >= 1 && i < num_batches + 1;
    int store_flag = i >= 2 && i < num_batches + 2;
    if (i % 2 == 0) {
      buffer_store(store_flag, alignedA + (i - 2) * (128 + 128) * 256,
                   alignedA_buf_x, alignedB + (i - 2) * (128 + 128) * 256,
                   alignedB_buf_x);
      buffer_load(load_flag, SEQA + i * 128 * 256, seqA_buf_x,
                  SEQB + i * 128 * 256, seqB_buf_x);
      buffer_compute(compute_flag, seqA_buf_y, seqB_buf_y, alignedA_buf_y,
                     alignedB_buf_y);
    } else {
      buffer_store(store_flag, alignedA + (i - 2) * (128 + 128) * 256,
                   alignedA_buf_y, alignedB + (i - 2) * (128 + 128) * 256,
                   alignedB_buf_y);
      buffer_load(load_flag, SEQA + i * 128 * 256, seqA_buf_y,
                  SEQB + i * 128 * 256, seqB_buf_y);
      buffer_compute(compute_flag, seqA_buf_x, seqB_buf_x, alignedA_buf_x,
                     alignedB_buf_x);
    }
  }
  return;
}


x86 assembly (clang, -O0):
<workload>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60050,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %eax,-0x28(%rbp)
movl   $0x0,-0x60034(%rbp)
mov    -0x60034(%rbp),%eax
mov    -0x28(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
jge    13c8 <workload+0x298>
xor    %eax,%eax
cmpl   $0x0,-0x60034(%rbp)
mov    %al,-0x60041(%rbp)
jl     11a2 <workload+0x72>
mov    -0x60034(%rbp),%eax
cmp    -0x28(%rbp),%eax
setl   %al
mov    %al,-0x60041(%rbp)
mov    -0x60041(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x60038(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0x60034(%rbp)
mov    %al,-0x60042(%rbp)
jl     11df <workload+0xaf>
mov    -0x60034(%rbp),%eax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
setl   %al
mov    %al,-0x60042(%rbp)
mov    -0x60042(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x6003c(%rbp)
xor    %eax,%eax
cmpl   $0x2,-0x60034(%rbp)
mov    %al,-0x60043(%rbp)
jl     121c <workload+0xec>
mov    -0x60034(%rbp),%eax
mov    -0x28(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
setl   %al
mov    %al,-0x60043(%rbp)
mov    -0x60043(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x60040(%rbp)
mov    -0x60034(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    12fc <workload+0x1cc>
mov    -0x60040(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x60034(%rbp),%eax
sub    $0x2,%eax
shl    $0x8,%eax
shl    $0x8,%eax
cltq
add    %rax,%rsi
lea    -0x30030(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x60034(%rbp),%eax
sub    $0x2,%eax
shl    $0x8,%eax
shl    $0x8,%eax
cltq
add    %rax,%rcx
lea    -0x50030(%rbp),%r8
call   1050 <buffer_store@plt>
mov    -0x60038(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0x60034(%rbp),%eax
shl    $0x7,%eax
shl    $0x8,%eax
cltq
add    %rax,%rsi
lea    -0x8030(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x60034(%rbp),%eax
shl    $0x7,%eax
shl    $0x8,%eax
cltq
add    %rax,%rcx
lea    -0x18030(%rbp),%r8
call   1030 <buffer_load@plt>
mov    -0x6003c(%rbp),%edi
lea    -0x10030(%rbp),%rsi
lea    -0x20030(%rbp),%rdx
lea    -0x40030(%rbp),%rcx
lea    -0x60030(%rbp),%r8
call   1040 <buffer_compute@plt>
jmp    13af <workload+0x27f>
mov    -0x60040(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x60034(%rbp),%eax
sub    $0x2,%eax
shl    $0x8,%eax
shl    $0x8,%eax
cltq
add    %rax,%rsi
lea    -0x40030(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x60034(%rbp),%eax
sub    $0x2,%eax
shl    $0x8,%eax
shl    $0x8,%eax
cltq
add    %rax,%rcx
lea    -0x60030(%rbp),%r8
call   1050 <buffer_store@plt>
mov    -0x60038(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0x60034(%rbp),%eax
shl    $0x7,%eax
shl    $0x8,%eax
cltq
add    %rax,%rsi
lea    -0x10030(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x60034(%rbp),%eax
shl    $0x7,%eax
shl    $0x8,%eax
cltq
add    %rax,%rcx
lea    -0x20030(%rbp),%r8
call   1030 <buffer_load@plt>
mov    -0x6003c(%rbp),%edi
lea    -0x8030(%rbp),%rsi
lea    -0x18030(%rbp),%rdx
lea    -0x30030(%rbp),%rcx
lea    -0x50030(%rbp),%r8
call   1040 <buffer_compute@plt>
jmp    13b4 <workload+0x284>
mov    -0x60034(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60034(%rbp)
jmp    1167 <workload+0x37>
add    $0x60050,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<workload>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x60028,%rsp
mov    %rcx,0x18(%rsp)
mov    %rdx,0x10(%rsp)
mov    %rsi,0x8(%rsp)
lea    0xff(%r8),%eax
test   %r8d,%r8d
cmovns %r8d,%eax
cmp    $0xfffffe01,%r8d
jl     12a5 <workload+0x175>
mov    %rdi,%rbx
sar    $0x8,%eax
movslq %eax,%r14
test   %r14d,%r14d
mov    $0xffffffff,%r15d
cmovns %r14d,%r15d
add    $0x2,%r15d
xor    %r12d,%r12d
jmp    11fd <workload+0xcd>
nopw   0x0(%rax,%rax,1)
lea    0x40020(%rsp),%rdx
lea    0x20020(%rsp),%r8
call   1050 <buffer_store@plt>
mov    %r12d,%ecx
shl    $0xf,%ecx
lea    (%rbx,%rcx,1),%rsi
add    0x8(%rsp),%rcx
mov    %ebp,%edi
lea    0x10020(%rsp),%rdx
lea    0x20(%rsp),%r8
call   1030 <buffer_load@plt>
mov    %r13d,%edi
lea    0x18020(%rsp),%rsi
lea    0x8020(%rsp),%rdx
lea    0x50020(%rsp),%rcx
lea    0x30020(%rsp),%r8
call   1040 <buffer_compute@plt>
add    $0x1,%r12
cmp    %r15,%r12
je     12a5 <workload+0x175>
test   %r12,%r12
setne  %al
xor    %ebp,%ebp
cmp    %r14,%r12
setl   %bpl
setle  %cl
and    %al,%cl
movzbl %cl,%r13d
xor    %edi,%edi
cmp    $0x2,%r12
setae  %dil
mov    %r12d,%eax
shl    $0x10,%eax
add    $0xfffe0000,%eax
movslq %eax,%rcx
mov    0x10(%rsp),%rax
lea    (%rax,%rcx,1),%rsi
add    0x18(%rsp),%rcx
test   $0x1,%r12b
jne    1190 <workload+0x60>
lea    0x50020(%rsp),%rdx
lea    0x30020(%rsp),%r8
call   1050 <buffer_store@plt>
mov    %r12d,%ecx
shl    $0xf,%ecx
lea    (%rbx,%rcx,1),%rsi
add    0x8(%rsp),%rcx
mov    %ebp,%edi
lea    0x18020(%rsp),%rdx
lea    0x8020(%rsp),%r8
call   1030 <buffer_load@plt>
mov    %r13d,%edi
lea    0x10020(%rsp),%rsi
lea    0x20(%rsp),%rdx
lea    0x40020(%rsp),%rcx
lea    0x20020(%rsp),%r8
jmp    11eb <workload+0xbb>
add    $0x60028,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @workload(i8* %0, i8* %1, i8* %2, i8* %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca [64 x [512 x i8]]
%13 = alloca [64 x [512 x i8]]
%14 = alloca [64 x [512 x i8]]
%15 = alloca [64 x [512 x i8]]
%16 = alloca [64 x [1024 x i8]]
%17 = alloca [64 x [1024 x i8]]
%18 = alloca [64 x [1024 x i8]]
%19 = alloca [64 x [1024 x i8]]
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%24 = load i32, i32* %10
%25 = sdiv i32 %24, 256
store i32 %25, i32* %11
store i32 0, i32* %20
br label %26
26: ; preds = %163, %5
%27 = load i32, i32* %20
%28 = load i32, i32* %11
%29 = add nsw i32 %28, 2
%30 = icmp slt i32 %27, %29
br i1 %30, label %31, label %166
31: ; preds = %26
%32 = load i32, i32* %20
%33 = icmp sge i32 %32, 0
br i1 %33, label %34, label %38
34: ; preds = %31
%35 = load i32, i32* %20
%36 = load i32, i32* %11
%37 = icmp slt i32 %35, %36
br label %38
38: ; preds = %34, %31
%39 = phi i1 [ false, %31 ], [ %37, %34 ]
%40 = zext i1 %39 to i32
store i32 %40, i32* %21
%41 = load i32, i32* %20
%42 = icmp sge i32 %41, 1
br i1 %42, label %43, label %48
43: ; preds = %38
%44 = load i32, i32* %20
%45 = load i32, i32* %11
%46 = add nsw i32 %45, 1
%47 = icmp slt i32 %44, %46
br label %48
48: ; preds = %43, %38
%49 = phi i1 [ false, %38 ], [ %47, %43 ]
%50 = zext i1 %49 to i32
store i32 %50, i32* %22
%51 = load i32, i32* %20
%52 = icmp sge i32 %51, 2
br i1 %52, label %53, label %58
53: ; preds = %48
%54 = load i32, i32* %20
%55 = load i32, i32* %11
%56 = add nsw i32 %55, 2
%57 = icmp slt i32 %54, %56
br label %58
58: ; preds = %53, %48
%59 = phi i1 [ false, %48 ], [ %57, %53 ]
%60 = zext i1 %59 to i32
store i32 %60, i32* %23
%61 = load i32, i32* %20
%62 = srem i32 %61, 2
%63 = icmp eq i32 %62, 0
br i1 %63, label %64, label %113
64: ; preds = %58
%65 = load i32, i32* %23
%66 = load i8*, i8** %8
%67 = load i32, i32* %20
%68 = sub nsw i32 %67, 2
%69 = mul nsw i32 %68, 256
%70 = mul nsw i32 %69, 256
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds i8, i8* %66, i64 %71
%73 = getelementptr inbounds [64 x [1024 x i8]], [64 x [1024 x i8]]* %16, i64 0, i64 0
%74 = bitcast [1024 x i8]* %73 to i8**
%75 = load i8*, i8** %9
%76 = load i32, i32* %20
%77 = sub nsw i32 %76, 2
%78 = mul nsw i32 %77, 256
%79 = mul nsw i32 %78, 256
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds i8, i8* %75, i64 %80
%82 = getelementptr inbounds [64 x [1024 x i8]], [64 x [1024 x i8]]* %18, i64 0, i64 0
%83 = bitcast [1024 x i8]* %82 to i8**
%84 = call i32 @buffer_store(i32 %65, i8* %72, i8** %74, i8* %81, i8** %83)
%85 = load i32, i32* %21
%86 = load i8*, i8** %6
%87 = load i32, i32* %20
%88 = mul nsw i32 %87, 128
%89 = mul nsw i32 %88, 256
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds i8, i8* %86, i64 %90
%92 = getelementptr inbounds [64 x [512 x i8]], [64 x [512 x i8]]* %12, i64 0, i64 0
%93 = bitcast [512 x i8]* %92 to i8**
%94 = load i8*, i8** %7
%95 = load i32, i32* %20
%96 = mul nsw i32 %95, 128
%97 = mul nsw i32 %96, 256
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds i8, i8* %94, i64 %98
%100 = getelementptr inbounds [64 x [512 x i8]], [64 x [512 x i8]]* %14, i64 0, i64 0
%101 = bitcast [512 x i8]* %100 to i8**
%102 = call i32 @buffer_load(i32 %85, i8* %91, i8** %93, i8* %99, i8** %101)
%103 = load i32, i32* %22
%104 = getelementptr inbounds [64 x [512 x i8]], [64 x [512 x i8]]* %13, i64 0, i64 0
%105 = bitcast [512 x i8]* %104 to i8**
%106 = getelementptr inbounds [64 x [512 x i8]], [64 x [512 x i8]]* %15, i64 0, i64 0
%107 = bitcast [512 x i8]* %106 to i8**
%108 = getelementptr inbounds [64 x [1024 x i8]], [64 x [1024 x i8]]* %17, i64 0, i64 0
%109 = bitcast [1024 x i8]* %108 to i8**
%110 = getelementptr inbounds [64 x [1024 x i8]], [64 x [1024 x i8]]* %19, i64 0, i64 0
%111 = bitcast [1024 x i8]* %110 to i8**
%112 = call i32 @buffer_compute(i32 %103, i8** %105, i8** %107, i8** %109, i8** %111)
br label %162
113: ; preds = %58
%114 = load i32, i32* %23
%115 = load i8*, i8** %8
%116 = load i32, i32* %20
%117 = sub nsw i32 %116, 2
%118 = mul nsw i32 %117, 256
%119 = mul nsw i32 %118, 256
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds i8, i8* %115, i64 %120
%122 = getelementptr inbounds [64 x [1024 x i8]], [64 x [1024 x i8]]* %17, i64 0, i64 0
%123 = bitcast [1024 x i8]* %122 to i8**
%124 = load i8*, i8** %9
%125 = load i32, i32* %20
%126 = sub nsw i32 %125, 2
%127 = mul nsw i32 %126, 256
%128 = mul nsw i32 %127, 256
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds i8, i8* %124, i64 %129
%131 = getelementptr inbounds [64 x [1024 x i8]], [64 x [1024 x i8]]* %19, i64 0, i64 0
%132 = bitcast [1024 x i8]* %131 to i8**
%133 = call i32 @buffer_store(i32 %114, i8* %121, i8** %123, i8* %130, i8** %132)
%134 = load i32, i32* %21
%135 = load i8*, i8** %6
%136 = load i32, i32* %20
%137 = mul nsw i32 %136, 128
%138 = mul nsw i32 %137, 256
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds i8, i8* %135, i64 %139
%141 = getelementptr inbounds [64 x [512 x i8]], [64 x [512 x i8]]* %13, i64 0, i64 0
%142 = bitcast [512 x i8]* %141 to i8**
%143 = load i8*, i8** %7
%144 = load i32, i32* %20
%145 = mul nsw i32 %144, 128
%146 = mul nsw i32 %145, 256
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds i8, i8* %143, i64 %147
%149 = getelementptr inbounds [64 x [512 x i8]], [64 x [512 x i8]]* %15, i64 0, i64 0
%150 = bitcast [512 x i8]* %149 to i8**
%151 = call i32 @buffer_load(i32 %134, i8* %140, i8** %142, i8* %148, i8** %150)
%152 = load i32, i32* %22
%153 = getelementptr inbounds [64 x [512 x i8]], [64 x [512 x i8]]* %12, i64 0, i64 0
%154 = bitcast [512 x i8]* %153 to i8**
%155 = getelementptr inbounds [64 x [512 x i8]], [64 x [512 x i8]]* %14, i64 0, i64 0
%156 = bitcast [512 x i8]* %155 to i8**
%157 = getelementptr inbounds [64 x [1024 x i8]], [64 x [1024 x i8]]* %16, i64 0, i64 0
%158 = bitcast [1024 x i8]* %157 to i8**
%159 = getelementptr inbounds [64 x [1024 x i8]], [64 x [1024 x i8]]* %18, i64 0, i64 0
%160 = bitcast [1024 x i8]* %159 to i8**
%161 = call i32 @buffer_compute(i32 %152, i8** %154, i8** %156, i8** %158, i8** %160)
br label %162
162: ; preds = %113, %64
br label %163
163: ; preds = %162
%164 = load i32, i32* %20
%165 = add nsw i32 %164, 1
store i32 %165, i32* %20
br label %26
166: ; preds = %26
ret void
}

LLVM IR (-O2):
define void @workload(i8* %0, i8* %1, i8* %2, i8* %3, i32 %4) {
%6 = alloca [64 x [512 x i8]]
%7 = alloca [64 x [512 x i8]]
%8 = alloca [64 x [512 x i8]]
%9 = alloca [64 x [512 x i8]]
%10 = alloca [64 x [1024 x i8]]
%11 = alloca [64 x [1024 x i8]]
%12 = alloca [64 x [1024 x i8]]
%13 = alloca [64 x [1024 x i8]]
%14 = sdiv i32 %4, 256
%15 = getelementptr inbounds [64 x [512 x i8]], [64 x [512 x i8]]* %6, i64 0, i64 0, i64 0
%16 = getelementptr inbounds [64 x [512 x i8]], [64 x [512 x i8]]* %7, i64 0, i64 0, i64 0
%17 = getelementptr inbounds [64 x [512 x i8]], [64 x [512 x i8]]* %8, i64 0, i64 0, i64 0
%18 = getelementptr inbounds [64 x [512 x i8]], [64 x [512 x i8]]* %9, i64 0, i64 0, i64 0
%19 = getelementptr inbounds [64 x [1024 x i8]], [64 x [1024 x i8]]* %10, i64 0, i64 0, i64 0
%20 = getelementptr inbounds [64 x [1024 x i8]], [64 x [1024 x i8]]* %11, i64 0, i64 0, i64 0
%21 = getelementptr inbounds [64 x [1024 x i8]], [64 x [1024 x i8]]* %12, i64 0, i64 0, i64 0
%22 = getelementptr inbounds [64 x [1024 x i8]], [64 x [1024 x i8]]* %13, i64 0, i64 0, i64 0
%23 = icmp sgt i32 %4, -512
br i1 %23, label %24, label %74
24: ; preds = %5
%25 = bitcast [64 x [1024 x i8]]* %11 to i8**
%26 = bitcast [64 x [1024 x i8]]* %13 to i8**
%27 = bitcast [64 x [512 x i8]]* %7 to i8**
%28 = bitcast [64 x [512 x i8]]* %9 to i8**
%29 = bitcast [64 x [512 x i8]]* %6 to i8**
%30 = bitcast [64 x [512 x i8]]* %8 to i8**
%31 = bitcast [64 x [1024 x i8]]* %10 to i8**
%32 = bitcast [64 x [1024 x i8]]* %12 to i8**
%33 = sext i32 %14 to i64
%34 = call i32 @llvm.smax.i32(i32 %14, i32 -1)
%35 = add nsw i32 %34, 2
%36 = zext i32 %35 to i64
br label %37
37: ; preds = %24, %71
%38 = phi i64 [ 0, %24 ], [ %72, %71 ]
%39 = icmp slt i64 %38, %33
%40 = zext i1 %39 to i32
%41 = icmp ne i64 %38, 0
%42 = icmp sle i64 %38, %33
%43 = and i1 %41, %42
%44 = zext i1 %43 to i32
%45 = icmp ugt i64 %38, 1
%46 = zext i1 %45 to i32
%47 = trunc i64 %38 to i32
%48 = and i32 %47, 1
%49 = icmp eq i32 %48, 0
%50 = shl i32 %47, 16
%51 = add i32 %50, -131072
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i8, i8* %2, i64 %52
%54 = getelementptr inbounds i8, i8* %3, i64 %52
br i1 %49, label %55, label %63
55: ; preds = %37
%56 = call i32 @buffer_store(i32 %46, i8* %53, i8** %31, i8* %54, i8** %32)
%57 = shl i64 %38, 15
%58 = and i64 %57, 4294934528
%59 = getelementptr inbounds i8, i8* %0, i64 %58
%60 = getelementptr inbounds i8, i8* %1, i64 %58
%61 = call i32 @buffer_load(i32 %40, i8* %59, i8** %29, i8* %60, i8** %30)
%62 = call i32 @buffer_compute(i32 %44, i8** %27, i8** %28, i8** %25, i8** %26)
br label %71
63: ; preds = %37
%64 = call i32 @buffer_store(i32 %46, i8* %53, i8** %25, i8* %54, i8** %26)
%65 = shl i64 %38, 15
%66 = and i64 %65, 4294934528
%67 = getelementptr inbounds i8, i8* %0, i64 %66
%68 = getelementptr inbounds i8, i8* %1, i64 %66
%69 = call i32 @buffer_load(i32 %40, i8* %67, i8** %27, i8* %68, i8** %28)
%70 = call i32 @buffer_compute(i32 %44, i8** %29, i8** %30, i8** %31, i8** %32)
br label %71
71: ; preds = %63, %55
%72 = add nuw nsw i64 %38, 1
%73 = icmp eq i64 %72, %36
br i1 %73, label %74, label %37
74: ; preds = %71, %5
ret void
}