#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*/ Expand_1D(double *, long, double *, double *, long, short);
int /*<<< orphan*/ GetColumn(float *, long, long, long, double *, long);
int /*<<< orphan*/ GetRow(float *, long, long, long, double *, long);
int /*<<< orphan*/ MessageDisplay(char *);
int /*<<< orphan*/ PutColumn(float *, long, long, long, double *, long);
int /*<<< orphan*/ PutRow(float *, long, long, long, double *, long);
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(size_t);
int /*<<< orphan*/ memcpy(float *, float *, size_t);
extern int Expand_2D(float *In, long NxIn, long NyIn, float *Out, double h[],
                     long nh, short IsCentered) {
  double *InBuffer;
  double *OutBuffer;
  long kx, ky;
  long NxOut;
  long NyOut;
  if (NxIn <= 1L)
    NxOut = 1L;
  else
    NxOut = NxIn * 2L;
  if (NyIn <= 1L)
    NyOut = 1L;
  else
    NyOut = NyIn * 2L;
  if (NxIn > 1L) {
    InBuffer = (double *)malloc((size_t)(NxIn * (long)sizeof(double)));
    if (InBuffer == (double *)NULL) {
      MessageDisplay("Unable to allocate memory");
      return ((!((int)(0 != 0))));
    }
    OutBuffer = (double *)malloc((size_t)(NxOut * (long)sizeof(double)));
    if (OutBuffer == (double *)NULL) {
      free(InBuffer);
      MessageDisplay("Unable to allocate memory");
      return ((!((int)(0 != 0))));
    }
    for (ky = 0L; ky < NyIn; ky++) {
      GetRow(In, NxIn, NyIn, ky, InBuffer, NxIn);
      Expand_1D(InBuffer, NxIn, OutBuffer, h, nh, IsCentered);
      PutRow(Out, NxOut, NyOut, ky, OutBuffer, NxOut);
    }
    free(InBuffer);
    free(OutBuffer);
  } else
    memcpy(Out, In, (size_t)(NxIn * NyIn * (long)sizeof(float)));
  if (NyIn > 1L) {
    InBuffer = (double *)malloc((size_t)(NyIn * (long)sizeof(double)));
    if (InBuffer == (double *)NULL) {
      MessageDisplay("Unable to allocate memory");
      return ((!((int)(0 != 0))));
    }
    OutBuffer = (double *)malloc((size_t)(NyOut * (long)sizeof(double)));
    if (OutBuffer == (double *)NULL) {
      free(InBuffer);
      MessageDisplay("Unable to allocate memory");
      return ((!((int)(0 != 0))));
    }
    for (kx = 0L; kx < NxOut; kx++) {
      GetColumn(Out, NxOut, NyOut, kx, InBuffer, NyIn);
      Expand_1D(InBuffer, NyIn, OutBuffer, h, nh, IsCentered);
      PutColumn(Out, NxOut, NyOut, kx, OutBuffer, NyOut);
    }
    free(InBuffer);
    free(OutBuffer);
  }
  return ((!((int)(0 != 0))));
}


