#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 */
struct link {
  int dummy;
};

/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ expValid(char *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ getchar();
struct link *pop(struct link *, int *);
int /*<<< orphan*/ printf(char *, int);
struct link *push(struct link *, int);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stdin;
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
char *strtok(char *, char *);
int main(void) {
  struct link *top = NULL;
  char str[50], use[50], *sub;
  int op1 = 0, op2 = 0;
  puts("Please input a string: ");
  fgets(str, 50 - 1, stdin);
  strcpy(use, str);
  if (!expValid(use)) {
    puts("\nInvalid expression\n");
    puts("\n[Press ENTER to close]");
    getchar();
    exit(1);
  }
  strcpy(use, str);
  sub = strtok(use, " \n");
  while (sub != NULL) {
    if (strcmp(sub, "*") == 0 || strcmp(sub, "/") == 0 ||
        strcmp(sub, "+") == 0 || strcmp(sub, "-") == 0) {
      top = pop(top, &op2);
      top = pop(top, &op1);
      switch (sub[0]) {
      case '*':
        op1 = op1 * op2;
        top = push(top, op1);
        break;
      case '/':
        op1 = op1 / op2;
        top = push(top, op1);
        break;
      case '+':
        op1 = op1 + op2;
        top = push(top, op1);
        break;
      case '-':
        op1 = op1 - op2;
        top = push(top, op1);
        break;
      default:
        break;
      }
    } else {
      top = push(top, atoi(sub));
    }
    sub = strtok(NULL, " \n");
  }
  top = pop(top, &op1);
  printf("\nAnswer is: %d\n", op1);
  puts("\n[Press ENTER to close]");
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x0,-0x9c(%rbp)
movl   $0x0,-0xa0(%rbp)
lea    0xe23(%rip),%rdi
call   1040 <puts@plt>
lea    -0x50(%rbp),%rdi
mov    0x2de3(%rip),%rax
mov    (%rax),%edx
mov    $0x31,%esi
call   1070 <fgets@plt>
lea    -0x90(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x90(%rbp),%rdi
call   10a0 <expValid@plt>
cmp    $0x0,%eax
jne    125f <main+0x9f>
lea    0xdf3(%rip),%rdi
call   1040 <puts@plt>
lea    0xdfc(%rip),%rdi
call   1040 <puts@plt>
mov    $0x0,%al
call   1090 <getchar@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
lea    -0x90(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x90(%rbp),%rdi
lea    0xde0(%rip),%rsi
call   10c0 <strtok@plt>
mov    %rax,-0x98(%rbp)
cmpq   $0x0,-0x98(%rbp)
je     1462 <main+0x2a2>
mov    -0x98(%rbp),%rdi
lea    0xdbb(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
je     130b <main+0x14b>
mov    -0x98(%rbp),%rdi
lea    0xda0(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
je     130b <main+0x14b>
mov    -0x98(%rbp),%rdi
lea    0xd85(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
je     130b <main+0x14b>
mov    -0x98(%rbp),%rdi
lea    0xd6a(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    141d <main+0x25d>
mov    -0x10(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
call   1060 <pop@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x9c(%rbp),%rsi
call   1060 <pop@plt>
mov    %rax,-0x10(%rbp)
mov    -0x98(%rbp),%rax
movsbl (%rax),%eax
add    $0xffffffd6,%eax
mov    %eax,%ecx
mov    %rcx,-0xa8(%rbp)
sub    $0x5,%eax
ja     1413 <main+0x253>
mov    -0xa8(%rbp),%rax
lea    0xca0(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x9c(%rbp),%eax
imul   -0xa0(%rbp),%eax
mov    %eax,-0x9c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x9c(%rbp),%esi
call   10b0 <push@plt>
mov    %rax,-0x10(%rbp)
jmp    1418 <main+0x258>
mov    -0x9c(%rbp),%eax
cltd
idivl  -0xa0(%rbp)
mov    %eax,-0x9c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x9c(%rbp),%esi
call   10b0 <push@plt>
mov    %rax,-0x10(%rbp)
jmp    1418 <main+0x258>
mov    -0x9c(%rbp),%eax
add    -0xa0(%rbp),%eax
mov    %eax,-0x9c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x9c(%rbp),%esi
call   10b0 <push@plt>
mov    %rax,-0x10(%rbp)
jmp    1418 <main+0x258>
mov    -0x9c(%rbp),%eax
sub    -0xa0(%rbp),%eax
mov    %eax,-0x9c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x9c(%rbp),%esi
call   10b0 <push@plt>
mov    %rax,-0x10(%rbp)
jmp    1418 <main+0x258>
jmp    1418 <main+0x258>
jmp    1446 <main+0x286>
mov    -0x10(%rbp),%rax
mov    %rax,-0xb0(%rbp)
mov    -0x98(%rbp),%rdi
call   10d0 <atoi@plt>
mov    -0xb0(%rbp),%rdi
mov    %eax,%esi
call   10b0 <push@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xc0c(%rip),%rsi
call   10c0 <strtok@plt>
mov    %rax,-0x98(%rbp)
jmp    1289 <main+0xc9>
mov    -0x10(%rbp),%rdi
lea    -0x9c(%rbp),%rsi
call   1060 <pop@plt>
mov    %rax,-0x10(%rbp)
mov    -0x9c(%rbp),%esi
lea    0xbe5(%rip),%rdi
call   1050 <printf@plt>
lea    0xbb6(%rip),%rdi
call   1040 <puts@plt>
mov    $0x0,%al
call   1090 <getchar@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
movl   $0x0,0x8(%rsp)
movl   $0x0,0xc(%rsp)
lea    0xe30(%rip),%rdi
call   1040 <puts@plt>
mov    0x2df4(%rip),%rax
mov    (%rax),%edx
lea    0x50(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x31,%esi
call   1070 <fgets@plt>
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %rbp,%rdi
call   10a0 <expValid@plt>
test   %eax,%eax
je     13ac <main+0x1ec>
lea    0x10(%rsp),%rbx
lea    0x50(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xe1c(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <strtok@plt>
test   %rax,%rax
je     1366 <main+0x1a6>
mov    %rax,%r13
xor    %ebp,%ebp
lea    0xe02(%rip),%r12
lea    0x8(%rsp),%r15
lea    0xd96(%rip),%r14
lea    0xdec(%rip),%rbx
jmp    12a1 <main+0xe1>
mov    0xc(%rsp),%esi
imul   0x8(%rsp),%esi
mov    %esi,0x8(%rsp)
mov    %rbp,%rdi
call   10b0 <push@plt>
mov    %rax,%rbp
xor    %edi,%edi
mov    %rbx,%rsi
call   10c0 <strtok@plt>
mov    %rax,%r13
test   %rax,%rax
je     1368 <main+0x1a8>
mov    %r13,%rdi
mov    %r12,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1300 <main+0x140>
mov    %r13,%rdi
lea    0xda7(%rip),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1300 <main+0x140>
mov    %r13,%rdi
lea    0xd95(%rip),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1300 <main+0x140>
mov    %r13,%rdi
lea    0xd83(%rip),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1300 <main+0x140>
mov    %r13,%rdi
call   10d0 <atoi@plt>
jmp    135c <main+0x19c>
nopw   0x0(%rax,%rax,1)
mov    %rbp,%rdi
lea    0xc(%rsp),%rsi
call   1060 <pop@plt>
mov    %rax,%rdi
mov    %r15,%rsi
call   1060 <pop@plt>
mov    %rax,%rbp
movsbl 0x0(%r13),%eax
add    $0xffffffd6,%eax
cmp    $0x5,%eax
ja     128b <main+0xcb>
movslq (%r14,%rax,4),%rax
add    %r14,%rax
jmp    *%rax
mov    0xc(%rsp),%esi
add    0x8(%rsp),%esi
jmp    127c <main+0xbc>
mov    0x8(%rsp),%esi
sub    0xc(%rsp),%esi
jmp    127c <main+0xbc>
mov    0x8(%rsp),%eax
cltd
idivl  0xc(%rsp)
mov    %eax,0x8(%rsp)
mov    %rbp,%rdi
mov    %eax,%esi
jmp    1283 <main+0xc3>
xor    %ebp,%ebp
lea    0x8(%rsp),%rsi
mov    %rbp,%rdi
call   1060 <pop@plt>
mov    0x8(%rsp),%esi
lea    0xce8(%rip),%rdi
call   1050 <printf@plt>
lea    0xcb9(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1090 <getchar@plt>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc7d(%rip),%rdi
call   1040 <puts@plt>
lea    0xc86(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1090 <getchar@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>

LLVM IR (-O0):
%struct.link = type { i32 }
@.str = [24 x i8] c"Please input a string: \00"
@stdin = global i32 0
@.str.1 = [21 x i8] c"\0AInvalid expression\0A\00"
@.str.2 = [24 x i8] c"\0A[Press ENTER to close]\00"
@.str.3 = [3 x i8] c" \0A\00"
@.str.4 = [2 x i8] c"*\00"
@.str.5 = [2 x i8] c"/\00"
@.str.6 = [2 x i8] c"+\00"
@.str.7 = [2 x i8] c"-\00"
@.str.8 = [16 x i8] c"\0AAnswer is: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.link*
%3 = alloca [50 x i8]
%4 = alloca [50 x i8]
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store %struct.link* null, %struct.link** %2
store i32 0, i32* %6
store i32 0, i32* %7
%8 = call i32 @puts(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%9 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%10 = load i32, i32* @stdin
%11 = call i32 @fgets(i8* %9, i32 49, i32 %10)
%12 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%13 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%14 = call i32 @strcpy(i8* %12, i8* %13)
%15 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%16 = call i32 @expValid(i8* %15)
%17 = icmp ne i32 %16, 0
br i1 %17, label %23, label %18
18: ; preds = %0
%19 = call i32 @puts(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%20 = call i32 @puts(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%21 = call i32 (...) @getchar()
%22 = call i32 @exit(i32 1)
unreachable
23: ; preds = %0
%24 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%25 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%26 = call i32 @strcpy(i8* %24, i8* %25)
%27 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%28 = call i8* @strtok(i8* %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i8* %28, i8** %5
br label %29
29: ; preds = %92, %23
%30 = load i8*, i8** %5
%31 = icmp ne i8* %30, null
br i1 %31, label %32, label %94
32: ; preds = %29
%33 = load i8*, i8** %5
%34 = call i64 @strcmp(i8* %33, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %35, label %48, label %36
36: ; preds = %32
%37 = load i8*, i8** %5
%38 = call i64 @strcmp(i8* %37, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
br i1 %39, label %48, label %40
40: ; preds = %36
%41 = load i8*, i8** %5
%42 = call i64 @strcmp(i8* %41, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%43 = icmp eq i64 %42, 0
br i1 %43, label %48, label %44
44: ; preds = %40
%45 = load i8*, i8** %5
%46 = call i64 @strcmp(i8* %45, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%47 = icmp eq i64 %46, 0
br i1 %47, label %48, label %87
48: ; preds = %44, %40, %36, %32
%49 = load %struct.link*, %struct.link** %2
%50 = call %struct.link* @pop(%struct.link* %49, i32* %7)
store %struct.link* %50, %struct.link** %2
%51 = load %struct.link*, %struct.link** %2
%52 = call %struct.link* @pop(%struct.link* %51, i32* %6)
store %struct.link* %52, %struct.link** %2
%53 = load i8*, i8** %5
%54 = getelementptr inbounds i8, i8* %53, i64 0
%55 = load i8, i8* %54
%56 = sext i8 %55 to i32
switch i32 %56, label %85 [
i32 42, label %57
i32 47, label %64
i32 43, label %71
i32 45, label %78
]
57: ; preds = %48
%58 = load i32, i32* %6
%59 = load i32, i32* %7
%60 = mul nsw i32 %58, %59
store i32 %60, i32* %6
%61 = load %struct.link*, %struct.link** %2
%62 = load i32, i32* %6
%63 = call %struct.link* @push(%struct.link* %61, i32 %62)
store %struct.link* %63, %struct.link** %2
br label %86
64: ; preds = %48
%65 = load i32, i32* %6
%66 = load i32, i32* %7
%67 = sdiv i32 %65, %66
store i32 %67, i32* %6
%68 = load %struct.link*, %struct.link** %2
%69 = load i32, i32* %6
%70 = call %struct.link* @push(%struct.link* %68, i32 %69)
store %struct.link* %70, %struct.link** %2
br label %86
71: ; preds = %48
%72 = load i32, i32* %6
%73 = load i32, i32* %7
%74 = add nsw i32 %72, %73
store i32 %74, i32* %6
%75 = load %struct.link*, %struct.link** %2
%76 = load i32, i32* %6
%77 = call %struct.link* @push(%struct.link* %75, i32 %76)
store %struct.link* %77, %struct.link** %2
br label %86
78: ; preds = %48
%79 = load i32, i32* %6
%80 = load i32, i32* %7
%81 = sub nsw i32 %79, %80
store i32 %81, i32* %6
%82 = load %struct.link*, %struct.link** %2
%83 = load i32, i32* %6
%84 = call %struct.link* @push(%struct.link* %82, i32 %83)
store %struct.link* %84, %struct.link** %2
br label %86
85: ; preds = %48
br label %86
86: ; preds = %85, %78, %71, %64, %57
br label %92
87: ; preds = %44
%88 = load %struct.link*, %struct.link** %2
%89 = load i8*, i8** %5
%90 = call i32 @atoi(i8* %89)
%91 = call %struct.link* @push(%struct.link* %88, i32 %90)
store %struct.link* %91, %struct.link** %2
br label %92
92: ; preds = %87, %86
%93 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i8* %93, i8** %5
br label %29
94: ; preds = %29
%95 = load %struct.link*, %struct.link** %2
%96 = call %struct.link* @pop(%struct.link* %95, i32* %6)
store %struct.link* %96, %struct.link** %2
%97 = load i32, i32* %6
%98 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i32 %97)
%99 = call i32 @puts(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%100 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
%struct.link = type { i32 }
@.str = [24 x i8] c"Please input a string: \00"
@stdin = global i32 0
@.str.1 = [21 x i8] c"\0AInvalid expression\0A\00"
@.str.2 = [24 x i8] c"\0A[Press ENTER to close]\00"
@.str.3 = [3 x i8] c" \0A\00"
@.str.4 = [2 x i8] c"*\00"
@.str.5 = [2 x i8] c"/\00"
@.str.6 = [2 x i8] c"+\00"
@.str.7 = [2 x i8] c"-\00"
@.str.8 = [16 x i8] c"\0AAnswer is: %d\0A\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = alloca [50 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%7 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%8 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @stdin
%11 = call i32 @fgets(i8* %5, i32 49, i32 %10)
%12 = call i32 @strcpy(i8* %6, i8* %5)
%13 = call i32 @expValid(i8* %6)
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %20
15: ; preds = %0
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%18 = call i32 (...) @getchar()
%19 = call i32 @exit(i32 1)
unreachable
20: ; preds = %0
%21 = call i32 @strcpy(i8* %6, i8* %5)
%22 = call i8* @strtok(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%23 = icmp eq i8* %22, null
br i1 %23, label %70, label %24
24: ; preds = %20, %66
%25 = phi i8* [ %68, %66 ], [ %22, %20 ]
%26 = phi %struct.link* [ %67, %66 ], [ null, %20 ]
%27 = call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
br i1 %28, label %38, label %29
29: ; preds = %24
%30 = call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
br i1 %31, label %38, label %32
32: ; preds = %29
%33 = call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%34 = icmp eq i64 %33, 0
br i1 %34, label %38, label %35
35: ; preds = %32
%36 = call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %63
38: ; preds = %35, %32, %29, %24
%39 = call %struct.link* @pop(%struct.link* %26, i32* %4)
%40 = call %struct.link* @pop(%struct.link* %39, i32* %3)
%41 = load i8, i8* %25
%42 = sext i8 %41 to i32
switch i32 %42, label %66 [
i32 42, label %43
i32 47, label %48
i32 43, label %53
i32 45, label %58
]
43: ; preds = %38
%44 = load i32, i32* %3
%45 = load i32, i32* %4
%46 = mul nsw i32 %45, %44
store i32 %46, i32* %3
%47 = call %struct.link* @push(%struct.link* %40, i32 %46)
br label %66
48: ; preds = %38
%49 = load i32, i32* %3
%50 = load i32, i32* %4
%51 = sdiv i32 %49, %50
store i32 %51, i32* %3
%52 = call %struct.link* @push(%struct.link* %40, i32 %51)
br label %66
53: ; preds = %38
%54 = load i32, i32* %3
%55 = load i32, i32* %4
%56 = add nsw i32 %55, %54
store i32 %56, i32* %3
%57 = call %struct.link* @push(%struct.link* %40, i32 %56)
br label %66
58: ; preds = %38
%59 = load i32, i32* %3
%60 = load i32, i32* %4
%61 = sub nsw i32 %59, %60
store i32 %61, i32* %3
%62 = call %struct.link* @push(%struct.link* %40, i32 %61)
br label %66
63: ; preds = %35
%64 = call i32 @atoi(i8* %25)
%65 = call %struct.link* @push(%struct.link* %26, i32 %64)
br label %66
66: ; preds = %43, %48, %53, %58, %38, %63
%67 = phi %struct.link* [ %40, %38 ], [ %62, %58 ], [ %57, %53 ], [ %52, %48 ], [ %47, %43 ], [ %65, %63 ]
%68 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%69 = icmp eq i8* %68, null
br i1 %69, label %70, label %24
70: ; preds = %66, %20
%71 = phi %struct.link* [ null, %20 ], [ %67, %66 ]
%72 = call %struct.link* @pop(%struct.link* %71, i32* %3)
%73 = load i32, i32* %3
%74 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i32 %73)
%75 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%76 = call i32 (...) @getchar()
ret i32 0
}