#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 */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ btea(int *, int, int *);
int /*<<< orphan*/ printf(char *, ...);
void main(int argc, char **argv) {
  uint32_t i;
  uint32_t s0, s1, s2, s3;
  uint32_t k[] = {0, 0, 0, 0};
  uint32_t v[] = {0, 0};
  uint32_t v3[] = {0, 0, 0};
  uint32_t v4[] = {0, 0, 0, 0};
  int n = 2;
  printf("i #n#                k               #       pt       #        ct    "
         "  \n");
  for (i = 0; i < 100; i++) {
    printf("%02X %d %08X%08X%08X%08X ", i, n, k[0], k[1], k[2], k[3]);
    printf("%08X%08X ", v[0], v[1]);
    btea(v, n, k);
    s0 = v[0];
    s1 = v[1];
    printf("%08X%08X\n", v[0], v[1]);
    btea(v, -n, k);
    k[2 + (i % 2)] ^= s0;
    k[1 - (i % 2)] ^= s1;
    v[0] = s0;
    v[1] = s1;
  }
  k[0] = k[1] = k[2] = k[3] = 0;
  printf("i #n#                k               #           pt           #      "
         "      ct          \n");
  n = 3;
  for (i = 0; i < 100; i++) {
    printf("%02X %d %08X%08X%08X%08X ", i, n, k[0], k[1], k[2], k[3]);
    printf("%08X%08X%08X ", v3[0], v3[1], v3[2]);
    btea(v3, n, k);
    s0 = v3[0];
    s1 = v3[1];
    s2 = v3[2];
    printf("%08X%08X%08X\n", v3[0], v3[1], v3[2]);
    btea(v3, -n, k);
    k[2 + (i % 2)] ^= s0;
    k[1 - (i % 2)] ^= s1;
    k[3] ^= s2;
    v3[0] = s0;
    v3[1] = s1;
    v3[2] = s2;
  }
  k[0] = k[1] = k[2] = k[3] = 0;
  printf("i #n#                k               #               pt              "
         " #                ct              \n");
  n = 4;
  for (i = 0; i < 100; i++) {
    printf("%02X %d %08X%08X%08X%08X ", i, n, k[0], k[1], k[2], k[3]);
    printf("%08X%08X%08X%08X ", v4[0], v4[1], v4[2], v4[3]);
    btea(v4, n, k);
    s0 = v4[0];
    s1 = v4[1];
    s2 = v4[2];
    s3 = v4[3];
    printf("%08X%08X%08X%08X\n", v4[0], v4[1], v4[2], v4[3]);
    btea(v4, -n, k);
    k[2 + (i % 2)] ^= s0;
    k[1 - (i % 2)] ^= s1;
    k[3] ^= s2;
    k[0] ^= s3;
    v4[0] = s0;
    v4[1] = s1;
    v4[2] = s2;
    v4[3] = s3;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1050 <memset@plt>
lea    -0x48(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1050 <memset@plt>
lea    -0x54(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1050 <memset@plt>
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1050 <memset@plt>
movl   $0x2,-0x74(%rbp)
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jge    1278 <main+0x148>
mov    -0x14(%rbp),%esi
mov    -0x74(%rbp),%edx
mov    -0x40(%rbp),%ecx
mov    -0x3c(%rbp),%r8d
mov    -0x38(%rbp),%r9d
mov    -0x34(%rbp),%eax
lea    0xe86(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x48(%rbp),%esi
mov    -0x44(%rbp),%edx
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x48(%rbp),%rdi
mov    -0x74(%rbp),%esi
lea    -0x40(%rbp),%rdx
call   1030 <btea@plt>
mov    -0x48(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x48(%rbp),%esi
mov    -0x44(%rbp),%edx
lea    0xf23(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x48(%rbp),%rdi
xor    %esi,%esi
sub    -0x74(%rbp),%esi
lea    -0x40(%rbp),%rdx
call   1030 <btea@plt>
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%eax
mov    $0x2,%esi
cltd
idiv   %esi
add    $0x2,%edx
movslq %edx,%rax
xor    -0x40(%rbp,%rax,4),%ecx
mov    %ecx,-0x40(%rbp,%rax,4)
mov    -0x1c(%rbp),%ecx
mov    -0x14(%rbp),%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    $0x1,%eax
sub    %edx,%eax
cltq
xor    -0x40(%rbp,%rax,4),%ecx
mov    %ecx,-0x40(%rbp,%rax,4)
mov    -0x18(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    119e <main+0x6e>
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
lea    0xdc8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x3,-0x74(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jge    13a5 <main+0x275>
mov    -0x14(%rbp),%esi
mov    -0x74(%rbp),%edx
mov    -0x40(%rbp),%ecx
mov    -0x3c(%rbp),%r8d
mov    -0x38(%rbp),%r9d
mov    -0x34(%rbp),%eax
lea    0xd74(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x54(%rbp),%esi
mov    -0x50(%rbp),%edx
mov    -0x4c(%rbp),%ecx
lea    0xd66(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x54(%rbp),%rdi
mov    -0x74(%rbp),%esi
lea    -0x40(%rbp),%rdx
call   1030 <btea@plt>
mov    -0x54(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x50(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x54(%rbp),%esi
mov    -0x50(%rbp),%edx
mov    -0x4c(%rbp),%ecx
lea    0xe01(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x54(%rbp),%rdi
xor    %esi,%esi
sub    -0x74(%rbp),%esi
lea    -0x40(%rbp),%rdx
call   1030 <btea@plt>
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%eax
mov    $0x2,%esi
cltd
idiv   %esi
add    $0x2,%edx
movslq %edx,%rax
xor    -0x40(%rbp,%rax,4),%ecx
mov    %ecx,-0x40(%rbp,%rax,4)
mov    -0x1c(%rbp),%ecx
mov    -0x14(%rbp),%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    $0x1,%eax
sub    %edx,%eax
cltq
xor    -0x40(%rbp,%rax,4),%ecx
mov    %ecx,-0x40(%rbp,%rax,4)
mov    -0x20(%rbp),%eax
xor    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12b0 <main+0x180>
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
lea    0xcf4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x4,-0x74(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jge    14ef <main+0x3bf>
mov    -0x14(%rbp),%esi
mov    -0x74(%rbp),%edx
mov    -0x40(%rbp),%ecx
mov    -0x3c(%rbp),%r8d
mov    -0x38(%rbp),%r9d
mov    -0x34(%rbp),%eax
lea    0xc47(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x70(%rbp),%esi
mov    -0x6c(%rbp),%edx
mov    -0x68(%rbp),%ecx
mov    -0x64(%rbp),%r8d
lea    0xc31(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x70(%rbp),%rdi
mov    -0x74(%rbp),%esi
lea    -0x40(%rbp),%rdx
call   1030 <btea@plt>
mov    -0x70(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x6c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x68(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x64(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x70(%rbp),%esi
mov    -0x6c(%rbp),%edx
mov    -0x68(%rbp),%ecx
mov    -0x64(%rbp),%r8d
lea    0xcc2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
sub    -0x74(%rbp),%esi
lea    -0x40(%rbp),%rdx
call   1030 <btea@plt>
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%eax
mov    $0x2,%esi
cltd
idiv   %esi
add    $0x2,%edx
movslq %edx,%rax
xor    -0x40(%rbp,%rax,4),%ecx
mov    %ecx,-0x40(%rbp,%rax,4)
mov    -0x1c(%rbp),%ecx
mov    -0x14(%rbp),%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    $0x1,%eax
sub    %edx,%eax
cltq
xor    -0x40(%rbp,%rax,4),%ecx
mov    %ecx,-0x40(%rbp,%rax,4)
mov    -0x20(%rbp),%eax
xor    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x24(%rbp),%eax
xor    -0x40(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x70(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    13dd <main+0x2ad>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movq   $0x0,0x38(%rsp)
movl   $0x0,0x30(%rsp)
movq   $0x0,0x28(%rsp)
movaps %xmm0,0x40(%rsp)
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
lea    0x38(%rsp),%r13
lea    0x10(%rsp),%rbp
lea    0xea0(%rip),%r12
xor    %eax,%eax
xor    %r9d,%r9d
xor    %r8d,%r8d
xor    %ecx,%ecx
xor    %ebx,%ebx
xchg   %ax,%ax
mov    %eax,(%rsp)
lea    0xe66(%rip),%rdi
mov    %ebx,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x38(%rsp),%esi
mov    0x3c(%rsp),%edx
lea    0xe59(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
mov    $0x2,%esi
mov    %rbp,%rdx
call   1040 <btea@plt>
mov    0x38(%rsp),%r14d
mov    0x3c(%rsp),%r15d
mov    %r12,%rdi
mov    %r14d,%esi
mov    %r15d,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
mov    $0xfffffffe,%esi
mov    %rbp,%rdx
call   1040 <btea@plt>
mov    %ebx,%eax
and    $0x1,%eax
lea    0x2(%rax),%ecx
xor    %r14d,0x10(%rsp,%rcx,4)
xor    $0x1,%eax
xor    %r15d,0x10(%rsp,%rax,4)
mov    %r14d,0x38(%rsp)
mov    %r15d,0x3c(%rsp)
cmp    $0x63,%ebx
je     1236 <main+0x106>
mov    0x10(%rsp),%ecx
mov    0x14(%rsp),%r8d
mov    0x18(%rsp),%r9d
mov    0x1c(%rsp),%eax
add    $0x1,%ebx
jmp    1190 <main+0x60>
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
lea    0xe2f(%rip),%rdi
call   1030 <puts@plt>
mov    0x1c(%rsp),%eax
lea    0x28(%rsp),%r13
lea    0x10(%rsp),%rbp
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    0x10(%rsp),%ecx
mov    0x14(%rsp),%r8d
mov    0x18(%rsp),%r9d
mov    %eax,(%rsp)
lea    0xd88(%rip),%rdi
mov    %ebx,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x28(%rsp),%esi
mov    0x2c(%rsp),%edx
mov    0x30(%rsp),%ecx
lea    0xd73(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
mov    $0x3,%esi
mov    %rbp,%rdx
call   1040 <btea@plt>
mov    0x28(%rsp),%r14d
mov    0x2c(%rsp),%r15d
mov    0x30(%rsp),%r12d
lea    0xd58(%rip),%rdi
mov    %r14d,%esi
mov    %r15d,%edx
mov    %r12d,%ecx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
mov    $0xfffffffd,%esi
mov    %rbp,%rdx
call   1040 <btea@plt>
mov    %ebx,%eax
and    $0x1,%eax
lea    0x2(%rax),%ecx
xor    %r14d,0x10(%rsp,%rcx,4)
xor    $0x1,%eax
xor    %r15d,0x10(%rsp,%rax,4)
mov    0x1c(%rsp),%eax
xor    %r12d,%eax
mov    %eax,0x1c(%rsp)
mov    %r14d,0x28(%rsp)
mov    %r15d,0x2c(%rsp)
mov    %r12d,0x30(%rsp)
add    $0x1,%ebx
cmp    $0x64,%ebx
jne    1260 <main+0x130>
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
lea    0xd9c(%rip),%rdi
call   1030 <puts@plt>
mov    0x10(%rsp),%ecx
mov    0x1c(%rsp),%eax
xor    %ebp,%ebp
nop
mov    0x14(%rsp),%r8d
mov    0x18(%rsp),%r9d
mov    %eax,(%rsp)
lea    0xcac(%rip),%rdi
mov    %ebp,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x40(%rsp),%esi
mov    0x44(%rsp),%edx
mov    0x48(%rsp),%ecx
mov    0x4c(%rsp),%r8d
lea    0xc8e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x40(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x4,%esi
lea    0x10(%rsp),%rdx
call   1040 <btea@plt>
mov    0x40(%rsp),%r14d
mov    0x44(%rsp),%r15d
mov    0x48(%rsp),%r13d
mov    0x4c(%rsp),%r12d
lea    0xc67(%rip),%rdi
mov    %r14d,%esi
mov    %r15d,%edx
mov    %r13d,%ecx
mov    %r12d,%r8d
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffffc,%esi
lea    0x10(%rsp),%rdx
call   1040 <btea@plt>
mov    %ebp,%eax
and    $0x1,%eax
lea    0x2(%rax),%ecx
xor    %r14d,0x10(%rsp,%rcx,4)
xor    $0x1,%eax
xor    %r15d,0x10(%rsp,%rax,4)
mov    0x1c(%rsp),%eax
xor    %r13d,%eax
mov    %eax,0x1c(%rsp)
mov    0x10(%rsp),%ecx
xor    %r12d,%ecx
mov    %ecx,0x10(%rsp)
mov    %r14d,0x40(%rsp)
mov    %r15d,0x44(%rsp)
mov    %r13d,0x48(%rsp)
mov    %r12d,0x4c(%rsp)
add    $0x1,%ebp
cmp    $0x64,%ebp
jne    1340 <main+0x210>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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