#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char EOF;
char fgetc(int /*<<< orphan*/ *);
scalar_t__ isspace(char);
scalar_t__ malloc(long);
int /*<<< orphan*/ printf(char *);
scalar_t__ realloc(char *, long);
int /*<<< orphan*/ skip_whitespaces(int /*<<< orphan*/ *);
int /*<<< orphan*/ t_error(char *);
int /*<<< orphan*/ ungetc(char, int /*<<< orphan*/ *);
char *query_for_label(FILE *inputfile) {
  char ch, ocurl = '{';
  static char *label = NULL;
  long i = 0, label_size = 0;
  label_size = 64;
  label = (char *)malloc(label_size * sizeof(char));
  if (label == NULL) {
    t_error("Cannot allocate the label");
  }
  skip_whitespaces(inputfile);
  do {
    if (i < label_size - 1) {
      label[i] = fgetc(inputfile);
      if (label[i] == EOF) {
        t_error("Unespected End Of File");
      }
      i++;
    } else {
      if (label_size == 1024) {
        printf(
            "\nWarning:: the name of the stored data exceeded the LABELSIZE\n");
        printf("Warning:: flushing the rest of the name\n");
        do {
          ch = fgetc(inputfile);
        } while (ch != ocurl && ch != EOF);
        if (ch == EOF) {
          t_error("Unespected End Of File");
        }
        label[i - 1] = ch;
      } else if (label_size + 64 > 1024) {
        label_size = 1024;
        label = (char *)realloc(label, label_size * sizeof(char));
        if (label == NULL) {
          t_error("Cannot expand the label");
        }
      } else {
        label_size += 64;
        label = (char *)realloc(label, label_size * sizeof(char));
        if (label == NULL) {
          t_error("Cannot expand the label");
        }
      }
    }
  } while (label[i - 1] != EOF && label[i - 1] != ocurl);
  ungetc(label[i - 1], inputfile);
  label[i] = label[i - 1] = '\0';
  i -= 2;
  while (isspace(label[i])) {
    label[i] = '\0';
    i--;
  }
  i++;
  if (i <= 0) {
    label = "NOLABEL";
  }
  return label;
}


