#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 *, ...);
void *malloc(int);
int /*<<< orphan*/ stderr;
int strlen(char const *);
int /*<<< orphan*/ zero_string(char *, int);
int explode(const char *in_X, const char delim, char ***ptr_Y, int *ptr_nY) {
  int status = 0;
  char **flds = NULL;
  int len, n_flds;
  char *cptr = NULL;
  *ptr_Y = NULL;
  *ptr_nY = 0;
  if ((in_X == NULL) || (*in_X == '\0')) {
    return status;
  }
  n_flds = 1;
  cptr = (char *)in_X;
  len = strlen(in_X) + 1;
  for (; *cptr != '\0'; cptr++) {
    if (*cptr == delim) {
      n_flds++;
    }
  }
  flds = malloc(n_flds * sizeof(char *));
  {
    if (flds == NULL) {
      fprintf(stderr, "Unable to allocate memory\n");
      {
        {
          fprintf(stderr, "Line %3d of File %s \n", 304,
                  "/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;
      };
    }
  };
  for (int i = 0; i < n_flds; i++) {
    flds[i] = malloc(len * sizeof(char));
    {
      if (flds[i] == NULL) {
        fprintf(stderr, "Unable to allocate memory\n");
        {
          {
            fprintf(stderr, "Line %3d of File %s \n", 307,
                    "/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;
        };
      }
    };
    zero_string(flds[i], len);
  }
  int fld_idx = 0;
  cptr = (char *)in_X;
  for (int char_idx = 0; *cptr != '\0'; cptr++) {
    if (char_idx >= len) {
      {
        {
          fprintf(stderr, "Line %3d of File %s \n", 313,
                  "/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 (*cptr == delim) {
      if (fld_idx >= n_flds) {
        {
          {
            fprintf(stderr, "Line %3d of File %s \n", 315,
                    "/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;
        };
      }
      flds[fld_idx][char_idx++] = '\0';
      char_idx = 0;
      fld_idx++;
    } else {
      flds[fld_idx][char_idx++] = *cptr;
    }
  }
  if ((fld_idx + 1) != n_flds) {
    {
      {
        fprintf(stderr, "Line %3d of File %s \n", 324,
                "/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;
    };
  }
  *ptr_nY = n_flds;
  *ptr_Y = flds;
BYE:
  return status;
}


x86 assembly (clang, -O0):
<explode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x48(%rbp)
mov    -0x20(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x28(%rbp),%rax
movl   $0x0,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     11a1 <explode+0x61>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    11ac <explode+0x6c>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    148f <explode+0x34f>
movl   $0x1,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     120c <explode+0xcc>
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    11f6 <explode+0xb6>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    11fb <explode+0xbb>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    11ca <explode+0x8a>
movslq -0x40(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    1270 <explode+0x130>
mov    0x2daf(%rip),%rax
mov    (%rax),%edi
lea    0xdc6(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2d98(%rip),%rax
mov    (%rax),%edi
lea    0xdca(%rip),%rsi
mov    $0x130,%edx
lea    0xdd4(%rip),%rcx
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x2c(%rbp)
jmp    1489 <explode+0x349>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x40(%rbp),%eax
jge    131c <explode+0x1dc>
movslq -0x3c(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,%rdx
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
jne    12fa <explode+0x1ba>
mov    0x2d25(%rip),%rax
mov    (%rax),%edi
lea    0xd3c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2d0e(%rip),%rax
mov    (%rax),%edi
lea    0xd40(%rip),%rsi
mov    $0x133,%edx
lea    0xd4a(%rip),%rcx
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x2c(%rbp)
jmp    1489 <explode+0x349>
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x3c(%rbp),%esi
call   1030 <zero_string@plt>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1277 <explode+0x137>
movl   $0x0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x54(%rbp)
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1437 <explode+0x2f7>
mov    -0x54(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jl     137d <explode+0x23d>
mov    0x2c8b(%rip),%rax
mov    (%rax),%edi
lea    0xcbd(%rip),%rsi
mov    $0x139,%edx
lea    0xcc7(%rip),%rcx
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x2c(%rbp)
jmp    1489 <explode+0x349>
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    13fe <explode+0x2be>
mov    -0x50(%rbp),%eax
cmp    -0x40(%rbp),%eax
jl     13cb <explode+0x28b>
mov    0x2c3d(%rip),%rax
mov    (%rax),%edi
lea    0xc6f(%rip),%rsi
mov    $0x13b,%edx
lea    0xc79(%rip),%rcx
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x2c(%rbp)
jmp    1489 <explode+0x349>
mov    -0x38(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x54(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x54(%rbp)
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
movl   $0x0,-0x54(%rbp)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1421 <explode+0x2e1>
mov    -0x48(%rbp),%rax
mov    (%rax),%dl
mov    -0x38(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x54(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x54(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
jmp    1426 <explode+0x2e6>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    1332 <explode+0x1f2>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
cmp    -0x40(%rbp),%eax
je     1475 <explode+0x335>
mov    0x2b93(%rip),%rax
mov    (%rax),%edi
lea    0xbc5(%rip),%rsi
mov    $0x144,%edx
lea    0xbcf(%rip),%rcx
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x2c(%rbp)
jmp    1489 <explode+0x349>
mov    -0x40(%rbp),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x38(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<explode>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
movq   $0x0,(%rdx)
movl   $0x0,(%rcx)
xor    %eax,%eax
test   %rdi,%rdi
je     139b <explode+0x25b>
mov    %rdi,%rbx
cmpb   $0x0,(%rdi)
je     139b <explode+0x25b>
mov    %rcx,%r12
mov    %rdx,%r15
mov    %esi,%ebp
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %eax,%r13d
mov    (%rbx),%cl
test   %cl,%cl
je     11b8 <explode+0x78>
lea    0x1(%rbx),%rax
mov    $0x1,%r14d
cs nopw 0x0(%rax,%rax,1)
nop
xor    %edx,%edx
cmp    %bpl,%cl
sete   %dl
add    %edx,%r14d
movzbl (%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    11a0 <explode+0x60>
jmp    11be <explode+0x7e>
mov    $0x1,%r14d
lea    0x0(,%r14,8),%edi
call   1060 <malloc@plt>
mov    %rax,0x8(%rsp)
test   %rax,%rax
je     12b5 <explode+0x175>
mov    %r12,0x10(%rsp)
mov    %r15,0x18(%rsp)
mov    %r13,0x20(%rsp)
lea    0x1(%r13),%r12d
cmp    $0x2,%r14d
mov    $0x1,%r15d
cmovae %r14d,%r15d
xor    %r13d,%r13d
nopl   (%rax)
mov    %r12d,%edi
call   1060 <malloc@plt>
mov    0x8(%rsp),%rcx
mov    %rax,(%rcx,%r13,8)
test   %rax,%rax
je     12e6 <explode+0x1a6>
mov    %rax,%rdi
mov    %r12d,%esi
call   1030 <zero_string@plt>
add    $0x1,%r13
cmp    %r13,%r15
jne    1200 <explode+0xc0>
mov    (%rbx),%dl
test   %dl,%dl
je     1314 <explode+0x1d4>
add    $0x1,%rbx
xor    %ecx,%ecx
xor    %eax,%eax
mov    0x18(%rsp),%r8
mov    0x10(%rsp),%r9
mov    0x20(%rsp),%r10
jmp    1284 <explode+0x144>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movslq %eax,%rsi
mov    0x8(%rsp),%rdi
mov    (%rdi,%rsi,8),%rsi
movslq %ecx,%rdi
add    $0x1,%ecx
mov    %dl,(%rsi,%rdi,1)
movzbl (%rbx),%edx
add    $0x1,%rbx
test   %dl,%dl
je     1320 <explode+0x1e0>
cmp    %r10d,%ecx
jg     1355 <explode+0x215>
cmp    %bpl,%dl
jne    1260 <explode+0x120>
cmp    %r14d,%eax
jge    1373 <explode+0x233>
movslq %eax,%rdx
mov    0x8(%rsp),%rsi
mov    (%rsi,%rdx,8),%rdx
movslq %ecx,%rcx
movb   $0x0,(%rdx,%rcx,1)
add    $0x1,%eax
xor    %ecx,%ecx
jmp    1275 <explode+0x135>
mov    0x2d24(%rip),%rbx
mov    (%rbx),%edi
lea    0xd3b(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xd46(%rip),%rsi
lea    0xd55(%rip),%rcx
mov    $0x130,%edx
jmp    138f <explode+0x24f>
mov    0x2cf3(%rip),%rbx
mov    (%rbx),%edi
lea    0xd0a(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xd15(%rip),%rsi
lea    0xd24(%rip),%rcx
mov    $0x133,%edx
jmp    138f <explode+0x24f>
xor    %eax,%eax
mov    0x18(%rsp),%r8
mov    0x10(%rsp),%r9
add    $0x1,%eax
cmp    %r14d,%eax
jne    1337 <explode+0x1f7>
mov    %r14d,(%r9)
mov    0x8(%rsp),%rax
mov    %rax,(%r8)
xor    %eax,%eax
jmp    139b <explode+0x25b>
mov    0x2ca2(%rip),%rax
mov    (%rax),%edi
lea    0xcd4(%rip),%rsi
lea    0xce3(%rip),%rcx
mov    $0x144,%edx
jmp    138f <explode+0x24f>
mov    0x2c84(%rip),%rax
mov    (%rax),%edi
lea    0xcb6(%rip),%rsi
lea    0xcc5(%rip),%rcx
mov    $0x139,%edx
jmp    138f <explode+0x24f>
mov    0x2c66(%rip),%rax
mov    (%rax),%edi
lea    0xc98(%rip),%rsi
lea    0xca7(%rip),%rcx
mov    $0x13b,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"Unable to allocate memory\0A\00"
@.str.1 = [22 x i8] c"Line %3d of File %s \0A\00"
@.str.2 = [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 @explode(i8* %0, i8 signext %1, i8*** %2, i32* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8
%8 = alloca i8***
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i8**
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
store i8* %0, i8** %6
store i8 %1, i8* %7
store i8*** %2, i8**** %8
store i32* %3, i32** %9
store i32 0, i32* %10
store i8** null, i8*** %11
store i8* null, i8** %14
%18 = load i8***, i8**** %8
store i8** null, i8*** %18
%19 = load i32*, i32** %9
store i32 0, i32* %19
%20 = load i8*, i8** %6
%21 = icmp eq i8* %20, null
br i1 %21, label %27, label %22
22: ; preds = %4
%23 = load i8*, i8** %6
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %22, %4
%28 = load i32, i32* %10
store i32 %28, i32* %5
br label %175
29: ; preds = %22
store i32 1, i32* %13
%30 = load i8*, i8** %6
store i8* %30, i8** %14
%31 = load i8*, i8** %6
%32 = call i32 @strlen(i8* %31)
%33 = add nsw i32 %32, 1
store i32 %33, i32* %12
br label %34
34: ; preds = %50, %29
%35 = load i8*, i8** %14
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = icmp ne i32 %37, 0
br i1 %38, label %39, label %53
39: ; preds = %34
%40 = load i8*, i8** %14
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = load i8, i8* %7
%44 = sext i8 %43 to i32
%45 = icmp eq i32 %42, %44
br i1 %45, label %46, label %49
46: ; preds = %39
%47 = load i32, i32* %13
%48 = add nsw i32 %47, 1
store i32 %48, i32* %13
br label %49
49: ; preds = %46, %39
br label %50
50: ; preds = %49
%51 = load i8*, i8** %14
%52 = getelementptr inbounds i8, i8* %51, i32 1
store i8* %52, i8** %14
br label %34
53: ; preds = %34
%54 = load i32, i32* %13
%55 = sext i32 %54 to i64
%56 = mul i64 %55, 8
%57 = trunc i64 %56 to i32
%58 = call i8* @malloc(i32 %57)
%59 = bitcast i8* %58 to i8**
store i8** %59, i8*** %11
%60 = load i8**, i8*** %11
%61 = icmp eq i8** %60, null
br i1 %61, label %62, label %67
62: ; preds = %53
%63 = load i32, i32* @stderr
%64 = call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%65 = load i32, i32* @stderr
%66 = call i32 (i32, i8*, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 304, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %10
br label %173
67: ; preds = %53
store i32 0, i32* %15
br label %68
68: ; preds = %101, %67
%69 = load i32, i32* %15
%70 = load i32, i32* %13
%71 = icmp slt i32 %69, %70
br i1 %71, label %72, label %104
72: ; preds = %68
%73 = load i32, i32* %12
%74 = sext i32 %73 to i64
%75 = mul i64 %74, 1
%76 = trunc i64 %75 to i32
%77 = call i8* @malloc(i32 %76)
%78 = load i8**, i8*** %11
%79 = load i32, i32* %15
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds i8*, i8** %78, i64 %80
store i8* %77, i8** %81
%82 = load i8**, i8*** %11
%83 = load i32, i32* %15
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds i8*, i8** %82, i64 %84
%86 = load i8*, i8** %85
%87 = icmp eq i8* %86, null
br i1 %87, label %88, label %93
88: ; preds = %72
%89 = load i32, i32* @stderr
%90 = call i32 (i32, i8*, ...) @fprintf(i32 %89, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%91 = load i32, i32* @stderr
%92 = call i32 (i32, i8*, ...) @fprintf(i32 %91, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 307, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %10
br label %173
93: ; preds = %72
%94 = load i8**, i8*** %11
%95 = load i32, i32* %15
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds i8*, i8** %94, i64 %96
%98 = load i8*, i8** %97
%99 = load i32, i32* %12
%100 = call i32 @zero_string(i8* %98, i32 %99)
br label %101
101: ; preds = %93
%102 = load i32, i32* %15
%103 = add nsw i32 %102, 1
store i32 %103, i32* %15
br label %68
104: ; preds = %68
store i32 0, i32* %16
%105 = load i8*, i8** %6
store i8* %105, i8** %14
store i32 0, i32* %17
br label %106
106: ; preds = %157, %104
%107 = load i8*, i8** %14
%108 = load i8, i8* %107
%109 = sext i8 %108 to i32
%110 = icmp ne i32 %109, 0
br i1 %110, label %111, label %160
111: ; preds = %106
%112 = load i32, i32* %17
%113 = load i32, i32* %12
%114 = icmp sge i32 %112, %113
br i1 %114, label %115, label %118
115: ; preds = %111
%116 = load i32, i32* @stderr
%117 = call i32 (i32, i8*, ...) @fprintf(i32 %116, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 313, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %10
br label %173
118: ; preds = %111
%119 = load i8*, i8** %14
%120 = load i8, i8* %119
%121 = sext i8 %120 to i32
%122 = load i8, i8* %7
%123 = sext i8 %122 to i32
%124 = icmp eq i32 %121, %123
br i1 %124, label %125, label %144
125: ; preds = %118
%126 = load i32, i32* %16
%127 = load i32, i32* %13
%128 = icmp sge i32 %126, %127
br i1 %128, label %129, label %132
129: ; preds = %125
%130 = load i32, i32* @stderr
%131 = call i32 (i32, i8*, ...) @fprintf(i32 %130, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 315, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %10
br label %173
132: ; preds = %125
%133 = load i8**, i8*** %11
%134 = load i32, i32* %16
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds i8*, i8** %133, i64 %135
%137 = load i8*, i8** %136
%138 = load i32, i32* %17
%139 = add nsw i32 %138, 1
store i32 %139, i32* %17
%140 = sext i32 %138 to i64
%141 = getelementptr inbounds i8, i8* %137, i64 %140
store i8 0, i8* %141
store i32 0, i32* %17
%142 = load i32, i32* %16
%143 = add nsw i32 %142, 1
store i32 %143, i32* %16
br label %156
144: ; preds = %118
%145 = load i8*, i8** %14
%146 = load i8, i8* %145
%147 = load i8**, i8*** %11
%148 = load i32, i32* %16
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds i8*, i8** %147, i64 %149
%151 = load i8*, i8** %150
%152 = load i32, i32* %17
%153 = add nsw i32 %152, 1
store i32 %153, i32* %17
%154 = sext i32 %152 to i64
%155 = getelementptr inbounds i8, i8* %151, i64 %154
store i8 %146, i8* %155
br label %156
156: ; preds = %144, %132
br label %157
157: ; preds = %156
%158 = load i8*, i8** %14
%159 = getelementptr inbounds i8, i8* %158, i32 1
store i8* %159, i8** %14
br label %106
160: ; preds = %106
%161 = load i32, i32* %16
%162 = add nsw i32 %161, 1
%163 = load i32, i32* %13
%164 = icmp ne i32 %162, %163
br i1 %164, label %165, label %168
165: ; preds = %160
%166 = load i32, i32* @stderr
%167 = call i32 (i32, i8*, ...) @fprintf(i32 %166, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 324, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %10
br label %173
168: ; preds = %160
%169 = load i32, i32* %13
%170 = load i32*, i32** %9
store i32 %169, i32* %170
%171 = load i8**, i8*** %11
%172 = load i8***, i8**** %8
store i8** %171, i8*** %172
br label %173
173: ; preds = %168, %165, %129, %115, %88, %62
%174 = load i32, i32* %10
store i32 %174, i32* %5
br label %175
175: ; preds = %173, %27
%176 = load i32, i32* %5
ret i32 %176
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"Unable to allocate memory\0A\00"
@.str.1 = [22 x i8] c"Line %3d of File %s \0A\00"
@.str.2 = [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 @explode(i8* %0, i8 signext %1, i8*** nocapture writeonly %2, i32* nocapture writeonly %3) {
store i8** null, i8*** %2
store i32 0, i32* %3
%5 = icmp eq i8* %0, null
br i1 %5, label %100, label %6
6: ; preds = %4
%7 = load i8, i8* %0
%8 = icmp eq i8 %7, 0
br i1 %8, label %100, label %9
9: ; preds = %6
%10 = tail call i32 @strlen(i8* %0)
%11 = add nsw i32 %10, 1
%12 = load i8, i8* %0
%13 = icmp eq i8 %12, 0
br i1 %13, label %24, label %14
14: ; preds = %9, %14
%15 = phi i8 [ %22, %14 ], [ %12, %9 ]
%16 = phi i8* [ %21, %14 ], [ %0, %9 ]
%17 = phi i32 [ %20, %14 ], [ 1, %9 ]
%18 = icmp eq i8 %15, %1
%19 = zext i1 %18 to i32
%20 = add nuw nsw i32 %17, %19
%21 = getelementptr inbounds i8, i8* %16, i64 1
%22 = load i8, i8* %21
%23 = icmp eq i8 %22, 0
br i1 %23, label %24, label %14
24: ; preds = %14, %9
%25 = phi i32 [ 1, %9 ], [ %20, %14 ]
%26 = shl i32 %25, 3
%27 = tail call i8* @malloc(i32 %26)
%28 = bitcast i8* %27 to i8**
%29 = icmp eq i8* %27, null
br i1 %29, label %33, label %30
30: ; preds = %24
%31 = call i32 @llvm.umax.i32(i32 %25, i32 1)
%32 = zext i32 %31 to i64
br label %41
33: ; preds = %24
%34 = load i32, i32* @stderr
%35 = tail call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%36 = load i32, i32* @stderr
%37 = tail call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 304, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.2, i64 0, i64 0))
br label %100
38: ; preds = %51
%39 = load i8, i8* %0
%40 = icmp eq i8 %39, 0
br i1 %40, label %91, label %55
41: ; preds = %30, %51
%42 = phi i64 [ 0, %30 ], [ %53, %51 ]
%43 = tail call i8* @malloc(i32 %11)
%44 = getelementptr inbounds i8*, i8** %28, i64 %42
store i8* %43, i8** %44
%45 = icmp eq i8* %43, null
br i1 %45, label %46, label %51
46: ; preds = %41
%47 = load i32, i32* @stderr
%48 = tail call i32 (i32, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%49 = load i32, i32* @stderr
%50 = tail call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 307, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.2, i64 0, i64 0))
br label %100
51: ; preds = %41
%52 = tail call i32 @zero_string(i8* %43, i32 %11)
%53 = add nuw nsw i64 %42, 1
%54 = icmp eq i64 %53, %32
br i1 %54, label %38, label %41
55: ; preds = %38, %85
%56 = phi i8 [ %89, %85 ], [ %39, %38 ]
%57 = phi i32 [ %87, %85 ], [ 0, %38 ]
%58 = phi i32 [ %86, %85 ], [ 0, %38 ]
%59 = phi i8* [ %88, %85 ], [ %0, %38 ]
%60 = icmp sgt i32 %57, %10
br i1 %60, label %61, label %64
61: ; preds = %55
%62 = load i32, i32* @stderr
%63 = tail call i32 (i32, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 313, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.2, i64 0, i64 0))
br label %100
64: ; preds = %55
%65 = icmp eq i8 %56, %1
br i1 %65, label %66, label %78
66: ; preds = %64
%67 = icmp slt i32 %58, %25
br i1 %67, label %71, label %68
68: ; preds = %66
%69 = load i32, i32* @stderr
%70 = tail call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 315, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.2, i64 0, i64 0))
br label %100
71: ; preds = %66
%72 = sext i32 %58 to i64
%73 = getelementptr inbounds i8*, i8** %28, i64 %72
%74 = load i8*, i8** %73
%75 = sext i32 %57 to i64
%76 = getelementptr inbounds i8, i8* %74, i64 %75
store i8 0, i8* %76
%77 = add nsw i32 %58, 1
br label %85
78: ; preds = %64
%79 = sext i32 %58 to i64
%80 = getelementptr inbounds i8*, i8** %28, i64 %79
%81 = load i8*, i8** %80
%82 = add nsw i32 %57, 1
%83 = sext i32 %57 to i64
%84 = getelementptr inbounds i8, i8* %81, i64 %83
store i8 %56, i8* %84
br label %85
85: ; preds = %71, %78
%86 = phi i32 [ %77, %71 ], [ %58, %78 ]
%87 = phi i32 [ 0, %71 ], [ %82, %78 ]
%88 = getelementptr inbounds i8, i8* %59, i64 1
%89 = load i8, i8* %88
%90 = icmp eq i8 %89, 0
br i1 %90, label %91, label %55
91: ; preds = %85, %38
%92 = phi i32 [ 0, %38 ], [ %86, %85 ]
%93 = add nsw i32 %92, 1
%94 = icmp eq i32 %93, %25
br i1 %94, label %98, label %95
95: ; preds = %91
%96 = load i32, i32* @stderr
%97 = tail call i32 (i32, i8*, ...) @fprintf(i32 %96, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 324, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.2, i64 0, i64 0))
br label %100
98: ; preds = %91
store i32 %25, i32* %3
%99 = bitcast i8*** %2 to i8**
store i8* %27, i8** %99
br label %100
100: ; preds = %68, %61, %46, %33, %95, %98, %4, %6
%101 = phi i32 [ 0, %6 ], [ 0, %4 ], [ -1, %33 ], [ -1, %95 ], [ 0, %98 ], [ -1, %46 ], [ -1, %61 ], [ -1, %68 ]
ret i32 %101
}