int check_index_source(unsigned char *filename, unsigned char *temp,
                       unsigned int temp_size) {
  int i;
  int j;
  debug_(1,
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/"
         "master/src/autodafe/file.c",
         413, __func__, "<-----------------------[enter]\n");
  debug_(3,
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/"
         "master/src/autodafe/file.c",
         416, __func__, "(filename ): \"%s\"\n", filename);
  debug_(3,
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/"
         "master/src/autodafe/file.c",
         417, __func__, "(temp     ): \"%s\"\n", temp);
  debug_(3,
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/"
         "master/src/autodafe/file.c",
         418, __func__, "(temp_size): \"%d\"\n\n", temp_size);
  if (strlen(temp) == temp_size - 1) {
    error_("size of the file too long. (max : %d)\n", temp_size);
    error_("QUITTING!\n");
    return -1;
  }
  for (i = 0; i < strlen(temp); i++)
    if ((temp[i] != 0x20) && (temp[i] != 0x09)) {
      debug_(3,
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/"
             "master/src/autodafe/file.c",
             432, __func__, "space or tab detected, ignore it\n");
      break;
    }
  if (i == strlen(temp)) {
    debug_(3,
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/"
           "master/src/autodafe/file.c",
           438, __func__, "empty line, ignore it\n");
    return 1;
  }
  debug_(3,
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/"
         "master/src/autodafe/file.c",
         443, __func__, "the first ascii char of the line is: 0x%02x (%c)\n",
         temp[i], temp[i]);
  if (temp[i] == '#') {
    debug_(3,
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/"
           "master/src/autodafe/file.c",
           447, __func__, "comment detected, ignore the line\n");
    return 1;
  }
  if (temp[i] != '/') {
    return 1;
  }
  for (i = 0; i < strlen(temp); i++) {
    if (temp[i] == '#') {
      debug_(3,
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/"
             "master/src/autodafe/file.c",
             459, __func__, "comment detected, replaced by NULL\n");
      temp[i] = '\0';
      for (j = i - 1; j > 0; j--) {
        debug_(3,
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/"
               "refs/heads/master/src/autodafe/file.c",
               464, __func__, "temp[j]: 0x%02x\n", temp[j]);
        if ((temp[j] == 0x20) || (temp[j] == 0x09)) {
          debug_(3,
                 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                 "outputs/2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/"
                 "refs/heads/master/src/autodafe/file.c",
                 466, __func__, "remove extra space\n");
          temp[j] = '\0';
        } else
          break;
      }
    }
  }
  debug_(1,
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/"
         "master/src/autodafe/file.c",
         476, __func__, "<-----------------------[quit]\n");
  return 0;
}


