#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;
scalar_t__ strcasecmp(char const *, char *);
int stoB(const char *X, bool *ptr_B) {
  int status = 0;
  if ((X == NULL) || (*X == '\0')) {
    {
      {
        fprintf(stderr, "Line %3d of File %s \n", 45,
                "/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 (strcasecmp(X, "true") == 0) {
    *ptr_B = true;
  } else if (strcasecmp(X, "false") == 0) {
    *ptr_B = false;
  } else {
    {
      {
        fprintf(stderr, "Line %3d of File %s \n", 53,
                "/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;
    };
  }
BYE:
  return status;
}


x86 assembly (clang, -O0):
<stoB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1152 <stoB+0x32>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    117f <stoB+0x5f>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    0xe9e(%rip),%rsi
mov    $0x2d,%edx
lea    0xea8(%rip),%rcx
call   1040 <fprintf@plt>
movl   $0xffffffff,-0x14(%rbp)
jmp    1208 <stoB+0xe8>
mov    -0x8(%rbp),%rdi
lea    0xf33(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    11a8 <stoB+0x88>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
jmp    1203 <stoB+0xe3>
mov    -0x8(%rbp),%rdi
lea    0xf0f(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    11d1 <stoB+0xb1>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
jmp    11fe <stoB+0xde>
mov    0x2e08(%rip),%rax
mov    (%rax),%edi
lea    0xe1f(%rip),%rsi
mov    $0x35,%edx
lea    0xe29(%rip),%rcx
call   1040 <fprintf@plt>
movl   $0xffffffff,-0x14(%rbp)
jmp    1208 <stoB+0xe8>
jmp    1203 <stoB+0xe3>
jmp    1208 <stoB+0xe8>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stoB>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     117a <stoB+0x5a>
mov    %rdi,%rbx
cmpb   $0x0,(%rdi)
je     117a <stoB+0x5a>
mov    %rsi,%r14
lea    0xf82(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %rax,%rax
je     11a8 <stoB+0x88>
lea    0xf73(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %rax,%rax
je     11b3 <stoB+0x93>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
lea    0xea3(%rip),%rcx
mov    $0x35,%edx
jmp    1196 <stoB+0x76>
mov    0x2e5f(%rip),%rax
mov    (%rax),%edi
lea    0xe76(%rip),%rsi
lea    0xe85(%rip),%rcx
mov    $0x2d,%edx
call   1040 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
movl   $0x1,(%r14)
xor    %eax,%eax
jmp    11a0 <stoB+0x80>
movl   $0x0,(%r14)
xor    %eax,%eax
jmp    11a0 <stoB+0x80>

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"
@.str.2 = [5 x i8] c"true\00"
@.str.3 = [6 x i8] c"false\00"
define i32 @stoB(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32
store i8* %0, i8** %3
store i32* %1, i32** %4
store i32 0, i32* %5
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %13, label %8
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %8, %2
%14 = load i32, i32* @stderr
%15 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 45, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %5
br label %33
16: ; preds = %8
%17 = load i8*, i8** %3
%18 = call i64 @strcasecmp(i8* %17, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %16
%21 = load i32*, i32** %4
store i32 1, i32* %21
br label %32
22: ; preds = %16
%23 = load i8*, i8** %3
%24 = call i64 @strcasecmp(i8* %23, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %28
26: ; preds = %22
%27 = load i32*, i32** %4
store i32 0, i32* %27
br label %31
28: ; preds = %22
%29 = load i32, i32* @stderr
%30 = call i32 @fprintf(i32 %29, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 53, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %5
br label %33
31: ; preds = %26
br label %32
32: ; preds = %31, %20
br label %33
33: ; preds = %32, %28, %13
%34 = load i32, i32* %5
ret i32 %34
}

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"
@.str.2 = [5 x i8] c"true\00"
@.str.3 = [6 x i8] c"false\00"
define i32 @stoB(i8* %0, i32* nocapture writeonly %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4, %2
%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 45, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %21
10: ; preds = %4
%11 = tail call i64 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %10
store i32 1, i32* %1
br label %21
14: ; preds = %10
%15 = tail call i64 @strcasecmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %14
store i32 0, i32* %1
br label %21
18: ; preds = %14
%19 = load i32, i32* @stderr
%20 = tail call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 53, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %21
21: ; preds = %13, %17, %18, %7
%22 = phi i32 [ -1, %7 ], [ 0, %13 ], [ 0, %17 ], [ -1, %18 ]
ret i32 %22
}