#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*/ printf(char *, int, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int q;
  scanf("%d", &q);
  int inbox[512000];
  int inbox_i = 0;
  int outbox[512000];
  int outbox_i = 0;
  for (int i = 0; i < q; i++) {
    printf("INBOX_I = %d, OUTBOX_I = %d\n", inbox_i, outbox_i);
    int action;
    scanf("%d", &action);
    if (action == 1) {
      int n;
      scanf("%d", &n);
      inbox[inbox_i++] = n;
      printf("ADDED = %d\n", n);
    } else if (action == 2) {
      if (outbox_i == 0)
        while (inbox_i > 0)
          outbox[outbox_i++] = inbox[--inbox_i];
      outbox_i--;
    } else {
      if (outbox_i == 0)
        while (inbox_i > 0)
          outbox[outbox_i++] = inbox[--inbox_i];
      printf("%d\n", outbox[outbox_i - 1]);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3e8030,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x1f4014(%rbp)
movl   $0x0,-0x3e8024(%rbp)
movl   $0x0,-0x3e8028(%rbp)
mov    -0x3e8028(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    130a <main+0x1ea>
mov    -0x1f4014(%rbp),%esi
mov    -0x3e8024(%rbp),%edx
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe70(%rip),%rdi
lea    -0x3e802c(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,-0x3e802c(%rbp)
jne    11f5 <main+0xd5>
lea    0xe50(%rip),%rdi
lea    -0x3e8030(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x3e8030(%rbp),%ecx
mov    -0x1f4014(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x1f4014(%rbp)
cltq
mov    %ecx,-0x1f4010(%rbp,%rax,4)
mov    -0x3e8030(%rbp),%esi
lea    0xe37(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12f1 <main+0x1d1>
cmpl   $0x2,-0x3e802c(%rbp)
jne    1271 <main+0x151>
cmpl   $0x0,-0x3e8024(%rbp)
jne    125d <main+0x13d>
jmp    1214 <main+0xf4>
cmpl   $0x0,-0x1f4014(%rbp)
jle    1258 <main+0x138>
mov    -0x1f4014(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1f4014(%rbp)
cltq
mov    -0x1f4010(%rbp,%rax,4),%ecx
mov    -0x3e8024(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x3e8024(%rbp)
cltq
mov    %ecx,-0x3e8020(%rbp,%rax,4)
jmp    1214 <main+0xf4>
jmp    125d <main+0x13d>
mov    -0x3e8024(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x3e8024(%rbp)
jmp    12ec <main+0x1cc>
cmpl   $0x0,-0x3e8024(%rbp)
jne    12cc <main+0x1ac>
jmp    1283 <main+0x163>
cmpl   $0x0,-0x1f4014(%rbp)
jle    12c7 <main+0x1a7>
mov    -0x1f4014(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1f4014(%rbp)
cltq
mov    -0x1f4010(%rbp,%rax,4),%ecx
mov    -0x3e8024(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x3e8024(%rbp)
cltq
mov    %ecx,-0x3e8020(%rbp,%rax,4)
jmp    1283 <main+0x163>
jmp    12cc <main+0x1ac>
mov    -0x3e8024(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x3e8020(%rbp,%rax,4),%esi
lea    0xd43(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12f1 <main+0x1d1>
jmp    12f6 <main+0x1d6>
mov    -0x3e8028(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3e8028(%rbp)
jmp    1160 <main+0x40>
xor    %eax,%eax
add    $0x3e8030,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x3e8018,%rsp
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    1625 <main+0x505>
mov    $0xfffffffe,%ebx
lea    0xeaa(%rip),%rbp
xor    %r14d,%r14d
xor    %r13d,%r13d
xor    %r12d,%r12d
jmp    11b6 <main+0x96>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0xe89(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x8(%rsp),%esi
movslq %r12d,%rax
add    $0x1,%r12d
mov    %esi,0x1f4010(%rsp,%rax,4)
lea    0xe86(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r12d,%r15d
add    $0x1,%r14d
mov    %r15d,%r12d
cmp    0x4(%rsp),%r14d
jge    1625 <main+0x505>
mov    %rbp,%rdi
mov    %r12d,%esi
mov    %r13d,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe33(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x2,%eax
je     1260 <main+0x140>
cmp    $0x1,%eax
je     1170 <main+0x50>
test   %r13d,%r13d
jne    12cb <main+0x1ab>
test   %r12d,%r12d
jle    12cb <main+0x1ab>
mov    %r12d,%eax
cmp    $0x8,%r12d
jae    12df <main+0x1bf>
xor    %ecx,%ecx
mov    %rax,%rdx
mov    %rcx,%rsi
not    %rsi
add    %rax,%rsi
mov    %rax,%rdi
and    $0x3,%rdi
je     123b <main+0x11b>
nop
add    $0xffffffffffffffff,%rdx
mov    %edx,%ebp
mov    0x1f4010(%rsp,%rbp,4),%ebp
mov    %ebp,0x10(%rsp,%rcx,4)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rdi
jne    1220 <main+0x100>
xor    %r15d,%r15d
cmp    $0x3,%rsi
jae    152c <main+0x40c>
mov    %r12d,%r13d
lea    0xdb1(%rip),%rbp
jmp    158a <main+0x46a>
nopw   0x0(%rax,%rax,1)
test   %r13d,%r13d
jne    12d3 <main+0x1b3>
test   %r12d,%r12d
jle    12d3 <main+0x1b3>
mov    %r12d,%eax
cmp    $0x8,%r12d
jae    140c <main+0x2ec>
xor    %ecx,%ecx
mov    %rax,%rdx
mov    %rcx,%rsi
not    %rsi
add    %rax,%rsi
mov    %rax,%rdi
and    $0x3,%rdi
je     12ab <main+0x18b>
xchg   %ax,%ax
add    $0xffffffffffffffff,%rdx
mov    %edx,%ebp
mov    0x1f4010(%rsp,%rbp,4),%ebp
mov    %ebp,0x10(%rsp,%rcx,4)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rdi
jne    1290 <main+0x170>
xor    %r15d,%r15d
cmp    $0x3,%rsi
jae    15a4 <main+0x484>
mov    %r12d,%r13d
lea    0xd41(%rip),%rbp
add    $0xffffffff,%r13d
jmp    11a4 <main+0x84>
mov    %r12d,%r15d
jmp    158a <main+0x46a>
mov    %r12d,%r15d
add    $0xffffffff,%r13d
jmp    11a4 <main+0x84>
lea    -0x1(%rax),%rsi
lea    -0x1(%r12),%ecx
cmp    %esi,%ecx
jb     1208 <main+0xe8>
mov    %rsi,%rcx
shr    $0x20,%rcx
mov    $0x0,%ecx
mov    %rax,%rdx
jne    120d <main+0xed>
mov    %eax,%ecx
and    $0xfffffff8,%ecx
lea    -0x8(%rcx),%rdx
mov    %rdx,%r8
shr    $0x3,%r8
add    $0x1,%r8
test   %rdx,%rdx
je     1603 <main+0x4e3>
mov    %r8,%rdi
movabs $0x3ffffffffffffffe,%rdx
ff ff 3f
and    %rdx,%rdi
mov    $0xfffffffe,%edx
lea    (%rdx,%rax,1),%rbx
add    $0xfffffffffffffff9,%rbx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %esi,%ebp
movdqu 0x1f3ff4(%rsp,%rbp,4),%xmm0
movdqu 0x1f4004(%rsp,%rbp,4),%xmm1
pshufd $0x1b,%xmm1,%xmm1
pshufd $0x1b,%xmm0,%xmm0
movdqa %xmm1,0x10(%rsp,%rdx,4)
movdqa %xmm0,0x20(%rsp,%rdx,4)
mov    %ebx,%ebp
movdqu 0x1f3ff4(%rsp,%rbp,4),%xmm0
movdqu 0x1f4004(%rsp,%rbp,4),%xmm1
pshufd $0x1b,%xmm1,%xmm1
pshufd $0x1b,%xmm0,%xmm0
movdqa %xmm1,0x30(%rsp,%rdx,4)
movdqa %xmm0,0x40(%rsp,%rdx,4)
add    $0x10,%rdx
add    $0xfffffffffffffff0,%rbx
add    $0xfffffffffffffff0,%rsi
add    $0xfffffffffffffffe,%rdi
jne    1350 <main+0x230>
test   $0x1,%r8b
je     13ea <main+0x2ca>
mov    %edx,%esi
not    %esi
add    %eax,%esi
movdqu 0x1f3ff4(%rsp,%rsi,4),%xmm0
movdqu 0x1f4004(%rsp,%rsi,4),%xmm1
pshufd $0x1b,%xmm1,%xmm1
pshufd $0x1b,%xmm0,%xmm0
movdqa %xmm1,0x10(%rsp,%rdx,4)
movdqa %xmm0,0x20(%rsp,%rdx,4)
xor    %r15d,%r15d
cmp    %rax,%rcx
mov    $0xfffffffe,%ebx
lea    0xc07(%rip),%rbp
je     1587 <main+0x467>
mov    %eax,%edx
and    $0x7,%edx
jmp    120d <main+0xed>
lea    -0x1(%rax),%rsi
lea    -0x1(%r12),%ecx
cmp    %esi,%ecx
jb     1277 <main+0x157>
mov    %rsi,%rcx
shr    $0x20,%rcx
mov    $0x0,%ecx
mov    %rax,%rdx
jne    127c <main+0x15c>
mov    %eax,%ecx
and    $0xfffffff8,%ecx
lea    -0x8(%rcx),%rdx
mov    %rdx,%r8
shr    $0x3,%r8
add    $0x1,%r8
test   %rdx,%rdx
je     1614 <main+0x4f4>
mov    %r8,%rdi
movabs $0x3ffffffffffffffe,%rdx
ff ff 3f
and    %rdx,%rdi
mov    $0xfffffffe,%edx
lea    (%rdx,%rax,1),%rbx
add    $0xfffffffffffffff9,%rbx
xor    %edx,%edx
xchg   %ax,%ax
mov    %esi,%ebp
movdqu 0x1f3ff4(%rsp,%rbp,4),%xmm0
movdqu 0x1f4004(%rsp,%rbp,4),%xmm1
pshufd $0x1b,%xmm1,%xmm1
pshufd $0x1b,%xmm0,%xmm0
movdqa %xmm1,0x10(%rsp,%rdx,4)
movdqa %xmm0,0x20(%rsp,%rdx,4)
mov    %ebx,%ebp
movdqu 0x1f3ff4(%rsp,%rbp,4),%xmm0
movdqu 0x1f4004(%rsp,%rbp,4),%xmm1
pshufd $0x1b,%xmm1,%xmm1
pshufd $0x1b,%xmm0,%xmm0
movdqa %xmm1,0x30(%rsp,%rdx,4)
movdqa %xmm0,0x40(%rsp,%rdx,4)
add    $0x10,%rdx
add    $0xfffffffffffffff0,%rbx
add    $0xfffffffffffffff0,%rsi
add    $0xfffffffffffffffe,%rdi
jne    1470 <main+0x350>
test   $0x1,%r8b
je     150a <main+0x3ea>
mov    %edx,%esi
not    %esi
add    %eax,%esi
movdqu 0x1f3ff4(%rsp,%rsi,4),%xmm0
movdqu 0x1f4004(%rsp,%rsi,4),%xmm1
pshufd $0x1b,%xmm1,%xmm1
pshufd $0x1b,%xmm0,%xmm0
movdqa %xmm1,0x10(%rsp,%rdx,4)
movdqa %xmm0,0x20(%rsp,%rdx,4)
xor    %r15d,%r15d
cmp    %rax,%rcx
mov    $0xfffffffe,%ebx
lea    0xae7(%rip),%rbp
je     15f7 <main+0x4d7>
mov    %eax,%edx
and    $0x7,%edx
jmp    127c <main+0x15c>
lea    0xad0(%rip),%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    (%rdx,%rbx,1),%rsi
lea    0x1(%rsi),%edi
mov    0x1f4010(%rsp,%rdi,4),%edi
mov    %edi,0x10(%rsp,%rcx,4)
mov    %esi,%edi
mov    0x1f4010(%rsp,%rdi,4),%edi
mov    %edi,0x14(%rsp,%rcx,4)
add    $0xffffffff,%esi
mov    0x1f4010(%rsp,%rsi,4),%esi
mov    %esi,0x18(%rsp,%rcx,4)
add    $0xfffffffffffffffc,%rdx
mov    %edx,%esi
mov    0x1f4010(%rsp,%rsi,4),%esi
mov    %esi,0x1c(%rsp,%rcx,4)
add    $0x4,%rcx
cmp    %rcx,%rax
jne    1540 <main+0x420>
mov    %r12d,%r13d
movslq %r13d,%rax
mov    0xc(%rsp,%rax,4),%esi
lea    0xa90(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    11a4 <main+0x84>
lea    0xa58(%rip),%rbp
nopl   0x0(%rax,%rax,1)
lea    (%rdx,%rbx,1),%rsi
lea    0x1(%rsi),%edi
mov    0x1f4010(%rsp,%rdi,4),%edi
mov    %edi,0x10(%rsp,%rcx,4)
mov    %esi,%edi
mov    0x1f4010(%rsp,%rdi,4),%edi
mov    %edi,0x14(%rsp,%rcx,4)
add    $0xffffffff,%esi
mov    0x1f4010(%rsp,%rsi,4),%esi
mov    %esi,0x18(%rsp,%rcx,4)
add    $0xfffffffffffffffc,%rdx
mov    %edx,%esi
mov    0x1f4010(%rsp,%rsi,4),%esi
mov    %esi,0x1c(%rsp,%rcx,4)
add    $0x4,%rcx
cmp    %rcx,%rax
jne    15b0 <main+0x490>
mov    %r12d,%r13d
add    $0xffffffff,%r13d
jmp    11a4 <main+0x84>
xor    %edx,%edx
test   $0x1,%r8b
jne    13bc <main+0x29c>
jmp    13ea <main+0x2ca>
xor    %edx,%edx
test   $0x1,%r8b
jne    14dc <main+0x3bc>
jmp    150a <main+0x3ea>
xor    %eax,%eax
add    $0x3e8018,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [29 x i8] c"INBOX_I = %d, OUTBOX_I = %d\0A\00"
@.str.2 = [12 x i8] c"ADDED = %d\0A\00"
@.str.3 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [512000 x i32]
%4 = alloca i32
%5 = alloca [512000 x i32]
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 0, i32* %4
store i32 0, i32* %6
store i32 0, i32* %7
br label %11
11: ; preds = %82, %0
%12 = load i32, i32* %7
%13 = load i32, i32* %2
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %85
15: ; preds = %11
%16 = load i32, i32* %4
%17 = load i32, i32* %6
%18 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %16, i32 %17)
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %8)
%20 = load i32, i32* %8
%21 = icmp eq i32 %20, 1
br i1 %21, label %22, label %31
22: ; preds = %15
%23 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %9)
%24 = load i32, i32* %9
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
%27 = sext i32 %25 to i64
%28 = getelementptr inbounds [512000 x i32], [512000 x i32]* %3, i64 0, i64 %27
store i32 %24, i32* %28
%29 = load i32, i32* %9
%30 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %29)
br label %81
31: ; preds = %15
%32 = load i32, i32* %8
%33 = icmp eq i32 %32, 2
br i1 %33, label %34, label %55
34: ; preds = %31
%35 = load i32, i32* %6
%36 = icmp eq i32 %35, 0
br i1 %36, label %37, label %52
37: ; preds = %34
br label %38
38: ; preds = %41, %37
%39 = load i32, i32* %4
%40 = icmp sgt i32 %39, 0
br i1 %40, label %41, label %51
41: ; preds = %38
%42 = load i32, i32* %4
%43 = add nsw i32 %42, -1
store i32 %43, i32* %4
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [512000 x i32], [512000 x i32]* %3, i64 0, i64 %44
%46 = load i32, i32* %45
%47 = load i32, i32* %6
%48 = add nsw i32 %47, 1
store i32 %48, i32* %6
%49 = sext i32 %47 to i64
%50 = getelementptr inbounds [512000 x i32], [512000 x i32]* %5, i64 0, i64 %49
store i32 %46, i32* %50
br label %38
51: ; preds = %38
br label %52
52: ; preds = %51, %34
%53 = load i32, i32* %6
%54 = add nsw i32 %53, -1
store i32 %54, i32* %6
br label %80
55: ; preds = %31
%56 = load i32, i32* %6
%57 = icmp eq i32 %56, 0
br i1 %57, label %58, label %73
58: ; preds = %55
br label %59
59: ; preds = %62, %58
%60 = load i32, i32* %4
%61 = icmp sgt i32 %60, 0
br i1 %61, label %62, label %72
62: ; preds = %59
%63 = load i32, i32* %4
%64 = add nsw i32 %63, -1
store i32 %64, i32* %4
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [512000 x i32], [512000 x i32]* %3, i64 0, i64 %65
%67 = load i32, i32* %66
%68 = load i32, i32* %6
%69 = add nsw i32 %68, 1
store i32 %69, i32* %6
%70 = sext i32 %68 to i64
%71 = getelementptr inbounds [512000 x i32], [512000 x i32]* %5, i64 0, i64 %70
store i32 %67, i32* %71
br label %59
72: ; preds = %59
br label %73
73: ; preds = %72, %55
%74 = load i32, i32* %6
%75 = sub nsw i32 %74, 1
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [512000 x i32], [512000 x i32]* %5, i64 0, i64 %76
%78 = load i32, i32* %77
%79 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %78)
br label %80
80: ; preds = %73, %52
br label %81
81: ; preds = %80, %22
br label %82
82: ; preds = %81
%83 = load i32, i32* %7
%84 = add nsw i32 %83, 1
store i32 %84, i32* %7
br label %11
85: ; preds = %11
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [29 x i8] c"INBOX_I = %d, OUTBOX_I = %d\0A\00"
@.str.2 = [12 x i8] c"ADDED = %d\0A\00"
@.str.3 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [512000 x i32]
%3 = alloca [512000 x i32]
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %1 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%8 = bitcast [512000 x i32]* %2 to i8*
%9 = bitcast [512000 x i32]* %3 to i8*
%10 = load i32, i32* %1
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %0
%13 = bitcast i32* %4 to i8*
%14 = bitcast i32* %5 to i8*
br label %16
15: ; preds = %314, %0
ret i32 0
16: ; preds = %12, %314
%17 = phi i32 [ 0, %12 ], [ %317, %314 ]
%18 = phi i32 [ 0, %12 ], [ %316, %314 ]
%19 = phi i32 [ 0, %12 ], [ %315, %314 ]
%20 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %19, i32 %18)
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%22 = load i32, i32* %4
switch i32 %22, label %170 [
i32 1, label %23
i32 2, label %30
]
23: ; preds = %16
%24 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
%25 = load i32, i32* %5
%26 = add nsw i32 %19, 1
%27 = sext i32 %19 to i64
%28 = getelementptr inbounds [512000 x i32], [512000 x i32]* %2, i64 0, i64 %27
store i32 %25, i32* %28
%29 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %25)
br label %314
30: ; preds = %16
%31 = icmp eq i32 %18, 0
%32 = icmp sgt i32 %19, 0
%33 = and i1 %31, %32
br i1 %33, label %34, label %166
34: ; preds = %30
%35 = zext i32 %19 to i64
%36 = icmp ult i32 %19, 8
br i1 %36, label %115, label %37
37: ; preds = %34
%38 = add nsw i64 %35, -1
%39 = add i32 %19, -1
%40 = trunc i64 %38 to i32
%41 = icmp ult i32 %39, %40
%42 = icmp ugt i64 %38, 4294967295
%43 = or i1 %41, %42
br i1 %43, label %115, label %44
44: ; preds = %37
%45 = and i64 %35, 4294967288
%46 = and i64 %35, 7
%47 = add nsw i64 %45, -8
%48 = lshr exact i64 %47, 3
%49 = add nuw nsw i64 %48, 1
%50 = and i64 %49, 1
%51 = icmp eq i64 %47, 0
br i1 %51, label %93, label %52
52: ; preds = %44
%53 = and i64 %49, 4611686018427387902
br label %54
54: ; preds = %54, %52
%55 = phi i64 [ 0, %52 ], [ %90, %54 ]
%56 = phi i64 [ 0, %52 ], [ %91, %54 ]
%57 = xor i64 %55, -1
%58 = add i64 %57, %35
%59 = and i64 %58, 4294967295
%60 = getelementptr inbounds [512000 x i32], [512000 x i32]* %2, i64 0, i64 %59
%61 = getelementptr inbounds i32, i32* %60, i64 -3
%62 = bitcast i32* %61 to <4 x i32>*
%63 = load <4 x i32>, <4 x i32>* %62
%64 = shufflevector <4 x i32> %63, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%65 = getelementptr inbounds i32, i32* %60, i64 -7
%66 = bitcast i32* %65 to <4 x i32>*
%67 = load <4 x i32>, <4 x i32>* %66
%68 = shufflevector <4 x i32> %67, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%69 = getelementptr inbounds [512000 x i32], [512000 x i32]* %3, i64 0, i64 %55
%70 = bitcast i32* %69 to <4 x i32>*
store <4 x i32> %64, <4 x i32>* %70
%71 = getelementptr inbounds i32, i32* %69, i64 4
%72 = bitcast i32* %71 to <4 x i32>*
store <4 x i32> %68, <4 x i32>* %72
%73 = or i64 %55, 8
%74 = sub i64 4294967287, %55
%75 = add i64 %74, %35
%76 = and i64 %75, 4294967295
%77 = getelementptr inbounds [512000 x i32], [512000 x i32]* %2, i64 0, i64 %76
%78 = getelementptr inbounds i32, i32* %77, i64 -3
%79 = bitcast i32* %78 to <4 x i32>*
%80 = load <4 x i32>, <4 x i32>* %79
%81 = shufflevector <4 x i32> %80, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%82 = getelementptr inbounds i32, i32* %77, i64 -7
%83 = bitcast i32* %82 to <4 x i32>*
%84 = load <4 x i32>, <4 x i32>* %83
%85 = shufflevector <4 x i32> %84, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%86 = getelementptr inbounds [512000 x i32], [512000 x i32]* %3, i64 0, i64 %73
%87 = bitcast i32* %86 to <4 x i32>*
store <4 x i32> %81, <4 x i32>* %87
%88 = getelementptr inbounds i32, i32* %86, i64 4
%89 = bitcast i32* %88 to <4 x i32>*
store <4 x i32> %85, <4 x i32>* %89
%90 = add nuw i64 %55, 16
%91 = add i64 %56, 2
%92 = icmp eq i64 %91, %53
br i1 %92, label %93, label %54
93: ; preds = %54, %44
%94 = phi i64 [ 0, %44 ], [ %90, %54 ]
%95 = icmp eq i64 %50, 0
br i1 %95, label %113, label %96
96: ; preds = %93
%97 = xor i64 %94, -1
%98 = add i64 %97, %35
%99 = and i64 %98, 4294967295
%100 = getelementptr inbounds [512000 x i32], [512000 x i32]* %2, i64 0, i64 %99
%101 = getelementptr inbounds i32, i32* %100, i64 -3
%102 = bitcast i32* %101 to <4 x i32>*
%103 = load <4 x i32>, <4 x i32>* %102
%104 = shufflevector <4 x i32> %103, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%105 = getelementptr inbounds i32, i32* %100, i64 -7
%106 = bitcast i32* %105 to <4 x i32>*
%107 = load <4 x i32>, <4 x i32>* %106
%108 = shufflevector <4 x i32> %107, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%109 = getelementptr inbounds [512000 x i32], [512000 x i32]* %3, i64 0, i64 %94
%110 = bitcast i32* %109 to <4 x i32>*
store <4 x i32> %104, <4 x i32>* %110
%111 = getelementptr inbounds i32, i32* %109, i64 4
%112 = bitcast i32* %111 to <4 x i32>*
store <4 x i32> %108, <4 x i32>* %112
br label %113
113: ; preds = %93, %96
%114 = icmp eq i64 %45, %35
br i1 %114, label %166, label %115
115: ; preds = %37, %34, %113
%116 = phi i64 [ 0, %37 ], [ 0, %34 ], [ %45, %113 ]
%117 = phi i64 [ %35, %37 ], [ %35, %34 ], [ %46, %113 ]
%118 = xor i64 %116, -1
%119 = add nsw i64 %118, %35
%120 = and i64 %35, 3
%121 = icmp eq i64 %120, 0
br i1 %121, label %134, label %122
122: ; preds = %115, %122
%123 = phi i64 [ %130, %122 ], [ %116, %115 ]
%124 = phi i64 [ %126, %122 ], [ %117, %115 ]
%125 = phi i64 [ %132, %122 ], [ 0, %115 ]
%126 = add nsw i64 %124, -1
%127 = and i64 %126, 4294967295
%128 = getelementptr inbounds [512000 x i32], [512000 x i32]* %2, i64 0, i64 %127
%129 = load i32, i32* %128
%130 = add nuw nsw i64 %123, 1
%131 = getelementptr inbounds [512000 x i32], [512000 x i32]* %3, i64 0, i64 %123
store i32 %129, i32* %131
%132 = add i64 %125, 1
%133 = icmp eq i64 %132, %120
br i1 %133, label %134, label %122
134: ; preds = %122, %115
%135 = phi i64 [ %116, %115 ], [ %130, %122 ]
%136 = phi i64 [ %117, %115 ], [ %126, %122 ]
%137 = icmp ult i64 %119, 3
br i1 %137, label %166, label %138
138: ; preds = %134, %138
%139 = phi i64 [ %163, %138 ], [ %135, %134 ]
%140 = phi i64 [ %159, %138 ], [ %136, %134 ]
%141 = add i64 %140, 4294967295
%142 = and i64 %141, 4294967295
%143 = getelementptr inbounds [512000 x i32], [512000 x i32]* %2, i64 0, i64 %142
%144 = load i32, i32* %143
%145 = add nuw nsw i64 %139, 1
%146 = getelementptr inbounds [512000 x i32], [512000 x i32]* %3, i64 0, i64 %139
store i32 %144, i32* %146
%147 = add i64 %140, 4294967294
%148 = and i64 %147, 4294967295
%149 = getelementptr inbounds [512000 x i32], [512000 x i32]* %2, i64 0, i64 %148
%150 = load i32, i32* %149
%151 = add nuw nsw i64 %139, 2
%152 = getelementptr inbounds [512000 x i32], [512000 x i32]* %3, i64 0, i64 %145
store i32 %150, i32* %152
%153 = add i64 %140, 4294967293
%154 = and i64 %153, 4294967295
%155 = getelementptr inbounds [512000 x i32], [512000 x i32]* %2, i64 0, i64 %154
%156 = load i32, i32* %155
%157 = add nuw nsw i64 %139, 3
%158 = getelementptr inbounds [512000 x i32], [512000 x i32]* %3, i64 0, i64 %151
store i32 %156, i32* %158
%159 = add nsw i64 %140, -4
%160 = and i64 %159, 4294967295
%161 = getelementptr inbounds [512000 x i32], [512000 x i32]* %2, i64 0, i64 %160
%162 = load i32, i32* %161
%163 = add nuw nsw i64 %139, 4
%164 = getelementptr inbounds [512000 x i32], [512000 x i32]* %3, i64 0, i64 %157
store i32 %162, i32* %164
%165 = icmp eq i64 %163, %35
br i1 %165, label %166, label %138
166: ; preds = %134, %138, %113, %30
%167 = phi i32 [ %19, %30 ], [ 0, %113 ], [ 0, %138 ], [ 0, %134 ]
%168 = phi i32 [ %18, %30 ], [ %19, %113 ], [ %19, %138 ], [ %19, %134 ]
%169 = add nsw i32 %168, -1
br label %314
170: ; preds = %16
%171 = icmp eq i32 %18, 0
%172 = icmp sgt i32 %19, 0
%173 = and i1 %171, %172
br i1 %173, label %174, label %306
174: ; preds = %170
%175 = zext i32 %19 to i64
%176 = icmp ult i32 %19, 8
br i1 %176, label %255, label %177
177: ; preds = %174
%178 = add nsw i64 %175, -1
%179 = add i32 %19, -1
%180 = trunc i64 %178 to i32
%181 = icmp ult i32 %179, %180
%182 = icmp ugt i64 %178, 4294967295
%183 = or i1 %181, %182
br i1 %183, label %255, label %184
184: ; preds = %177
%185 = and i64 %175, 4294967288
%186 = and i64 %175, 7
%187 = add nsw i64 %185, -8
%188 = lshr exact i64 %187, 3
%189 = add nuw nsw i64 %188, 1
%190 = and i64 %189, 1
%191 = icmp eq i64 %187, 0
br i1 %191, label %233, label %192
192: ; preds = %184
%193 = and i64 %189, 4611686018427387902
br label %194
194: ; preds = %194, %192
%195 = phi i64 [ 0, %192 ], [ %230, %194 ]
%196 = phi i64 [ 0, %192 ], [ %231, %194 ]
%197 = xor i64 %195, -1
%198 = add i64 %197, %175
%199 = and i64 %198, 4294967295
%200 = getelementptr inbounds [512000 x i32], [512000 x i32]* %2, i64 0, i64 %199
%201 = getelementptr inbounds i32, i32* %200, i64 -3
%202 = bitcast i32* %201 to <4 x i32>*
%203 = load <4 x i32>, <4 x i32>* %202
%204 = shufflevector <4 x i32> %203, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%205 = getelementptr inbounds i32, i32* %200, i64 -7
%206 = bitcast i32* %205 to <4 x i32>*
%207 = load <4 x i32>, <4 x i32>* %206
%208 = shufflevector <4 x i32> %207, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%209 = getelementptr inbounds [512000 x i32], [512000 x i32]* %3, i64 0, i64 %195
%210 = bitcast i32* %209 to <4 x i32>*
store <4 x i32> %204, <4 x i32>* %210
%211 = getelementptr inbounds i32, i32* %209, i64 4
%212 = bitcast i32* %211 to <4 x i32>*
store <4 x i32> %208, <4 x i32>* %212
%213 = or i64 %195, 8
%214 = sub i64 4294967287, %195
%215 = add i64 %214, %175
%216 = and i64 %215, 4294967295
%217 = getelementptr inbounds [512000 x i32], [512000 x i32]* %2, i64 0, i64 %216
%218 = getelementptr inbounds i32, i32* %217, i64 -3
%219 = bitcast i32* %218 to <4 x i32>*
%220 = load <4 x i32>, <4 x i32>* %219
%221 = shufflevector <4 x i32> %220, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%222 = getelementptr inbounds i32, i32* %217, i64 -7
%223 = bitcast i32* %222 to <4 x i32>*
%224 = load <4 x i32>, <4 x i32>* %223
%225 = shufflevector <4 x i32> %224, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%226 = getelementptr inbounds [512000 x i32], [512000 x i32]* %3, i64 0, i64 %213
%227 = bitcast i32* %226 to <4 x i32>*
store <4 x i32> %221, <4 x i32>* %227
%228 = getelementptr inbounds i32, i32* %226, i64 4
%229 = bitcast i32* %228 to <4 x i32>*
store <4 x i32> %225, <4 x i32>* %229
%230 = add nuw i64 %195, 16
%231 = add i64 %196, 2
%232 = icmp eq i64 %231, %193
br i1 %232, label %233, label %194
233: ; preds = %194, %184
%234 = phi i64 [ 0, %184 ], [ %230, %194 ]
%235 = icmp eq i64 %190, 0
br i1 %235, label %253, label %236
236: ; preds = %233
%237 = xor i64 %234, -1
%238 = add i64 %237, %175
%239 = and i64 %238, 4294967295
%240 = getelementptr inbounds [512000 x i32], [512000 x i32]* %2, i64 0, i64 %239
%241 = getelementptr inbounds i32, i32* %240, i64 -3
%242 = bitcast i32* %241 to <4 x i32>*
%243 = load <4 x i32>, <4 x i32>* %242
%244 = shufflevector <4 x i32> %243, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%245 = getelementptr inbounds i32, i32* %240, i64 -7
%246 = bitcast i32* %245 to <4 x i32>*
%247 = load <4 x i32>, <4 x i32>* %246
%248 = shufflevector <4 x i32> %247, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%249 = getelementptr inbounds [512000 x i32], [512000 x i32]* %3, i64 0, i64 %234
%250 = bitcast i32* %249 to <4 x i32>*
store <4 x i32> %244, <4 x i32>* %250
%251 = getelementptr inbounds i32, i32* %249, i64 4
%252 = bitcast i32* %251 to <4 x i32>*
store <4 x i32> %248, <4 x i32>* %252
br label %253
253: ; preds = %233, %236
%254 = icmp eq i64 %185, %175
br i1 %254, label %306, label %255
255: ; preds = %177, %174, %253
%256 = phi i64 [ 0, %177 ], [ 0, %174 ], [ %185, %253 ]
%257 = phi i64 [ %175, %177 ], [ %175, %174 ], [ %186, %253 ]
%258 = xor i64 %256, -1
%259 = add nsw i64 %258, %175
%260 = and i64 %175, 3
%261 = icmp eq i64 %260, 0
br i1 %261, label %274, label %262
262: ; preds = %255, %262
%263 = phi i64 [ %270, %262 ], [ %256, %255 ]
%264 = phi i64 [ %266, %262 ], [ %257, %255 ]
%265 = phi i64 [ %272, %262 ], [ 0, %255 ]
%266 = add nsw i64 %264, -1
%267 = and i64 %266, 4294967295
%268 = getelementptr inbounds [512000 x i32], [512000 x i32]* %2, i64 0, i64 %267
%269 = load i32, i32* %268
%270 = add nuw nsw i64 %263, 1
%271 = getelementptr inbounds [512000 x i32], [512000 x i32]* %3, i64 0, i64 %263
store i32 %269, i32* %271
%272 = add i64 %265, 1
%273 = icmp eq i64 %272, %260
br i1 %273, label %274, label %262
274: ; preds = %262, %255
%275 = phi i64 [ %256, %255 ], [ %270, %262 ]
%276 = phi i64 [ %257, %255 ], [ %266, %262 ]
%277 = icmp ult i64 %259, 3
br i1 %277, label %306, label %278
278: ; preds = %274, %278
%279 = phi i64 [ %303, %278 ], [ %275, %274 ]
%280 = phi i64 [ %299, %278 ], [ %276, %274 ]
%281 = add i64 %280, 4294967295
%282 = and i64 %281, 4294967295
%283 = getelementptr inbounds [512000 x i32], [512000 x i32]* %2, i64 0, i64 %282
%284 = load i32, i32* %283
%285 = add nuw nsw i64 %279, 1
%286 = getelementptr inbounds [512000 x i32], [512000 x i32]* %3, i64 0, i64 %279
store i32 %284, i32* %286
%287 = add i64 %280, 4294967294
%288 = and i64 %287, 4294967295
%289 = getelementptr inbounds [512000 x i32], [512000 x i32]* %2, i64 0, i64 %288
%290 = load i32, i32* %289
%291 = add nuw nsw i64 %279, 2
%292 = getelementptr inbounds [512000 x i32], [512000 x i32]* %3, i64 0, i64 %285
store i32 %290, i32* %292
%293 = add i64 %280, 4294967293
%294 = and i64 %293, 4294967295
%295 = getelementptr inbounds [512000 x i32], [512000 x i32]* %2, i64 0, i64 %294
%296 = load i32, i32* %295
%297 = add nuw nsw i64 %279, 3
%298 = getelementptr inbounds [512000 x i32], [512000 x i32]* %3, i64 0, i64 %291
store i32 %296, i32* %298
%299 = add nsw i64 %280, -4
%300 = and i64 %299, 4294967295
%301 = getelementptr inbounds [512000 x i32], [512000 x i32]* %2, i64 0, i64 %300
%302 = load i32, i32* %301
%303 = add nuw nsw i64 %279, 4
%304 = getelementptr inbounds [512000 x i32], [512000 x i32]* %3, i64 0, i64 %297
store i32 %302, i32* %304
%305 = icmp eq i64 %303, %175
br i1 %305, label %306, label %278
306: ; preds = %274, %278, %253, %170
%307 = phi i32 [ %19, %170 ], [ 0, %253 ], [ 0, %278 ], [ 0, %274 ]
%308 = phi i32 [ %18, %170 ], [ %19, %253 ], [ %19, %278 ], [ %19, %274 ]
%309 = add nsw i32 %308, -1
%310 = sext i32 %309 to i64
%311 = getelementptr inbounds [512000 x i32], [512000 x i32]* %3, i64 0, i64 %310
%312 = load i32, i32* %311
%313 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %312)
br label %314
314: ; preds = %166, %306, %23
%315 = phi i32 [ %26, %23 ], [ %167, %166 ], [ %307, %306 ]
%316 = phi i32 [ %18, %23 ], [ %169, %166 ], [ %308, %306 ]
%317 = add nuw nsw i32 %17, 1
%318 = load i32, i32* %1
%319 = icmp slt i32 %317, %318
br i1 %319, label %16, label %15
}