x86 assembly (clang, -O0):
<check_index_source>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    $0x1,%edi
lea    0xeb1(%rip),%rsi
mov    $0x19d,%edx
lea    0xf40(%rip),%rcx
lea    0xf4c(%rip),%r8
mov    $0x0,%al
call   1040 <debug_@plt>
mov    -0x10(%rbp),%r9
mov    $0x3,%edi
lea    0xe87(%rip),%rsi
mov    $0x1a0,%edx
lea    0xf16(%rip),%rcx
lea    0xf43(%rip),%r8
mov    $0x0,%al
call   1040 <debug_@plt>
mov    -0x18(%rbp),%r9
mov    $0x3,%edi
lea    0xe5d(%rip),%rsi
mov    $0x1a1,%edx
lea    0xeec(%rip),%rcx
lea    0xf2c(%rip),%r8
mov    $0x0,%al
call   1040 <debug_@plt>
mov    -0x1c(%rbp),%r9d
mov    $0x3,%edi
lea    0xe33(%rip),%rsi
mov    $0x1a2,%edx
lea    0xec2(%rip),%rcx
lea    0xf15(%rip),%r8
mov    $0x0,%al
call   1040 <debug_@plt>
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
mov    %ecx,%ecx
cmp    %rcx,%rax
jne    122c <check_index_source+0xfc>
mov    -0x1c(%rbp),%esi
lea    0xefe(%rip),%rdi
mov    $0x0,%al
call   1050 <error_@plt>
lea    0xf17(%rip),%rdi
mov    $0x0,%al
call   1050 <error_@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    152c <check_index_source+0x3fc>
movl   $0x0,-0x20(%rbp)
movslq -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x30(%rbp),%rax
cmp    %rcx,%rax
jae    12bc <check_index_source+0x18c>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
je     12a9 <check_index_source+0x179>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x9,%eax
je     12a9 <check_index_source+0x179>
mov    $0x3,%edi
lea    0xd76(%rip),%rsi
mov    $0x1b0,%edx
lea    0xe05(%rip),%rcx
lea    0xe9e(%rip),%r8
mov    $0x0,%al
call   1040 <debug_@plt>
jmp    12bc <check_index_source+0x18c>
jmp    12ae <check_index_source+0x17e>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1233 <check_index_source+0x103>
movslq -0x20(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x38(%rbp),%rax
cmp    %rcx,%rax
jne    130f <check_index_source+0x1df>
mov    $0x3,%edi
lea    0xd17(%rip),%rsi
mov    $0x1b6,%edx
lea    0xda6(%rip),%rcx
lea    0xe61(%rip),%r8
mov    $0x0,%al
call   1040 <debug_@plt>
movl   $0x1,-0x4(%rbp)
jmp    152c <check_index_source+0x3fc>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movzbl (%rax,%rcx,1),%r9d
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    $0x3,%edi
lea    0xccc(%rip),%rsi
mov    $0x1bb,%edx
lea    0xd5b(%rip),%rcx
lea    0xe2d(%rip),%r8
mov    %eax,(%rsp)
mov    $0x0,%al
call   1040 <debug_@plt>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x23,%eax
jne    1398 <check_index_source+0x268>
mov    $0x3,%edi
lea    0xc8e(%rip),%rsi
mov    $0x1bf,%edx
lea    0xd1d(%rip),%rcx
lea    0xe21(%rip),%r8
mov    $0x0,%al
call   1040 <debug_@plt>
movl   $0x1,-0x4(%rbp)
jmp    152c <check_index_source+0x3fc>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
je     13b9 <check_index_source+0x289>
movl   $0x1,-0x4(%rbp)
jmp    152c <check_index_source+0x3fc>
movl   $0x0,-0x20(%rbp)
movslq -0x20(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x40(%rbp),%rax
cmp    %rcx,%rax
jae    14ff <check_index_source+0x3cf>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x23,%eax
jne    14ec <check_index_source+0x3bc>
mov    $0x3,%edi
lea    0xbfe(%rip),%rsi
mov    $0x1cb,%edx
lea    0xc8d(%rip),%rcx
lea    0xdb4(%rip),%r8
mov    $0x0,%al
call   1040 <debug_@plt>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jle    14e7 <check_index_source+0x3b7>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movzbl (%rax,%rcx,1),%r9d
mov    $0x3,%edi
lea    0xbac(%rip),%rsi
mov    $0x1d0,%edx
lea    0xc3b(%rip),%rcx
lea    0xd86(%rip),%r8
mov    $0x0,%al
call   1040 <debug_@plt>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
je     1498 <check_index_source+0x368>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x9,%eax
jne    14cf <check_index_source+0x39f>
mov    $0x3,%edi
lea    0xb5c(%rip),%rsi
mov    $0x1d2,%edx
lea    0xbeb(%rip),%rcx
lea    0xd47(%rip),%r8
mov    $0x0,%al
call   1040 <debug_@plt>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    14d4 <check_index_source+0x3a4>
jmp    14e7 <check_index_source+0x3b7>
jmp    14d9 <check_index_source+0x3a9>
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    1431 <check_index_source+0x301>
jmp    14ec <check_index_source+0x3bc>
jmp    14f1 <check_index_source+0x3c1>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    13c0 <check_index_source+0x290>
mov    $0x1,%edi
lea    0xaf5(%rip),%rsi
mov    $0x1dc,%edx
lea    0xb84(%rip),%rcx
lea    0xcf4(%rip),%r8
mov    $0x0,%al
call   1040 <debug_@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_index_source>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
lea    0xeb2(%rip),%r12
lea    0xf46(%rip),%r15
lea    0xf52(%rip),%r8
mov    $0x1,%edi
mov    %r12,%rsi
mov    $0x19d,%edx
mov    %r15,%rcx
xor    %eax,%eax
call   1040 <debug_@plt>
lea    0xf55(%rip),%r8
mov    $0x3,%edi
mov    %r12,%rsi
mov    $0x1a0,%edx
mov    %r15,%rcx
mov    %rbp,%r9
xor    %eax,%eax
call   1040 <debug_@plt>
lea    0xf47(%rip),%r8
mov    $0x3,%edi
mov    %r12,%rsi
mov    $0x1a1,%edx
mov    %r15,%rcx
mov    %rbx,%r9
xor    %eax,%eax
call   1040 <debug_@plt>
lea    0xf39(%rip),%r8
mov    $0x3,%edi
mov    %r12,%rsi
mov    $0x1a2,%edx
mov    %r15,%rcx
mov    %r14d,%r9d
xor    %eax,%eax
call   1040 <debug_@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    -0x1(%r14),%ecx
cmp    %rcx,%rax
jne    1210 <check_index_source+0xe0>
lea    0xf1b(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <error_@plt>
lea    0xf31(%rip),%rdi
xor    %eax,%eax
call   1050 <error_@plt>
mov    $0xffffffff,%ebp
jmp    141f <check_index_source+0x2ef>
xor    %ebp,%ebp
test   %rax,%rax
jne    1229 <check_index_source+0xf9>
jmp    1262 <check_index_source+0x132>
nopl   0x0(%rax)
add    $0x1,%rbp
cmp    %rbp,%rax
je     125f <check_index_source+0x12f>
movzbl (%rbx,%rbp,1),%ecx
cmp    $0x9,%cl
je     1220 <check_index_source+0xf0>
cmp    $0x20,%cl
je     1220 <check_index_source+0xf0>
lea    0xdc2(%rip),%rsi
lea    0xe56(%rip),%rcx
lea    0xeef(%rip),%r8
mov    $0x3,%edi
mov    $0x1b0,%edx
xor    %eax,%eax
call   1040 <debug_@plt>
jmp    1262 <check_index_source+0x132>
mov    %rax,%rbp
mov    %ebp,%ebp
mov    %rbx,%rdi
call   1030 <strlen@plt>
cmp    %rbp,%rax
jne    12a1 <check_index_source+0x171>
lea    0xd88(%rip),%rsi
lea    0xe1c(%rip),%rcx
lea    0xed7(%rip),%r8
mov    $0x3,%edi
mov    $0x1b6,%edx
xor    %eax,%eax
call   1040 <debug_@plt>
mov    $0x1,%ebp
jmp    141f <check_index_source+0x2ef>
movzbl (%rbx,%rbp,1),%r9d
mov    %r9d,(%rsp)
lea    0xd4f(%rip),%rsi
lea    0xde3(%rip),%rcx
lea    0xeb5(%rip),%r8
mov    $0x3,%edi
mov    $0x1bb,%edx
xor    %eax,%eax
call   1040 <debug_@plt>
mov    (%rbx,%rbp,1),%al
mov    $0x1,%ebp
cmp    $0x23,%al
je     13d6 <check_index_source+0x2a6>
cmp    $0x2f,%al
jne    141f <check_index_source+0x2ef>
mov    (%rbx),%al
test   %al,%al
je     13f7 <check_index_source+0x2c7>
mov    $0x1,%ecx
mov    %rcx,0x10(%rsp)
lea    0xcfd(%rip),%r14
lea    0xd91(%rip),%r15
xor    %r12d,%r12d
cmp    $0x23,%al
jne    13b0 <check_index_source+0x280>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x3,%edi
mov    %r14,%rsi
mov    $0x1cb,%edx
mov    %r15,%rcx
lea    0xe92(%rip),%r8
xor    %eax,%eax
call   1040 <debug_@plt>
movb   $0x0,(%rbx,%r12,1)
cmp    $0x2,%r12
jb     13b0 <check_index_source+0x280>
mov    0x10(%rsp),%r13
jmp    137c <check_index_source+0x24c>
mov    $0x3,%edi
mov    %r14,%rsi
mov    $0x1d2,%edx
mov    %r15,%rcx
lea    0xe97(%rip),%r8
xor    %eax,%eax
call   1040 <debug_@plt>
movb   $0x0,(%rbx,%rbp,1)
add    $0xffffffffffffffff,%r13
cmp    $0x2,%r13
jle    13b0 <check_index_source+0x280>
lea    -0x2(%r13),%ebp
movzbl (%rbx,%rbp,1),%r9d
mov    $0x3,%edi
mov    %r14,%rsi
mov    $0x1d0,%edx
mov    %r15,%rcx
lea    0xe51(%rip),%r8
xor    %eax,%eax
call   1040 <debug_@plt>
movzbl (%rbx,%rbp,1),%eax
cmp    $0x20,%al
je     1350 <check_index_source+0x220>
cmp    $0x9,%al
je     1350 <check_index_source+0x220>
nop
add    $0x1,%r12
mov    %rbx,%rdi
call   1030 <strlen@plt>
cmp    %r12,%rax
jbe    13f7 <check_index_source+0x2c7>
movzbl (%rbx,%r12,1),%eax
addq   $0x1,0x10(%rsp)
cmp    $0x23,%al
je     1320 <check_index_source+0x1f0>
jmp    13b0 <check_index_source+0x280>
lea    0xc23(%rip),%rsi
lea    0xcb7(%rip),%rcx
lea    0xdbb(%rip),%r8
mov    $0x3,%edi
mov    $0x1bf,%edx
jmp    1418 <check_index_source+0x2e8>
lea    0xc02(%rip),%rsi
lea    0xc96(%rip),%rcx
lea    0xe06(%rip),%r8
xor    %ebp,%ebp
mov    $0x1,%edi
mov    $0x1dc,%edx
xor    %eax,%eax
call   1040 <debug_@plt>
mov    %ebp,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [155 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/master/src/autodafe/file.c\00"
@__func__.check_index_source = [19 x i8] c"check_index_source\00"
@.str.1 = [33 x i8] c"<-----------------------[enter]\0A\00"
@.str.2 = [19 x i8] c"(filename ): \22%s\22\0A\00"
@.str.3 = [19 x i8] c"(temp ): \22%s\22\0A\00"
@.str.4 = [20 x i8] c"(temp_size): \22%d\22\0A\0A\00"
@.str.5 = [39 x i8] c"size of the file too long. (max : %d)\0A\00"
@.str.6 = [11 x i8] c"QUITTING!\0A\00"
@.str.7 = [34 x i8] c"space or tab detected, ignore it\0A\00"
@.str.8 = [23 x i8] c"empty line, ignore it\0A\00"
@.str.9 = [50 x i8] c"the first ascii char of the line is: 0x%02x (%c)\0A\00"
@.str.10 = [35 x i8] c"comment detected, ignore the line\0A\00"
@.str.11 = [36 x i8] c"comment detected, replaced by NULL\0A\00"
@.str.12 = [17 x i8] c"temp[j]: 0x%02x\0A\00"
@.str.13 = [20 x i8] c"remove extra space\0A\00"
@.str.14 = [32 x i8] c"<-----------------------[quit]\0A\00"
define i32 @check_index_source(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%10 = call i32 (i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 413, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%11 = load i8*, i8** %5
%12 = call i32 (i32, i8*, i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, i8*, ...)*)(i32 3, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 416, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* %11)
%13 = load i8*, i8** %6
%14 = call i32 (i32, i8*, i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, i8*, ...)*)(i32 3, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 417, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %13)
%15 = load i32, i32* %7
%16 = call i32 (i32, i8*, i32, i8*, i8*, i32, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, i32, ...)*)(i32 3, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 418, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i32 %15)
%17 = load i8*, i8** %6
%18 = call i64 @strlen(i8* %17)
%19 = load i32, i32* %7
%20 = sub i32 %19, 1
%21 = zext i32 %20 to i64
%22 = icmp eq i64 %18, %21
br i1 %22, label %23, label %27
23: ; preds = %3
%24 = load i32, i32* %7
%25 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @error_ to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0), i32 %24)
%26 = call i32 (i8*, ...) bitcast (i32 (...)* @error_ to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
store i32 -1, i32* %4
br label %163
27: ; preds = %3
store i32 0, i32* %8
br label %28
28: ; preds = %53, %27
%29 = load i32, i32* %8
%30 = sext i32 %29 to i64
%31 = load i8*, i8** %6
%32 = call i64 @strlen(i8* %31)
%33 = icmp ult i64 %30, %32
br i1 %33, label %34, label %56
34: ; preds = %28
%35 = load i8*, i8** %6
%36 = load i32, i32* %8
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i8, i8* %35, i64 %37
%39 = load i8, i8* %38
%40 = zext i8 %39 to i32
%41 = icmp ne i32 %40, 32
br i1 %41, label %42, label %52
42: ; preds = %34
%43 = load i8*, i8** %6
%44 = load i32, i32* %8
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i8, i8* %43, i64 %45
%47 = load i8, i8* %46
%48 = zext i8 %47 to i32
%49 = icmp ne i32 %48, 9
br i1 %49, label %50, label %52
50: ; preds = %42
%51 = call i32 (i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, ...)*)(i32 3, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 432, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0))
br label %56
52: ; preds = %42, %34
br label %53
53: ; preds = %52
%54 = load i32, i32* %8
%55 = add nsw i32 %54, 1
store i32 %55, i32* %8
br label %28
56: ; preds = %50, %28
%57 = load i32, i32* %8
%58 = sext i32 %57 to i64
%59 = load i8*, i8** %6
%60 = call i64 @strlen(i8* %59)
%61 = icmp eq i64 %58, %60
br i1 %61, label %62, label %64
62: ; preds = %56
%63 = call i32 (i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, ...)*)(i32 3, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 438, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0))
store i32 1, i32* %4
br label %163
64: ; preds = %56
%65 = load i8*, i8** %6
%66 = load i32, i32* %8
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds i8, i8* %65, i64 %67
%69 = load i8, i8* %68
%70 = zext i8 %69 to i32
%71 = load i8*, i8** %6
%72 = load i32, i32* %8
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds i8, i8* %71, i64 %73
%75 = load i8, i8* %74
%76 = zext i8 %75 to i32
%77 = call i32 (i32, i8*, i32, i8*, i8*, i32, i32, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, i32, i32, ...)*)(i32 3, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 443, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.9, i64 0, i64 0), i32 %70, i32 %76)
%78 = load i8*, i8** %6
%79 = load i32, i32* %8
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds i8, i8* %78, i64 %80
%82 = load i8, i8* %81
%83 = zext i8 %82 to i32
%84 = icmp eq i32 %83, 35
br i1 %84, label %85, label %87
85: ; preds = %64
%86 = call i32 (i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, ...)*)(i32 3, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 447, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.10, i64 0, i64 0))
store i32 1, i32* %4
br label %163
87: ; preds = %64
%88 = load i8*, i8** %6
%89 = load i32, i32* %8
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds i8, i8* %88, i64 %90
%92 = load i8, i8* %91
%93 = zext i8 %92 to i32
%94 = icmp ne i32 %93, 47
br i1 %94, label %95, label %96
95: ; preds = %87
store i32 1, i32* %4
br label %163
96: ; preds = %87
store i32 0, i32* %8
br label %97
97: ; preds = %158, %96
%98 = load i32, i32* %8
%99 = sext i32 %98 to i64
%100 = load i8*, i8** %6
%101 = call i64 @strlen(i8* %100)
%102 = icmp ult i64 %99, %101
br i1 %102, label %103, label %161
103: ; preds = %97
%104 = load i8*, i8** %6
%105 = load i32, i32* %8
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds i8, i8* %104, i64 %106
%108 = load i8, i8* %107
%109 = zext i8 %108 to i32
%110 = icmp eq i32 %109, 35
br i1 %110, label %111, label %157
111: ; preds = %103
%112 = call i32 (i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, ...)*)(i32 3, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 459, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0))
%113 = load i8*, i8** %6
%114 = load i32, i32* %8
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds i8, i8* %113, i64 %115
store i8 0, i8* %116
%117 = load i32, i32* %8
%118 = sub nsw i32 %117, 1
store i32 %118, i32* %9
br label %119
119: ; preds = %153, %111
%120 = load i32, i32* %9
%121 = icmp sgt i32 %120, 0
br i1 %121, label %122, label %156
122: ; preds = %119
%123 = load i8*, i8** %6
%124 = load i32, i32* %9
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds i8, i8* %123, i64 %125
%127 = load i8, i8* %126
%128 = zext i8 %127 to i32
%129 = call i32 (i32, i8*, i32, i8*, i8*, i32, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, i32, ...)*)(i32 3, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 464, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i32 %128)
%130 = load i8*, i8** %6
%131 = load i32, i32* %9
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds i8, i8* %130, i64 %132
%134 = load i8, i8* %133
%135 = zext i8 %134 to i32
%136 = icmp eq i32 %135, 32
br i1 %136, label %145, label %137
137: ; preds = %122
%138 = load i8*, i8** %6
%139 = load i32, i32* %9
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds i8, i8* %138, i64 %140
%142 = load i8, i8* %141
%143 = zext i8 %142 to i32
%144 = icmp eq i32 %143, 9
br i1 %144, label %145, label %151
145: ; preds = %137, %122
%146 = call i32 (i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, ...)*)(i32 3, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 466, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0))
%147 = load i8*, i8** %6
%148 = load i32, i32* %9
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds i8, i8* %147, i64 %149
store i8 0, i8* %150
br label %152
151: ; preds = %137
br label %156
152: ; preds = %145
br label %153
153: ; preds = %152
%154 = load i32, i32* %9
%155 = add nsw i32 %154, -1
store i32 %155, i32* %9
br label %119
156: ; preds = %151, %119
br label %157
157: ; preds = %156, %103
br label %158
158: ; preds = %157
%159 = load i32, i32* %8
%160 = add nsw i32 %159, 1
store i32 %160, i32* %8
br label %97
161: ; preds = %97
%162 = call i32 (i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 476, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.14, i64 0, i64 0))
store i32 0, i32* %4
br label %163
163: ; preds = %161, %95, %85, %62, %23
%164 = load i32, i32* %4
ret i32 %164
}

