#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_array_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);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int /*<<< orphan*/ strcmp(char *, char *);
scalar_t__ strlen(char *);
int __get_struct_size(char *type, char *ptr, char *rslt_ptr) {
  char *buf;
  char *token;
  int size = 0;
  int total = 0;
  char *buf_ptr = NULL;
  int ptr_cnt = 0;
  char *temp = NULL;
  int size_count = 0;
  token = malloc(1024);
  temp = calloc(1024, 1);
  buf = charalloc(type);
  get_token_llvm(buf, token);
  if (ptr != NULL) {
    buf_ptr = charalloc(ptr);
  }
  if (buf_ptr != NULL) {
    get_irtype_llvm(buf_ptr, token);
    get_token_llvm(buf_ptr, token);
    ptr_cnt = atoi(token);
    get_token_llvm(buf_ptr, token);
  }
  do {
    get_irtype_llvm(buf, token);
    if ((strlen(token) == 0) || (!strcmp(token, ")")))
      break;
    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;
    if (ptr_cnt > 0) {
      size_count += size;
      ptr_cnt--;
    }
    get_token_llvm(buf, token);
  } while (strlen(buf) > 0);
  if (ptr != NULL) {
    if (rslt_ptr != NULL) {
      if (strlen(temp) > 0) {
        sprintf(rslt_ptr, "%s + (%d)", temp, size_count);
      } else {
        sprintf(rslt_ptr, "(%d)", size_count);
      }
    }
  }
  free(token);
  return total;
}


