#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 char uint8_t;

/* Variables and functions */
int /*<<< orphan*/ aes_encrypt(char *);
char getc();
int /*<<< orphan*/ memset(char *, char, int);
int /*<<< orphan*/ putc(char);
int main() {
  uint8_t block1[16];
  uint8_t block2[16];
  uint8_t *block_prev = block1;
  uint8_t *block_cur = block2;
  uint8_t last = 0;
  uint8_t pad = 0;
  memset(block1, 'X', 16);
  while (1) {
    size_t num_input = 0;
    for (num_input = 0; num_input < 16; num_input++) {
      block_cur[num_input] = getc();
      if (block_cur[num_input] == '\n') {
        last = 1;
        break;
      }
    }
    if (last == 1) {
      pad = 16 - (num_input % 16);
      for (; num_input < 16; num_input++) {
        block_cur[num_input] = pad;
      }
    }
    for (size_t i = 0; i < 16; i++) {
      block_cur[i] ^= block_prev[i];
    }
    aes_encrypt(block_cur);
    for (size_t i = 0; i < 16; i++) {
      putc(block_cur[i]);
    }
    uint8_t *tmp = block_prev;
    block_prev = block_cur;
    block_cur = tmp;
    if (last == 1) {
      break;
    }
  }
  if (pad == 0) {
    for (size_t i = 0; i < 16; i++) {
      block_cur[i] = block_prev[i] ^ 0x10;
    }
    aes_encrypt(block_cur);
    for (size_t i = 0; i < 16; i++) {
      putc(block_cur[i]);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x38(%rbp)
lea    -0x30(%rbp),%rax
mov    %rax,-0x40(%rbp)
movb   $0x0,-0x41(%rbp)
movb   $0x0,-0x42(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x58,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
movq   $0x0,-0x50(%rbp)
movq   $0x0,-0x50(%rbp)
cmpq   $0x10,-0x50(%rbp)
jae    11e0 <main+0xa0>
mov    $0x0,%al
call   1060 <getc@plt>
mov    %al,%dl
mov    -0x40(%rbp),%rax
mov    -0x50(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x40(%rbp),%rax
mov    -0x50(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    11ca <main+0x8a>
movb   $0x1,-0x41(%rbp)
jmp    11e0 <main+0xa0>
jmp    11cf <main+0x8f>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    118d <main+0x4d>
movsbl -0x41(%rbp),%eax
cmp    $0x1,%eax
jne    122f <main+0xef>
mov    -0x50(%rbp),%rcx
and    $0xf,%rcx
mov    $0x10,%eax
sub    %rcx,%rax
mov    %al,-0x42(%rbp)
cmpq   $0x10,-0x50(%rbp)
jae    122a <main+0xea>
mov    -0x42(%rbp),%dl
mov    -0x40(%rbp),%rax
mov    -0x50(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    1200 <main+0xc0>
jmp    122f <main+0xef>
movq   $0x0,-0x58(%rbp)
cmpq   $0x10,-0x58(%rbp)
jae    1270 <main+0x130>
mov    -0x38(%rbp),%rax
mov    -0x58(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
mov    -0x40(%rbp),%rax
mov    -0x58(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
xor    %esi,%edx
mov    %dl,(%rax,%rcx,1)
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
jmp    1237 <main+0xf7>
mov    -0x40(%rbp),%rdi
call   1030 <aes_encrypt@plt>
movq   $0x0,-0x60(%rbp)
cmpq   $0x10,-0x60(%rbp)
jae    12ae <main+0x16e>
mov    -0x40(%rbp),%rax
mov    -0x60(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1050 <putc@plt>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    1281 <main+0x141>
mov    -0x38(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,-0x40(%rbp)
movsbl -0x41(%rbp),%eax
cmp    $0x1,%eax
jne    12d8 <main+0x198>
jmp    12dd <main+0x19d>
jmp    117d <main+0x3d>
movsbl -0x42(%rbp),%eax
cmp    $0x0,%eax
jne    136d <main+0x22d>
movq   $0x0,-0x70(%rbp)
cmpq   $0x10,-0x70(%rbp)
jae    132a <main+0x1ea>
mov    -0x38(%rbp),%rax
mov    -0x70(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
xor    $0x10,%eax
mov    %al,%dl
mov    -0x40(%rbp),%rax
mov    -0x70(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x70(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x70(%rbp)
jmp    12f2 <main+0x1b2>
mov    -0x40(%rbp),%rdi
call   1030 <aes_encrypt@plt>
movq   $0x0,-0x78(%rbp)
cmpq   $0x10,-0x78(%rbp)
jae    1368 <main+0x228>
mov    -0x40(%rbp),%rax
mov    -0x78(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1050 <putc@plt>
mov    -0x78(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x78(%rbp)
jmp    133b <main+0x1fb>
jmp    136d <main+0x22d>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0x10(%rsp),%rbx
mov    %rsp,%r14
mov    %rbx,%rdi
mov    $0x58,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
xor    %r13d,%r13d
xor    %r12d,%r12d
xchg   %ax,%ax
mov    %r14,%r15
mov    %rbx,%r14
xor    %eax,%eax
call   1060 <getc@plt>
mov    %al,(%r15)
cmp    $0xa,%al
jne    1190 <main+0x50>
xor    %ecx,%ecx
jmp    12e0 <main+0x1a0>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1060 <getc@plt>
mov    %al,0x1(%r15)
mov    $0x1,%ecx
cmp    $0xa,%al
je     12e0 <main+0x1a0>
xor    %eax,%eax
call   1060 <getc@plt>
mov    %al,0x2(%r15)
mov    $0x2,%ecx
cmp    $0xa,%al
je     12e0 <main+0x1a0>
xor    %eax,%eax
call   1060 <getc@plt>
mov    %al,0x3(%r15)
mov    $0x3,%ecx
cmp    $0xa,%al
je     12e0 <main+0x1a0>
xor    %eax,%eax
call   1060 <getc@plt>
mov    %al,0x4(%r15)
mov    $0x4,%ecx
cmp    $0xa,%al
je     12e0 <main+0x1a0>
xor    %eax,%eax
call   1060 <getc@plt>
mov    %al,0x5(%r15)
mov    $0x5,%ecx
cmp    $0xa,%al
je     12e0 <main+0x1a0>
xor    %eax,%eax
call   1060 <getc@plt>
mov    %al,0x6(%r15)
mov    $0x6,%ecx
cmp    $0xa,%al
je     12e0 <main+0x1a0>
xor    %eax,%eax
call   1060 <getc@plt>
mov    %al,0x7(%r15)
mov    $0x7,%ecx
cmp    $0xa,%al
je     12e0 <main+0x1a0>
xor    %eax,%eax
call   1060 <getc@plt>
mov    %al,0x8(%r15)
mov    $0x8,%ecx
cmp    $0xa,%al
je     12e0 <main+0x1a0>
xor    %eax,%eax
call   1060 <getc@plt>
mov    %al,0x9(%r15)
mov    $0x9,%ecx
cmp    $0xa,%al
je     12e0 <main+0x1a0>
xor    %eax,%eax
call   1060 <getc@plt>
mov    %al,0xa(%r15)
mov    $0xa,%ecx
cmp    $0xa,%al
je     12e0 <main+0x1a0>
xor    %eax,%eax
call   1060 <getc@plt>
mov    %al,0xb(%r15)
mov    $0xb,%ecx
cmp    $0xa,%al
je     12e0 <main+0x1a0>
xor    %eax,%eax
call   1060 <getc@plt>
mov    %al,0xc(%r15)
mov    $0xc,%ecx
cmp    $0xa,%al
je     12e0 <main+0x1a0>
xor    %eax,%eax
call   1060 <getc@plt>
mov    %al,0xd(%r15)
mov    $0xd,%ecx
cmp    $0xa,%al
je     12e0 <main+0x1a0>
xor    %eax,%eax
call   1060 <getc@plt>
mov    %al,0xe(%r15)
mov    $0xe,%ecx
cmp    $0xa,%al
je     12e0 <main+0x1a0>
xor    %eax,%eax
call   1060 <getc@plt>
mov    %al,0xf(%r15)
mov    $0xf,%ecx
cmp    $0xa,%al
jne    13c5 <main+0x285>
mov    $0x10,%r12b
sub    %cl,%r12b
lea    (%r15,%rcx,1),%rdi
mov    $0x10,%edx
sub    %rcx,%rdx
movzbl %r12b,%esi
call   1040 <memset@plt>
mov    $0x1,%bpl
mov    $0x1,%r13b
movups (%r14),%xmm0
movups (%r15),%xmm1
xorps  %xmm0,%xmm1
movups %xmm1,(%r15)
mov    %r15,%rdi
call   1030 <aes_encrypt@plt>
movsbl (%r15),%edi
call   1050 <putc@plt>
movsbl 0x1(%r15),%edi
call   1050 <putc@plt>
movsbl 0x2(%r15),%edi
call   1050 <putc@plt>
movsbl 0x3(%r15),%edi
call   1050 <putc@plt>
movsbl 0x4(%r15),%edi
call   1050 <putc@plt>
movsbl 0x5(%r15),%edi
call   1050 <putc@plt>
movsbl 0x6(%r15),%edi
call   1050 <putc@plt>
movsbl 0x7(%r15),%edi
call   1050 <putc@plt>
movsbl 0x8(%r15),%edi
call   1050 <putc@plt>
movsbl 0x9(%r15),%edi
call   1050 <putc@plt>
movsbl 0xa(%r15),%edi
call   1050 <putc@plt>
movsbl 0xb(%r15),%edi
call   1050 <putc@plt>
movsbl 0xc(%r15),%edi
call   1050 <putc@plt>
movsbl 0xd(%r15),%edi
call   1050 <putc@plt>
movsbl 0xe(%r15),%edi
call   1050 <putc@plt>
movsbl 0xf(%r15),%edi
call   1050 <putc@plt>
mov    %r15,%rbx
test   %bpl,%bpl
je     1170 <main+0x30>
jmp    13da <main+0x29a>
cmp    $0x1,%r13b
jne    13d3 <main+0x293>
mov    $0x10,%r12b
jmp    12fb <main+0x1bb>
xor    %ebp,%ebp
jmp    1301 <main+0x1c1>
test   %r12b,%r12b
jne    1499 <main+0x359>
movups (%r15),%xmm0
xorps  0xc12(%rip),%xmm0
movups %xmm0,(%r14)
mov    %r14,%rdi
call   1030 <aes_encrypt@plt>
movsbl (%r14),%edi
call   1050 <putc@plt>
movsbl 0x1(%r14),%edi
call   1050 <putc@plt>
movsbl 0x2(%r14),%edi
call   1050 <putc@plt>
movsbl 0x3(%r14),%edi
call   1050 <putc@plt>
movsbl 0x4(%r14),%edi
call   1050 <putc@plt>
movsbl 0x5(%r14),%edi
call   1050 <putc@plt>
movsbl 0x6(%r14),%edi
call   1050 <putc@plt>
movsbl 0x7(%r14),%edi
call   1050 <putc@plt>
movsbl 0x8(%r14),%edi
call   1050 <putc@plt>
movsbl 0x9(%r14),%edi
call   1050 <putc@plt>
movsbl 0xa(%r14),%edi
call   1050 <putc@plt>
movsbl 0xb(%r14),%edi
call   1050 <putc@plt>
movsbl 0xc(%r14),%edi
call   1050 <putc@plt>
movsbl 0xd(%r14),%edi
call   1050 <putc@plt>
movsbl 0xe(%r14),%edi
call   1050 <putc@plt>
movsbl 0xf(%r14),%edi
call   1050 <putc@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [16 x i8]
%2 = alloca [16 x i8]
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%5 = call i32 @memset(i8* %3, i8 signext 88, i32 16)
br label %6
6: ; preds = %82, %0
%7 = phi i8* [ %3, %0 ], [ %8, %82 ]
%8 = phi i8* [ %4, %0 ], [ %7, %82 ]
%9 = phi i8 [ 0, %0 ], [ %84, %82 ]
%10 = phi i8 [ 0, %0 ], [ %85, %82 ]
%11 = call signext i8 (...) @getc()
store i8 %11, i8* %8
%12 = icmp eq i8 %11, 10
br i1 %12, label %76, label %13
13: ; preds = %6
%14 = call signext i8 (...) @getc()
%15 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %14, i8* %15
%16 = icmp eq i8 %14, 10
br i1 %16, label %76, label %17
17: ; preds = %13
%18 = call signext i8 (...) @getc()
%19 = getelementptr inbounds i8, i8* %8, i64 2
store i8 %18, i8* %19
%20 = icmp eq i8 %18, 10
br i1 %20, label %76, label %21
21: ; preds = %17
%22 = call signext i8 (...) @getc()
%23 = getelementptr inbounds i8, i8* %8, i64 3
store i8 %22, i8* %23
%24 = icmp eq i8 %22, 10
br i1 %24, label %76, label %25
25: ; preds = %21
%26 = call signext i8 (...) @getc()
%27 = getelementptr inbounds i8, i8* %8, i64 4
store i8 %26, i8* %27
%28 = icmp eq i8 %26, 10
br i1 %28, label %76, label %29
29: ; preds = %25
%30 = call signext i8 (...) @getc()
%31 = getelementptr inbounds i8, i8* %8, i64 5
store i8 %30, i8* %31
%32 = icmp eq i8 %30, 10
br i1 %32, label %76, label %33
33: ; preds = %29
%34 = call signext i8 (...) @getc()
%35 = getelementptr inbounds i8, i8* %8, i64 6
store i8 %34, i8* %35
%36 = icmp eq i8 %34, 10
br i1 %36, label %76, label %37
37: ; preds = %33
%38 = call signext i8 (...) @getc()
%39 = getelementptr inbounds i8, i8* %8, i64 7
store i8 %38, i8* %39
%40 = icmp eq i8 %38, 10
br i1 %40, label %76, label %41
41: ; preds = %37
%42 = call signext i8 (...) @getc()
%43 = getelementptr inbounds i8, i8* %8, i64 8
store i8 %42, i8* %43
%44 = icmp eq i8 %42, 10
br i1 %44, label %76, label %45
45: ; preds = %41
%46 = call signext i8 (...) @getc()
%47 = getelementptr inbounds i8, i8* %8, i64 9
store i8 %46, i8* %47
%48 = icmp eq i8 %46, 10
br i1 %48, label %76, label %49
49: ; preds = %45
%50 = call signext i8 (...) @getc()
%51 = getelementptr inbounds i8, i8* %8, i64 10
store i8 %50, i8* %51
%52 = icmp eq i8 %50, 10
br i1 %52, label %76, label %53
53: ; preds = %49
%54 = call signext i8 (...) @getc()
%55 = getelementptr inbounds i8, i8* %8, i64 11
store i8 %54, i8* %55
%56 = icmp eq i8 %54, 10
br i1 %56, label %76, label %57
57: ; preds = %53
%58 = call signext i8 (...) @getc()
%59 = getelementptr inbounds i8, i8* %8, i64 12
store i8 %58, i8* %59
%60 = icmp eq i8 %58, 10
br i1 %60, label %76, label %61
61: ; preds = %57
%62 = call signext i8 (...) @getc()
%63 = getelementptr inbounds i8, i8* %8, i64 13
store i8 %62, i8* %63
%64 = icmp eq i8 %62, 10
br i1 %64, label %76, label %65
65: ; preds = %61
%66 = call signext i8 (...) @getc()
%67 = getelementptr inbounds i8, i8* %8, i64 14
store i8 %66, i8* %67
%68 = icmp eq i8 %66, 10
br i1 %68, label %76, label %69
69: ; preds = %65
%70 = call signext i8 (...) @getc()
%71 = getelementptr inbounds i8, i8* %8, i64 15
store i8 %70, i8* %71
%72 = icmp eq i8 %70, 10
br i1 %72, label %76, label %73
73: ; preds = %69
%74 = icmp eq i8 %9, 1
br i1 %74, label %75, label %82
75: ; preds = %73
br label %82
76: ; preds = %6, %13, %17, %21, %25, %29, %33, %37, %41, %45, %49, %53, %57, %61, %65, %69
%77 = phi i64 [ 15, %69 ], [ 14, %65 ], [ 13, %61 ], [ 12, %57 ], [ 11, %53 ], [ 10, %49 ], [ 9, %45 ], [ 8, %41 ], [ 7, %37 ], [ 6, %33 ], [ 5, %29 ], [ 4, %25 ], [ 3, %21 ], [ 2, %17 ], [ 1, %13 ], [ 0, %6 ]
%78 = trunc i64 %77 to i8
%79 = sub nuw nsw i8 16, %78
%80 = getelementptr i8, i8* %8, i64 %77
%81 = sub nuw nsw i64 16, %77
br label %82
82: ; preds = %75, %76, %73
%83 = phi i1 [ false, %73 ], [ true, %75 ], [ true, %76 ]
%84 = phi i8 [ %9, %73 ], [ 1, %75 ], [ 1, %76 ]
%85 = phi i8 [ %10, %73 ], [ 16, %75 ], [ %79, %76 ]
%86 = getelementptr inbounds i8, i8* %8, i64 1
%87 = getelementptr inbounds i8, i8* %8, i64 2
%88 = getelementptr inbounds i8, i8* %8, i64 3
%89 = getelementptr inbounds i8, i8* %8, i64 4
%90 = getelementptr inbounds i8, i8* %8, i64 5
%91 = getelementptr inbounds i8, i8* %8, i64 6
%92 = getelementptr inbounds i8, i8* %8, i64 7
%93 = getelementptr inbounds i8, i8* %8, i64 8
%94 = getelementptr inbounds i8, i8* %8, i64 9
%95 = getelementptr inbounds i8, i8* %8, i64 10
%96 = getelementptr inbounds i8, i8* %8, i64 11
%97 = getelementptr inbounds i8, i8* %8, i64 12
%98 = getelementptr inbounds i8, i8* %8, i64 13
%99 = getelementptr inbounds i8, i8* %8, i64 14
%100 = bitcast i8* %7 to <16 x i8>*
%101 = load <16 x i8>, <16 x i8>* %100
%102 = getelementptr inbounds i8, i8* %8, i64 15
%103 = bitcast i8* %8 to <16 x i8>*
%104 = load <16 x i8>, <16 x i8>* %103
%105 = xor <16 x i8> %104, %101
%106 = bitcast i8* %8 to <16 x i8>*
store <16 x i8> %105, <16 x i8>* %106
%107 = call i32 @aes_encrypt(i8* %8)
%108 = load i8, i8* %8
%109 = call i32 @putc(i8 signext %108)
%110 = load i8, i8* %86
%111 = call i32 @putc(i8 signext %110)
%112 = load i8, i8* %87
%113 = call i32 @putc(i8 signext %112)
%114 = load i8, i8* %88
%115 = call i32 @putc(i8 signext %114)
%116 = load i8, i8* %89
%117 = call i32 @putc(i8 signext %116)
%118 = load i8, i8* %90
%119 = call i32 @putc(i8 signext %118)
%120 = load i8, i8* %91
%121 = call i32 @putc(i8 signext %120)
%122 = load i8, i8* %92
%123 = call i32 @putc(i8 signext %122)
%124 = load i8, i8* %93
%125 = call i32 @putc(i8 signext %124)
%126 = load i8, i8* %94
%127 = call i32 @putc(i8 signext %126)
%128 = load i8, i8* %95
%129 = call i32 @putc(i8 signext %128)
%130 = load i8, i8* %96
%131 = call i32 @putc(i8 signext %130)
%132 = load i8, i8* %97
%133 = call i32 @putc(i8 signext %132)
%134 = load i8, i8* %98
%135 = call i32 @putc(i8 signext %134)
%136 = load i8, i8* %99
%137 = call i32 @putc(i8 signext %136)
%138 = load i8, i8* %102
%139 = call i32 @putc(i8 signext %138)
br i1 %83, label %140, label %6
140: ; preds = %82
%141 = icmp eq i8 %85, 0
br i1 %141, label %142, label %195
142: ; preds = %140
%143 = getelementptr inbounds i8, i8* %7, i64 15
%144 = getelementptr inbounds i8, i8* %7, i64 14
%145 = getelementptr inbounds i8, i8* %7, i64 13
%146 = getelementptr inbounds i8, i8* %7, i64 12
%147 = getelementptr inbounds i8, i8* %7, i64 11
%148 = getelementptr inbounds i8, i8* %7, i64 10
%149 = getelementptr inbounds i8, i8* %7, i64 9
%150 = getelementptr inbounds i8, i8* %7, i64 8
%151 = getelementptr inbounds i8, i8* %7, i64 7
%152 = getelementptr inbounds i8, i8* %7, i64 6
%153 = getelementptr inbounds i8, i8* %7, i64 5
%154 = getelementptr inbounds i8, i8* %7, i64 4
%155 = getelementptr inbounds i8, i8* %7, i64 3
%156 = getelementptr inbounds i8, i8* %7, i64 2
%157 = getelementptr inbounds i8, i8* %7, i64 1
%158 = bitcast i8* %8 to <16 x i8>*
%159 = load <16 x i8>, <16 x i8>* %158
%160 = xor <16 x i8> %159, <i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16>
%161 = bitcast i8* %7 to <16 x i8>*
store <16 x i8> %160, <16 x i8>* %161
%162 = call i32 @aes_encrypt(i8* %7)
%163 = load i8, i8* %7
%164 = call i32 @putc(i8 signext %163)
%165 = load i8, i8* %157
%166 = call i32 @putc(i8 signext %165)
%167 = load i8, i8* %156
%168 = call i32 @putc(i8 signext %167)
%169 = load i8, i8* %155
%170 = call i32 @putc(i8 signext %169)
%171 = load i8, i8* %154
%172 = call i32 @putc(i8 signext %171)
%173 = load i8, i8* %153
%174 = call i32 @putc(i8 signext %173)
%175 = load i8, i8* %152
%176 = call i32 @putc(i8 signext %175)
%177 = load i8, i8* %151
%178 = call i32 @putc(i8 signext %177)
%179 = load i8, i8* %150
%180 = call i32 @putc(i8 signext %179)
%181 = load i8, i8* %149
%182 = call i32 @putc(i8 signext %181)
%183 = load i8, i8* %148
%184 = call i32 @putc(i8 signext %183)
%185 = load i8, i8* %147
%186 = call i32 @putc(i8 signext %185)
%187 = load i8, i8* %146
%188 = call i32 @putc(i8 signext %187)
%189 = load i8, i8* %145
%190 = call i32 @putc(i8 signext %189)
%191 = load i8, i8* %144
%192 = call i32 @putc(i8 signext %191)
%193 = load i8, i8* %143
%194 = call i32 @putc(i8 signext %193)
br label %195
195: ; preds = %142, %140
ret i32 0
}