#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*/ gets(char *);
scalar_t__ icp(char);
scalar_t__ isp(char);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, int *);
char strlen(char *);
main() {
  char in[30], i, len, post[30], opr[30], ch1, ch2;
  int ans[20], post_top = -1, opr_top = -1, ans_top = -1;
  int val;
  printf("\nEnter the expression:");
  gets(in);
  opr[++opr_top] = '#';
  for (i = 0; i < strlen(in); i++) {
    ch1 = in[i];
    printf("Token %c \n", ch1);
    if (ch1 == '#') {
    }
    if (ch1 == '+' || ch1 == '-' || ch1 == '*' || ch1 == '/' || ch1 == '^') {
      if (icp(ch1) > isp(opr[opr_top])) {
        printf("~");
        opr[++opr_top] = ch1;
      } else {
        printf("!");
        while (icp(ch1) <= isp(opr[opr_top])) {
          post[++post_top] = opr[opr_top--];
        }
        opr[++opr_top] = ch1;
      }
    }
    if (ch1 == ')') {
      while (opr[opr_top] != '(') {
        post[++post_top] = opr[opr_top--];
      }
      opr_top--;
    }
    if (ch1 == '(') {
      opr[++opr_top] = ch1;
    }
    if (ch1 >= 'a' && ch1 <= 'z') {
      post[++post_top] = ch1;
    }
    post[post_top + 1] = '\0';
    opr[opr_top + 1] = '\0';
    puts(post);
    puts(opr);
  }
  while (opr[opr_top] != '#') {
    post[++post_top] = opr[opr_top--];
  }
  opr[0] = '\0';
  post[post_top + 1] = '\0';
  printf("\n");
  puts(post);
  for (i = 0; i <= post_top; i++) {
    ch1 = post[i];
    printf("\n");
    if ((ch1 >= 'a') && (ch1 <= 'z')) {
      printf("Enter the value of %c  \n", ch1);
      scanf("%d", &val);
      ans[++ans_top] = val;
    }
    if (ch1 == '+') {
      ans[ans_top - 1] = ans[ans_top - 1] + ans[ans_top];
      ans_top--;
    }
    if (ch1 == '-') {
      ans[ans_top - 1] = ans[ans_top - 1] - ans[ans_top];
      ans_top--;
    }
    if (ch1 == '*') {
      ans[ans_top - 1] = ans[ans_top - 1] * ans[ans_top];
      ans_top--;
    }
    if (ch1 == '/') {
      ans[ans_top - 1] = ans[ans_top - 1] / ans[ans_top];
      ans_top--;
    }
  }
  printf("Result %d\n", ans[0]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffffff,-0xd4(%rbp)
ff ff ff
movl   $0xffffffff,-0xd8(%rbp)
ff ff ff
movl   $0xffffffff,-0xdc(%rbp)
ff ff ff
lea    0xe59(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x30(%rbp),%rdi
call   1060 <gets@plt>
mov    -0xd8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd8(%rbp)
cltq
movb   $0x23,-0x70(%rbp,%rax,1)
movb   $0x0,-0x31(%rbp)
movsbl -0x31(%rbp),%eax
mov    %eax,-0xe4(%rbp)
lea    -0x30(%rbp),%rdi
call   1040 <strlen@plt>
mov    %al,%cl
mov    -0xe4(%rbp),%eax
movsbl %cl,%ecx
cmp    %ecx,%eax
jge    1454 <main+0x2e4>
movsbq -0x31(%rbp),%rax
mov    -0x30(%rbp,%rax,1),%al
mov    %al,-0x71(%rbp)
movsbl -0x71(%rbp),%esi
lea    0xe09(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movsbl -0x71(%rbp),%eax
cmp    $0x23,%eax
jne    1227 <main+0xb7>
jmp    1227 <main+0xb7>
movsbl -0x71(%rbp),%eax
cmp    $0x2b,%eax
je     1268 <main+0xf8>
movsbl -0x71(%rbp),%eax
cmp    $0x2d,%eax
je     1268 <main+0xf8>
movsbl -0x71(%rbp),%eax
cmp    $0x2a,%eax
je     1268 <main+0xf8>
movsbl -0x71(%rbp),%eax
cmp    $0x2f,%eax
je     1268 <main+0xf8>
movsbl -0x71(%rbp),%eax
cmp    $0x5e,%eax
jne    1357 <main+0x1e7>
movsbl -0x71(%rbp),%edi
call   1080 <icp@plt>
mov    %rax,-0xf0(%rbp)
movslq -0xd8(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%edi
call   1090 <isp@plt>
mov    %rax,%rcx
mov    -0xf0(%rbp),%rax
cmp    %rcx,%rax
jle    12c7 <main+0x157>
lea    0xd7f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x71(%rbp),%cl
mov    -0xd8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd8(%rbp)
cltq
mov    %cl,-0x70(%rbp,%rax,1)
jmp    1352 <main+0x1e2>
lea    0xd56(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movsbl -0x71(%rbp),%edi
call   1080 <icp@plt>
mov    %rax,-0xf8(%rbp)
movslq -0xd8(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%edi
call   1090 <isp@plt>
mov    %rax,%rcx
mov    -0xf8(%rbp),%rax
cmp    %rcx,%rax
jg     133a <main+0x1ca>
mov    -0xd8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xd8(%rbp)
cltq
mov    -0x70(%rbp,%rax,1),%cl
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
cltq
mov    %cl,-0x50(%rbp,%rax,1)
jmp    12d5 <main+0x165>
mov    -0x71(%rbp),%cl
mov    -0xd8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd8(%rbp)
cltq
mov    %cl,-0x70(%rbp,%rax,1)
jmp    1357 <main+0x1e7>
movsbl -0x71(%rbp),%eax
cmp    $0x29,%eax
jne    13be <main+0x24e>
jmp    1369 <main+0x1f9>
movslq -0xd8(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x28,%eax
je     13af <main+0x23f>
mov    -0xd8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xd8(%rbp)
cltq
mov    -0x70(%rbp,%rax,1),%cl
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
cltq
mov    %cl,-0x50(%rbp,%rax,1)
jmp    1369 <main+0x1f9>
mov    -0xd8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xd8(%rbp)
movsbl -0x71(%rbp),%eax
cmp    $0x28,%eax
jne    13e3 <main+0x273>
mov    -0x71(%rbp),%cl
mov    -0xd8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd8(%rbp)
cltq
mov    %cl,-0x70(%rbp,%rax,1)
movsbl -0x71(%rbp),%eax
cmp    $0x61,%eax
jl     1415 <main+0x2a5>
movsbl -0x71(%rbp),%eax
cmp    $0x7a,%eax
jg     1415 <main+0x2a5>
mov    -0x71(%rbp),%cl
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
cltq
mov    %cl,-0x50(%rbp,%rax,1)
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
cltq
movb   $0x0,-0x50(%rbp,%rax,1)
mov    -0xd8(%rbp),%eax
add    $0x1,%eax
cltq
movb   $0x0,-0x70(%rbp,%rax,1)
lea    -0x50(%rbp),%rdi
call   1030 <puts@plt>
lea    -0x70(%rbp),%rdi
call   1030 <puts@plt>
mov    -0x31(%rbp),%al
add    $0x1,%al
mov    %al,-0x31(%rbp)
jmp    11d1 <main+0x61>
jmp    1459 <main+0x2e9>
movslq -0xd8(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x23,%eax
je     149f <main+0x32f>
mov    -0xd8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xd8(%rbp)
cltq
mov    -0x70(%rbp,%rax,1),%cl
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
cltq
mov    %cl,-0x50(%rbp,%rax,1)
jmp    1459 <main+0x2e9>
movb   $0x0,-0x70(%rbp)
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
cltq
movb   $0x0,-0x50(%rbp,%rax,1)
lea    0xb83(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x50(%rbp),%rdi
call   1030 <puts@plt>
movb   $0x0,-0x31(%rbp)
movsbl -0x31(%rbp),%eax
cmp    -0xd4(%rbp),%eax
jg     16a3 <main+0x533>
movsbq -0x31(%rbp),%rax
mov    -0x50(%rbp,%rax,1),%al
mov    %al,-0x71(%rbp)
lea    0xb4c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movsbl -0x71(%rbp),%eax
cmp    $0x61,%eax
jl     1555 <main+0x3e5>
movsbl -0x71(%rbp),%eax
cmp    $0x7a,%eax
jg     1555 <main+0x3e5>
movsbl -0x71(%rbp),%esi
lea    0xb09(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xb14(%rip),%rdi
lea    -0xe0(%rbp),%rsi
call   1070 <scanf@plt>
mov    -0xe0(%rbp),%ecx
mov    -0xdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xdc(%rbp)
cltq
mov    %ecx,-0xd0(%rbp,%rax,4)
movsbl -0x71(%rbp),%eax
cmp    $0x2b,%eax
jne    15a3 <main+0x433>
mov    -0xdc(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0xd0(%rbp,%rax,4),%ecx
movslq -0xdc(%rbp),%rax
add    -0xd0(%rbp,%rax,4),%ecx
mov    -0xdc(%rbp),%eax
sub    $0x1,%eax
cltq
mov    %ecx,-0xd0(%rbp,%rax,4)
mov    -0xdc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xdc(%rbp)
movsbl -0x71(%rbp),%eax
cmp    $0x2d,%eax
jne    15f1 <main+0x481>
mov    -0xdc(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0xd0(%rbp,%rax,4),%ecx
movslq -0xdc(%rbp),%rax
sub    -0xd0(%rbp,%rax,4),%ecx
mov    -0xdc(%rbp),%eax
sub    $0x1,%eax
cltq
mov    %ecx,-0xd0(%rbp,%rax,4)
mov    -0xdc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xdc(%rbp)
movsbl -0x71(%rbp),%eax
cmp    $0x2a,%eax
jne    1640 <main+0x4d0>
mov    -0xdc(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0xd0(%rbp,%rax,4),%ecx
movslq -0xdc(%rbp),%rax
imul   -0xd0(%rbp,%rax,4),%ecx
ff
mov    -0xdc(%rbp),%eax
sub    $0x1,%eax
cltq
mov    %ecx,-0xd0(%rbp,%rax,4)
mov    -0xdc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xdc(%rbp)
movsbl -0x71(%rbp),%eax
cmp    $0x2f,%eax
jne    1691 <main+0x521>
mov    -0xdc(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0xd0(%rbp,%rax,4),%eax
movslq -0xdc(%rbp),%rcx
cltd
idivl  -0xd0(%rbp,%rcx,4)
mov    %eax,%ecx
mov    -0xdc(%rbp),%eax
sub    $0x1,%eax
cltq
mov    %ecx,-0xd0(%rbp,%rax,4)
mov    -0xdc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xdc(%rbp)
jmp    1696 <main+0x526>
mov    -0x31(%rbp),%al
add    $0x1,%al
mov    %al,-0x31(%rbp)
jmp    14ce <main+0x35e>
mov    -0xd0(%rbp),%esi
lea    0x992(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xe8,%rsp
lea    0xe80(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xc0(%rsp),%rbx
mov    %rbx,%rdi
call   1070 <gets@plt>
movb   $0x23,0x30(%rsp)
mov    %rbx,%rdi
call   1050 <strlen@plt>
movl   $0xffffffff,0x8(%rsp)
ff
mov    $0xffffffff,%r14d
test   %al,%al
jle    1455 <main+0x2d5>
mov    $0xffffffff,%r14d
lea    0x30(%rsp),%r15
xor    %r12d,%r12d
xor    %r13d,%r13d
jmp    125f <main+0xdf>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x7e,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
mov    %ebx,%eax
lea    0x30(%rsp),%r15
mov    %r15,%rcx
mov    0xc(%rsp),%r14d
mov    0x20(%rsp),%r12
mov    %rbx,%r13
mov    0x18(%rsp),%rbx
cltq
mov    %bl,(%rcx,%rax,1)
movslq %r14d,%rbx
lea    0x50(%rsp),%rdi
movb   $0x0,0x1(%rbx,%rdi,1)
movslq %r13d,%rbp
movb   $0x0,0x1(%rbp,%r15,1)
call   1040 <puts@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
add    $0x1,%r12
lea    0xc0(%rsp),%rdi
call   1050 <strlen@plt>
movsbq %al,%rax
cmp    %rax,%r12
jge    1426 <main+0x2a6>
mov    %r13,0x10(%rsp)
mov    0xc0(%rsp,%r12,1),%bl
movsbl %bl,%r13d
lea    0xdb8(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    -0x2a(%r13),%eax
cmp    $0x34,%al
ja     13fe <main+0x27e>
movzbl %al,%eax
movabs $0x1000000000002b,%rcx
bt     %rax,%rcx
jae    13fe <main+0x27e>
mov    %rbx,0x18(%rsp)
mov    %r12,0x20(%rsp)
mov    %r14d,0xc(%rsp)
mov    %r13d,%edi
call   1090 <icp@plt>
mov    %rax,%r14
mov    0x10(%rsp),%rbx
movslq %ebx,%r12
mov    0x30(%rsp,%r12,1),%r15b
movsbl %r15b,%ebp
mov    %ebp,%edi
call   10a0 <isp@plt>
cmp    %rax,%r14
jg     11f0 <main+0x70>
mov    $0x21,%edi
call   1030 <putchar@plt>
mov    %r13d,%edi
call   1090 <icp@plt>
mov    %rax,%r14
mov    %ebp,%edi
call   10a0 <isp@plt>
cmp    %rax,%r14
jle    1320 <main+0x1a0>
mov    0xc(%rsp),%r14d
lea    0x30(%rsp),%r15
mov    0x20(%rsp),%r12
mov    0x10(%rsp),%r13
jmp    1384 <main+0x204>
cs nopw 0x0(%rax,%rax,1)
movslq 0xc(%rsp),%r14
lea    0x51(%rsp),%rax
add    %rax,%r14
lea    0x2f(%rsp),%rax
add    %rax,%r12
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    %r15b,(%r14,%rbx,1)
mov    %r13d,%edi
call   1090 <icp@plt>
mov    %rax,%rbp
movzbl (%r12),%r15d
movsbl %r15b,%edi
call   10a0 <isp@plt>
add    $0x1,%rbx
add    $0xffffffffffffffff,%r12
cmp    %rax,%rbp
jle    1340 <main+0x1c0>
mov    0xc(%rsp),%r14d
add    %ebx,%r14d
mov    0x10(%rsp),%r13
sub    %ebx,%r13d
lea    0x30(%rsp),%r15
mov    0x20(%rsp),%r12
mov    0x18(%rsp),%rbx
movslq %r13d,%r13
mov    %bl,0x31(%rsp,%r13,1)
add    $0x1,%r13
cmp    $0x29,%bl
jne    1410 <main+0x290>
movslq %r13d,%rax
mov    0x30(%rsp,%rax,1),%cl
cmp    $0x28,%cl
je     13d9 <main+0x259>
movslq %r14d,%rdx
lea    0x51(%rsp),%rsi
add    %rsi,%rdx
lea    0x2f(%rsp),%rsi
add    %rsi,%rax
xor    %esi,%esi
nopl   0x0(%rax,%rax,1)
mov    %cl,(%rdx,%rsi,1)
movzbl (%rax),%ecx
add    $0x1,%rsi
add    $0xffffffffffffffff,%rax
cmp    $0x28,%cl
jne    13c0 <main+0x240>
add    %esi,%r14d
sub    %esi,%r13d
add    $0xffffffff,%r13d
cmp    $0x28,%bl
je     1415 <main+0x295>
lea    -0x61(%rbx),%eax
cmp    $0x19,%al
ja     121e <main+0x9e>
add    $0x1,%r14d
mov    %r14d,%eax
lea    0x50(%rsp),%rcx
jmp    1219 <main+0x99>
mov    0x10(%rsp),%r13
cmp    $0x29,%bl
je     139a <main+0x21a>
nopl   0x0(%rax,%rax,1)
cmp    $0x28,%bl
jne    13e2 <main+0x262>
add    $0x1,%r13d
mov    $0x28,%bl
mov    %r13d,%eax
mov    %r15,%rcx
jmp    1219 <main+0x99>
mov    0x30(%rsp,%rbp,1),%al
cmp    $0x23,%al
je     1455 <main+0x2d5>
lea    (%rsp,%rbx,1),%rdx
add    $0x51,%rdx
lea    (%rsp,%rbp,1),%rsi
add    $0x2f,%rsi
xor    %ecx,%ecx
mov    %al,(%rdx)
movzbl (%rsi,%rcx,1),%eax
add    $0xffffffffffffffff,%rcx
add    $0x1,%rdx
cmp    $0x23,%al
jne    1440 <main+0x2c0>
sub    %ecx,%r14d
mov    %r14d,%r13d
movslq %r14d,%rax
lea    0x50(%rsp),%rbx
movb   $0x0,0x1(%rax,%rbx,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xbd5(%rip),%r14
lea    0x2c(%rsp),%r15
lea    0xb76(%rip),%r12
xor    %ebp,%ebp
jmp    14d2 <main+0x352>
xchg   %ax,%ax
lea    0xba3(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1080 <scanf@plt>
mov    0x2c(%rsp),%eax
mov    0x8(%rsp),%edx
movslq %edx,%rcx
add    $0x1,%edx
mov    %edx,0x8(%rsp)
mov    %eax,0x74(%rsp,%rcx,4)
add    $0x1,%bpl
movsbl %bpl,%eax
cmp    %eax,%r13d
jl     1570 <main+0x3f0>
movsbq %bpl,%rax
movzbl 0x50(%rsp,%rax,1),%ebx
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    -0x61(%rbx),%eax
cmp    $0x19,%al
jbe    1490 <main+0x310>
add    $0xd6,%bl
cmp    $0x5,%bl
ja     14c1 <main+0x341>
movzbl %bl,%eax
movslq (%r12,%rax,4),%rax
add    %r12,%rax
jmp    *%rax
mov    0x8(%rsp),%ecx
movslq %ecx,%rax
add    $0xffffffff,%ecx
mov    %ecx,0x8(%rsp)
mov    0x70(%rsp,%rax,4),%ecx
imul   0x6c(%rsp,%rax,4),%ecx
mov    %ecx,0x6c(%rsp,%rax,4)
jmp    14c1 <main+0x341>
mov    0x8(%rsp),%ecx
movslq %ecx,%rax
add    $0xffffffff,%ecx
mov    %ecx,0x8(%rsp)
mov    0x70(%rsp,%rax,4),%ecx
add    %ecx,0x6c(%rsp,%rax,4)
jmp    14c1 <main+0x341>
mov    0x8(%rsp),%ecx
movslq %ecx,%rax
add    $0xffffffff,%ecx
mov    %ecx,0x8(%rsp)
mov    0x70(%rsp,%rax,4),%ecx
sub    %ecx,0x6c(%rsp,%rax,4)
jmp    14c1 <main+0x341>
mov    0x8(%rsp),%eax
movslq %eax,%rcx
add    $0xffffffff,%eax
mov    %eax,0x8(%rsp)
mov    0x6c(%rsp,%rcx,4),%eax
cltd
idivl  0x70(%rsp,%rcx,4)
mov    %eax,0x6c(%rsp,%rcx,4)
jmp    14c1 <main+0x341>
mov    0x70(%rsp),%esi
lea    0xadb(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
add    $0xe8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [23 x i8] c"\0AEnter the expression:\00"
@.str.1 = [11 x i8] c"Token %c \0A\00"
@.str.5 = [25 x i8] c"Enter the value of %c \0A\00"
@.str.6 = [3 x i8] c"%d\00"
@.str.7 = [11 x i8] c"Result %d\0A\00"
define i32 @main() {
%1 = alloca [30 x i8]
%2 = alloca [30 x i8]
%3 = alloca [30 x i8]
%4 = alloca [20 x i32]
%5 = alloca i32
%6 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%7 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%9 = bitcast [20 x i32]* %4 to i8*
%10 = bitcast i32* %5 to i8*
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @gets(i8* %6)
store i8 35, i8* %8
%13 = call signext i8 @strlen(i8* %6)
%14 = icmp sgt i8 %13, 0
br i1 %14, label %23, label %143
15: ; preds = %116
%16 = sext i32 %117 to i64
%17 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 %16
%18 = load i8, i8* %17
%19 = icmp eq i8 %18, 35
br i1 %19, label %143, label %20
20: ; preds = %15
%21 = sext i32 %117 to i64
%22 = sext i32 %118 to i64
br label %131
23: ; preds = %0, %116
%24 = phi i64 [ %127, %116 ], [ 0, %0 ]
%25 = phi i32 [ %117, %116 ], [ 0, %0 ]
%26 = phi i32 [ %118, %116 ], [ -1, %0 ]
%27 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 %24
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %29)
switch i8 %28, label %69 [
i8 94, label %31
i8 47, label %31
i8 45, label %31
i8 43, label %31
i8 42, label %31
]
31: ; preds = %23, %23, %23, %23, %23
%32 = call i64 @icp(i8 signext %28)
%33 = sext i32 %25 to i64
%34 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 %33
%35 = load i8, i8* %34
%36 = call i64 @isp(i8 signext %35)
%37 = icmp sgt i64 %32, %36
br i1 %37, label %38, label %41
38: ; preds = %31
%39 = call i32 @putchar(i32 126)
%40 = add nsw i32 %25, 1
br label %108
41: ; preds = %31
%42 = call i32 @putchar(i32 33)
%43 = call i64 @icp(i8 signext %28)
%44 = call i64 @isp(i8 signext %35)
%45 = icmp sgt i64 %43, %44
br i1 %45, label %63, label %46
46: ; preds = %41
%47 = sext i32 %26 to i64
br label %48
48: ; preds = %46, %48
%49 = phi i64 [ %47, %46 ], [ %53, %48 ]
%50 = phi i64 [ %33, %46 ], [ %52, %48 ]
%51 = phi i8 [ %35, %46 ], [ %57, %48 ]
%52 = add i64 %50, -1
%53 = add i64 %49, 1
%54 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 %53
store i8 %51, i8* %54
%55 = call i64 @icp(i8 signext %28)
%56 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 %52
%57 = load i8, i8* %56
%58 = call i64 @isp(i8 signext %57)
%59 = icmp sgt i64 %55, %58
br i1 %59, label %60, label %48
60: ; preds = %48
%61 = trunc i64 %53 to i32
%62 = trunc i64 %52 to i32
br label %63
63: ; preds = %60, %41
%64 = phi i32 [ %26, %41 ], [ %61, %60 ]
%65 = phi i32 [ %25, %41 ], [ %62, %60 ]
%66 = add nsw i32 %65, 1
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 %67
store i8 %28, i8* %68
br label %69
69: ; preds = %23, %63
%70 = phi i32 [ %64, %63 ], [ %26, %23 ]
%71 = phi i32 [ %66, %63 ], [ %25, %23 ]
%72 = icmp eq i8 %28, 41
br i1 %72, label %73, label %97
73: ; preds = %69
%74 = sext i32 %71 to i64
%75 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 %74
%76 = load i8, i8* %75
%77 = icmp eq i8 %76, 40
br i1 %77, label %93, label %78
78: ; preds = %73
%79 = sext i32 %70 to i64
br label %80
80: ; preds = %78, %80
%81 = phi i64 [ %79, %78 ], [ %85, %80 ]
%82 = phi i64 [ %74, %78 ], [ %84, %80 ]
%83 = phi i8 [ %76, %78 ], [ %88, %80 ]
%84 = add i64 %82, -1
%85 = add i64 %81, 1
%86 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 %85
store i8 %83, i8* %86
%87 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 %84
%88 = load i8, i8* %87
%89 = icmp eq i8 %88, 40
br i1 %89, label %90, label %80
90: ; preds = %80
%91 = trunc i64 %85 to i32
%92 = trunc i64 %84 to i32
br label %93
93: ; preds = %90, %73
%94 = phi i32 [ %70, %73 ], [ %91, %90 ]
%95 = phi i32 [ %71, %73 ], [ %92, %90 ]
%96 = add nsw i32 %95, -1
br label %97
97: ; preds = %93, %69
%98 = phi i32 [ %94, %93 ], [ %70, %69 ]
%99 = phi i32 [ %96, %93 ], [ %71, %69 ]
%100 = icmp eq i8 %28, 40
br i1 %100, label %101, label %103
101: ; preds = %97
%102 = add nsw i32 %99, 1
br label %108
103: ; preds = %97
%104 = add i8 %28, -97
%105 = icmp ult i8 %104, 26
br i1 %105, label %106, label %116
106: ; preds = %103
%107 = add nsw i32 %98, 1
br label %108
108: ; preds = %106, %38, %101
%109 = phi i32 [ %102, %101 ], [ %40, %38 ], [ %107, %106 ]
%110 = phi [30 x i8]* [ %3, %101 ], [ %3, %38 ], [ %2, %106 ]
%111 = phi i8 [ 40, %101 ], [ %28, %38 ], [ %28, %106 ]
%112 = phi i32 [ %102, %101 ], [ %40, %38 ], [ %99, %106 ]
%113 = phi i32 [ %98, %101 ], [ %26, %38 ], [ %107, %106 ]
%114 = sext i32 %109 to i64
%115 = getelementptr inbounds [30 x i8], [30 x i8]* %110, i64 0, i64 %114
store i8 %111, i8* %115
br label %116
116: ; preds = %108, %103
%117 = phi i32 [ %99, %103 ], [ %112, %108 ]
%118 = phi i32 [ %98, %103 ], [ %113, %108 ]
%119 = add nsw i32 %118, 1
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 %120
store i8 0, i8* %121
%122 = add nsw i32 %117, 1
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 %123
store i8 0, i8* %124
%125 = call i32 @puts(i8* %7)
%126 = call i32 @puts(i8* %8)
%127 = add nuw nsw i64 %24, 1
%128 = call signext i8 @strlen(i8* %6)
%129 = sext i8 %128 to i64
%130 = icmp slt i64 %127, %129
br i1 %130, label %23, label %15
131: ; preds = %20, %131
%132 = phi i64 [ %22, %20 ], [ %136, %131 ]
%133 = phi i64 [ %21, %20 ], [ %135, %131 ]
%134 = phi i8 [ %18, %20 ], [ %139, %131 ]
%135 = add i64 %133, -1
%136 = add i64 %132, 1
%137 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 %136
store i8 %134, i8* %137
%138 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 %135
%139 = load i8, i8* %138
%140 = icmp eq i8 %139, 35
br i1 %140, label %141, label %131
141: ; preds = %131
%142 = trunc i64 %136 to i32
br label %143
143: ; preds = %0, %141, %15
%144 = phi i32 [ %118, %15 ], [ %142, %141 ], [ -1, %0 ]
%145 = add nsw i32 %144, 1
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 %146
store i8 0, i8* %147
%148 = call i32 @putchar(i32 10)
%149 = call i32 @puts(i8* %7)
%150 = icmp sgt i32 %144, -1
br label %151
151: ; preds = %143, %205
%152 = phi i32 [ %206, %205 ], [ -1, %143 ]
%153 = phi i8 [ %207, %205 ], [ 0, %143 ]
%154 = sext i8 %153 to i64
%155 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 %154
%156 = load i8, i8* %155
%157 = call i32 @putchar(i32 10)
%158 = add i8 %156, -97
%159 = icmp ult i8 %158, 26
br i1 %159, label %160, label %168
160: ; preds = %151
%161 = zext i8 %156 to i32
%162 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 %161)
%163 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %5)
%164 = load i32, i32* %5
%165 = add nsw i32 %152, 1
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds [20 x i32], [20 x i32]* %4, i64 0, i64 %166
store i32 %164, i32* %167
br label %205
168: ; preds = %151
switch i8 %156, label %205 [
i8 43, label %169
i8 45, label %178
i8 42, label %187
i8 47, label %196
]
169: ; preds = %168
%170 = add nsw i32 %152, -1
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds [20 x i32], [20 x i32]* %4, i64 0, i64 %171
%173 = load i32, i32* %172
%174 = sext i32 %152 to i64
%175 = getelementptr inbounds [20 x i32], [20 x i32]* %4, i64 0, i64 %174
%176 = load i32, i32* %175
%177 = add nsw i32 %176, %173
store i32 %177, i32* %172
br label %205
178: ; preds = %168
%179 = add nsw i32 %152, -1
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds [20 x i32], [20 x i32]* %4, i64 0, i64 %180
%182 = load i32, i32* %181
%183 = sext i32 %152 to i64
%184 = getelementptr inbounds [20 x i32], [20 x i32]* %4, i64 0, i64 %183
%185 = load i32, i32* %184
%186 = sub nsw i32 %182, %185
store i32 %186, i32* %181
br label %205
187: ; preds = %168
%188 = add nsw i32 %152, -1
%189 = sext i32 %188 to i64
%190 = getelementptr inbounds [20 x i32], [20 x i32]* %4, i64 0, i64 %189
%191 = load i32, i32* %190
%192 = sext i32 %152 to i64
%193 = getelementptr inbounds [20 x i32], [20 x i32]* %4, i64 0, i64 %192
%194 = load i32, i32* %193
%195 = mul nsw i32 %194, %191
store i32 %195, i32* %190
br label %205
196: ; preds = %168
%197 = add nsw i32 %152, -1
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds [20 x i32], [20 x i32]* %4, i64 0, i64 %198
%200 = load i32, i32* %199
%201 = sext i32 %152 to i64
%202 = getelementptr inbounds [20 x i32], [20 x i32]* %4, i64 0, i64 %201
%203 = load i32, i32* %202
%204 = sdiv i32 %200, %203
store i32 %204, i32* %199
br label %205
205: ; preds = %168, %178, %160, %169, %187, %196
%206 = phi i32 [ %197, %196 ], [ %188, %187 ], [ %170, %169 ], [ %165, %160 ], [ %179, %178 ], [ %152, %168 ]
%207 = add i8 %153, 1
%208 = sext i8 %207 to i32
%209 = icmp slt i32 %144, %208
br i1 %209, label %210, label %151
210: ; preds = %205
%211 = getelementptr inbounds [20 x i32], [20 x i32]* %4, i64 0, i64 0
%212 = load i32, i32* %211
%213 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i32 %212)
ret i32 0
}