#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_span_round_trip(char *);
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/span-unit.c"
            " at line "
            "54",
            0, "%d",
            test_span_round_trip(
                "{\"a\":\"ba85631c2ce111e5b345feff819cdc9f\",\"b\":34359738368,"
                "\"e\":34359739368,\"d\":\"myspan\",\"r\":\"span-unit2\","
                "\"p\":[\"1549e8d42ce411e5b345feff819cdc9f\","
                "\"1b6a1d242ce411e5b345feff819cdc9f\","
                "\"25ab73822ce411e5b345feff819cdc9f\"]}")))
      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/span-unit.c"
               " at line "
               "60",
               0, "%d",
               test_span_round_trip(
                   "{\"a\":\"000000002ce111e5b345feff819cdc9f\",\"b\":0,"
                   "\"e\":0,\"d\":\"secondSpan\",\"r\":\"other-tracerid\","
                   "\"p\":[]}")))
      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/span-unit.c"
               " at line "
               "64",
               0, "%d",
               test_span_round_trip(
                   "{\"a\":\"6baba3842ce411e5b345feff819cdc9f\",\"b\":999,"
                   "\"e\":1000,\"d\":\"thirdSpan\",\"r\":\"other-tracerid\","
                   "\"p\":[\"000000002ce111e5b345feff819cdc9f\"]}")))
      return 1;
  } while (0);
  ;
  ;
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf7a(%rip),%rdi
call   1040 <test_span_round_trip@plt>
mov    %eax,%r8d
lea    0x10ec(%rip),%rdi
lea    0xeb4(%rip),%rsi
xor    %edx,%edx
lea    0xf58(%rip),%rcx
call   1030 <expect@plt>
cmp    $0x0,%rax
je     1170 <main+0x50>
movl   $0x1,-0x4(%rbp)
jmp    1217 <main+0xf7>
jmp    1175 <main+0x55>
jmp    117a <main+0x5a>
lea    0x10b2(%rip),%rdi
call   1040 <test_span_round_trip@plt>
mov    %eax,%r8d
lea    0x10a1(%rip),%rdi
lea    0xfef(%rip),%rsi
xor    %edx,%edx
lea    0xf0d(%rip),%rcx
call   1030 <expect@plt>
cmp    $0x0,%rax
je     11bb <main+0x9b>
movl   $0x1,-0x4(%rbp)
jmp    1217 <main+0xf7>
jmp    11c0 <main+0xa0>
jmp    11c5 <main+0xa5>
lea    0x1176(%rip),%rdi
call   1040 <test_span_round_trip@plt>
mov    %eax,%r8d
lea    0x1056(%rip),%rdi
lea    0x10b3(%rip),%rsi
xor    %edx,%edx
lea    0xec2(%rip),%rcx
call   1030 <expect@plt>
cmp    $0x0,%rax
je     1206 <main+0xe6>
movl   $0x1,-0x4(%rbp)
jmp    1217 <main+0xf7>
jmp    120b <main+0xeb>
mov    0x2dce(%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
lea    0xf88(%rip),%rdi
call   1040 <test_span_round_trip@plt>
lea    0x10fd(%rip),%rdi
lea    0xec5(%rip),%rsi
lea    0xf6b(%rip),%rcx
xor    %edx,%edx
mov    %eax,%r8d
call   1030 <expect@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    11c4 <main+0xa4>
lea    0x10d6(%rip),%rdi
call   1040 <test_span_round_trip@plt>
lea    0x10c8(%rip),%rdi
lea    0x1016(%rip),%rsi
lea    0xf36(%rip),%rcx
xor    %edx,%edx
mov    %eax,%r8d
call   1030 <expect@plt>
test   %rax,%rax
jne    11c4 <main+0xa4>
lea    0x11b5(%rip),%rdi
call   1040 <test_span_round_trip@plt>
lea    0x1098(%rip),%rdi
lea    0x10f5(%rip),%rsi
lea    0xf06(%rip),%rcx
xor    %edx,%edx
mov    %eax,%r8d
call   1030 <expect@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    11c4 <main+0xa4>
mov    0x2e1e(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"0\00"
@.str.1 = [173 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/span-unit.c at line 54\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [214 x i8] c"{\22a\22:\22ba85631c2ce111e5b345feff819cdc9f\22,\22b\22:34359738368,\22e\22:34359739368,\22d\22:\22myspan\22,\22r\22:\22span-unit2\22,\22p\22:[\221549e8d42ce411e5b345feff819cdc9f\22,\221b6a1d242ce411e5b345feff819cdc9f\22,\2225ab73822ce411e5b345feff819cdc9f\22]}\00"
@.str.4 = [173 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/span-unit.c at line 60\00"
@.str.5 = [98 x i8] c"{\22a\22:\22000000002ce111e5b345feff819cdc9f\22,\22b\22:0,\22e\22:0,\22d\22:\22secondSpan\22,\22r\22:\22other-tracerid\22,\22p\22:[]}\00"
@.str.6 = [173 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/span-unit.c at line 64\00"
@.str.7 = [136 x i8] c"{\22a\22:\226baba3842ce411e5b345feff819cdc9f\22,\22b\22:999,\22e\22:1000,\22d\22:\22thirdSpan\22,\22r\22:\22other-tracerid\22,\22p\22:[\22000000002ce111e5b345feff819cdc9f\22]}\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_span_round_trip(i8* getelementptr inbounds ([214 x i8], [214 x i8]* @.str.3, i64 0, i64 0))
%4 = call i64 @expect(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([173 x i8], [173 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_span_round_trip(i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str.5, i64 0, i64 0))
%11 = call i64 @expect(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([173 x i8], [173 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 %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_span_round_trip(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.7, i64 0, i64 0))
%18 = call i64 @expect(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.6, 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 = [173 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/span-unit.c at line 54\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [214 x i8] c"{\22a\22:\22ba85631c2ce111e5b345feff819cdc9f\22,\22b\22:34359738368,\22e\22:34359739368,\22d\22:\22myspan\22,\22r\22:\22span-unit2\22,\22p\22:[\221549e8d42ce411e5b345feff819cdc9f\22,\221b6a1d242ce411e5b345feff819cdc9f\22,\2225ab73822ce411e5b345feff819cdc9f\22]}\00"
@.str.4 = [173 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/span-unit.c at line 60\00"
@.str.5 = [98 x i8] c"{\22a\22:\22000000002ce111e5b345feff819cdc9f\22,\22b\22:0,\22e\22:0,\22d\22:\22secondSpan\22,\22r\22:\22other-tracerid\22,\22p\22:[]}\00"
@.str.6 = [173 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/span-unit.c at line 64\00"
@.str.7 = [136 x i8] c"{\22a\22:\226baba3842ce411e5b345feff819cdc9f\22,\22b\22:999,\22e\22:1000,\22d\22:\22thirdSpan\22,\22r\22:\22other-tracerid\22,\22p\22:[\22000000002ce111e5b345feff819cdc9f\22]}\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @test_span_round_trip(i8* getelementptr inbounds ([214 x i8], [214 x i8]* @.str.3, i64 0, i64 0))
%2 = tail call i64 @expect(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([173 x i8], [173 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_span_round_trip(i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str.5, i64 0, i64 0))
%6 = tail call i64 @expect(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([173 x i8], [173 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 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %4
%9 = tail call i32 @test_span_round_trip(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.7, i64 0, i64 0))
%10 = tail call i64 @expect(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.6, 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
}