#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 /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ stderr;
int strlen(char const *);
scalar_t__ strncmp(char *, char const *, int);
int read_nth_val(const char *in_str, const char *delim, int n, char *out_str,
                 int len_out_str) {
  int status = 0;
  if (len_out_str < 2) {
    {
      {
        fprintf(stderr, "Line %3d of File %s \n", 176,
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/"
                "master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c");
      };
      status = -1;
      goto BYE;
    };
  }
  if (out_str == NULL) {
    {
      {
        fprintf(stderr, "Line %3d of File %s \n", 177,
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/"
                "master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c");
      };
      status = -1;
      goto BYE;
    };
  }
  if (delim == NULL) {
    {
      {
        fprintf(stderr, "Line %3d of File %s \n", 178,
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/"
                "master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c");
      };
      status = -1;
      goto BYE;
    };
  }
  if (in_str == NULL) {
    {
      {
        fprintf(stderr, "Line %3d of File %s \n", 179,
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/"
                "master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c");
      };
      status = -1;
      goto BYE;
    };
  }
  if (n < 0) {
    {
      {
        fprintf(stderr, "Line %3d of File %s \n", 180,
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/"
                "master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c");
      };
      status = -1;
      goto BYE;
    };
  }
  char *cptr = (char *)in_str;
  int n_delim = strlen(delim);
  if (n_delim <= 0) {
    {
      {
        fprintf(stderr, "Line %3d of File %s \n", 185,
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/"
                "master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c");
      };
      status = -1;
      goto BYE;
    };
  }
  int i = 0;
  for (; ((i < n) && (*cptr != '\0') && (*cptr != '\n'));) {
    if (strncmp(cptr, delim, n_delim) == 0) {
      cptr += n_delim;
      i++;
    } else {
      cptr++;
    }
  }
  if (i < n) {
    *out_str = '\0';
  } else {
    int j = 0;
    for (j = 0; ((*cptr != '\0') && (*cptr != '\n')); j++) {
      if (strncmp(cptr, delim, n_delim) == 0) {
        break;
      }
      if (j == (len_out_str - 1)) {
        {
          {
            fprintf(stderr, "Line %3d of File %s \n", 205,
                    "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                    "outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/"
                    "heads/master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c");
          };
          status = -1;
          goto BYE;
        };
      }
      out_str[j] = *cptr++;
    }
    out_str[j] = '\0';
  }
BYE:
  return status;
}


