#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 __get_struct_size(char *, char *, char *);
int atoi(char *);
char *calloc(int, int);
char *charalloc(char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ get_irtype_llvm(char *, char *);
int /*<<< orphan*/ get_token_llvm(char *, char *);
char *malloc(int);
char *regalloc(char *);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int /*<<< orphan*/ strcmp(char *, char *);
scalar_t__ strlen(char *);
int __get_array_size(char *type, char *ptr, char *rslt_ptr) {
  char *buf;
  char *token;
  int size = 0;
  int total = 0;
  int num = 0;
  char *buf_ptr = NULL;
  char *ptr_cnt = NULL;
  char *temp = NULL;
  char *str = NULL;
  token = malloc(1024);
  temp = calloc(1024, 1);
  buf = charalloc(type);
  if (ptr != NULL) {
    if (strlen(ptr) > 0) {
      buf_ptr = charalloc(ptr);
    }
  }
  if (buf_ptr != NULL) {
    get_irtype_llvm(buf_ptr, token);
    get_token_llvm(buf_ptr, token);
    str = regalloc(token);
    ptr_cnt = charalloc(str);
    free(str);
    get_token_llvm(buf_ptr, token);
  }
  get_token_llvm(buf, token);
  get_token_llvm(buf, token);
  num = atoi(token);
  get_token_llvm(buf, token);
  get_irtype_llvm(buf, token);
  if (token[0] == '[') {
    size = __get_array_size(token, buf_ptr, temp);
  } else if (token[0] == '{') {
    size = __get_struct_size(token, buf_ptr, temp);
  } else if (!strcmp(token, "i8")) {
    size = 1;
  } else if (!strcmp(token, "i16")) {
    size = 2;
  } else if (!strcmp(token, "i32")) {
    size = 4;
  }
  total += size * num;
  get_token_llvm(buf, token);
  if (ptr_cnt != NULL) {
    if (rslt_ptr != NULL) {
      if (strlen(temp) > 0) {
        sprintf(rslt_ptr, "%s + (%d * %s)", temp, size, ptr_cnt);
      } else {
        sprintf(rslt_ptr, "(%d * %s)", size, ptr_cnt);
      }
    }
    free(ptr_cnt);
  }
  return total;
}


x86 assembly (clang, -O0):
<__get_array_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x48(%rbp)
movq   $0x0,-0x50(%rbp)
movq   $0x0,-0x58(%rbp)
mov    $0x400,%edi
call   10c0 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    $0x400,%edi
mov    $0x1,%esi
call   1090 <calloc@plt>
mov    %rax,-0x50(%rbp)
mov    -0x8(%rbp),%rdi
call   10f0 <charalloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1277 <__get_array_size+0xa7>
mov    -0x10(%rbp),%rdi
call   1070 <strlen@plt>
cmp    $0x0,%rax
jle    1272 <__get_array_size+0xa2>
mov    -0x10(%rbp),%rdi
call   10f0 <charalloc@plt>
mov    %rax,-0x40(%rbp)
jmp    1277 <__get_array_size+0xa7>
cmpq   $0x0,-0x40(%rbp)
je     12cc <__get_array_size+0xfc>
mov    -0x40(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1050 <get_irtype_llvm@plt>
mov    -0x40(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1080 <get_token_llvm@plt>
mov    -0x28(%rbp),%rdi
call   1030 <regalloc@plt>
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rdi
call   10f0 <charalloc@plt>
mov    %rax,-0x48(%rbp)
mov    -0x58(%rbp),%rdi
call   1040 <free@plt>
mov    -0x40(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1080 <get_token_llvm@plt>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1080 <get_token_llvm@plt>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1080 <get_token_llvm@plt>
mov    -0x28(%rbp),%rdi
call   10d0 <atoi@plt>
mov    %eax,-0x34(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1080 <get_token_llvm@plt>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1050 <get_irtype_llvm@plt>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5b,%eax
jne    1335 <__get_array_size+0x165>
mov    -0x28(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x50(%rbp),%rdx
call   10b0 <__get_array_size@plt>
mov    %eax,-0x2c(%rbp)
jmp    13dc <__get_array_size+0x20c>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7b,%eax
jne    135e <__get_array_size+0x18e>
mov    -0x28(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x50(%rbp),%rdx
call   1060 <__get_struct_size@plt>
mov    %eax,-0x2c(%rbp)
jmp    13d7 <__get_array_size+0x207>
mov    -0x28(%rbp),%rdi
lea    0xc97(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    1383 <__get_array_size+0x1b3>
movl   $0x1,-0x2c(%rbp)
jmp    13d2 <__get_array_size+0x202>
mov    -0x28(%rbp),%rdi
lea    0xc75(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    13a8 <__get_array_size+0x1d8>
movl   $0x2,-0x2c(%rbp)
jmp    13cd <__get_array_size+0x1fd>
mov    -0x28(%rbp),%rdi
lea    0xc54(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    13c8 <__get_array_size+0x1f8>
movl   $0x4,-0x2c(%rbp)
jmp    13cd <__get_array_size+0x1fd>
jmp    13d2 <__get_array_size+0x202>
jmp    13d7 <__get_array_size+0x207>
jmp    13dc <__get_array_size+0x20c>
mov    -0x2c(%rbp),%eax
imul   -0x34(%rbp),%eax
add    -0x30(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1080 <get_token_llvm@plt>
cmpq   $0x0,-0x48(%rbp)
je     1468 <__get_array_size+0x298>
cmpq   $0x0,-0x18(%rbp)
je     145f <__get_array_size+0x28f>
mov    -0x50(%rbp),%rdi
call   1070 <strlen@plt>
cmp    $0x0,%rax
jle    1441 <__get_array_size+0x271>
mov    -0x18(%rbp),%rdi
mov    -0x50(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
mov    -0x48(%rbp),%r8
lea    0xbd6(%rip),%rsi
mov    $0x0,%al
call   10e0 <sprintf@plt>
jmp    145a <__get_array_size+0x28a>
mov    -0x18(%rbp),%rdi
mov    -0x2c(%rbp),%edx
mov    -0x48(%rbp),%rcx
lea    0xbbd(%rip),%rsi
mov    $0x0,%al
call   10e0 <sprintf@plt>
jmp    145f <__get_array_size+0x28f>
mov    -0x48(%rbp),%rdi
call   1040 <free@plt>
mov    -0x30(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__get_array_size>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdx,0x10(%rsp)
mov    %rsi,%rbp
mov    %rdi,%r14
mov    $0x400,%edi
call   10c0 <malloc@plt>
mov    %rax,%r15
mov    $0x400,%edi
mov    $0x1,%esi
call   1090 <calloc@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   10f0 <charalloc@plt>
mov    %rax,%r12
test   %rbp,%rbp
mov    %rbx,0x8(%rsp)
je     127b <__get_array_size+0xab>
mov    %rbp,%rdi
call   1070 <strlen@plt>
test   %rax,%rax
jle    127b <__get_array_size+0xab>
mov    %rbp,%rdi
call   10f0 <charalloc@plt>
test   %rax,%rax
je     127b <__get_array_size+0xab>
mov    %rax,%r14
mov    %rax,%rdi
mov    %r15,%rsi
call   1050 <get_irtype_llvm@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1080 <get_token_llvm@plt>
mov    %r15,%rdi
call   1030 <regalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   10f0 <charalloc@plt>
mov    %rax,%r13
mov    %rbx,%rdi
call   1040 <free@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1080 <get_token_llvm@plt>
jmp    1281 <__get_array_size+0xb1>
xor    %r14d,%r14d
xor    %r13d,%r13d
mov    %r12,%rdi
mov    %r15,%rsi
call   1080 <get_token_llvm@plt>
mov    %r12,%rdi
mov    %r15,%rsi
call   1080 <get_token_llvm@plt>
mov    %r15,%rdi
call   10d0 <atoi@plt>
mov    %eax,%ebx
mov    %r12,%rdi
mov    %r15,%rsi
call   1080 <get_token_llvm@plt>
mov    %r12,%rdi
mov    %r15,%rsi
call   1050 <get_irtype_llvm@plt>
mov    (%r15),%al
cmp    $0x7b,%al
je     12d9 <__get_array_size+0x109>
cmp    $0x5b,%al
jne    12f0 <__get_array_size+0x120>
mov    %r15,%rdi
mov    %r14,%rsi
mov    0x8(%rsp),%r14
mov    %r14,%rdx
call   10b0 <__get_array_size@plt>
mov    %eax,%ebp
jmp    1343 <__get_array_size+0x173>
mov    %r15,%rdi
mov    %r14,%rsi
mov    0x8(%rsp),%r14
mov    %r14,%rdx
call   1060 <__get_struct_size@plt>
mov    %eax,%ebp
jmp    1343 <__get_array_size+0x173>
lea    0xd09(%rip),%rsi
mov    %r15,%rdi
call   10a0 <strcmp@plt>
test   %eax,%eax
je     1332 <__get_array_size+0x162>
lea    0xcf9(%rip),%rsi
mov    %r15,%rdi
call   10a0 <strcmp@plt>
test   %eax,%eax
je     1339 <__get_array_size+0x169>
lea    0xcea(%rip),%rsi
mov    %r15,%rdi
call   10a0 <strcmp@plt>
xor    %ebp,%ebp
test   %eax,%eax
sete   %bpl
shl    $0x2,%ebp
jmp    133e <__get_array_size+0x16e>
mov    $0x1,%ebp
jmp    133e <__get_array_size+0x16e>
mov    $0x2,%ebp
mov    0x8(%rsp),%r14
mov    %r12,%rdi
mov    %r15,%rsi
call   1080 <get_token_llvm@plt>
test   %r13,%r13
je     13a9 <__get_array_size+0x1d9>
mov    %ebx,%r15d
mov    0x10(%rsp),%rbx
test   %rbx,%rbx
je     139e <__get_array_size+0x1ce>
mov    %r14,%rdi
call   1070 <strlen@plt>
test   %rax,%rax
jle    1388 <__get_array_size+0x1b8>
lea    0xc97(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
mov    %ebp,%ecx
mov    %r13,%r8
xor    %eax,%eax
call   10e0 <sprintf@plt>
jmp    139e <__get_array_size+0x1ce>
lea    0xc81(%rip),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
mov    %r13,%rcx
xor    %eax,%eax
call   10e0 <sprintf@plt>
mov    %r13,%rdi
call   1040 <free@plt>
mov    %r15d,%ebx
imul   %ebx,%ebp
mov    %ebp,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"i8\00"
@.str.1 = [4 x i8] c"i16\00"
@.str.2 = [4 x i8] c"i32\00"
@.str.3 = [15 x i8] c"%s + (%d * %s)\00"
@.str.4 = [10 x i8] c"(%d * %s)\00"
define i32 @__get_array_size(i8* %0, i8* %1, i8* writeonly %2) {
%4 = tail call dereferenceable_or_null(1024) i8* @malloc(i32 1024)
%5 = tail call dereferenceable_or_null(1024) i8* @calloc(i32 1024, i32 1)
%6 = tail call i8* @charalloc(i8* %0)
%7 = icmp eq i8* %1, null
br i1 %7, label %21, label %8
8: ; preds = %3
%9 = tail call i64 @strlen(i8* %1)
%10 = icmp sgt i64 %9, 0
br i1 %10, label %11, label %21
11: ; preds = %8
%12 = tail call i8* @charalloc(i8* %1)
%13 = icmp eq i8* %12, null
br i1 %13, label %21, label %14
14: ; preds = %11
%15 = tail call i32 @get_irtype_llvm(i8* %12, i8* %4)
%16 = tail call i32 @get_token_llvm(i8* %12, i8* %4)
%17 = tail call i8* @regalloc(i8* %4)
%18 = tail call i8* @charalloc(i8* %17)
%19 = tail call i32 @free(i8* %17)
%20 = tail call i32 @get_token_llvm(i8* %12, i8* %4)
br label %21
21: ; preds = %3, %8, %14, %11
%22 = phi i8* [ %12, %14 ], [ null, %11 ], [ null, %8 ], [ null, %3 ]
%23 = phi i8* [ %18, %14 ], [ null, %11 ], [ null, %8 ], [ null, %3 ]
%24 = tail call i32 @get_token_llvm(i8* %6, i8* %4)
%25 = tail call i32 @get_token_llvm(i8* %6, i8* %4)
%26 = tail call i32 @atoi(i8* %4)
%27 = tail call i32 @get_token_llvm(i8* %6, i8* %4)
%28 = tail call i32 @get_irtype_llvm(i8* %6, i8* %4)
%29 = load i8, i8* %4
switch i8 %29, label %34 [
i8 91, label %30
i8 123, label %32
]
30: ; preds = %21
%31 = tail call i32 @__get_array_size(i8* %4, i8* %22, i8* %5)
br label %44
32: ; preds = %21
%33 = tail call i32 @__get_struct_size(i8* %4, i8* %22, i8* %5)
br label %44
34: ; preds = %21
%35 = tail call i32 @strcmp(i8* %4, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%36 = icmp eq i32 %35, 0
br i1 %36, label %44, label %37
37: ; preds = %34
%38 = tail call i32 @strcmp(i8* %4, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%39 = icmp eq i32 %38, 0
br i1 %39, label %44, label %40
40: ; preds = %37
%41 = tail call i32 @strcmp(i8* %4, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%42 = icmp eq i32 %41, 0
%43 = select i1 %42, i32 4, i32 0
br label %44
44: ; preds = %40, %37, %34, %32, %30
%45 = phi i32 [ %31, %30 ], [ %33, %32 ], [ 1, %34 ], [ 2, %37 ], [ %43, %40 ]
%46 = tail call i32 @get_token_llvm(i8* %6, i8* %4)
%47 = icmp eq i8* %23, null
br i1 %47, label %59, label %48
48: ; preds = %44
%49 = icmp eq i8* %2, null
br i1 %49, label %57, label %50
50: ; preds = %48
%51 = tail call i64 @strlen(i8* dereferenceable(1) %5)
%52 = icmp sgt i64 %51, 0
br i1 %52, label %53, label %55
53: ; preds = %50
%54 = tail call i32 (i8*, i8*, ...) @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8* %5, i32 %45, i8* %23)
br label %57
55: ; preds = %50
%56 = tail call i32 (i8*, i8*, ...) @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %45, i8* %23)
br label %57
57: ; preds = %53, %55, %48
%58 = tail call i32 @free(i8* %23)
br label %59
59: ; preds = %57, %44
%60 = mul nsw i32 %45, %26
ret i32 %60
}