LLVM IR (-O2):
@.str = [155 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/master/src/autodafe/file.c\00"
@__func__.check_index_source = [19 x i8] c"check_index_source\00"
@.str.1 = [33 x i8] c"<-----------------------[enter]\0A\00"
@.str.2 = [19 x i8] c"(filename ): \22%s\22\0A\00"
@.str.3 = [19 x i8] c"(temp ): \22%s\22\0A\00"
@.str.4 = [20 x i8] c"(temp_size): \22%d\22\0A\0A\00"
@.str.5 = [39 x i8] c"size of the file too long. (max : %d)\0A\00"
@.str.6 = [11 x i8] c"QUITTING!\0A\00"
@.str.7 = [34 x i8] c"space or tab detected, ignore it\0A\00"
@.str.8 = [23 x i8] c"empty line, ignore it\0A\00"
@.str.9 = [50 x i8] c"the first ascii char of the line is: 0x%02x (%c)\0A\00"
@.str.10 = [35 x i8] c"comment detected, ignore the line\0A\00"
@.str.11 = [36 x i8] c"comment detected, replaced by NULL\0A\00"
@.str.12 = [17 x i8] c"temp[j]: 0x%02x\0A\00"
@.str.13 = [20 x i8] c"remove extra space\0A\00"
@.str.14 = [32 x i8] c"<-----------------------[quit]\0A\00"
define i32 @check_index_source(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 (i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 413, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (i32, i8*, i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, i8*, ...)*)(i32 3, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 416, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%6 = tail call i32 (i32, i8*, i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, i8*, ...)*)(i32 3, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 417, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %1)
%7 = tail call i32 (i32, i8*, i32, i8*, i8*, i32, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, i32, ...)*)(i32 3, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 418, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i32 %2)
%8 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%9 = add i32 %2, -1
%10 = zext i32 %9 to i64
%11 = icmp eq i64 %8, %10
br i1 %11, label %14, label %12
12: ; preds = %3
%13 = icmp eq i64 %8, 0
br i1 %13, label %26, label %17
14: ; preds = %3
%15 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @error_ to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0), i32 %2)
%16 = tail call i32 (i8*, ...) bitcast (i32 (...)* @error_ to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
br label %73
17: ; preds = %12, %23
%18 = phi i64 [ %24, %23 ], [ 0, %12 ]
%19 = getelementptr inbounds i8, i8* %1, i64 %18
%20 = load i8, i8* %19
switch i8 %20, label %21 [
i8 32, label %23
i8 9, label %23
]
21: ; preds = %17
%22 = tail call i32 (i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, ...)*)(i32 3, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 432, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0))
br label %26
23: ; preds = %17, %17
%24 = add nuw i64 %18, 1
%25 = icmp eq i64 %24, %8
br i1 %25, label %26, label %17
26: ; preds = %23, %12, %21
%27 = phi i64 [ %18, %21 ], [ 0, %12 ], [ %8, %23 ]
%28 = and i64 %27, 4294967295
%29 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%30 = icmp eq i64 %29, %28
br i1 %30, label %31, label %33
31: ; preds = %26
%32 = tail call i32 (i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, ...)*)(i32 3, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 438, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0))
br label %73
33: ; preds = %26
%34 = getelementptr inbounds i8, i8* %1, i64 %28
%35 = load i8, i8* %34
%36 = zext i8 %35 to i32
%37 = tail call i32 (i32, i8*, i32, i8*, i8*, i32, i32, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, i32, i32, ...)*)(i32 3, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 443, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.9, i64 0, i64 0), i32 %36, i32 %36)
%38 = load i8, i8* %34
switch i8 %38, label %73 [
i8 35, label %42
i8 47, label %39
]
39: ; preds = %33
%40 = load i8, i8* %1
%41 = icmp eq i8 %40, 0
br i1 %41, label %71, label %44
42: ; preds = %33
%43 = tail call i32 (i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, ...)*)(i32 3, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 447, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.10, i64 0, i64 0))
br label %73
44: ; preds = %39, %68
%45 = phi i8 [ %70, %68 ], [ %40, %39 ]
%46 = phi i64 [ %65, %68 ], [ 0, %39 ]
%47 = icmp eq i8 %45, 35
br i1 %47, label %48, label %64
48: ; preds = %44
%49 = getelementptr inbounds i8, i8* %1, i64 %46
%50 = tail call i32 (i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, ...)*)(i32 3, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 459, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0))
store i8 0, i8* %49
%51 = icmp ugt i64 %46, 1
br i1 %51, label %52, label %64
52: ; preds = %48, %61
%53 = phi i64 [ %54, %61 ], [ %46, %48 ]
%54 = add nsw i64 %53, -1
%55 = and i64 %54, 4294967295
%56 = getelementptr inbounds i8, i8* %1, i64 %55
%57 = load i8, i8* %56
%58 = zext i8 %57 to i32
%59 = tail call i32 (i32, i8*, i32, i8*, i8*, i32, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, i32, ...)*)(i32 3, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 464, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i32 %58)
%60 = load i8, i8* %56
switch i8 %60, label %64 [
i8 32, label %61
i8 9, label %61
]
61: ; preds = %52, %52
%62 = tail call i32 (i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, ...)*)(i32 3, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 466, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0))
store i8 0, i8* %56
%63 = icmp sgt i64 %53, 2
br i1 %63, label %52, label %64
64: ; preds = %61, %52, %48, %44
%65 = add nuw i64 %46, 1
%66 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%67 = icmp ugt i64 %66, %65
br i1 %67, label %68, label %71
68: ; preds = %64
%69 = getelementptr inbounds i8, i8* %1, i64 %65
%70 = load i8, i8* %69
br label %44
71: ; preds = %64, %39
%72 = tail call i32 (i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @debug_ to i32 (i32, i8*, i32, i8*, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 476, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.check_index_source, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.14, i64 0, i64 0))
br label %73
73: ; preds = %33, %71, %42, %31, %14
%74 = phi i32 [ -1, %14 ], [ 1, %31 ], [ 1, %42 ], [ 0, %71 ], [ 1, %33 ]
ret i32 %74
}