#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 EXIT_SUCCESS;
scalar_t__ expect(char *, char *, int /*<<< orphan*/, char *,
                  int /*<<< orphan*/);
int /*<<< orphan*/ test_fwdprintf();
int /*<<< orphan*/ test_parse_endpoints();
int /*<<< orphan*/ test_validate_json_string();
int main(void) {
  do {
    if (expect("0",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/apache/incubator-htrace/refs/"
               "heads/master/htrace-c/src/test/string-unit.c"
               " at line "
               "112",
               0, "%d", test_fwdprintf()))
      return 1;
  } while (0);
  ;
  ;
  do {
    if (expect("0",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/apache/incubator-htrace/refs/"
               "heads/master/htrace-c/src/test/string-unit.c"
               " at line "
               "113",
               0, "%d", test_validate_json_string()))
      return 1;
  } while (0);
  ;
  ;
  do {
    if (expect("0",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/apache/incubator-htrace/refs/"
               "heads/master/htrace-c/src/test/string-unit.c"
               " at line "
               "114",
               0, "%d", test_parse_endpoints()))
      return 1;
  } while (0);
  ;
  ;
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <test_fwdprintf@plt>
mov    %eax,%r8d
lea    0xea0(%rip),%rdi
lea    0xe9b(%rip),%rsi
xor    %edx,%edx
lea    0xf42(%rip),%rcx
call   1040 <expect@plt>
cmp    $0x0,%rax
je     118b <main+0x4b>
movl   $0x1,-0x4(%rbp)
jmp    1228 <main+0xe8>
jmp    1190 <main+0x50>
jmp    1195 <main+0x55>
mov    $0x0,%al
call   1030 <test_validate_json_string@plt>
mov    %eax,%r8d
lea    0xe5a(%rip),%rdi
lea    0xf08(%rip),%rsi
xor    %edx,%edx
lea    0xefc(%rip),%rcx
call   1040 <expect@plt>
cmp    $0x0,%rax
je     11d1 <main+0x91>
movl   $0x1,-0x4(%rbp)
jmp    1228 <main+0xe8>
jmp    11d6 <main+0x96>
jmp    11db <main+0x9b>
mov    $0x0,%al
call   1060 <test_parse_endpoints@plt>
mov    %eax,%r8d
lea    0xe14(%rip),%rdi
lea    0xf72(%rip),%rsi
xor    %edx,%edx
lea    0xeb6(%rip),%rcx
call   1040 <expect@plt>
cmp    $0x0,%rax
je     1217 <main+0xd7>
movl   $0x1,-0x4(%rbp)
jmp    1228 <main+0xe8>
jmp    121c <main+0xdc>
mov    0x2dbd(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <test_fwdprintf@plt>
lea    0xeb1(%rip),%rdi
lea    0xeac(%rip),%rsi
lea    0xf55(%rip),%rcx
xor    %edx,%edx
mov    %eax,%r8d
call   1040 <expect@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    11d5 <main+0x95>
xor    %eax,%eax
call   1030 <test_validate_json_string@plt>
lea    0xe81(%rip),%rdi
lea    0xf2f(%rip),%rsi
lea    0xf25(%rip),%rcx
xor    %edx,%edx
mov    %eax,%r8d
call   1040 <expect@plt>
test   %rax,%rax
jne    11d5 <main+0x95>
xor    %eax,%eax
call   1060 <test_parse_endpoints@plt>
lea    0xe56(%rip),%rdi
lea    0xfb4(%rip),%rsi
lea    0xefa(%rip),%rcx
xor    %edx,%edx
mov    %eax,%r8d
call   1040 <expect@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    11d5 <main+0x95>
mov    0x2e0d(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"0\00"
@.str.1 = [176 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/apache/incubator-htrace/refs/heads/master/htrace-c/src/test/string-unit.c at line 112\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [176 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/apache/incubator-htrace/refs/heads/master/htrace-c/src/test/string-unit.c at line 113\00"
@.str.4 = [176 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/apache/incubator-htrace/refs/heads/master/htrace-c/src/test/string-unit.c at line 114\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
%3 = call i32 (...) @test_fwdprintf()
%4 = call i64 @expect(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str.1, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %2
store i32 1, i32* %1
br label %24
7: ; preds = %2
br label %8
8: ; preds = %7
br label %9
9: ; preds = %8
%10 = call i32 (...) @test_validate_json_string()
%11 = call i64 @expect(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str.3, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %9
store i32 1, i32* %1
br label %24
14: ; preds = %9
br label %15
15: ; preds = %14
br label %16
16: ; preds = %15
%17 = call i32 (...) @test_parse_endpoints()
%18 = call i64 @expect(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str.4, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %17)
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 1, i32* %1
br label %24
21: ; preds = %16
br label %22
22: ; preds = %21
%23 = load i32, i32* @EXIT_SUCCESS
store i32 %23, i32* %1
br label %24
24: ; preds = %22, %20, %13, %6
%25 = load i32, i32* %1
ret i32 %25
}

LLVM IR (-O2):
@.str = [2 x i8] c"0\00"
@.str.1 = [176 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/apache/incubator-htrace/refs/heads/master/htrace-c/src/test/string-unit.c at line 112\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [176 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/apache/incubator-htrace/refs/heads/master/htrace-c/src/test/string-unit.c at line 113\00"
@.str.4 = [176 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/apache/incubator-htrace/refs/heads/master/htrace-c/src/test/string-unit.c at line 114\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @test_fwdprintf()
%2 = tail call i64 @expect(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str.1, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %14
4: ; preds = %0
%5 = tail call i32 (...) @test_validate_json_string()
%6 = tail call i64 @expect(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str.3, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %4
%9 = tail call i32 (...) @test_parse_endpoints()
%10 = tail call i64 @expect(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str.4, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %9)
%11 = icmp eq i64 %10, 0
%12 = load i32, i32* @EXIT_SUCCESS
%13 = select i1 %11, i32 %12, i32 1
br label %14
14: ; preds = %8, %4, %0
%15 = phi i32 [ 1, %0 ], [ 1, %4 ], [ %13, %8 ]
ret i32 %15
}