x86 assembly (clang, -O0):
<query_for_label>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movb   $0x7b,-0xa(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x40,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
shl    $0x0,%rdi
call   1070 <malloc@plt>
mov    %rax,0x2eac(%rip)
cmpq   $0x0,0x2ea4(%rip)
jne    11d6 <query_for_label+0x56>
lea    0xe2f(%rip),%rdi
call   10a0 <t_error@plt>
mov    -0x8(%rbp),%rdi
call   1030 <skip_whitespaces@plt>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    $0x1,%rcx
cmp    %rcx,%rax
jge    124b <query_for_label+0xcb>
mov    -0x8(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %al,%dl
mov    0x2e62(%rip),%rax
mov    -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    0x2e54(%rip),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    0x2dc5(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    123a <query_for_label+0xba>
lea    0xde5(%rip),%rdi
call   10a0 <t_error@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1395 <query_for_label+0x215>
cmpq   $0x400,-0x20(%rbp)
jne    12ef <query_for_label+0x16f>
lea    0xdd1(%rip),%rdi
call   1040 <printf@plt>
lea    0xe04(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%ecx
movsbl -0xa(%rbp),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x21(%rbp)
je     12a8 <query_for_label+0x128>
movsbl -0x9(%rbp),%eax
mov    0x2d4b(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
setne  %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
test   $0x1,%al
jne    1271 <query_for_label+0xf1>
movsbl -0x9(%rbp),%eax
mov    0x2d2a(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    12d5 <query_for_label+0x155>
lea    0xd4a(%rip),%rdi
call   10a0 <t_error@plt>
mov    -0x9(%rbp),%dl
mov    0x2d89(%rip),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
mov    %dl,(%rax,%rcx,1)
jmp    1390 <query_for_label+0x210>
mov    -0x20(%rbp),%rax
add    $0x40,%rax
cmp    $0x400,%rax
jle    1345 <query_for_label+0x1c5>
movq   $0x400,-0x20(%rbp)
mov    0x2d56(%rip),%rdi
mov    -0x20(%rbp),%rsi
shl    $0x0,%rsi
call   1090 <realloc@plt>
mov    %rax,0x2d42(%rip)
cmpq   $0x0,0x2d3a(%rip)
jne    1340 <query_for_label+0x1c0>
lea    0xd5e(%rip),%rdi
call   10a0 <t_error@plt>
jmp    138b <query_for_label+0x20b>
mov    -0x20(%rbp),%rax
add    $0x40,%rax
mov    %rax,-0x20(%rbp)
mov    0x2d10(%rip),%rdi
mov    -0x20(%rbp),%rsi
shl    $0x0,%rsi
call   1090 <realloc@plt>
mov    %rax,0x2cfc(%rip)
cmpq   $0x0,0x2cf4(%rip)
jne    1386 <query_for_label+0x206>
lea    0xd18(%rip),%rdi
call   10a0 <t_error@plt>
jmp    138b <query_for_label+0x20b>
jmp    1390 <query_for_label+0x210>
jmp    1395 <query_for_label+0x215>
jmp    139a <query_for_label+0x21a>
mov    0x2cc7(%rip),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%ecx
mov    0x2c34(%rip),%rax
movsbl (%rax),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x22(%rbp)
je     13e3 <query_for_label+0x263>
mov    0x2c9d(%rip),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0xa(%rbp),%ecx
cmp    %ecx,%eax
setne  %al
mov    %al,-0x22(%rbp)
mov    -0x22(%rbp),%al
test   $0x1,%al
jne    11df <query_for_label+0x5f>
mov    0x2c73(%rip),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
mov    (%rax,%rcx,1),%al
mov    -0x8(%rbp),%rsi
movsbl %al,%edi
call   1080 <ungetc@plt>
mov    0x2c55(%rip),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    0x2c42(%rip),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
sub    $0x2,%rax
mov    %rax,-0x18(%rbp)
mov    0x2c27(%rip),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1060 <isspace@plt>
cmp    $0x0,%rax
je     1478 <query_for_label+0x2f8>
mov    0x2c09(%rip),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
jmp    143a <query_for_label+0x2ba>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jg     149d <query_for_label+0x31d>
lea    0xc1b(%rip),%rax
mov    %rax,0x2bcb(%rip)
mov    0x2bc4(%rip),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<query_for_label>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r13
mov    $0x40,%ebp
mov    $0x40,%edi
call   1070 <malloc@plt>
mov    %rax,0x2ec4(%rip)
test   %rax,%rax
jne    11b5 <query_for_label+0x35>
lea    0xe50(%rip),%rdi
call   10a0 <t_error@plt>
mov    %r13,%rdi
call   1040 <skip_whitespaces@plt>
xor    %r15d,%r15d
mov    0x2e21(%rip),%r12
lea    0xe4c(%rip),%r14
xchg   %ax,%ax
lea    -0x1(%rbp),%rax
cmp    %rax,%r15
jge    1210 <query_for_label+0x90>
mov    %r13,%rdi
call   1050 <fgetc@plt>
mov    0x2e80(%rip),%rcx
mov    %al,(%rcx,%r15,1)
cmp    (%r12),%al
jne    11fa <query_for_label+0x7a>
mov    %r14,%rdi
call   10a0 <t_error@plt>
add    $0x1,%r15
jmp    12c0 <query_for_label+0x140>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    $0x400,%rbp
jne    1280 <query_for_label+0x100>
lea    0xe31(%rip),%rdi
call   1030 <puts@plt>
lea    0xe63(%rip),%rdi
call   1030 <puts@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r13,%rdi
call   1050 <fgetc@plt>
mov    %eax,%ebx
movzbl (%r12),%eax
cmp    $0x7b,%bl
je     1258 <query_for_label+0xd8>
cmp    %al,%bl
jne    1240 <query_for_label+0xc0>
cmp    %al,%bl
jne    1264 <query_for_label+0xe4>
mov    %r14,%rdi
call   10a0 <t_error@plt>
mov    0x2dfd(%rip),%rax
mov    %bl,-0x1(%r15,%rax,1)
mov    $0x400,%ebp
jmp    12c0 <query_for_label+0x140>
nopw   0x0(%rax,%rax,1)
mov    0x2de1(%rip),%rdi
cmp    $0x3c1,%rbp
jl     129c <query_for_label+0x11c>
mov    $0x400,%ebp
mov    $0x400,%esi
jmp    12a3 <query_for_label+0x123>
add    $0x40,%rbp
mov    %rbp,%rsi
call   1090 <realloc@plt>
mov    %rax,0x2db9(%rip)
test   %rax,%rax
jne    12c0 <query_for_label+0x140>
lea    0xd76(%rip),%rdi
call   10a0 <t_error@plt>
mov    0x2da1(%rip),%rax
mov    -0x1(%r15,%rax,1),%al
cmp    $0x7b,%al
je     12da <query_for_label+0x15a>
cmp    (%r12),%al
jne    11d0 <query_for_label+0x50>
movsbl %al,%edi
mov    %r13,%rsi
call   1080 <ungetc@plt>
mov    0x2d7c(%rip),%rax
movw   $0x0,-0x1(%rax,%r15,1)
movsbl -0x2(%rax,%r15,1),%edi
add    $0xfffffffffffffffe,%r15
xchg   %ax,%ax
call   1060 <isspace@plt>
test   %rax,%rax
je     1322 <query_for_label+0x1a2>
mov    0x2d57(%rip),%rax
movb   $0x0,(%rax,%r15,1)
movsbl -0x1(%rax,%r15,1),%edi
add    $0xffffffffffffffff,%r15
jmp    1300 <query_for_label+0x180>
test   %r15,%r15
js     1330 <query_for_label+0x1b0>
mov    0x2d3a(%rip),%rax
jmp    133e <query_for_label+0x1be>
lea    0xd12(%rip),%rax
mov    %rax,0x2d2a(%rip)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@query_for_label.label = internal global i8* null
@.str = [26 x i8] c"Cannot allocate the label\00"
@EOF = global i8 0
@.str.1 = [23 x i8] c"Unespected End Of File\00"
@.str.2 = [63 x i8] c"\0AWarning:: the name of the stored data exceeded the LABELSIZE\0A\00"
@.str.3 = [41 x i8] c"Warning:: flushing the rest of the name\0A\00"
@.str.4 = [24 x i8] c"Cannot expand the label\00"
@.str.5 = [8 x i8] c"NOLABEL\00"
define i8* @query_for_label(i32* %0) {
%2 = alloca i32*
%3 = alloca i8
%4 = alloca i8
%5 = alloca i64
%6 = alloca i64
store i32* %0, i32** %2
store i8 123, i8* %4
store i64 0, i64* %5
store i64 0, i64* %6
store i64 64, i64* %6
%7 = load i64, i64* %6
%8 = mul i64 %7, 1
%9 = call i64 @malloc(i64 %8)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** @query_for_label.label
%11 = load i8*, i8** @query_for_label.label
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %15
13: ; preds = %1
%14 = call i32 @t_error(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %1
%16 = load i32*, i32** %2
%17 = call i32 @skip_whitespaces(i32* %16)
br label %18
18: ; preds = %130, %15
%19 = load i64, i64* %5
%20 = load i64, i64* %6
%21 = sub nsw i64 %20, 1
%22 = icmp slt i64 %19, %21
br i1 %22, label %23, label %42
23: ; preds = %18
%24 = load i32*, i32** %2
%25 = call signext i8 @fgetc(i32* %24)
%26 = load i8*, i8** @query_for_label.label
%27 = load i64, i64* %5
%28 = getelementptr inbounds i8, i8* %26, i64 %27
store i8 %25, i8* %28
%29 = load i8*, i8** @query_for_label.label
%30 = load i64, i64* %5
%31 = getelementptr inbounds i8, i8* %29, i64 %30
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = load i8, i8* @EOF
%35 = sext i8 %34 to i32
%36 = icmp eq i32 %33, %35
br i1 %36, label %37, label %39
37: ; preds = %23
%38 = call i32 @t_error(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
br label %39
39: ; preds = %37, %23
%40 = load i64, i64* %5
%41 = add nsw i64 %40, 1
store i64 %41, i64* %5
br label %109
42: ; preds = %18
%43 = load i64, i64* %6
%44 = icmp eq i64 %43, 1024
br i1 %44, label %45, label %79
45: ; preds = %42
%46 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0))
%47 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0))
br label %48
48: ; preds = %63, %45
%49 = load i32*, i32** %2
%50 = call signext i8 @fgetc(i32* %49)
store i8 %50, i8* %3
br label %51
51: ; preds = %48
%52 = load i8, i8* %3
%53 = sext i8 %52 to i32
%54 = load i8, i8* %4
%55 = sext i8 %54 to i32
%56 = icmp ne i32 %53, %55
br i1 %56, label %57, label %63
57: ; preds = %51
%58 = load i8, i8* %3
%59 = sext i8 %58 to i32
%60 = load i8, i8* @EOF
%61 = sext i8 %60 to i32
%62 = icmp ne i32 %59, %61
br label %63
63: ; preds = %57, %51
%64 = phi i1 [ false, %51 ], [ %62, %57 ]
br i1 %64, label %48, label %65
65: ; preds = %63
%66 = load i8, i8* %3
%67 = sext i8 %66 to i32
%68 = load i8, i8* @EOF
%69 = sext i8 %68 to i32
%70 = icmp eq i32 %67, %69
br i1 %70, label %71, label %73
71: ; preds = %65
%72 = call i32 @t_error(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
br label %73
73: ; preds = %71, %65
%74 = load i8, i8* %3
%75 = load i8*, i8** @query_for_label.label
%76 = load i64, i64* %5
%77 = sub nsw i64 %76, 1
%78 = getelementptr inbounds i8, i8* %75, i64 %77
store i8 %74, i8* %78
br label %108
79: ; preds = %42
%80 = load i64, i64* %6
%81 = add nsw i64 %80, 64
%82 = icmp sgt i64 %81, 1024
br i1 %82, label %83, label %94
83: ; preds = %79
store i64 1024, i64* %6
%84 = load i8*, i8** @query_for_label.label
%85 = load i64, i64* %6
%86 = mul i64 %85, 1
%87 = call i64 @realloc(i8* %84, i64 %86)
%88 = inttoptr i64 %87 to i8*
store i8* %88, i8** @query_for_label.label
%89 = load i8*, i8** @query_for_label.label
%90 = icmp eq i8* %89, null
br i1 %90, label %91, label %93
91: ; preds = %83
%92 = call i32 @t_error(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
br label %93
93: ; preds = %91, %83
br label %107
94: ; preds = %79
%95 = load i64, i64* %6
%96 = add nsw i64 %95, 64
store i64 %96, i64* %6
%97 = load i8*, i8** @query_for_label.label
%98 = load i64, i64* %6
%99 = mul i64 %98, 1
%100 = call i64 @realloc(i8* %97, i64 %99)
%101 = inttoptr i64 %100 to i8*
store i8* %101, i8** @query_for_label.label
%102 = load i8*, i8** @query_for_label.label
%103 = icmp eq i8* %102, null
br i1 %103, label %104, label %106
104: ; preds = %94
%105 = call i32 @t_error(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
br label %106
106: ; preds = %104, %94
br label %107
107: ; preds = %106, %93
br label %108
108: ; preds = %107, %73
br label %109
109: ; preds = %108, %39
br label %110
110: ; preds = %109
%111 = load i8*, i8** @query_for_label.label
%112 = load i64, i64* %5
%113 = sub nsw i64 %112, 1
%114 = getelementptr inbounds i8, i8* %111, i64 %113
%115 = load i8, i8* %114
%116 = sext i8 %115 to i32
%117 = load i8, i8* @EOF
%118 = sext i8 %117 to i32
%119 = icmp ne i32 %116, %118
br i1 %119, label %120, label %130
120: ; preds = %110
%121 = load i8*, i8** @query_for_label.label
%122 = load i64, i64* %5
%123 = sub nsw i64 %122, 1
%124 = getelementptr inbounds i8, i8* %121, i64 %123
%125 = load i8, i8* %124
%126 = sext i8 %125 to i32
%127 = load i8, i8* %4
%128 = sext i8 %127 to i32
%129 = icmp ne i32 %126, %128
br label %130
130: ; preds = %120, %110
%131 = phi i1 [ false, %110 ], [ %129, %120 ]
br i1 %131, label %18, label %132
132: ; preds = %130
%133 = load i8*, i8** @query_for_label.label
%134 = load i64, i64* %5
%135 = sub nsw i64 %134, 1
%136 = getelementptr inbounds i8, i8* %133, i64 %135
%137 = load i8, i8* %136
%138 = load i32*, i32** %2
%139 = call i32 @ungetc(i8 signext %137, i32* %138)
%140 = load i8*, i8** @query_for_label.label
%141 = load i64, i64* %5
%142 = sub nsw i64 %141, 1
%143 = getelementptr inbounds i8, i8* %140, i64 %142
store i8 0, i8* %143
%144 = load i8*, i8** @query_for_label.label
%145 = load i64, i64* %5
%146 = getelementptr inbounds i8, i8* %144, i64 %145
store i8 0, i8* %146
%147 = load i64, i64* %5
%148 = sub nsw i64 %147, 2
store i64 %148, i64* %5
br label %149
149: ; preds = %156, %132
%150 = load i8*, i8** @query_for_label.label
%151 = load i64, i64* %5
%152 = getelementptr inbounds i8, i8* %150, i64 %151
%153 = load i8, i8* %152
%154 = call i64 @isspace(i8 signext %153)
%155 = icmp ne i64 %154, 0
br i1 %155, label %156, label %162
156: ; preds = %149
%157 = load i8*, i8** @query_for_label.label
%158 = load i64, i64* %5
%159 = getelementptr inbounds i8, i8* %157, i64 %158
store i8 0, i8* %159
%160 = load i64, i64* %5
%161 = add nsw i64 %160, -1
store i64 %161, i64* %5
br label %149
162: ; preds = %149
%163 = load i64, i64* %5
%164 = add nsw i64 %163, 1
store i64 %164, i64* %5
%165 = load i64, i64* %5
%166 = icmp sle i64 %165, 0
br i1 %166, label %167, label %168
167: ; preds = %162
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8** @query_for_label.label
br label %168
168: ; preds = %167, %162
%169 = load i8*, i8** @query_for_label.label
ret i8* %169
}

LLVM IR (-O2):
@query_for_label.label = internal unnamed_addr global i8* null
@.str = [26 x i8] c"Cannot allocate the label\00"
@EOF = global i8 0
@.str.1 = [23 x i8] c"Unespected End Of File\00"
@.str.4 = [24 x i8] c"Cannot expand the label\00"
@.str.5 = [8 x i8] c"NOLABEL\00"
@str = [62 x i8] c"\0AWarning:: the name of the stored data exceeded the LABELSIZE\00"
@str.6 = [40 x i8] c"Warning:: flushing the rest of the name\00"
define i8* @query_for_label(i32* %0) {
%2 = tail call i64 @malloc(i64 64)
%3 = inttoptr i64 %2 to i8*
store i8* %3, i8** @query_for_label.label
%4 = icmp eq i64 %2, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @t_error(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = tail call i32 @skip_whitespaces(i32* %0)
br label %9
9: ; preds = %59, %7
%10 = phi i64 [ 0, %7 ], [ %60, %59 ]
%11 = phi i64 [ 64, %7 ], [ %61, %59 ]
%12 = add nsw i64 %11, -1
%13 = icmp slt i64 %10, %12
br i1 %13, label %14, label %24
14: ; preds = %9
%15 = tail call signext i8 @fgetc(i32* %0)
%16 = load i8*, i8** @query_for_label.label
%17 = getelementptr inbounds i8, i8* %16, i64 %10
store i8 %15, i8* %17
%18 = load i8, i8* @EOF
%19 = icmp eq i8 %15, %18
br i1 %19, label %20, label %22
20: ; preds = %14
%21 = tail call i32 @t_error(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
br label %22
22: ; preds = %20, %14
%23 = add nsw i64 %10, 1
br label %59
24: ; preds = %9
%25 = icmp eq i64 %11, 1024
br i1 %25, label %26, label %43
26: ; preds = %24
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str, i64 0, i64 0))
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.6, i64 0, i64 0))
br label %29
29: ; preds = %29, %26
%30 = tail call signext i8 @fgetc(i32* %0)
%31 = icmp ne i8 %30, 123
%32 = load i8, i8* @EOF
%33 = icmp ne i8 %30, %32
%34 = select i1 %31, i1 %33, i1 false
br i1 %34, label %29, label %35
35: ; preds = %29
%36 = icmp eq i8 %30, %32
br i1 %36, label %37, label %39
37: ; preds = %35
%38 = tail call i32 @t_error(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
br label %39
39: ; preds = %37, %35
%40 = load i8*, i8** @query_for_label.label
%41 = add nsw i64 %10, -1
%42 = getelementptr inbounds i8, i8* %40, i64 %41
store i8 %30, i8* %42
br label %59
43: ; preds = %24
%44 = add nsw i64 %11, 64
%45 = icmp sgt i64 %11, 960
%46 = load i8*, i8** @query_for_label.label
br i1 %45, label %47, label %53
47: ; preds = %43
%48 = tail call i64 @realloc(i8* %46, i64 1024)
%49 = inttoptr i64 %48 to i8*
store i8* %49, i8** @query_for_label.label
%50 = icmp eq i64 %48, 0
br i1 %50, label %51, label %59
51: ; preds = %47
%52 = tail call i32 @t_error(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
br label %59
53: ; preds = %43
%54 = tail call i64 @realloc(i8* %46, i64 %44)
%55 = inttoptr i64 %54 to i8*
store i8* %55, i8** @query_for_label.label
%56 = icmp eq i64 %54, 0
br i1 %56, label %57, label %59
57: ; preds = %53
%58 = tail call i32 @t_error(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
br label %59
59: ; preds = %22, %51, %47, %57, %53, %39
%60 = phi i64 [ %23, %22 ], [ %10, %39 ], [ %10, %51 ], [ %10, %47 ], [ %10, %57 ], [ %10, %53 ]
%61 = phi i64 [ %11, %22 ], [ 1024, %39 ], [ 1024, %51 ], [ 1024, %47 ], [ %44, %57 ], [ %44, %53 ]
%62 = load i8*, i8** @query_for_label.label
%63 = add nsw i64 %60, -1
%64 = getelementptr inbounds i8, i8* %62, i64 %63
%65 = load i8, i8* %64
%66 = load i8, i8* @EOF
%67 = icmp eq i8 %65, %66
%68 = icmp eq i8 %65, 123
%69 = or i1 %68, %67
br i1 %69, label %70, label %9
70: ; preds = %59
%71 = tail call i32 @ungetc(i8 signext %65, i32* %0)
%72 = load i8*, i8** @query_for_label.label
%73 = getelementptr inbounds i8, i8* %72, i64 %63
store i8 0, i8* %73
%74 = getelementptr inbounds i8, i8* %72, i64 %60
store i8 0, i8* %74
%75 = add nsw i64 %60, -2
%76 = getelementptr inbounds i8, i8* %72, i64 %75
%77 = load i8, i8* %76
%78 = tail call i64 @isspace(i8 signext %77)
%79 = icmp eq i64 %78, 0
br i1 %79, label %89, label %80
80: ; preds = %70, %80
%81 = phi i64 [ %84, %80 ], [ %75, %70 ]
%82 = load i8*, i8** @query_for_label.label
%83 = getelementptr inbounds i8, i8* %82, i64 %81
store i8 0, i8* %83
%84 = add nsw i64 %81, -1
%85 = getelementptr inbounds i8, i8* %82, i64 %84
%86 = load i8, i8* %85
%87 = tail call i64 @isspace(i8 signext %86)
%88 = icmp eq i64 %87, 0
br i1 %88, label %89, label %80
89: ; preds = %80, %70
%90 = phi i64 [ %75, %70 ], [ %84, %80 ]
%91 = icmp slt i64 %90, 0
br i1 %91, label %94, label %92
92: ; preds = %89
%93 = load i8*, i8** @query_for_label.label
br label %95
94: ; preds = %89
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8** @query_for_label.label
br label %95
95: ; preds = %92, %94
%96 = phi i8* [ %93, %92 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), %94 ]
ret i8* %96
}