#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 getchar();
int /*<<< orphan*/ printf(char *, ...);
main() {
  static int number, arr1[20], i = 19, arr2[20], n1, n2, sum[40];
  static int point1, point2, j, k;
  printf("##THIS PROGRAM ADDS BINARY NUMBERS##\n\n");
  printf("Enter The Number1:\n");
  while ((number = getchar()) != '\n') {
    if (number == '0' || number == '1' || number == '.') {
      arr1[i] = number - 48;
      if (number == '.')
        point1 = i;
      i--;
    } else {
      printf("Invalid Operation! not a Binary number..");
      goto amanda;
    }
  }
  n1 = i;
  i = 19;
  printf("Enter The Number2:\n");
  while ((number = getchar()) != '\n') {
    if (number == '0' || number == '1' || number == '.') {
      arr2[i] = number - 48;
      if (number == '.')
        point2 = i;
      i--;
    } else {
      printf("Invalid Operation! not a Binary number..");
      goto amanda;
    }
  }
  n2 = i;
  if (point1 == 0 && point2 == 0) {
    if (n1 < n2) {
      for (i = 19, j = 19, k = 0; i >= n1; i--, j--, k++)
        if (arr1[i] + arr2[j] == 0)
          sum[k] = 0;
        else if (arr1[i] + arr2[j] == 1)
          sum[k] = 1;
        else if (arr1[i] + arr2[j] == 2) {
          sum[k] = 0;
          arr1[i - 1] += 1;
        } else if (arr1[i] + arr2[j] == 3) {
          sum[k] = 1;
          arr1[i - 1] += 1;
        }
      printf("The Sum of the Two numbers is : ");
      for (i = k; i >= 0; i--)
        printf("%d", sum[i]);
    } else if (n2 <= n1) {
      for (i = 19, j = 19, k = 0; j >= n2; i--, j--, k++)
        if (arr1[i] + arr2[j] == 0)
          sum[k] = 0;
        else if (arr1[i] + arr2[j] == 1)
          sum[k] = 1;
        else if (arr1[i] + arr2[j] == 2) {
          sum[k] = 0;
          arr2[j - 1]++;
        } else if (arr1[i] + arr2[j] == 3) {
          sum[k] = 1;
          arr2[j - 1]++;
        }
      printf("The Sum of the Two numbers is : ");
      for (i = k; i >= 0; i--)
        printf("%d", sum[i]);
    }
  } else
    printf("This facility will be made available in next version.");
amanda:
  printf("\nThank you\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,0x2ef8(%rip)
cmp    $0xa,%eax
je     11e7 <main+0xc7>
cmpl   $0x30,0x2ee8(%rip)
je     1188 <main+0x68>
cmpl   $0x31,0x2edb(%rip)
je     1188 <main+0x68>
cmpl   $0x2e,0x2ece(%rip)
jne    11cf <main+0xaf>
mov    0x2ec2(%rip),%edx
sub    $0x30,%edx
movslq 0x2e98(%rip),%rcx
lea    0x2ec1(%rip),%rax
mov    %edx,(%rax,%rcx,4)
cmpl   $0x2e,0x2ea7(%rip)
jne    11bb <main+0x9b>
mov    0x2e7b(%rip),%eax
mov    %eax,0x2ff5(%rip)
mov    0x2e6f(%rip),%eax
add    $0xffffffff,%eax
mov    %eax,0x2e66(%rip)
jmp    11e2 <main+0xc2>
lea    0xe65(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1762 <main+0x642>
jmp    114b <main+0x2b>
mov    0x2e43(%rip),%eax
mov    %eax,0x2f0d(%rip)
movl   $0x13,0x2e33(%rip)
lea    0xe60(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,0x2e38(%rip)
cmp    $0xa,%eax
je     12a7 <main+0x187>
cmpl   $0x30,0x2e28(%rip)
je     1248 <main+0x128>
cmpl   $0x31,0x2e1b(%rip)
je     1248 <main+0x128>
cmpl   $0x2e,0x2e0e(%rip)
jne    128f <main+0x16f>
mov    0x2e02(%rip),%edx
sub    $0x30,%edx
movslq 0x2dd8(%rip),%rcx
lea    0x2e51(%rip),%rax
mov    %edx,(%rax,%rcx,4)
cmpl   $0x2e,0x2de7(%rip)
jne    127b <main+0x15b>
mov    0x2dbb(%rip),%eax
mov    %eax,0x2f39(%rip)
mov    0x2daf(%rip),%eax
add    $0xffffffff,%eax
mov    %eax,0x2da6(%rip)
jmp    12a2 <main+0x182>
lea    0xda5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1762 <main+0x642>
jmp    120b <main+0xeb>
mov    0x2d83(%rip),%eax
mov    %eax,0x2e51(%rip)
cmpl   $0x0,0x2ef6(%rip)
jne    174f <main+0x62f>
cmpl   $0x0,0x2eed(%rip)
jne    174f <main+0x62f>
mov    0x2e2d(%rip),%eax
cmp    0x2e2b(%rip),%eax
jge    1509 <main+0x3e9>
movl   $0x13,0x2d47(%rip)
movl   $0x13,0x2ec5(%rip)
movl   $0x0,0x2ebf(%rip)
mov    0x2d2d(%rip),%eax
cmp    0x2df7(%rip),%eax
jl     14aa <main+0x38a>
movslq 0x2d1a(%rip),%rcx
lea    0x2d43(%rip),%rax
mov    (%rax,%rcx,4),%eax
movslq 0x2e91(%rip),%rdx
lea    0x2d82(%rip),%rcx
add    (%rcx,%rdx,4),%eax
cmp    $0x0,%eax
jne    1354 <main+0x234>
movslq 0x2e7b(%rip),%rcx
lea    0x2dc8(%rip),%rax
movl   $0x0,(%rax,%rcx,4)
jmp    1473 <main+0x353>
movslq 0x2cd5(%rip),%rcx
lea    0x2cfe(%rip),%rax
mov    (%rax,%rcx,4),%eax
movslq 0x2e4c(%rip),%rdx
lea    0x2d3d(%rip),%rcx
add    (%rcx,%rdx,4),%eax
cmp    $0x1,%eax
jne    1399 <main+0x279>
movslq 0x2e36(%rip),%rcx
lea    0x2d83(%rip),%rax
movl   $0x1,(%rax,%rcx,4)
jmp    146e <main+0x34e>
movslq 0x2c90(%rip),%rcx
lea    0x2cb9(%rip),%rax
mov    (%rax,%rcx,4),%eax
movslq 0x2e07(%rip),%rdx
lea    0x2cf8(%rip),%rcx
add    (%rcx,%rdx,4),%eax
cmp    $0x2,%eax
jne    1401 <main+0x2e1>
movslq 0x2df1(%rip),%rcx
lea    0x2d3e(%rip),%rax
movl   $0x0,(%rax,%rcx,4)
mov    0x2c51(%rip),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2c74(%rip),%rax
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
lea    0x2c67(%rip),%rax
mov    %edx,(%rax,%rcx,4)
jmp    1469 <main+0x349>
movslq 0x2c28(%rip),%rcx
lea    0x2c51(%rip),%rax
mov    (%rax,%rcx,4),%eax
movslq 0x2d9f(%rip),%rdx
lea    0x2c90(%rip),%rcx
add    (%rcx,%rdx,4),%eax
cmp    $0x3,%eax
jne    1464 <main+0x344>
movslq 0x2d89(%rip),%rcx
lea    0x2cd6(%rip),%rax
movl   $0x1,(%rax,%rcx,4)
mov    0x2be9(%rip),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2c0c(%rip),%rax
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
lea    0x2bff(%rip),%rax
mov    %edx,(%rax,%rcx,4)
jmp    1469 <main+0x349>
jmp    146e <main+0x34e>
jmp    1473 <main+0x353>
jmp    1478 <main+0x358>
mov    0x2bb2(%rip),%eax
add    $0xffffffff,%eax
mov    %eax,0x2ba9(%rip)
mov    0x2d2b(%rip),%eax
add    $0xffffffff,%eax
mov    %eax,0x2d22(%rip)
mov    0x2d20(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2d17(%rip)
jmp    12fd <main+0x1dd>
lea    0xbc7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2cfe(%rip),%eax
mov    %eax,0x2b6c(%rip)
cmpl   $0x0,0x2b65(%rip)
jl     1504 <main+0x3e4>
movslq 0x2b58(%rip),%rcx
lea    0x2c31(%rip),%rax
mov    (%rax,%rcx,4),%esi
lea    0xbb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2b3a(%rip),%eax
add    $0xffffffff,%eax
mov    %eax,0x2b31(%rip)
jmp    14c4 <main+0x3a4>
jmp    174a <main+0x62a>
mov    0x2bf5(%rip),%eax
cmp    0x2beb(%rip),%eax
jg     1745 <main+0x625>
movl   $0x13,0x2b0b(%rip)
movl   $0x13,0x2c89(%rip)
movl   $0x0,0x2c83(%rip)
mov    0x2c79(%rip),%eax
cmp    0x2bbf(%rip),%eax
jl     16e6 <main+0x5c6>
movslq 0x2ade(%rip),%rcx
lea    0x2b07(%rip),%rax
mov    (%rax,%rcx,4),%eax
movslq 0x2c55(%rip),%rdx
lea    0x2b46(%rip),%rcx
add    (%rcx,%rdx,4),%eax
cmp    $0x0,%eax
jne    1590 <main+0x470>
movslq 0x2c3f(%rip),%rcx
lea    0x2b8c(%rip),%rax
movl   $0x0,(%rax,%rcx,4)
jmp    16af <main+0x58f>
movslq 0x2a99(%rip),%rcx
lea    0x2ac2(%rip),%rax
mov    (%rax,%rcx,4),%eax
movslq 0x2c10(%rip),%rdx
lea    0x2b01(%rip),%rcx
add    (%rcx,%rdx,4),%eax
cmp    $0x1,%eax
jne    15d5 <main+0x4b5>
movslq 0x2bfa(%rip),%rcx
lea    0x2b47(%rip),%rax
movl   $0x1,(%rax,%rcx,4)
jmp    16aa <main+0x58a>
movslq 0x2a54(%rip),%rcx
lea    0x2a7d(%rip),%rax
mov    (%rax,%rcx,4),%eax
movslq 0x2bcb(%rip),%rdx
lea    0x2abc(%rip),%rcx
add    (%rcx,%rdx,4),%eax
cmp    $0x2,%eax
jne    163d <main+0x51d>
movslq 0x2bb5(%rip),%rcx
lea    0x2b02(%rip),%rax
movl   $0x0,(%rax,%rcx,4)
mov    0x2b9d(%rip),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2a88(%rip),%rax
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
lea    0x2a7b(%rip),%rax
mov    %edx,(%rax,%rcx,4)
jmp    16a5 <main+0x585>
movslq 0x29ec(%rip),%rcx
lea    0x2a15(%rip),%rax
mov    (%rax,%rcx,4),%eax
movslq 0x2b63(%rip),%rdx
lea    0x2a54(%rip),%rcx
add    (%rcx,%rdx,4),%eax
cmp    $0x3,%eax
jne    16a0 <main+0x580>
movslq 0x2b4d(%rip),%rcx
lea    0x2a9a(%rip),%rax
movl   $0x1,(%rax,%rcx,4)
mov    0x2b35(%rip),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2a20(%rip),%rax
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
lea    0x2a13(%rip),%rax
mov    %edx,(%rax,%rcx,4)
jmp    16a5 <main+0x585>
jmp    16aa <main+0x58a>
jmp    16af <main+0x58f>
jmp    16b4 <main+0x594>
mov    0x2976(%rip),%eax
add    $0xffffffff,%eax
mov    %eax,0x296d(%rip)
mov    0x2aef(%rip),%eax
add    $0xffffffff,%eax
mov    %eax,0x2ae6(%rip)
mov    0x2ae4(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2adb(%rip)
jmp    1539 <main+0x419>
lea    0x98b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2ac2(%rip),%eax
mov    %eax,0x2930(%rip)
cmpl   $0x0,0x2929(%rip)
jl     1740 <main+0x620>
movslq 0x291c(%rip),%rcx
lea    0x29f5(%rip),%rax
mov    (%rax,%rcx,4),%esi
lea    0x974(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x28fe(%rip),%eax
add    $0xffffffff,%eax
mov    %eax,0x28f5(%rip)
jmp    1700 <main+0x5e0>
jmp    1745 <main+0x625>
jmp    174a <main+0x62a>
jmp    175d <main+0x63d>
lea    0x946(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1762 <main+0x642>
lea    0x969(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xf68(%rip),%rdi
call   1030 <puts@plt>
lea    0xf82(%rip),%rdi
call   1030 <puts@plt>
lea    0x2efd(%rip),%rbx
jmp    1169 <main+0x39>
cs nopw 0x0(%rax,%rax,1)
nop
lea    -0x1(%rdx),%eax
mov    %eax,0x2ecf(%rip)
xor    %eax,%eax
call   1050 <getchar@plt>
lea    -0x30(%rax),%ecx
cmp    $0x2,%ecx
jb     117d <main+0x4d>
cmp    $0x2e,%eax
jne    1194 <main+0x64>
movslq 0x2eb4(%rip),%rdx
mov    %ecx,(%rbx,%rdx,4)
cmp    $0x2e,%eax
jne    1160 <main+0x30>
mov    %edx,0x300e(%rip)
jmp    1160 <main+0x30>
cmp    $0xa,%eax
jne    1261 <main+0x131>
mov    0x2e95(%rip),%eax
mov    %eax,0x2f47(%rip)
movl   $0x13,0x2e85(%rip)
lea    0xf22(%rip),%rdi
call   1030 <puts@plt>
lea    0x2eda(%rip),%r14
jmp    11d9 <main+0xa9>
nopl   0x0(%rax,%rax,1)
lea    -0x1(%rdx),%eax
mov    %eax,0x2e5f(%rip)
xor    %eax,%eax
call   1050 <getchar@plt>
lea    -0x30(%rax),%ecx
cmp    $0x2,%ecx
jb     11ed <main+0xbd>
cmp    $0x2e,%eax
jne    1205 <main+0xd5>
movslq 0x2e44(%rip),%rdx
mov    %ecx,(%r14,%rdx,4)
cmp    $0x2e,%eax
jne    11d0 <main+0xa0>
mov    %edx,0x2fa1(%rip)
jmp    11d0 <main+0xa0>
cmp    $0xa,%eax
jne    1261 <main+0x131>
mov    0x2f90(%rip),%eax
or     0x2f8e(%rip),%eax
jne    12f8 <main+0x1c8>
mov    0x2e16(%rip),%ecx
mov    0x2ec8(%rip),%edx
movl   $0x13,0x2e06(%rip)
xor    %eax,%eax
cmp    %ecx,%edx
jge    1304 <main+0x1d4>
cmp    $0x13,%edx
jg     139e <main+0x26e>
mov    $0x14,%eax
sub    %edx,%eax
mov    $0x13,%ecx
lea    0x2ea8(%rip),%rdx
lea    0xdb1(%rip),%rsi
jmp    12b5 <main+0x185>
lea    0xdb8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe79(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
cs nopw 0x0(%rax,%rax,1)
nop
movl   $0x1,(%rdx)
addl   $0x1,-0x4(%rbx,%rcx,4)
add    $0x4,%rdx
lea    (%rax,%rcx,1),%rdi
add    $0xffffffffffffffff,%rdi
add    $0xffffffffffffffff,%rcx
cmp    $0x13,%rdi
je     1398 <main+0x268>
mov    (%r14,%rcx,4),%edi
add    (%rbx,%rcx,4),%edi
cmp    $0x3,%edi
ja     129b <main+0x16b>
movslq (%rsi,%rdi,4),%rdi
add    %rsi,%rdi
jmp    *%rdi
movl   $0x0,(%rdx)
jmp    129b <main+0x16b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movl   $0x1,(%rdx)
jmp    129b <main+0x16b>
nopl   0x0(%rax,%rax,1)
movl   $0x0,(%rdx)
jmp    1296 <main+0x166>
lea    0xd6e(%rip),%rdi
jmp    1268 <main+0x138>
cmp    $0x13,%ecx
jg     140e <main+0x2de>
mov    $0x14,%eax
sub    %ecx,%eax
mov    $0x13,%ecx
lea    0x2de0(%rip),%rdx
lea    0xcd9(%rip),%rsi
jmp    1356 <main+0x226>
nopl   0x0(%rax)
movl   $0x1,(%rdx)
addl   $0x1,-0x4(%r14,%rcx,4)
add    $0x4,%rdx
lea    (%rax,%rcx,1),%rdi
add    $0xffffffffffffffff,%rdi
add    $0xffffffffffffffff,%rcx
cmp    $0x13,%rdi
je     1408 <main+0x2d8>
mov    (%r14,%rcx,4),%edi
add    (%rbx,%rcx,4),%edi
cmp    $0x3,%edi
ja     133c <main+0x20c>
movslq (%rsi,%rdi,4),%rdi
add    %rsi,%rdi
jmp    *%rdi
movl   $0x0,(%rdx)
jmp    133c <main+0x20c>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movl   $0x1,(%rdx)
jmp    133c <main+0x20c>
nopl   0x0(%rax,%rax,1)
movl   $0x0,(%rdx)
jmp    1336 <main+0x206>
mov    %ecx,0x2c9a(%rip)
mov    %eax,0x2e04(%rip)
lea    0xc9e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2df0(%rip),%eax
mov    %eax,0x2c7a(%rip)
test   %eax,%eax
js     126f <main+0x13f>
lea    0x2d33(%rip),%r14
lea    0xc96(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %eax,%eax
mov    (%r14,%rax,4),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2c42(%rip),%ecx
lea    -0x1(%rcx),%eax
mov    %eax,0x2c39(%rip)
test   %ecx,%ecx
jg     13e0 <main+0x2b0>
jmp    126f <main+0x13f>
mov    %ecx,0x2c2a(%rip)
mov    %eax,0x2d94(%rip)
lea    0xc2e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2d80(%rip),%eax
mov    %eax,0x2c0a(%rip)
test   %eax,%eax
js     126f <main+0x13f>
lea    0x2cc3(%rip),%r14
lea    0xc26(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %eax,%eax
mov    (%r14,%rax,4),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2bd2(%rip),%ecx
lea    -0x1(%rcx),%eax
mov    %eax,0x2bc9(%rip)
test   %ecx,%ecx
jg     1450 <main+0x320>
jmp    126f <main+0x13f>

LLVM IR (-O0):
@main.number = internal global i32 0
@main.arr1 = internal global [20 x i32] zeroinitializer
@main.i = internal global i32 19
@main.arr2 = internal global [20 x i32] zeroinitializer
@main.n1 = internal global i32 0
@main.n2 = internal global i32 0
@main.sum = internal global [40 x i32] zeroinitializer
@main.point1 = internal global i32 0
@main.point2 = internal global i32 0
@main.j = internal global i32 0
@main.k = internal global i32 0
@.str = [39 x i8] c"##THIS PROGRAM ADDS BINARY NUMBERS##\0A\0A\00"
@.str.1 = [20 x i8] c"Enter The Number1:\0A\00"
@.str.2 = [41 x i8] c"Invalid Operation! not a Binary number..\00"
@.str.3 = [20 x i8] c"Enter The Number2:\0A\00"
@.str.4 = [33 x i8] c"The Sum of the Two numbers is : \00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [54 x i8] c"This facility will be made available in next version.\00"
@.str.7 = [12 x i8] c"\0AThank you\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
br label %4
4: ; preds = %31, %0
%5 = call i32 (...) @getchar()
store i32 %5, i32* @main.number
%6 = icmp ne i32 %5, 10
br i1 %6, label %7, label %32
7: ; preds = %4
%8 = load i32, i32* @main.number
%9 = icmp eq i32 %8, 48
br i1 %9, label %16, label %10
10: ; preds = %7
%11 = load i32, i32* @main.number
%12 = icmp eq i32 %11, 49
br i1 %12, label %16, label %13
13: ; preds = %10
%14 = load i32, i32* @main.number
%15 = icmp eq i32 %14, 46
br i1 %15, label %16, label %29
16: ; preds = %13, %10, %7
%17 = load i32, i32* @main.number
%18 = sub nsw i32 %17, 48
%19 = load i32, i32* @main.i
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr1, i64 0, i64 %20
store i32 %18, i32* %21
%22 = load i32, i32* @main.number
%23 = icmp eq i32 %22, 46
br i1 %23, label %24, label %26
24: ; preds = %16
%25 = load i32, i32* @main.i
store i32 %25, i32* @main.point1
br label %26
26: ; preds = %24, %16
%27 = load i32, i32* @main.i
%28 = add nsw i32 %27, -1
store i32 %28, i32* @main.i
br label %31
29: ; preds = %13
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
br label %291
31: ; preds = %26
br label %4
32: ; preds = %4
%33 = load i32, i32* @main.i
store i32 %33, i32* @main.n1
store i32 19, i32* @main.i
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
br label %35
35: ; preds = %62, %32
%36 = call i32 (...) @getchar()
store i32 %36, i32* @main.number
%37 = icmp ne i32 %36, 10
br i1 %37, label %38, label %63
38: ; preds = %35
%39 = load i32, i32* @main.number
%40 = icmp eq i32 %39, 48
br i1 %40, label %47, label %41
41: ; preds = %38
%42 = load i32, i32* @main.number
%43 = icmp eq i32 %42, 49
br i1 %43, label %47, label %44
44: ; preds = %41
%45 = load i32, i32* @main.number
%46 = icmp eq i32 %45, 46
br i1 %46, label %47, label %60
47: ; preds = %44, %41, %38
%48 = load i32, i32* @main.number
%49 = sub nsw i32 %48, 48
%50 = load i32, i32* @main.i
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr2, i64 0, i64 %51
store i32 %49, i32* %52
%53 = load i32, i32* @main.number
%54 = icmp eq i32 %53, 46
br i1 %54, label %55, label %57
55: ; preds = %47
%56 = load i32, i32* @main.i
store i32 %56, i32* @main.point2
br label %57
57: ; preds = %55, %47
%58 = load i32, i32* @main.i
%59 = add nsw i32 %58, -1
store i32 %59, i32* @main.i
br label %62
60: ; preds = %44
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
br label %291
62: ; preds = %57
br label %35
63: ; preds = %35
%64 = load i32, i32* @main.i
store i32 %64, i32* @main.n2
%65 = load i32, i32* @main.point1
%66 = icmp eq i32 %65, 0
br i1 %66, label %67, label %288
67: ; preds = %63
%68 = load i32, i32* @main.point2
%69 = icmp eq i32 %68, 0
br i1 %69, label %70, label %288
70: ; preds = %67
%71 = load i32, i32* @main.n1
%72 = load i32, i32* @main.n2
%73 = icmp slt i32 %71, %72
br i1 %73, label %74, label %178
74: ; preds = %70
store i32 19, i32* @main.i
store i32 19, i32* @main.j
store i32 0, i32* @main.k
br label %75
75: ; preds = %155, %74
%76 = load i32, i32* @main.i
%77 = load i32, i32* @main.n1
%78 = icmp sge i32 %76, %77
br i1 %78, label %79, label %162
79: ; preds = %75
%80 = load i32, i32* @main.i
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr1, i64 0, i64 %81
%83 = load i32, i32* %82
%84 = load i32, i32* @main.j
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr2, i64 0, i64 %85
%87 = load i32, i32* %86
%88 = add nsw i32 %83, %87
%89 = icmp eq i32 %88, 0
br i1 %89, label %90, label %94
90: ; preds = %79
%91 = load i32, i32* @main.k
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds [40 x i32], [40 x i32]* @main.sum, i64 0, i64 %92
store i32 0, i32* %93
br label %154
94: ; preds = %79
%95 = load i32, i32* @main.i
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr1, i64 0, i64 %96
%98 = load i32, i32* %97
%99 = load i32, i32* @main.j
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr2, i64 0, i64 %100
%102 = load i32, i32* %101
%103 = add nsw i32 %98, %102
%104 = icmp eq i32 %103, 1
br i1 %104, label %105, label %109
105: ; preds = %94
%106 = load i32, i32* @main.k
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds [40 x i32], [40 x i32]* @main.sum, i64 0, i64 %107
store i32 1, i32* %108
br label %153
109: ; preds = %94
%110 = load i32, i32* @main.i
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr1, i64 0, i64 %111
%113 = load i32, i32* %112
%114 = load i32, i32* @main.j
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr2, i64 0, i64 %115
%117 = load i32, i32* %116
%118 = add nsw i32 %113, %117
%119 = icmp eq i32 %118, 2
br i1 %119, label %120, label %130
120: ; preds = %109
%121 = load i32, i32* @main.k
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds [40 x i32], [40 x i32]* @main.sum, i64 0, i64 %122
store i32 0, i32* %123
%124 = load i32, i32* @main.i
%125 = sub nsw i32 %124, 1
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr1, i64 0, i64 %126
%128 = load i32, i32* %127
%129 = add nsw i32 %128, 1
store i32 %129, i32* %127
br label %152
130: ; preds = %109
%131 = load i32, i32* @main.i
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr1, i64 0, i64 %132
%134 = load i32, i32* %133
%135 = load i32, i32* @main.j
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr2, i64 0, i64 %136
%138 = load i32, i32* %137
%139 = add nsw i32 %134, %138
%140 = icmp eq i32 %139, 3
br i1 %140, label %141, label %151
141: ; preds = %130
%142 = load i32, i32* @main.k
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds [40 x i32], [40 x i32]* @main.sum, i64 0, i64 %143
store i32 1, i32* %144
%145 = load i32, i32* @main.i
%146 = sub nsw i32 %145, 1
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr1, i64 0, i64 %147
%149 = load i32, i32* %148
%150 = add nsw i32 %149, 1
store i32 %150, i32* %148
br label %151
151: ; preds = %141, %130
br label %152
152: ; preds = %151, %120
br label %153
153: ; preds = %152, %105
br label %154
154: ; preds = %153, %90
br label %155
155: ; preds = %154
%156 = load i32, i32* @main.i
%157 = add nsw i32 %156, -1
store i32 %157, i32* @main.i
%158 = load i32, i32* @main.j
%159 = add nsw i32 %158, -1
store i32 %159, i32* @main.j
%160 = load i32, i32* @main.k
%161 = add nsw i32 %160, 1
store i32 %161, i32* @main.k
br label %75
162: ; preds = %75
%163 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
%164 = load i32, i32* @main.k
store i32 %164, i32* @main.i
br label %165
165: ; preds = %174, %162
%166 = load i32, i32* @main.i
%167 = icmp sge i32 %166, 0
br i1 %167, label %168, label %177
168: ; preds = %165
%169 = load i32, i32* @main.i
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds [40 x i32], [40 x i32]* @main.sum, i64 0, i64 %170
%172 = load i32, i32* %171
%173 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %172)
br label %174
174: ; preds = %168
%175 = load i32, i32* @main.i
%176 = add nsw i32 %175, -1
store i32 %176, i32* @main.i
br label %165
177: ; preds = %165
br label %287
178: ; preds = %70
%179 = load i32, i32* @main.n2
%180 = load i32, i32* @main.n1
%181 = icmp sle i32 %179, %180
br i1 %181, label %182, label %286
182: ; preds = %178
store i32 19, i32* @main.i
store i32 19, i32* @main.j
store i32 0, i32* @main.k
br label %183
183: ; preds = %263, %182
%184 = load i32, i32* @main.j
%185 = load i32, i32* @main.n2
%186 = icmp sge i32 %184, %185
br i1 %186, label %187, label %270
187: ; preds = %183
%188 = load i32, i32* @main.i
%189 = sext i32 %188 to i64
%190 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr1, i64 0, i64 %189
%191 = load i32, i32* %190
%192 = load i32, i32* @main.j
%193 = sext i32 %192 to i64
%194 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr2, i64 0, i64 %193
%195 = load i32, i32* %194
%196 = add nsw i32 %191, %195
%197 = icmp eq i32 %196, 0
br i1 %197, label %198, label %202
198: ; preds = %187
%199 = load i32, i32* @main.k
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds [40 x i32], [40 x i32]* @main.sum, i64 0, i64 %200
store i32 0, i32* %201
br label %262
202: ; preds = %187
%203 = load i32, i32* @main.i
%204 = sext i32 %203 to i64
%205 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr1, i64 0, i64 %204
%206 = load i32, i32* %205
%207 = load i32, i32* @main.j
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr2, i64 0, i64 %208
%210 = load i32, i32* %209
%211 = add nsw i32 %206, %210
%212 = icmp eq i32 %211, 1
br i1 %212, label %213, label %217
213: ; preds = %202
%214 = load i32, i32* @main.k
%215 = sext i32 %214 to i64
%216 = getelementptr inbounds [40 x i32], [40 x i32]* @main.sum, i64 0, i64 %215
store i32 1, i32* %216
br label %261
217: ; preds = %202
%218 = load i32, i32* @main.i
%219 = sext i32 %218 to i64
%220 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr1, i64 0, i64 %219
%221 = load i32, i32* %220
%222 = load i32, i32* @main.j
%223 = sext i32 %222 to i64
%224 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr2, i64 0, i64 %223
%225 = load i32, i32* %224
%226 = add nsw i32 %221, %225
%227 = icmp eq i32 %226, 2
br i1 %227, label %228, label %238
228: ; preds = %217
%229 = load i32, i32* @main.k
%230 = sext i32 %229 to i64
%231 = getelementptr inbounds [40 x i32], [40 x i32]* @main.sum, i64 0, i64 %230
store i32 0, i32* %231
%232 = load i32, i32* @main.j
%233 = sub nsw i32 %232, 1
%234 = sext i32 %233 to i64
%235 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr2, i64 0, i64 %234
%236 = load i32, i32* %235
%237 = add nsw i32 %236, 1
store i32 %237, i32* %235
br label %260
238: ; preds = %217
%239 = load i32, i32* @main.i
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr1, i64 0, i64 %240
%242 = load i32, i32* %241
%243 = load i32, i32* @main.j
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr2, i64 0, i64 %244
%246 = load i32, i32* %245
%247 = add nsw i32 %242, %246
%248 = icmp eq i32 %247, 3
br i1 %248, label %249, label %259
249: ; preds = %238
%250 = load i32, i32* @main.k
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds [40 x i32], [40 x i32]* @main.sum, i64 0, i64 %251
store i32 1, i32* %252
%253 = load i32, i32* @main.j
%254 = sub nsw i32 %253, 1
%255 = sext i32 %254 to i64
%256 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr2, i64 0, i64 %255
%257 = load i32, i32* %256
%258 = add nsw i32 %257, 1
store i32 %258, i32* %256
br label %259
259: ; preds = %249, %238
br label %260
260: ; preds = %259, %228
br label %261
261: ; preds = %260, %213
br label %262
262: ; preds = %261, %198
br label %263
263: ; preds = %262
%264 = load i32, i32* @main.i
%265 = add nsw i32 %264, -1
store i32 %265, i32* @main.i
%266 = load i32, i32* @main.j
%267 = add nsw i32 %266, -1
store i32 %267, i32* @main.j
%268 = load i32, i32* @main.k
%269 = add nsw i32 %268, 1
store i32 %269, i32* @main.k
br label %183
270: ; preds = %183
%271 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
%272 = load i32, i32* @main.k
store i32 %272, i32* @main.i
br label %273
273: ; preds = %282, %270
%274 = load i32, i32* @main.i
%275 = icmp sge i32 %274, 0
br i1 %275, label %276, label %285
276: ; preds = %273
%277 = load i32, i32* @main.i
%278 = sext i32 %277 to i64
%279 = getelementptr inbounds [40 x i32], [40 x i32]* @main.sum, i64 0, i64 %278
%280 = load i32, i32* %279
%281 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %280)
br label %282
282: ; preds = %276
%283 = load i32, i32* @main.i
%284 = add nsw i32 %283, -1
store i32 %284, i32* @main.i
br label %273
285: ; preds = %273
br label %286
286: ; preds = %285, %178
br label %287
287: ; preds = %286, %177
br label %290
288: ; preds = %67, %63
%289 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.6, i64 0, i64 0))
br label %290
290: ; preds = %288, %287
br label %291
291: ; preds = %290, %60, %29
%292 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0))
%293 = load i32, i32* %1
ret i32 %293
}

LLVM IR (-O2):
@main.arr1 = internal unnamed_addr global [20 x i32] zeroinitializer
@main.i = internal unnamed_addr global i32 19
@main.arr2 = internal unnamed_addr global [20 x i32] zeroinitializer
@main.n1 = internal unnamed_addr global i32 0
@main.sum = internal unnamed_addr global [40 x i32] zeroinitializer
@main.point1 = internal unnamed_addr global i32 0
@main.point2 = internal unnamed_addr global i32 0
@main.k = internal unnamed_addr global i32 0
@.str.2 = [41 x i8] c"Invalid Operation! not a Binary number..\00"
@.str.4 = [33 x i8] c"The Sum of the Two numbers is : \00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [54 x i8] c"This facility will be made available in next version.\00"
@str = [38 x i8] c"##THIS PROGRAM ADDS BINARY NUMBERS##\0A\00"
@str.8 = [19 x i8] c"Enter The Number1:\00"
@str.9 = [19 x i8] c"Enter The Number2:\00"
@str.10 = [11 x i8] c"\0AThank you\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.8, i64 0, i64 0))
br label %3
3: ; preds = %12, %0
%4 = tail call i32 (...) @getchar()
switch i32 %4, label %136 [
i32 10, label %14
i32 49, label %5
i32 48, label %5
i32 46, label %5
]
5: ; preds = %3, %3, %3
%6 = add nsw i32 %4, -48
%7 = load i32, i32* @main.i
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr1, i64 0, i64 %8
store i32 %6, i32* %9
%10 = icmp eq i32 %4, 46
br i1 %10, label %11, label %12
11: ; preds = %5
store i32 %7, i32* @main.point1
br label %12
12: ; preds = %11, %5
%13 = add nsw i32 %7, -1
store i32 %13, i32* @main.i
br label %3
14: ; preds = %3
%15 = load i32, i32* @main.i
store i32 %15, i32* @main.n1
store i32 19, i32* @main.i
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.9, i64 0, i64 0))
br label %17
17: ; preds = %26, %14
%18 = tail call i32 (...) @getchar()
switch i32 %18, label %136 [
i32 10, label %28
i32 49, label %19
i32 48, label %19
i32 46, label %19
]
19: ; preds = %17, %17, %17
%20 = add nsw i32 %18, -48
%21 = load i32, i32* @main.i
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr2, i64 0, i64 %22
store i32 %20, i32* %23
%24 = icmp eq i32 %18, 46
br i1 %24, label %25, label %26
25: ; preds = %19
store i32 %21, i32* @main.point2
br label %26
26: ; preds = %25, %19
%27 = add nsw i32 %21, -1
store i32 %27, i32* @main.i
br label %17
28: ; preds = %17
%29 = load i32, i32* @main.i
%30 = load i32, i32* @main.point1
%31 = icmp eq i32 %30, 0
%32 = load i32, i32* @main.point2
%33 = icmp eq i32 %32, 0
%34 = select i1 %31, i1 %33, i1 false
br i1 %34, label %35, label %136
35: ; preds = %28
%36 = load i32, i32* @main.n1
%37 = icmp slt i32 %36, %29
store i32 19, i32* @main.i
br i1 %37, label %38, label %87
38: ; preds = %35
%39 = icmp sgt i32 %36, 19
br i1 %39, label %73, label %40
40: ; preds = %38
%41 = sub i32 20, %36
%42 = zext i32 %41 to i64
br label %43
43: ; preds = %40, %67
%44 = phi i64 [ 19, %40 ], [ %68, %67 ]
%45 = phi i64 [ 0, %40 ], [ %69, %67 ]
%46 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr1, i64 0, i64 %44
%47 = load i32, i32* %46
%48 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr2, i64 0, i64 %44
%49 = load i32, i32* %48
%50 = add nsw i32 %49, %47
switch i32 %50, label %67 [
i32 0, label %51
i32 1, label %53
i32 2, label %55
i32 3, label %61
]
51: ; preds = %43
%52 = getelementptr inbounds [40 x i32], [40 x i32]* @main.sum, i64 0, i64 %45
store i32 0, i32* %52
br label %67
53: ; preds = %43
%54 = getelementptr inbounds [40 x i32], [40 x i32]* @main.sum, i64 0, i64 %45
store i32 1, i32* %54
br label %67
55: ; preds = %43
%56 = getelementptr inbounds [40 x i32], [40 x i32]* @main.sum, i64 0, i64 %45
store i32 0, i32* %56
%57 = add nsw i64 %44, -1
%58 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr1, i64 0, i64 %57
%59 = load i32, i32* %58
%60 = add nsw i32 %59, 1
store i32 %60, i32* %58
br label %67
61: ; preds = %43
%62 = getelementptr inbounds [40 x i32], [40 x i32]* @main.sum, i64 0, i64 %45
store i32 1, i32* %62
%63 = add nsw i64 %44, -1
%64 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr1, i64 0, i64 %63
%65 = load i32, i32* %64
%66 = add nsw i32 %65, 1
store i32 %66, i32* %64
br label %67
67: ; preds = %43, %51, %55, %61, %53
%68 = add nsw i64 %44, -1
%69 = add nuw nsw i64 %45, 1
%70 = icmp eq i64 %69, %42
br i1 %70, label %71, label %43
71: ; preds = %67
%72 = trunc i64 %68 to i32
store i32 %72, i32* @main.i
br label %73
73: ; preds = %71, %38
%74 = phi i32 [ %41, %71 ], [ 0, %38 ]
store i32 %74, i32* @main.k
%75 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
%76 = load i32, i32* @main.k
store i32 %76, i32* @main.i
%77 = icmp sgt i32 %76, -1
br i1 %77, label %78, label %139
78: ; preds = %73, %78
%79 = phi i32 [ %85, %78 ], [ %76, %73 ]
%80 = zext i32 %79 to i64
%81 = getelementptr inbounds [40 x i32], [40 x i32]* @main.sum, i64 0, i64 %80
%82 = load i32, i32* %81
%83 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %82)
%84 = load i32, i32* @main.i
%85 = add nsw i32 %84, -1
store i32 %85, i32* @main.i
%86 = icmp sgt i32 %84, 0
br i1 %86, label %78, label %139
87: ; preds = %35
%88 = icmp sgt i32 %29, 19
br i1 %88, label %122, label %89
89: ; preds = %87
%90 = sub i32 20, %29
%91 = zext i32 %90 to i64
br label %92
92: ; preds = %89, %116
%93 = phi i64 [ 19, %89 ], [ %117, %116 ]
%94 = phi i64 [ 0, %89 ], [ %118, %116 ]
%95 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr1, i64 0, i64 %93
%96 = load i32, i32* %95
%97 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr2, i64 0, i64 %93
%98 = load i32, i32* %97
%99 = add nsw i32 %98, %96
switch i32 %99, label %116 [
i32 0, label %100
i32 1, label %102
i32 2, label %104
i32 3, label %110
]
100: ; preds = %92
%101 = getelementptr inbounds [40 x i32], [40 x i32]* @main.sum, i64 0, i64 %94
store i32 0, i32* %101
br label %116
102: ; preds = %92
%103 = getelementptr inbounds [40 x i32], [40 x i32]* @main.sum, i64 0, i64 %94
store i32 1, i32* %103
br label %116
104: ; preds = %92
%105 = getelementptr inbounds [40 x i32], [40 x i32]* @main.sum, i64 0, i64 %94
store i32 0, i32* %105
%106 = add nsw i64 %93, -1
%107 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr2, i64 0, i64 %106
%108 = load i32, i32* %107
%109 = add nsw i32 %108, 1
store i32 %109, i32* %107
br label %116
110: ; preds = %92
%111 = getelementptr inbounds [40 x i32], [40 x i32]* @main.sum, i64 0, i64 %94
store i32 1, i32* %111
%112 = add nsw i64 %93, -1
%113 = getelementptr inbounds [20 x i32], [20 x i32]* @main.arr2, i64 0, i64 %112
%114 = load i32, i32* %113
%115 = add nsw i32 %114, 1
store i32 %115, i32* %113
br label %116
116: ; preds = %92, %100, %104, %110, %102
%117 = add nsw i64 %93, -1
%118 = add nuw nsw i64 %94, 1
%119 = icmp eq i64 %118, %91
br i1 %119, label %120, label %92
120: ; preds = %116
%121 = trunc i64 %117 to i32
store i32 %121, i32* @main.i
br label %122
122: ; preds = %120, %87
%123 = phi i32 [ %90, %120 ], [ 0, %87 ]
store i32 %123, i32* @main.k
%124 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
%125 = load i32, i32* @main.k
store i32 %125, i32* @main.i
%126 = icmp sgt i32 %125, -1
br i1 %126, label %127, label %139
127: ; preds = %122, %127
%128 = phi i32 [ %134, %127 ], [ %125, %122 ]
%129 = zext i32 %128 to i64
%130 = getelementptr inbounds [40 x i32], [40 x i32]* @main.sum, i64 0, i64 %129
%131 = load i32, i32* %130
%132 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %131)
%133 = load i32, i32* @main.i
%134 = add nsw i32 %133, -1
store i32 %134, i32* @main.i
%135 = icmp sgt i32 %133, 0
br i1 %135, label %127, label %139
136: ; preds = %3, %17, %28
%137 = phi i8* [ getelementptr inbounds ([54 x i8], [54 x i8]* @.str.6, i64 0, i64 0), %28 ], [ getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0), %17 ], [ getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0), %3 ]
%138 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %137)
br label %139
139: ; preds = %127, %78, %136, %122, %73
%140 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.10, i64 0, i64 0))
ret i32 0
}