x86 assembly (clang, -O0):
<__get_struct_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movq   $0x0,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    $0x400,%edi
call   10b0 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    $0x400,%edi
mov    $0x1,%esi
call   1080 <calloc@plt>
mov    %rax,-0x48(%rbp)
mov    -0x8(%rbp),%rdi
call   10e0 <charalloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1070 <get_token_llvm@plt>
cmpq   $0x0,-0x10(%rbp)
je     1253 <__get_struct_size+0x93>
mov    -0x10(%rbp),%rdi
call   10e0 <charalloc@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
je     1291 <__get_struct_size+0xd1>
mov    -0x38(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1040 <get_irtype_llvm@plt>
mov    -0x38(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1070 <get_token_llvm@plt>
mov    -0x28(%rbp),%rdi
call   10c0 <atoi@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1070 <get_token_llvm@plt>
jmp    1296 <__get_struct_size+0xd6>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1040 <get_irtype_llvm@plt>
mov    -0x28(%rbp),%rdi
call   1060 <strlen@plt>
cmp    $0x0,%rax
je     12cf <__get_struct_size+0x10f>
mov    -0x28(%rbp),%rdi
lea    0xd52(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    12d4 <__get_struct_size+0x114>
jmp    13e9 <__get_struct_size+0x229>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5b,%eax
jne    12fd <__get_struct_size+0x13d>
mov    -0x28(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x48(%rbp),%rdx
call   10a0 <__get_array_size@plt>
mov    %eax,-0x2c(%rbp)
jmp    13a4 <__get_struct_size+0x1e4>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7b,%eax
jne    1326 <__get_struct_size+0x166>
mov    -0x28(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x48(%rbp),%rdx
call   1050 <__get_struct_size@plt>
mov    %eax,-0x2c(%rbp)
jmp    139f <__get_struct_size+0x1df>
mov    -0x28(%rbp),%rdi
lea    0xccf(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    134b <__get_struct_size+0x18b>
movl   $0x1,-0x2c(%rbp)
jmp    139a <__get_struct_size+0x1da>
mov    -0x28(%rbp),%rdi
lea    0xcad(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    1370 <__get_struct_size+0x1b0>
movl   $0x2,-0x2c(%rbp)
jmp    1395 <__get_struct_size+0x1d5>
mov    -0x28(%rbp),%rdi
lea    0xc8c(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    1390 <__get_struct_size+0x1d0>
movl   $0x4,-0x2c(%rbp)
jmp    1395 <__get_struct_size+0x1d5>
jmp    139a <__get_struct_size+0x1da>
jmp    139f <__get_struct_size+0x1df>
jmp    13a4 <__get_struct_size+0x1e4>
mov    -0x2c(%rbp),%eax
add    -0x30(%rbp),%eax
mov    %eax,-0x30(%rbp)
cmpl   $0x0,-0x3c(%rbp)
jle    13c9 <__get_struct_size+0x209>
mov    -0x2c(%rbp),%eax
add    -0x4c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x3c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1070 <get_token_llvm@plt>
mov    -0x20(%rbp),%rdi
call   1060 <strlen@plt>
cmp    $0x0,%rax
jg     1296 <__get_struct_size+0xd6>
cmpq   $0x0,-0x10(%rbp)
je     144f <__get_struct_size+0x28f>
cmpq   $0x0,-0x18(%rbp)
je     144a <__get_struct_size+0x28a>
mov    -0x48(%rbp),%rdi
call   1060 <strlen@plt>
cmp    $0x0,%rax
jle    1430 <__get_struct_size+0x270>
mov    -0x18(%rbp),%rdi
mov    -0x48(%rbp),%rdx
mov    -0x4c(%rbp),%ecx
lea    0xbe7(%rip),%rsi
mov    $0x0,%al
call   10d0 <sprintf@plt>
jmp    1445 <__get_struct_size+0x285>
mov    -0x18(%rbp),%rdi
mov    -0x4c(%rbp),%edx
lea    0xbd2(%rip),%rsi
mov    $0x0,%al
call   10d0 <sprintf@plt>
jmp    144a <__get_struct_size+0x28a>
jmp    144f <__get_struct_size+0x28f>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__get_struct_size>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%r14
mov    %rsi,%r12
mov    %rdi,%r15
mov    $0x400,%edi
call   10b0 <malloc@plt>
mov    %rax,%r13
mov    $0x400,%edi
mov    $0x1,%esi
call   1080 <calloc@plt>
mov    %rax,0x8(%rsp)
mov    %r15,%rdi
call   10e0 <charalloc@plt>
mov    %rax,%rbp
mov    %rax,%rdi
mov    %r13,%rsi
call   1070 <get_token_llvm@plt>
xor    %eax,%eax
mov    %rax,0x10(%rsp)
test   %r12,%r12
mov    %r14,0x20(%rsp)
mov    %r12,0x18(%rsp)
je     1266 <__get_struct_size+0xa6>
mov    %r12,%rdi
call   10e0 <charalloc@plt>
test   %rax,%rax
je     1266 <__get_struct_size+0xa6>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r13,%rsi
call   1040 <get_irtype_llvm@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   1070 <get_token_llvm@plt>
mov    %r13,%rdi
call   10c0 <atoi@plt>
mov    %eax,%r14d
mov    %rbx,(%rsp)
mov    %rbx,%rdi
mov    %r13,%rsi
call   1070 <get_token_llvm@plt>
jmp    126f <__get_struct_size+0xaf>
xor    %eax,%eax
mov    %rax,(%rsp)
xor    %r14d,%r14d
xor    %r12d,%r12d
xor    %r15d,%r15d
jmp    12d1 <__get_struct_size+0x111>
nopw   0x0(%rax,%rax,1)
mov    %rbp,%r13
mov    %rbp,%rdi
mov    (%rsp),%rsi
mov    0x8(%rsp),%rdx
call   1050 <__get_struct_size@plt>
mov    %rbx,%rbp
add    %eax,%r12d
xor    %edx,%edx
test   %r14d,%r14d
setg   %dl
mov    $0x0,%ecx
mov    %rax,0x10(%rsp)
cmovg  %eax,%ecx
sub    %edx,%r14d
add    %ecx,%r15d
mov    %rbp,%rdi
mov    %r13,%rsi
call   1070 <get_token_llvm@plt>
mov    %rbp,%rdi
call   1060 <strlen@plt>
test   %rax,%rax
jle    139b <__get_struct_size+0x1db>
mov    %rbp,%rbx
mov    %rbp,%rdi
mov    %r13,%rsi
call   1040 <get_irtype_llvm@plt>
mov    %r13,%rdi
movzbl 0x0(%r13),%r13d
test   %r13b,%r13b
je     1393 <__get_struct_size+0x1d3>
mov    %rdi,%rbp
lea    0xd19(%rip),%rsi
call   1090 <strcmp@plt>
test   %eax,%eax
je     1398 <__get_struct_size+0x1d8>
cmp    $0x7b,%r13b
je     1280 <__get_struct_size+0xc0>
cmp    $0x5b,%r13b
jne    1330 <__get_struct_size+0x170>
mov    %rbp,%r13
mov    %rbp,%rdi
mov    (%rsp),%rsi
mov    0x8(%rsp),%rdx
call   10a0 <__get_array_size@plt>
jmp    1294 <__get_struct_size+0xd4>
mov    %rbp,%r13
mov    %rbp,%rdi
lea    0xcc3(%rip),%rsi
call   1090 <strcmp@plt>
test   %eax,%eax
je     137f <__get_struct_size+0x1bf>
mov    %r13,%rdi
lea    0xcb3(%rip),%rsi
call   1090 <strcmp@plt>
test   %eax,%eax
mov    %rbx,%rbp
je     1389 <__get_struct_size+0x1c9>
mov    %r13,%rdi
lea    0xca1(%rip),%rsi
call   1090 <strcmp@plt>
test   %eax,%eax
mov    0x10(%rsp),%rax
mov    $0x4,%ecx
cmove  %ecx,%eax
jmp    1297 <__get_struct_size+0xd7>
mov    $0x1,%eax
jmp    1294 <__get_struct_size+0xd4>
mov    $0x2,%eax
jmp    1297 <__get_struct_size+0xd7>
mov    %rdi,%r13
jmp    139b <__get_struct_size+0x1db>
mov    %rbp,%r13
cmpq   $0x0,0x18(%rsp)
mov    0x20(%rsp),%r14
je     13ec <__get_struct_size+0x22c>
test   %r14,%r14
je     13ec <__get_struct_size+0x22c>
mov    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1060 <strlen@plt>
test   %rax,%rax
jle    13d8 <__get_struct_size+0x218>
lea    0xc45(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
mov    %r15d,%ecx
xor    %eax,%eax
call   10d0 <sprintf@plt>
jmp    13ec <__get_struct_size+0x22c>
lea    0xc31(%rip),%rsi
mov    %r14,%rdi
mov    %r15d,%edx
xor    %eax,%eax
call   10d0 <sprintf@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %r12d,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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