x86 assembly (clang, -O0):
<read_nth_val>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
cmpl   $0x2,-0x24(%rbp)
jge    1189 <read_nth_val+0x59>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
mov    $0xb0,%edx
lea    0xe9e(%rip),%rcx
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x28(%rbp)
jmp    143d <read_nth_val+0x30d>
cmpq   $0x0,-0x20(%rbp)
jne    11c1 <read_nth_val+0x91>
mov    0x2e45(%rip),%rax
mov    (%rax),%edi
lea    0xe5c(%rip),%rsi
mov    $0xb1,%edx
lea    0xe66(%rip),%rcx
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x28(%rbp)
jmp    143d <read_nth_val+0x30d>
cmpq   $0x0,-0x10(%rbp)
jne    11f9 <read_nth_val+0xc9>
mov    0x2e0d(%rip),%rax
mov    (%rax),%edi
lea    0xe24(%rip),%rsi
mov    $0xb2,%edx
lea    0xe2e(%rip),%rcx
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x28(%rbp)
jmp    143d <read_nth_val+0x30d>
cmpq   $0x0,-0x8(%rbp)
jne    1231 <read_nth_val+0x101>
mov    0x2dd5(%rip),%rax
mov    (%rax),%edi
lea    0xdec(%rip),%rsi
mov    $0xb3,%edx
lea    0xdf6(%rip),%rcx
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x28(%rbp)
jmp    143d <read_nth_val+0x30d>
cmpl   $0x0,-0x14(%rbp)
jge    1268 <read_nth_val+0x138>
mov    0x2d9e(%rip),%rax
mov    (%rax),%edi
lea    0xdb5(%rip),%rsi
mov    $0xb4,%edx
lea    0xdbf(%rip),%rcx
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x28(%rbp)
jmp    143d <read_nth_val+0x30d>
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
jg     12b3 <read_nth_val+0x183>
mov    0x2d53(%rip),%rax
mov    (%rax),%edi
lea    0xd6a(%rip),%rsi
mov    $0xb9,%edx
lea    0xd74(%rip),%rcx
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x28(%rbp)
jmp    143d <read_nth_val+0x30d>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%ecx
xor    %eax,%eax
cmp    -0x14(%rbp),%ecx
mov    %al,-0x3d(%rbp)
jge    12f0 <read_nth_val+0x1c0>
mov    -0x30(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x3d(%rbp)
je     12f0 <read_nth_val+0x1c0>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x3d(%rbp)
mov    -0x3d(%rbp),%al
test   $0x1,%al
jne    1300 <read_nth_val+0x1d0>
jmp    134a <read_nth_val+0x21a>
mov    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x34(%rbp),%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1339 <read_nth_val+0x209>
mov    -0x34(%rbp),%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1345 <read_nth_val+0x215>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    12ba <read_nth_val+0x18a>
mov    -0x38(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1362 <read_nth_val+0x232>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
jmp    1438 <read_nth_val+0x308>
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x30(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x3e(%rbp)
je     1395 <read_nth_val+0x265>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x3e(%rbp)
mov    -0x3e(%rbp),%al
test   $0x1,%al
jne    13a5 <read_nth_val+0x275>
jmp    142c <read_nth_val+0x2fc>
mov    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x34(%rbp),%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    13c4 <read_nth_val+0x294>
jmp    142c <read_nth_val+0x2fc>
mov    -0x3c(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    1402 <read_nth_val+0x2d2>
mov    0x2c04(%rip),%rax
mov    (%rax),%edi
lea    0xc1b(%rip),%rsi
mov    $0xcd,%edx
lea    0xc25(%rip),%rcx
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x28(%rbp)
jmp    143d <read_nth_val+0x30d>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x30(%rbp)
mov    (%rax),%dl
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1370 <read_nth_val+0x240>
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    143d <read_nth_val+0x30d>
mov    -0x28(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_nth_val>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
cmp    $0x1,%r8d
jg     1165 <read_nth_val+0x35>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
lea    0xeac(%rip),%rsi
lea    0xebb(%rip),%rcx
mov    $0xb0,%edx
jmp    1323 <read_nth_val+0x1f3>
mov    %rcx,%r14
test   %rcx,%rcx
je     1209 <read_nth_val+0xd9>
mov    %rsi,%r15
test   %rsi,%rsi
je     122a <read_nth_val+0xfa>
mov    %rdi,%rbx
test   %rdi,%rdi
je     124b <read_nth_val+0x11b>
mov    %edx,%ebp
test   %edx,%edx
js     126c <read_nth_val+0x13c>
mov    %r8d,%r12d
mov    %r15,%rdi
call   1040 <strlen@plt>
mov    %eax,0xc(%rsp)
test   %eax,%eax
jle    128d <read_nth_val+0x15d>
test   %ebp,%ebp
je     12ab <read_nth_val+0x17b>
mov    0xc(%rsp),%eax
mov    %rax,0x10(%rsp)
xor    %r13d,%r13d
jmp    11d1 <read_nth_val+0xa1>
add    %rdx,%rbx
mov    %al,%cl
add    %ecx,%r13d
cmp    %ebp,%r13d
jge    12ab <read_nth_val+0x17b>
movzbl (%rbx),%eax
test   %al,%al
je     12ff <read_nth_val+0x1cf>
cmp    $0xa,%al
je     12ff <read_nth_val+0x1cf>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    0xc(%rsp),%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
mov    0x10(%rsp),%rdx
test   %rax,%rax
sete   %al
je     11c0 <read_nth_val+0x90>
mov    $0x1,%edx
jmp    11c0 <read_nth_val+0x90>
mov    0x2dd0(%rip),%rax
mov    (%rax),%edi
lea    0xde7(%rip),%rsi
lea    0xdf6(%rip),%rcx
mov    $0xb1,%edx
jmp    1323 <read_nth_val+0x1f3>
mov    0x2daf(%rip),%rax
mov    (%rax),%edi
lea    0xdc6(%rip),%rsi
lea    0xdd5(%rip),%rcx
mov    $0xb2,%edx
jmp    1323 <read_nth_val+0x1f3>
mov    0x2d8e(%rip),%rax
mov    (%rax),%edi
lea    0xda5(%rip),%rsi
lea    0xdb4(%rip),%rcx
mov    $0xb3,%edx
jmp    1323 <read_nth_val+0x1f3>
mov    0x2d6d(%rip),%rax
mov    (%rax),%edi
lea    0xd84(%rip),%rsi
lea    0xd93(%rip),%rcx
mov    $0xb4,%edx
jmp    1323 <read_nth_val+0x1f3>
mov    0x2d4c(%rip),%rax
mov    (%rax),%edi
lea    0xd63(%rip),%rsi
lea    0xd72(%rip),%rcx
mov    $0xb9,%edx
jmp    1323 <read_nth_val+0x1f3>
add    $0xffffffff,%r12d
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rbx,%r13,1),%eax
test   %al,%al
je     12f8 <read_nth_val+0x1c8>
cmp    $0xa,%al
je     12f8 <read_nth_val+0x1c8>
lea    (%rbx,%r13,1),%rbp
mov    %rbp,%rdi
mov    %r15,%rsi
mov    0xc(%rsp),%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12f8 <read_nth_val+0x1c8>
cmp    %r13,%r12
je     1307 <read_nth_val+0x1d7>
movzbl 0x0(%rbp),%eax
mov    %al,(%r14,%r13,1)
add    $0x1,%r13
jmp    12c0 <read_nth_val+0x190>
movb   $0x0,(%r14,%r13,1)
jmp    1303 <read_nth_val+0x1d3>
movb   $0x0,(%r14)
xor    %eax,%eax
jmp    132d <read_nth_val+0x1fd>
mov    0x2cd2(%rip),%rax
mov    (%rax),%edi
lea    0xce9(%rip),%rsi
lea    0xcf8(%rip),%rcx
mov    $0xcd,%edx
call   1050 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"Line %3d of File %s \0A\00"
@.str.1 = [167 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c\00"
define i32 @read_nth_val(i8* %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
store i32 0, i32* %11
%16 = load i32, i32* %10
%17 = icmp slt i32 %16, 2
br i1 %17, label %18, label %21
18: ; preds = %5
%19 = load i32, i32* @stderr
%20 = call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 176, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %11
br label %139
21: ; preds = %5
%22 = load i8*, i8** %9
%23 = icmp eq i8* %22, null
br i1 %23, label %24, label %27
24: ; preds = %21
%25 = load i32, i32* @stderr
%26 = call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 177, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %11
br label %139
27: ; preds = %21
%28 = load i8*, i8** %7
%29 = icmp eq i8* %28, null
br i1 %29, label %30, label %33
30: ; preds = %27
%31 = load i32, i32* @stderr
%32 = call i32 @fprintf(i32 %31, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 178, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %11
br label %139
33: ; preds = %27
%34 = load i8*, i8** %6
%35 = icmp eq i8* %34, null
br i1 %35, label %36, label %39
36: ; preds = %33
%37 = load i32, i32* @stderr
%38 = call i32 @fprintf(i32 %37, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 179, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %11
br label %139
39: ; preds = %33
%40 = load i32, i32* %8
%41 = icmp slt i32 %40, 0
br i1 %41, label %42, label %45
42: ; preds = %39
%43 = load i32, i32* @stderr
%44 = call i32 @fprintf(i32 %43, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 180, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %11
br label %139
45: ; preds = %39
%46 = load i8*, i8** %6
store i8* %46, i8** %12
%47 = load i8*, i8** %7
%48 = call i32 @strlen(i8* %47)
store i32 %48, i32* %13
%49 = load i32, i32* %13
%50 = icmp sle i32 %49, 0
br i1 %50, label %51, label %54
51: ; preds = %45
%52 = load i32, i32* @stderr
%53 = call i32 @fprintf(i32 %52, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 185, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %11
br label %139
54: ; preds = %45
store i32 0, i32* %14
br label %55
55: ; preds = %87, %54
%56 = load i32, i32* %14
%57 = load i32, i32* %8
%58 = icmp slt i32 %56, %57
br i1 %58, label %59, label %69
59: ; preds = %55
%60 = load i8*, i8** %12
%61 = load i8, i8* %60
%62 = sext i8 %61 to i32
%63 = icmp ne i32 %62, 0
br i1 %63, label %64, label %69
64: ; preds = %59
%65 = load i8*, i8** %12
%66 = load i8, i8* %65
%67 = sext i8 %66 to i32
%68 = icmp ne i32 %67, 10
br label %69
69: ; preds = %64, %59, %55
%70 = phi i1 [ false, %59 ], [ false, %55 ], [ %68, %64 ]
br i1 %70, label %71, label %88
71: ; preds = %69
%72 = load i8*, i8** %12
%73 = load i8*, i8** %7
%74 = load i32, i32* %13
%75 = call i64 @strncmp(i8* %72, i8* %73, i32 %74)
%76 = icmp eq i64 %75, 0
br i1 %76, label %77, label %84
77: ; preds = %71
%78 = load i32, i32* %13
%79 = load i8*, i8** %12
%80 = sext i32 %78 to i64
%81 = getelementptr inbounds i8, i8* %79, i64 %80
store i8* %81, i8** %12
%82 = load i32, i32* %14
%83 = add nsw i32 %82, 1
store i32 %83, i32* %14
br label %87
84: ; preds = %71
%85 = load i8*, i8** %12
%86 = getelementptr inbounds i8, i8* %85, i32 1
store i8* %86, i8** %12
br label %87
87: ; preds = %84, %77
br label %55
88: ; preds = %69
%89 = load i32, i32* %14
%90 = load i32, i32* %8
%91 = icmp slt i32 %89, %90
br i1 %91, label %92, label %94
92: ; preds = %88
%93 = load i8*, i8** %9
store i8 0, i8* %93
br label %138
94: ; preds = %88
store i32 0, i32* %15
store i32 0, i32* %15
br label %95
95: ; preds = %130, %94
%96 = load i8*, i8** %12
%97 = load i8, i8* %96
%98 = sext i8 %97 to i32
%99 = icmp ne i32 %98, 0
br i1 %99, label %100, label %105
100: ; preds = %95
%101 = load i8*, i8** %12
%102 = load i8, i8* %101
%103 = sext i8 %102 to i32
%104 = icmp ne i32 %103, 10
br label %105
105: ; preds = %100, %95
%106 = phi i1 [ false, %95 ], [ %104, %100 ]
br i1 %106, label %107, label %133
107: ; preds = %105
%108 = load i8*, i8** %12
%109 = load i8*, i8** %7
%110 = load i32, i32* %13
%111 = call i64 @strncmp(i8* %108, i8* %109, i32 %110)
%112 = icmp eq i64 %111, 0
br i1 %112, label %113, label %114
113: ; preds = %107
br label %133
114: ; preds = %107
%115 = load i32, i32* %15
%116 = load i32, i32* %10
%117 = sub nsw i32 %116, 1
%118 = icmp eq i32 %115, %117
br i1 %118, label %119, label %122
119: ; preds = %114
%120 = load i32, i32* @stderr
%121 = call i32 @fprintf(i32 %120, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 205, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %11
br label %139
122: ; preds = %114
%123 = load i8*, i8** %12
%124 = getelementptr inbounds i8, i8* %123, i32 1
store i8* %124, i8** %12
%125 = load i8, i8* %123
%126 = load i8*, i8** %9
%127 = load i32, i32* %15
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds i8, i8* %126, i64 %128
store i8 %125, i8* %129
br label %130
130: ; preds = %122
%131 = load i32, i32* %15
%132 = add nsw i32 %131, 1
store i32 %132, i32* %15
br label %95
133: ; preds = %113, %105
%134 = load i8*, i8** %9
%135 = load i32, i32* %15
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds i8, i8* %134, i64 %136
store i8 0, i8* %137
br label %138
138: ; preds = %133, %92
br label %139
139: ; preds = %138, %119, %51, %42, %36, %30, %24, %18
%140 = load i32, i32* %11
ret i32 %140
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"Line %3d of File %s \0A\00"
@.str.1 = [167 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c\00"
define i32 @read_nth_val(i8* %0, i8* %1, i32 %2, i8* writeonly %3, i32 %4) {
%6 = icmp slt i32 %4, 2
br i1 %6, label %7, label %10
7: ; preds = %5
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 176, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %77
10: ; preds = %5
%11 = icmp eq i8* %3, null
br i1 %11, label %12, label %15
12: ; preds = %10
%13 = load i32, i32* @stderr
%14 = tail call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 177, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %77
15: ; preds = %10
%16 = icmp eq i8* %1, null
br i1 %16, label %17, label %20
17: ; preds = %15
%18 = load i32, i32* @stderr
%19 = tail call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 178, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %77
20: ; preds = %15
%21 = icmp eq i8* %0, null
br i1 %21, label %22, label %25
22: ; preds = %20
%23 = load i32, i32* @stderr
%24 = tail call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 179, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %77
25: ; preds = %20
%26 = icmp slt i32 %2, 0
br i1 %26, label %27, label %30
27: ; preds = %25
%28 = load i32, i32* @stderr
%29 = tail call i32 @fprintf(i32 %28, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 180, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %77
30: ; preds = %25
%31 = tail call i32 @strlen(i8* %1)
%32 = icmp slt i32 %31, 1
br i1 %32, label %37, label %33
33: ; preds = %30
%34 = icmp eq i32 %2, 0
br i1 %34, label %40, label %35
35: ; preds = %33
%36 = zext i32 %31 to i64
br label %44
37: ; preds = %30
%38 = load i32, i32* @stderr
%39 = tail call i32 @fprintf(i32 %38, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 185, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %77
40: ; preds = %48, %33
%41 = phi i8* [ %0, %33 ], [ %52, %48 ]
%42 = add nsw i32 %4, -1
%43 = zext i32 %42 to i64
br label %57
44: ; preds = %35, %48
%45 = phi i32 [ 0, %35 ], [ %54, %48 ]
%46 = phi i8* [ %0, %35 ], [ %52, %48 ]
%47 = load i8, i8* %46
switch i8 %47, label %48 [
i8 0, label %56
i8 10, label %56
]
48: ; preds = %44
%49 = tail call i64 @strncmp(i8* %46, i8* %1, i32 %31)
%50 = icmp eq i64 %49, 0
%51 = select i1 %50, i64 %36, i64 1
%52 = getelementptr inbounds i8, i8* %46, i64 %51
%53 = zext i1 %50 to i32
%54 = add nuw nsw i32 %45, %53
%55 = icmp slt i32 %54, %2
br i1 %55, label %44, label %40
56: ; preds = %44, %44
store i8 0, i8* %3
br label %77
57: ; preds = %40, %69
%58 = phi i64 [ 0, %40 ], [ %73, %69 ]
%59 = phi i8* [ %41, %40 ], [ %70, %69 ]
%60 = load i8, i8* %59
switch i8 %60, label %61 [
i8 0, label %74
i8 10, label %74
]
61: ; preds = %57
%62 = tail call i64 @strncmp(i8* %59, i8* %1, i32 %31)
%63 = icmp eq i64 %62, 0
br i1 %63, label %74, label %64
64: ; preds = %61
%65 = icmp eq i64 %58, %43
br i1 %65, label %66, label %69
66: ; preds = %64
%67 = load i32, i32* @stderr
%68 = tail call i32 @fprintf(i32 %67, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 205, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %77
69: ; preds = %64
%70 = getelementptr inbounds i8, i8* %59, i64 1
%71 = load i8, i8* %59
%72 = getelementptr inbounds i8, i8* %3, i64 %58
store i8 %71, i8* %72
%73 = add nuw nsw i64 %58, 1
br label %57
74: ; preds = %57, %57, %61
%75 = and i64 %58, 4294967295
%76 = getelementptr inbounds i8, i8* %3, i64 %75
store i8 0, i8* %76
br label %77
77: ; preds = %7, %12, %17, %22, %27, %37, %56, %66, %74
%78 = phi i32 [ -1, %7 ], [ -1, %12 ], [ -1, %17 ], [ -1, %22 ], [ -1, %27 ], [ -1, %37 ], [ 0, %56 ], [ 0, %74 ], [ -1, %66 ]
ret i32 %78
}