x86 assembly (clang, -O0):
<Expand_2D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x10(%rbp),%ax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
cmpq   $0x1,-0x18(%rbp)
jg     11cc <Expand_2D+0x3c>
movq   $0x1,-0x60(%rbp)
jmp    11d8 <Expand_2D+0x48>
mov    -0x18(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x60(%rbp)
cmpq   $0x1,-0x20(%rbp)
jg     11f0 <Expand_2D+0x60>
movq   $0x1,-0x68(%rbp)
jmp    11fc <Expand_2D+0x6c>
mov    -0x20(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x68(%rbp)
cmpq   $0x1,-0x18(%rbp)
jle    130e <Expand_2D+0x17e>
mov    -0x18(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    123b <Expand_2D+0xab>
lea    0xdd6(%rip),%rdi
call   1080 <MessageDisplay@plt>
movl   $0x1,-0x4(%rbp)
jmp    143c <Expand_2D+0x2ac>
mov    -0x60(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jne    1278 <Expand_2D+0xe8>
mov    -0x40(%rbp),%rdi
call   1040 <free@plt>
lea    0xd99(%rip),%rdi
call   1080 <MessageDisplay@plt>
movl   $0x1,-0x4(%rbp)
jmp    143c <Expand_2D+0x2ac>
movq   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    12f7 <Expand_2D+0x167>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x58(%rbp),%rcx
mov    -0x40(%rbp),%r8
mov    -0x18(%rbp),%r9
call   1090 <GetRow@plt>
mov    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x38(%rbp),%r8
movswl 0x10(%rbp),%r9d
call   10b0 <Expand_1D@plt>
mov    -0x28(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x58(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    -0x60(%rbp),%r9
call   10a0 <PutRow@plt>
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
jmp    1280 <Expand_2D+0xf0>
mov    -0x40(%rbp),%rdi
call   1040 <free@plt>
mov    -0x48(%rbp),%rdi
call   1040 <free@plt>
jmp    1328 <Expand_2D+0x198>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
imul   -0x20(%rbp),%rdx
shl    $0x2,%rdx
call   1050 <memcpy@plt>
cmpq   $0x1,-0x20(%rbp)
jle    1435 <Expand_2D+0x2a5>
mov    -0x20(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    1367 <Expand_2D+0x1d7>
lea    0xcaa(%rip),%rdi
call   1080 <MessageDisplay@plt>
movl   $0x1,-0x4(%rbp)
jmp    143c <Expand_2D+0x2ac>
mov    -0x68(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jne    13a4 <Expand_2D+0x214>
mov    -0x40(%rbp),%rdi
call   1040 <free@plt>
lea    0xc6d(%rip),%rdi
call   1080 <MessageDisplay@plt>
movl   $0x1,-0x4(%rbp)
jmp    143c <Expand_2D+0x2ac>
movq   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%rax
cmp    -0x60(%rbp),%rax
jge    1423 <Expand_2D+0x293>
mov    -0x28(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x50(%rbp),%rcx
mov    -0x40(%rbp),%r8
mov    -0x20(%rbp),%r9
call   1030 <GetColumn@plt>
mov    -0x40(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x38(%rbp),%r8
movswl 0x10(%rbp),%r9d
call   10b0 <Expand_1D@plt>
mov    -0x28(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x50(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    -0x68(%rbp),%r9
call   1060 <PutColumn@plt>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    13ac <Expand_2D+0x21c>
mov    -0x40(%rbp),%rdi
call   1040 <free@plt>
mov    -0x48(%rbp),%rdi
call   1040 <free@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Expand_2D>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9,%rbp
mov    %r8,0x28(%rsp)
mov    %rcx,%r13
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%rsi
lea    (%rdx,%rdx,1),%r12
cmp    $0x2,%rdx
mov    $0x1,%eax
cmovl  %rax,%r12
lea    (%r14,%r14,1),%r15
cmp    $0x2,%r14
cmovl  %rax,%r15
jl     12d3 <Expand_2D+0x143>
mov    %rsi,0x30(%rsp)
mov    %rbp,0x18(%rsp)
lea    0x0(,%r14,8),%rdi
call   1070 <malloc@plt>
test   %rax,%rax
je     13e3 <Expand_2D+0x253>
mov    %rax,%rbp
mov    %r12,(%rsp)
lea    0x0(,%r15,8),%rdi
call   1070 <malloc@plt>
test   %rax,%rax
je     13d6 <Expand_2D+0x246>
test   %rbx,%rbx
mov    %r13,0x10(%rsp)
mov    %rbx,%rcx
mov    %r15,0x8(%rsp)
mov    %rbp,%r12
mov    0x30(%rsp),%rbp
mov    %rax,%rbx
jle    129f <Expand_2D+0x10f>
xor    %r13d,%r13d
movswl 0x70(%rsp),%eax
mov    %eax,0x24(%rsp)
nopl   0x0(%rax,%rax,1)
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %rcx,%r15
mov    %rcx,%rdx
mov    %r13,%rcx
mov    %r12,%r8
mov    %r14,%r9
call   1090 <GetRow@plt>
mov    %r12,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    0x28(%rsp),%rcx
mov    0x18(%rsp),%r8
mov    0x24(%rsp),%r9d
call   10b0 <Expand_1D@plt>
mov    0x10(%rsp),%rdi
mov    0x8(%rsp),%rsi
mov    (%rsp),%rdx
mov    %r13,%rcx
mov    %rbx,%r8
mov    %rsi,%r9
call   10a0 <PutRow@plt>
mov    %r15,%rcx
add    $0x1,%r13
cmp    %r13,%rcx
jne    1240 <Expand_2D+0xb0>
mov    %r12,%rdi
mov    %rcx,%r14
call   1040 <free@plt>
mov    %rbx,%rdi
call   1040 <free@plt>
mov    0x18(%rsp),%rbp
mov    0x10(%rsp),%r13
mov    %r14,%rbx
mov    (%rsp),%r12
mov    0x8(%rsp),%r15
cmp    $0x2,%rbx
jge    12f0 <Expand_2D+0x160>
jmp    13ef <Expand_2D+0x25f>
imul   %rbx,%r14
shl    $0x2,%r14
mov    %r13,%rdi
mov    %r14,%rdx
call   1050 <memcpy@plt>
cmp    $0x2,%rbx
jl     13ef <Expand_2D+0x25f>
lea    0x0(,%rbx,8),%rdi
call   1070 <malloc@plt>
test   %rax,%rax
je     13e3 <Expand_2D+0x253>
mov    %rax,%r14
mov    %rbp,0x18(%rsp)
lea    0x0(,%r12,8),%rdi
call   1070 <malloc@plt>
test   %rax,%rax
je     13db <Expand_2D+0x24b>
test   %r15,%r15
mov    %r14,%rbp
mov    %rax,(%rsp)
jle    13c3 <Expand_2D+0x233>
mov    %r13,%rcx
mov    %r15,%r13
mov    %r12,%r14
mov    %rbx,%r15
mov    %rcx,%r12
xor    %ebx,%ebx
movswl 0x70(%rsp),%eax
mov    %eax,0x8(%rsp)
mov    %rbp,0x10(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r12,%rdi
mov    %r13,%rsi
mov    %r14,%rdx
mov    %rbx,%rcx
mov    %rbp,%r8
mov    %r15,%r9
call   1030 <GetColumn@plt>
mov    %rbp,%rdi
mov    %r15,%rsi
mov    %r15,%rbp
mov    (%rsp),%r15
mov    %r15,%rdx
mov    0x28(%rsp),%rcx
mov    0x18(%rsp),%r8
mov    0x8(%rsp),%r9d
call   10b0 <Expand_1D@plt>
mov    %r12,%rdi
mov    %r13,%rsi
mov    %r14,%rdx
mov    %rbx,%rcx
mov    %r15,%r8
mov    %rbp,%r15
mov    0x10(%rsp),%rbp
mov    %r14,%r9
call   1060 <PutColumn@plt>
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1360 <Expand_2D+0x1d0>
mov    %rbp,%rdi
call   1040 <free@plt>
mov    (%rsp),%rdi
call   1040 <free@plt>
jmp    13ef <Expand_2D+0x25f>
mov    %rbp,%rdi
jmp    13de <Expand_2D+0x24e>
mov    %r14,%rdi
call   1040 <free@plt>
lea    0xc16(%rip),%rdi
call   1080 <MessageDisplay@plt>
mov    $0x1,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [26 x i8] c"Unable to allocate memory\00"
define i32 @Expand_2D(float* %0, i64 %1, i64 %2, float* %3, double* %4, i64 %5, i16 signext %6) {
%8 = shl nsw i64 %1, 1
%9 = icmp sgt i64 %1, 1
%10 = select i1 %9, i64 %8, i64 1
%11 = shl nsw i64 %2, 1
%12 = icmp sgt i64 %2, 1
%13 = select i1 %12, i64 %11, i64 1
br i1 %9, label %14, label %41
14: ; preds = %7
%15 = shl nsw i64 %1, 3
%16 = tail call i64 @malloc(i64 %15)
%17 = inttoptr i64 %16 to double*
%18 = icmp eq i64 %16, 0
br i1 %18, label %19, label %21
19: ; preds = %14
%20 = tail call i32 @MessageDisplay(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %73
21: ; preds = %14
%22 = shl nsw i64 %10, 3
%23 = tail call i64 @malloc(i64 %22)
%24 = inttoptr i64 %23 to double*
%25 = icmp eq i64 %23, 0
br i1 %25, label %28, label %26
26: ; preds = %21
%27 = icmp sgt i64 %2, 0
br i1 %27, label %31, label %38
28: ; preds = %21
%29 = tail call i32 @free(double* %17)
%30 = tail call i32 @MessageDisplay(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %73
31: ; preds = %26, %31
%32 = phi i64 [ %36, %31 ], [ 0, %26 ]
%33 = tail call i32 @GetRow(float* %0, i64 %1, i64 %2, i64 %32, double* %17, i64 %1)
%34 = tail call i32 @Expand_1D(double* %17, i64 %1, double* %24, double* %4, i64 %5, i16 signext %6)
%35 = tail call i32 @PutRow(float* %3, i64 %10, i64 %13, i64 %32, double* %24, i64 %10)
%36 = add nuw nsw i64 %32, 1
%37 = icmp eq i64 %36, %2
br i1 %37, label %38, label %31
38: ; preds = %31, %26
%39 = tail call i32 @free(double* %17)
%40 = tail call i32 @free(double* %24)
br label %45
41: ; preds = %7
%42 = shl i64 %1, 2
%43 = mul i64 %42, %2
%44 = tail call i32 @memcpy(float* %3, float* %0, i64 %43)
br label %45
45: ; preds = %41, %38
br i1 %12, label %46, label %73
46: ; preds = %45
%47 = shl nsw i64 %2, 3
%48 = tail call i64 @malloc(i64 %47)
%49 = inttoptr i64 %48 to double*
%50 = icmp eq i64 %48, 0
br i1 %50, label %51, label %53
51: ; preds = %46
%52 = tail call i32 @MessageDisplay(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %73
53: ; preds = %46
%54 = shl nsw i64 %13, 3
%55 = tail call i64 @malloc(i64 %54)
%56 = inttoptr i64 %55 to double*
%57 = icmp eq i64 %55, 0
br i1 %57, label %60, label %58
58: ; preds = %53
%59 = icmp sgt i64 %10, 0
br i1 %59, label %63, label %70
60: ; preds = %53
%61 = tail call i32 @free(double* %49)
%62 = tail call i32 @MessageDisplay(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %73
63: ; preds = %58, %63
%64 = phi i64 [ %68, %63 ], [ 0, %58 ]
%65 = tail call i32 @GetColumn(float* %3, i64 %10, i64 %13, i64 %64, double* %49, i64 %2)
%66 = tail call i32 @Expand_1D(double* %49, i64 %2, double* %56, double* %4, i64 %5, i16 signext %6)
%67 = tail call i32 @PutColumn(float* %3, i64 %10, i64 %13, i64 %64, double* %56, i64 %13)
%68 = add nuw nsw i64 %64, 1
%69 = icmp eq i64 %68, %10
br i1 %69, label %70, label %63
70: ; preds = %63, %58
%71 = tail call i32 @free(double* %49)
%72 = tail call i32 @free(double* %56)
br label %73
73: ; preds = %45, %70, %60, %51, %28, %19
ret i32 1
}