int test_recursive_panic() {
  do {
    if (!chk(!!(chk_recursive_panic(0)),
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/adrianratnapala/elm0/refs/heads/master/"
             "test_elm.c",
             590, __func__, "%s", "chk_recursive_panic(0)"))
      goto fail;
  } while (0);
  do {
    if (!chk(!!(chk_recursive_panic(0)),
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/adrianratnapala/elm0/refs/heads/master/"
             "test_elm.c",
             591, __func__, "%s", "chk_recursive_panic(0)"))
      goto fail;
  } while (0);
  return pass(__func__);
  goto fail;
fail:
  return 0;
}


x86 assembly (clang, -O0):
<test_recursive_panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
mov    $0x0,%al
call   1050 <chk_recursive_panic@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
lea    0xea9(%rip),%rsi
mov    $0x24e,%edx
lea    0xf29(%rip),%rcx
lea    0xf37(%rip),%r8
lea    0xf33(%rip),%r9
mov    $0x0,%al
call   1030 <chk@plt>
cmp    $0x0,%eax
jne    1186 <test_recursive_panic+0x56>
jmp    11f9 <test_recursive_panic+0xc9>
jmp    118b <test_recursive_panic+0x5b>
jmp    1190 <test_recursive_panic+0x60>
xor    %edi,%edi
mov    $0x0,%al
call   1050 <chk_recursive_panic@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
lea    0xe51(%rip),%rsi
mov    $0x24f,%edx
lea    0xed1(%rip),%rcx
lea    0xedf(%rip),%r8
lea    0xedb(%rip),%r9
mov    $0x0,%al
call   1030 <chk@plt>
cmp    $0x0,%eax
jne    11de <test_recursive_panic+0xae>
jmp    11f9 <test_recursive_panic+0xc9>
jmp    11e3 <test_recursive_panic+0xb3>
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1040 <pass@plt>
mov    %eax,-0x4(%rbp)
jmp    1200 <test_recursive_panic+0xd0>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_recursive_panic>:
push   %rax
xor    %edi,%edi
xor    %eax,%eax
call   1050 <chk_recursive_panic@plt>
xor    %edi,%edi
test   %eax,%eax
setne  %dil
lea    0xeb7(%rip),%rsi
lea    0xf3c(%rip),%rcx
lea    0xf4a(%rip),%r8
lea    0xf46(%rip),%r9
mov    $0x24e,%edx
xor    %eax,%eax
call   1030 <chk@plt>
test   %eax,%eax
je     11ba <test_recursive_panic+0x8a>
xor    %edi,%edi
xor    %eax,%eax
call   1050 <chk_recursive_panic@plt>
xor    %edi,%edi
test   %eax,%eax
setne  %dil
lea    0xe7a(%rip),%rsi
lea    0xeff(%rip),%rcx
lea    0xf0d(%rip),%r8
lea    0xf09(%rip),%r9
mov    $0x24f,%edx
xor    %eax,%eax
call   1030 <chk@plt>
test   %eax,%eax
je     11ba <test_recursive_panic+0x8a>
lea    0xeda(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1040 <pass@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/adrianratnapala/elm0/refs/heads/master/test_elm.c\00"
@__func__.test_recursive_panic = [21 x i8] c"test_recursive_panic\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [23 x i8] c"chk_recursive_panic(0)\00"
define i32 @test_recursive_panic() {
%1 = alloca i32
br label %2
2: ; preds = %0
%3 = call i32 (i32, ...) bitcast (i32 (...)* @chk_recursive_panic to i32 (i32, ...)*)(i32 0)
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
%8 = call i32 (i32, i8*, i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @chk to i32 (i32, i8*, i32, i8*, i8*, i8*, ...)*)(i32 %7, i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 590, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__func__.test_recursive_panic, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%9 = icmp ne i32 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %2
br label %25
11: ; preds = %2
br label %12
12: ; preds = %11
br label %13
13: ; preds = %12
%14 = call i32 (i32, ...) bitcast (i32 (...)* @chk_recursive_panic to i32 (i32, ...)*)(i32 0)
%15 = icmp ne i32 %14, 0
%16 = xor i1 %15, true
%17 = xor i1 %16, true
%18 = zext i1 %17 to i32
%19 = call i32 (i32, i8*, i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @chk to i32 (i32, i8*, i32, i8*, i8*, i8*, ...)*)(i32 %18, i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 591, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__func__.test_recursive_panic, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%20 = icmp ne i32 %19, 0
br i1 %20, label %22, label %21
21: ; preds = %13
br label %25
22: ; preds = %13
br label %23
23: ; preds = %22
%24 = call i32 (i8*, ...) bitcast (i32 (...)* @pass to i32 (i8*, ...)*)(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__func__.test_recursive_panic, i64 0, i64 0))
store i32 %24, i32* %1
br label %26
25: ; preds = %21, %10
store i32 0, i32* %1
br label %26
26: ; preds = %25, %23
%27 = load i32, i32* %1
ret i32 %27
}

LLVM IR (-O2):
@.str = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/adrianratnapala/elm0/refs/heads/master/test_elm.c\00"
@__func__.test_recursive_panic = [21 x i8] c"test_recursive_panic\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [23 x i8] c"chk_recursive_panic(0)\00"
define i32 @test_recursive_panic() {
%1 = tail call i32 (i32, ...) bitcast (i32 (...)* @chk_recursive_panic to i32 (i32, ...)*)(i32 0)
%2 = icmp ne i32 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 (i32, i8*, i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @chk to i32 (i32, i8*, i32, i8*, i8*, i8*, ...)*)(i32 %3, i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 590, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__func__.test_recursive_panic, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%5 = icmp eq i32 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %0
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @chk_recursive_panic to i32 (i32, ...)*)(i32 0)
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i32
%10 = tail call i32 (i32, i8*, i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @chk to i32 (i32, i8*, i32, i8*, i8*, i8*, ...)*)(i32 %9, i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 591, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__func__.test_recursive_panic, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%11 = icmp eq i32 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %6
%13 = tail call i32 (i8*, ...) bitcast (i32 (...)* @pass to i32 (i8*, ...)*)(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__func__.test_recursive_panic, i64 0, i64 0))
br label %14
14: ; preds = %0, %6, %12
%15 = phi i32 [ %13, %12 ], [ 0, %6 ], [ 0, %0 ]
ret i32 %15
}