int main() {
  int l1[] = {1, 2, 3, 4, 5};
  int l2[] = {6, 7, 8, 9, 10};
  int l3[] = {11, 12, 13, 14, 15};
  int l4[] = {16, 17, 18, 19, 20};
  int l5[] = {21, 22, 23, 24, 25};
  int **m1 = (int **)malloc(5 * sizeof(int *));
  m1[0] = l1;
  m1[1] = l2;
  m1[2] = l3;
  m1[3] = l4;
  m1[4] = l5;
  int *ret1 = spiralOrder(m1, 5, 5);
  for (int i = 0; i < 25; i++)
    printf("%d ", ret1[i]);
  printf("\n");
  int *ret2 = spiralOrder(m1, 4, 5);
  for (int i = 0; i < 20; i++)
    printf("%d ", ret2[i]);
  printf("\n");
  int *ret3 = spiralOrder(m1, 5, 3);
  for (int i = 0; i < 15; i++)
    printf("%d ", ret3[i]);
  printf("\n");
  int *ret4 = spiralOrder(m1, 1, 5);
  for (int i = 0; i < 5; i++)
    printf("%d ", ret4[i]);
  printf("\n");
  int *ret5 = spiralOrder(m1, 5, 1);
  for (int i = 0; i < 5; i++)
    printf("%d ", ret5[i]);
  printf("\n");
  free(m1);
  free(ret1);
  free(ret2);
  free(ret3);
  free(ret4);
  free(ret5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xea7(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xea4(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xea2(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xea8(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xea5(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xea3(%rip),%eax
mov    %eax,-0x30(%rbp)
mov    0xea9(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xea6(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xea4(%rip),%eax
mov    %eax,-0x50(%rbp)
mov    0xeaa(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xea7(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xea5(%rip),%eax
mov    %eax,-0x70(%rbp)
mov    0xeab(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0xea5(%rip),%rax
mov    %rax,-0x98(%rbp)
mov    0xea0(%rip),%eax
mov    %eax,-0x90(%rbp)
mov    $0x28,%edi
call   1060 <malloc@plt>
mov    %rax,-0xa8(%rbp)
lea    -0x20(%rbp),%rcx
mov    -0xa8(%rbp),%rax
mov    %rcx,(%rax)
lea    -0x40(%rbp),%rcx
mov    -0xa8(%rbp),%rax
mov    %rcx,0x8(%rax)
lea    -0x60(%rbp),%rcx
mov    -0xa8(%rbp),%rax
mov    %rcx,0x10(%rax)
lea    -0x80(%rbp),%rcx
mov    -0xa8(%rbp),%rax
mov    %rcx,0x18(%rax)
lea    -0xa0(%rbp),%rcx
mov    -0xa8(%rbp),%rax
mov    %rcx,0x20(%rax)
mov    -0xa8(%rbp),%rdi
mov    $0x5,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1050 <spiralOrder@plt>
cltq
mov    %rax,-0xb0(%rbp)
movl   $0x0,-0xb4(%rbp)
cmpl   $0x19,-0xb4(%rbp)
jge    12bc <main+0x17c>
mov    -0xb0(%rbp),%rax
movslq -0xb4(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xdf3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    127c <main+0x13c>
lea    0xdd5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xa8(%rbp),%rdi
mov    $0x4,%esi
mov    $0x5,%edx
mov    $0x0,%al
call   1050 <spiralOrder@plt>
cltq
mov    %rax,-0xc0(%rbp)
movl   $0x0,-0xc4(%rbp)
cmpl   $0x14,-0xc4(%rbp)
jge    1335 <main+0x1f5>
mov    -0xc0(%rbp),%rax
movslq -0xc4(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xd7a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc4(%rbp)
jmp    12f5 <main+0x1b5>
lea    0xd5c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xa8(%rbp),%rdi
mov    $0x5,%esi
mov    $0x3,%edx
mov    $0x0,%al
call   1050 <spiralOrder@plt>
cltq
mov    %rax,-0xd0(%rbp)
movl   $0x0,-0xd4(%rbp)
cmpl   $0xf,-0xd4(%rbp)
jge    13ae <main+0x26e>
mov    -0xd0(%rbp),%rax
movslq -0xd4(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xd01(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    136e <main+0x22e>
lea    0xce3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xa8(%rbp),%rdi
mov    $0x1,%esi
mov    $0x5,%edx
mov    $0x0,%al
call   1050 <spiralOrder@plt>
cltq
mov    %rax,-0xe0(%rbp)
movl   $0x0,-0xe4(%rbp)
cmpl   $0x5,-0xe4(%rbp)
jge    1427 <main+0x2e7>
mov    -0xe0(%rbp),%rax
movslq -0xe4(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xc88(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    13e7 <main+0x2a7>
lea    0xc6a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xa8(%rbp),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
mov    $0x0,%al
call   1050 <spiralOrder@plt>
cltq
mov    %rax,-0xf0(%rbp)
movl   $0x0,-0xf4(%rbp)
cmpl   $0x5,-0xf4(%rbp)
jge    14a0 <main+0x360>
mov    -0xf0(%rbp),%rax
movslq -0xf4(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xc0f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xf4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf4(%rbp)
jmp    1460 <main+0x320>
lea    0xbf1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xa8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xb0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xc0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xd0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xe0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xf0(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    0xea9(%rip),%eax
mov    %eax,0xa0(%rsp)
movaps 0xe8b(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
mov    0xead(%rip),%eax
mov    %eax,0x80(%rsp)
movaps 0xe8f(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
mov    0xeb4(%rip),%eax
mov    %eax,0x60(%rsp)
movaps 0xe99(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
mov    0xebe(%rip),%eax
mov    %eax,0x40(%rsp)
movaps 0xea3(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
mov    0xec8(%rip),%eax
mov    %eax,0x20(%rsp)
movaps 0xead(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
mov    $0x28,%edi
call   1070 <malloc@plt>
mov    %rax,%r14
lea    0x90(%rsp),%rax
mov    %rax,(%r14)
lea    0x70(%rsp),%rax
mov    %rax,0x8(%r14)
lea    0x50(%rsp),%rax
mov    %rax,0x10(%r14)
lea    0x30(%rsp),%rax
mov    %rax,0x18(%r14)
lea    0x10(%rsp),%rax
mov    %rax,0x20(%r14)
mov    %r14,%rdi
mov    $0x5,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1060 <spiralOrder@plt>
movslq %eax,%r15
mov    (%r15),%esi
lea    0xe5f(%rip),%r13
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x4(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x14(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x18(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x1c(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x20(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x24(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x28(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2c(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x30(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x34(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x38(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x3c(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x40(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x44(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x48(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x4c(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x50(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x54(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x58(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x5c(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x60(%r15),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    %r14,%rdi
mov    $0x4,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1060 <spiralOrder@plt>
movslq %eax,%r12
mov    (%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x4(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x14(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x18(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x1c(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x20(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x24(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x28(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2c(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x30(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x34(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x38(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x3c(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x40(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x44(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x48(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x4c(%r12),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    %r14,%rdi
mov    $0x5,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1060 <spiralOrder@plt>
movslq %eax,%rbx
mov    (%rbx),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x4(%rbx),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%rbx),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%rbx),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%rbx),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x14(%rbx),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x18(%rbx),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x1c(%rbx),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x20(%rbx),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x24(%rbx),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x28(%rbx),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2c(%rbx),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x30(%rbx),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x34(%rbx),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x38(%rbx),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    %r14,%rdi
mov    %r14,0x8(%rsp)
mov    $0x1,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1060 <spiralOrder@plt>
movslq %eax,%rbp
mov    0x0(%rbp),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x4(%rbp),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%rbp),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%rbp),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%rbp),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    %r14,%rdi
mov    $0x5,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1060 <spiralOrder@plt>
movslq %eax,%r14
mov    (%r14),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x4(%r14),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%r14),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%r14),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%r14),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.l1 = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
@__const.main.l2 = [5 x i32] [i32 6, i32 7, i32 8, i32 9, i32 10]
@__const.main.l3 = [5 x i32] [i32 11, i32 12, i32 13, i32 14, i32 15]
@__const.main.l4 = [5 x i32] [i32 16, i32 17, i32 18, i32 19, i32 20]
@__const.main.l5 = [5 x i32] [i32 21, i32 22, i32 23, i32 24, i32 25]
@.str = [4 x i8] c"%d \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca [5 x i32]
%4 = alloca [5 x i32]
%5 = alloca [5 x i32]
%6 = alloca [5 x i32]
%7 = alloca i32**
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i32*
%15 = alloca i32
%16 = alloca i32*
%17 = alloca i32
store i32 0, i32* %1
%18 = bitcast [5 x i32]* %2 to i8*
%19 = bitcast [5 x i32]* %3 to i8*
%20 = bitcast [5 x i32]* %4 to i8*
%21 = bitcast [5 x i32]* %5 to i8*
%22 = bitcast [5 x i32]* %6 to i8*
%23 = call i8* @malloc(i64 40)
%24 = bitcast i8* %23 to i32**
store i32** %24, i32*** %7
%25 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%26 = load i32**, i32*** %7
%27 = getelementptr inbounds i32*, i32** %26, i64 0
store i32* %25, i32** %27
%28 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%29 = load i32**, i32*** %7
%30 = getelementptr inbounds i32*, i32** %29, i64 1
store i32* %28, i32** %30
%31 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 0
%32 = load i32**, i32*** %7
%33 = getelementptr inbounds i32*, i32** %32, i64 2
store i32* %31, i32** %33
%34 = getelementptr inbounds [5 x i32], [5 x i32]* %5, i64 0, i64 0
%35 = load i32**, i32*** %7
%36 = getelementptr inbounds i32*, i32** %35, i64 3
store i32* %34, i32** %36
%37 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 0
%38 = load i32**, i32*** %7
%39 = getelementptr inbounds i32*, i32** %38, i64 4
store i32* %37, i32** %39
%40 = load i32**, i32*** %7
%41 = call i32 (i32**, i32, i32, ...) bitcast (i32 (...)* @spiralOrder to i32 (i32**, i32, i32, ...)*)(i32** %40, i32 5, i32 5)
%42 = sext i32 %41 to i64
%43 = inttoptr i64 %42 to i32*
store i32* %43, i32** %8
store i32 0, i32* %9
br label %44
44: ; preds = %54, %0
%45 = load i32, i32* %9
%46 = icmp slt i32 %45, 25
br i1 %46, label %47, label %57
47: ; preds = %44
%48 = load i32*, i32** %8
%49 = load i32, i32* %9
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i32, i32* %48, i64 %50
%52 = load i32, i32* %51
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %52)
br label %54
54: ; preds = %47
%55 = load i32, i32* %9
%56 = add nsw i32 %55, 1
store i32 %56, i32* %9
br label %44
57: ; preds = %44
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%59 = load i32**, i32*** %7
%60 = call i32 (i32**, i32, i32, ...) bitcast (i32 (...)* @spiralOrder to i32 (i32**, i32, i32, ...)*)(i32** %59, i32 4, i32 5)
%61 = sext i32 %60 to i64
%62 = inttoptr i64 %61 to i32*
store i32* %62, i32** %10
store i32 0, i32* %11
br label %63
63: ; preds = %73, %57
%64 = load i32, i32* %11
%65 = icmp slt i32 %64, 20
br i1 %65, label %66, label %76
66: ; preds = %63
%67 = load i32*, i32** %10
%68 = load i32, i32* %11
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds i32, i32* %67, i64 %69
%71 = load i32, i32* %70
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %71)
br label %73
73: ; preds = %66
%74 = load i32, i32* %11
%75 = add nsw i32 %74, 1
store i32 %75, i32* %11
br label %63
76: ; preds = %63
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%78 = load i32**, i32*** %7
%79 = call i32 (i32**, i32, i32, ...) bitcast (i32 (...)* @spiralOrder to i32 (i32**, i32, i32, ...)*)(i32** %78, i32 5, i32 3)
%80 = sext i32 %79 to i64
%81 = inttoptr i64 %80 to i32*
store i32* %81, i32** %12
store i32 0, i32* %13
br label %82
82: ; preds = %92, %76
%83 = load i32, i32* %13
%84 = icmp slt i32 %83, 15
br i1 %84, label %85, label %95
85: ; preds = %82
%86 = load i32*, i32** %12
%87 = load i32, i32* %13
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds i32, i32* %86, i64 %88
%90 = load i32, i32* %89
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %90)
br label %92
92: ; preds = %85
%93 = load i32, i32* %13
%94 = add nsw i32 %93, 1
store i32 %94, i32* %13
br label %82
95: ; preds = %82
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%97 = load i32**, i32*** %7
%98 = call i32 (i32**, i32, i32, ...) bitcast (i32 (...)* @spiralOrder to i32 (i32**, i32, i32, ...)*)(i32** %97, i32 1, i32 5)
%99 = sext i32 %98 to i64
%100 = inttoptr i64 %99 to i32*
store i32* %100, i32** %14
store i32 0, i32* %15
br label %101
101: ; preds = %111, %95
%102 = load i32, i32* %15
%103 = icmp slt i32 %102, 5
br i1 %103, label %104, label %114
104: ; preds = %101
%105 = load i32*, i32** %14
%106 = load i32, i32* %15
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds i32, i32* %105, i64 %107
%109 = load i32, i32* %108
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %109)
br label %111
111: ; preds = %104
%112 = load i32, i32* %15
%113 = add nsw i32 %112, 1
store i32 %113, i32* %15
br label %101
114: ; preds = %101
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%116 = load i32**, i32*** %7
%117 = call i32 (i32**, i32, i32, ...) bitcast (i32 (...)* @spiralOrder to i32 (i32**, i32, i32, ...)*)(i32** %116, i32 5, i32 1)
%118 = sext i32 %117 to i64
%119 = inttoptr i64 %118 to i32*
store i32* %119, i32** %16
store i32 0, i32* %17
br label %120
120: ; preds = %130, %114
%121 = load i32, i32* %17
%122 = icmp slt i32 %121, 5
br i1 %122, label %123, label %133
123: ; preds = %120
%124 = load i32*, i32** %16
%125 = load i32, i32* %17
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds i32, i32* %124, i64 %126
%128 = load i32, i32* %127
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %128)
br label %130
130: ; preds = %123
%131 = load i32, i32* %17
%132 = add nsw i32 %131, 1
store i32 %132, i32* %17
br label %120
133: ; preds = %120
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%135 = load i32**, i32*** %7
%136 = bitcast i32** %135 to i8*
%137 = load i32*, i32** %8
%138 = bitcast i32* %137 to i8*
%139 = load i32*, i32** %10
%140 = bitcast i32* %139 to i8*
%141 = load i32*, i32** %12
%142 = bitcast i32* %141 to i8*
%143 = load i32*, i32** %14
%144 = bitcast i32* %143 to i8*
%145 = load i32*, i32** %16
%146 = bitcast i32* %145 to i8*
ret i32 0
}

LLVM IR (-O2):
@__const.main.l1 = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
@__const.main.l2 = [5 x i32] [i32 6, i32 7, i32 8, i32 9, i32 10]
@__const.main.l3 = [5 x i32] [i32 11, i32 12, i32 13, i32 14, i32 15]
@__const.main.l4 = [5 x i32] [i32 16, i32 17, i32 18, i32 19, i32 20]
@__const.main.l5 = [5 x i32] [i32 21, i32 22, i32 23, i32 24, i32 25]
@.str = [4 x i8] c"%d \00"
define i32 @main() {
%1 = alloca [5 x i32]
%2 = alloca [5 x i32]
%3 = alloca [5 x i32]
%4 = alloca [5 x i32]
%5 = alloca [5 x i32]
%6 = bitcast [5 x i32]* %1 to i8*
%7 = bitcast [5 x i32]* %2 to i8*
%8 = bitcast [5 x i32]* %3 to i8*
%9 = bitcast [5 x i32]* %4 to i8*
%10 = bitcast [5 x i32]* %5 to i8*
%11 = tail call dereferenceable_or_null(40) i8* @malloc(i64 40)
%12 = bitcast i8* %11 to i32**
%13 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
store i32* %13, i32** %12
%14 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%15 = getelementptr inbounds i32*, i32** %12, i64 1
store i32* %14, i32** %15
%16 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%17 = getelementptr inbounds i32*, i32** %12, i64 2
store i32* %16, i32** %17
%18 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 0
%19 = getelementptr inbounds i32*, i32** %12, i64 3
store i32* %18, i32** %19
%20 = getelementptr inbounds [5 x i32], [5 x i32]* %5, i64 0, i64 0
%21 = getelementptr inbounds i32*, i32** %12, i64 4
store i32* %20, i32** %21
%22 = call i32 (i32**, i32, i32, ...) bitcast (i32 (...)* @spiralOrder to i32 (i32**, i32, i32, ...)*)(i32** %12, i32 5, i32 5)
%23 = sext i32 %22 to i64
%24 = inttoptr i64 %23 to i32*
%25 = load i32, i32* %24
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %25)
%27 = getelementptr inbounds i32, i32* %24, i64 1
%28 = load i32, i32* %27
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %28)
%30 = getelementptr inbounds i32, i32* %24, i64 2
%31 = load i32, i32* %30
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %31)
%33 = getelementptr inbounds i32, i32* %24, i64 3
%34 = load i32, i32* %33
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %34)
%36 = getelementptr inbounds i32, i32* %24, i64 4
%37 = load i32, i32* %36
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %37)
%39 = getelementptr inbounds i32, i32* %24, i64 5
%40 = load i32, i32* %39
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %40)
%42 = getelementptr inbounds i32, i32* %24, i64 6
%43 = load i32, i32* %42
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %43)
%45 = getelementptr inbounds i32, i32* %24, i64 7
%46 = load i32, i32* %45
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %46)
%48 = getelementptr inbounds i32, i32* %24, i64 8
%49 = load i32, i32* %48
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %49)
%51 = getelementptr inbounds i32, i32* %24, i64 9
%52 = load i32, i32* %51
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %52)
%54 = getelementptr inbounds i32, i32* %24, i64 10
%55 = load i32, i32* %54
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %55)
%57 = getelementptr inbounds i32, i32* %24, i64 11
%58 = load i32, i32* %57
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %58)
%60 = getelementptr inbounds i32, i32* %24, i64 12
%61 = load i32, i32* %60
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %61)
%63 = getelementptr inbounds i32, i32* %24, i64 13
%64 = load i32, i32* %63
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %64)
%66 = getelementptr inbounds i32, i32* %24, i64 14
%67 = load i32, i32* %66
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %67)
%69 = getelementptr inbounds i32, i32* %24, i64 15
%70 = load i32, i32* %69
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %70)
%72 = getelementptr inbounds i32, i32* %24, i64 16
%73 = load i32, i32* %72
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %73)
%75 = getelementptr inbounds i32, i32* %24, i64 17
%76 = load i32, i32* %75
%77 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %76)
%78 = getelementptr inbounds i32, i32* %24, i64 18
%79 = load i32, i32* %78
%80 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %79)
%81 = getelementptr inbounds i32, i32* %24, i64 19
%82 = load i32, i32* %81
%83 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %82)
%84 = getelementptr inbounds i32, i32* %24, i64 20
%85 = load i32, i32* %84
%86 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %85)
%87 = getelementptr inbounds i32, i32* %24, i64 21
%88 = load i32, i32* %87
%89 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %88)
%90 = getelementptr inbounds i32, i32* %24, i64 22
%91 = load i32, i32* %90
%92 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %91)
%93 = getelementptr inbounds i32, i32* %24, i64 23
%94 = load i32, i32* %93
%95 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %94)
%96 = getelementptr inbounds i32, i32* %24, i64 24
%97 = load i32, i32* %96
%98 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %97)
%99 = call i32 @putchar(i32 10)
%100 = call i32 (i32**, i32, i32, ...) bitcast (i32 (...)* @spiralOrder to i32 (i32**, i32, i32, ...)*)(i32** %12, i32 4, i32 5)
%101 = sext i32 %100 to i64
%102 = inttoptr i64 %101 to i32*
%103 = load i32, i32* %102
%104 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %103)
%105 = getelementptr inbounds i32, i32* %102, i64 1
%106 = load i32, i32* %105
%107 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %106)
%108 = getelementptr inbounds i32, i32* %102, i64 2
%109 = load i32, i32* %108
%110 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %109)
%111 = getelementptr inbounds i32, i32* %102, i64 3
%112 = load i32, i32* %111
%113 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %112)
%114 = getelementptr inbounds i32, i32* %102, i64 4
%115 = load i32, i32* %114
%116 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %115)
%117 = getelementptr inbounds i32, i32* %102, i64 5
%118 = load i32, i32* %117
%119 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %118)
%120 = getelementptr inbounds i32, i32* %102, i64 6
%121 = load i32, i32* %120
%122 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %121)
%123 = getelementptr inbounds i32, i32* %102, i64 7
%124 = load i32, i32* %123
%125 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %124)
%126 = getelementptr inbounds i32, i32* %102, i64 8
%127 = load i32, i32* %126
%128 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %127)
%129 = getelementptr inbounds i32, i32* %102, i64 9
%130 = load i32, i32* %129
%131 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %130)
%132 = getelementptr inbounds i32, i32* %102, i64 10
%133 = load i32, i32* %132
%134 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %133)
%135 = getelementptr inbounds i32, i32* %102, i64 11
%136 = load i32, i32* %135
%137 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %136)
%138 = getelementptr inbounds i32, i32* %102, i64 12
%139 = load i32, i32* %138
%140 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %139)
%141 = getelementptr inbounds i32, i32* %102, i64 13
%142 = load i32, i32* %141
%143 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %142)
%144 = getelementptr inbounds i32, i32* %102, i64 14
%145 = load i32, i32* %144
%146 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %145)
%147 = getelementptr inbounds i32, i32* %102, i64 15
%148 = load i32, i32* %147
%149 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %148)
%150 = getelementptr inbounds i32, i32* %102, i64 16
%151 = load i32, i32* %150
%152 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %151)
%153 = getelementptr inbounds i32, i32* %102, i64 17
%154 = load i32, i32* %153
%155 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %154)
%156 = getelementptr inbounds i32, i32* %102, i64 18
%157 = load i32, i32* %156
%158 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %157)
%159 = getelementptr inbounds i32, i32* %102, i64 19
%160 = load i32, i32* %159
%161 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %160)
%162 = call i32 @putchar(i32 10)
%163 = call i32 (i32**, i32, i32, ...) bitcast (i32 (...)* @spiralOrder to i32 (i32**, i32, i32, ...)*)(i32** %12, i32 5, i32 3)
%164 = sext i32 %163 to i64
%165 = inttoptr i64 %164 to i32*
%166 = load i32, i32* %165
%167 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %166)
%168 = getelementptr inbounds i32, i32* %165, i64 1
%169 = load i32, i32* %168
%170 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %169)
%171 = getelementptr inbounds i32, i32* %165, i64 2
%172 = load i32, i32* %171
%173 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %172)
%174 = getelementptr inbounds i32, i32* %165, i64 3
%175 = load i32, i32* %174
%176 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %175)
%177 = getelementptr inbounds i32, i32* %165, i64 4
%178 = load i32, i32* %177
%179 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %178)
%180 = getelementptr inbounds i32, i32* %165, i64 5
%181 = load i32, i32* %180
%182 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %181)
%183 = getelementptr inbounds i32, i32* %165, i64 6
%184 = load i32, i32* %183
%185 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %184)
%186 = getelementptr inbounds i32, i32* %165, i64 7
%187 = load i32, i32* %186
%188 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %187)
%189 = getelementptr inbounds i32, i32* %165, i64 8
%190 = load i32, i32* %189
%191 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %190)
%192 = getelementptr inbounds i32, i32* %165, i64 9
%193 = load i32, i32* %192
%194 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %193)
%195 = getelementptr inbounds i32, i32* %165, i64 10
%196 = load i32, i32* %195
%197 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %196)
%198 = getelementptr inbounds i32, i32* %165, i64 11
%199 = load i32, i32* %198
%200 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %199)
%201 = getelementptr inbounds i32, i32* %165, i64 12
%202 = load i32, i32* %201
%203 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %202)
%204 = getelementptr inbounds i32, i32* %165, i64 13
%205 = load i32, i32* %204
%206 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %205)
%207 = getelementptr inbounds i32, i32* %165, i64 14
%208 = load i32, i32* %207
%209 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %208)
%210 = call i32 @putchar(i32 10)
%211 = call i32 (i32**, i32, i32, ...) bitcast (i32 (...)* @spiralOrder to i32 (i32**, i32, i32, ...)*)(i32** %12, i32 1, i32 5)
%212 = sext i32 %211 to i64
%213 = inttoptr i64 %212 to i32*
%214 = load i32, i32* %213
%215 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %214)
%216 = getelementptr inbounds i32, i32* %213, i64 1
%217 = load i32, i32* %216
%218 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %217)
%219 = getelementptr inbounds i32, i32* %213, i64 2
%220 = load i32, i32* %219
%221 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %220)
%222 = getelementptr inbounds i32, i32* %213, i64 3
%223 = load i32, i32* %222
%224 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %223)
%225 = getelementptr inbounds i32, i32* %213, i64 4
%226 = load i32, i32* %225
%227 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %226)
%228 = call i32 @putchar(i32 10)
%229 = call i32 (i32**, i32, i32, ...) bitcast (i32 (...)* @spiralOrder to i32 (i32**, i32, i32, ...)*)(i32** %12, i32 5, i32 1)
%230 = sext i32 %229 to i64
%231 = inttoptr i64 %230 to i32*
%232 = load i32, i32* %231
%233 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %232)
%234 = getelementptr inbounds i32, i32* %231, i64 1
%235 = load i32, i32* %234
%236 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %235)
%237 = getelementptr inbounds i32, i32* %231, i64 2
%238 = load i32, i32* %237
%239 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %238)
%240 = getelementptr inbounds i32, i32* %231, i64 3
%241 = load i32, i32* %240
%242 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %241)
%243 = getelementptr inbounds i32, i32* %231, i64 4
%244 = load i32, i32* %243
%245 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %244)
%246 = call i32 @putchar(i32 10)
%247 = inttoptr i64 %23 to i8*
%248 = inttoptr i64 %101 to i8*
%249 = inttoptr i64 %164 to i8*
%250 = inttoptr i64 %212 to i8*
%251 = inttoptr i64 %230 to i8*
ret i32 0
}