int test_something_good() {
  int x = 3;
  do {
    if (!chk(!!(42 == 6 * 7),
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/adrianratnapala/elm0/refs/heads/master/"
             "0example.c",
             25, __func__, "%s", "42 == 6 * 7"))
      goto fail;
  } while (0);
  do {
    if (!chk(!!(strlen("answer") < strlen("question")),
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/adrianratnapala/elm0/refs/heads/master/"
             "0example.c",
             26, __func__, "%s", "strlen(\"answer\") < strlen(\"question\")"))
      goto fail;
  } while (0);
  do {
    if (!chk(!!(4 == ++x),
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/adrianratnapala/elm0/refs/heads/master/"
             "0example.c",
             27, __func__, "%s", "4 == ++x"))
      goto fail;
  } while (0);
  do {
    if (!chk(!!(5 == ++x),
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/adrianratnapala/elm0/refs/heads/master/"
             "0example.c",
             28, __func__, "%s", "5 == ++x"))
      goto fail;
  } while (0);
  return pass(__func__);
  goto fail;
fail:
  return 0;
}


x86 assembly (clang, -O0):
<test_something_good>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x3,-0x8(%rbp)
mov    $0x1,%edi
lea    0xec5(%rip),%rsi
mov    $0x19,%edx
lea    0xf45(%rip),%rcx
lea    0xf52(%rip),%r8
lea    0xf4e(%rip),%r9
mov    $0x0,%al
call   1030 <chk@plt>
cmp    $0x0,%eax
jne    116a <test_something_good+0x4a>
jmp    1282 <test_something_good+0x162>
jmp    116f <test_something_good+0x4f>
jmp    1174 <test_something_good+0x54>
mov    $0x1,%edi
lea    0xe80(%rip),%rsi
mov    $0x1a,%edx
lea    0xf00(%rip),%rcx
lea    0xf0d(%rip),%r8
lea    0xf15(%rip),%r9
mov    $0x0,%al
call   1030 <chk@plt>
cmp    $0x0,%eax
jne    11af <test_something_good+0x8f>
jmp    1282 <test_something_good+0x162>
jmp    11b4 <test_something_good+0x94>
jmp    11b9 <test_something_good+0x99>
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
mov    $0x4,%eax
cmp    %ecx,%eax
sete   %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
lea    0xe24(%rip),%rsi
mov    $0x1b,%edx
lea    0xea4(%rip),%rcx
lea    0xeb1(%rip),%r8
lea    0xedf(%rip),%r9
mov    $0x0,%al
call   1030 <chk@plt>
cmp    $0x0,%eax
jne    120b <test_something_good+0xeb>
jmp    1282 <test_something_good+0x162>
jmp    1210 <test_something_good+0xf0>
jmp    1215 <test_something_good+0xf5>
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
mov    $0x5,%eax
cmp    %ecx,%eax
sete   %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
lea    0xdc8(%rip),%rsi
mov    $0x1c,%edx
lea    0xe48(%rip),%rcx
lea    0xe55(%rip),%r8
lea    0xe8c(%rip),%r9
mov    $0x0,%al
call   1030 <chk@plt>
cmp    $0x0,%eax
jne    1267 <test_something_good+0x147>
jmp    1282 <test_something_good+0x162>
jmp    126c <test_something_good+0x14c>
lea    0xe19(%rip),%rdi
mov    $0x0,%al
call   1040 <pass@plt>
mov    %eax,-0x4(%rbp)
jmp    1289 <test_something_good+0x169>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_something_good>:
push   %rax
lea    0xed8(%rip),%rsi
lea    0xf5d(%rip),%rcx
lea    0xf6a(%rip),%r8
lea    0xf66(%rip),%r9
mov    $0x1,%edi
mov    $0x19,%edx
xor    %eax,%eax
call   1030 <chk@plt>
test   %eax,%eax
je     11f8 <test_something_good+0xd8>
lea    0xea3(%rip),%rsi
lea    0xf28(%rip),%rcx
lea    0xf35(%rip),%r8
lea    0xf3d(%rip),%r9
mov    $0x1,%edi
mov    $0x1a,%edx
xor    %eax,%eax
call   1030 <chk@plt>
test   %eax,%eax
je     11f8 <test_something_good+0xd8>
lea    0xe72(%rip),%rsi
lea    0xef7(%rip),%rcx
lea    0xf04(%rip),%r8
lea    0xf32(%rip),%r9
mov    $0x1,%edi
mov    $0x1b,%edx
xor    %eax,%eax
call   1030 <chk@plt>
test   %eax,%eax
je     11f8 <test_something_good+0xd8>
lea    0xe41(%rip),%rsi
lea    0xec6(%rip),%rcx
lea    0xed3(%rip),%r8
lea    0xf0a(%rip),%r9
mov    $0x1,%edi
mov    $0x1c,%edx
xor    %eax,%eax
call   1030 <chk@plt>
test   %eax,%eax
je     11f8 <test_something_good+0xd8>
lea    0xe9c(%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/0example.c\00"
@__func__.test_something_good = [20 x i8] c"test_something_good\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [12 x i8] c"42 == 6 * 7\00"
@.str.3 = [38 x i8] c"strlen(\22answer\22) < strlen(\22question\22)\00"
@.str.4 = [9 x i8] c"4 == ++x\00"
@.str.5 = [9 x i8] c"5 == ++x\00"
define i32 @test_something_good() {
%1 = alloca i32
%2 = alloca i32
store i32 3, i32* %2
br label %3
3: ; preds = %0
%4 = call i32 (i32, i8*, i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @chk to i32 (i32, i8*, i32, i8*, i8*, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 25, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.test_something_good, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%5 = icmp ne i32 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %3
br label %40
7: ; preds = %3
br label %8
8: ; preds = %7
br label %9
9: ; preds = %8
%10 = call i32 (i32, i8*, i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @chk to i32 (i32, i8*, i32, i8*, i8*, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 26, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.test_something_good, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0))
%11 = icmp ne i32 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %9
br label %40
13: ; preds = %9
br label %14
14: ; preds = %13
br label %15
15: ; preds = %14
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
%18 = icmp eq i32 4, %17
%19 = xor i1 %18, true
%20 = xor i1 %19, true
%21 = zext i1 %20 to i32
%22 = call i32 (i32, i8*, i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @chk to i32 (i32, i8*, i32, i8*, i8*, i8*, ...)*)(i32 %21, i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 27, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.test_something_good, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%23 = icmp ne i32 %22, 0
br i1 %23, label %25, label %24
24: ; preds = %15
br label %40
25: ; preds = %15
br label %26
26: ; preds = %25
br label %27
27: ; preds = %26
%28 = load i32, i32* %2
%29 = add nsw i32 %28, 1
store i32 %29, i32* %2
%30 = icmp eq i32 5, %29
%31 = xor i1 %30, true
%32 = xor i1 %31, true
%33 = zext i1 %32 to i32
%34 = call i32 (i32, i8*, i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @chk to i32 (i32, i8*, i32, i8*, i8*, i8*, ...)*)(i32 %33, i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 28, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.test_something_good, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%35 = icmp ne i32 %34, 0
br i1 %35, label %37, label %36
36: ; preds = %27
br label %40
37: ; preds = %27
br label %38
38: ; preds = %37
%39 = call i32 (i8*, ...) bitcast (i32 (...)* @pass to i32 (i8*, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.test_something_good, i64 0, i64 0))
store i32 %39, i32* %1
br label %41
40: ; preds = %36, %24, %12, %6
store i32 0, i32* %1
br label %41
41: ; preds = %40, %38
%42 = load i32, i32* %1
ret i32 %42
}

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/0example.c\00"
@__func__.test_something_good = [20 x i8] c"test_something_good\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [12 x i8] c"42 == 6 * 7\00"
@.str.3 = [38 x i8] c"strlen(\22answer\22) < strlen(\22question\22)\00"
@.str.4 = [9 x i8] c"4 == ++x\00"
@.str.5 = [9 x i8] c"5 == ++x\00"
define i32 @test_something_good() {
%1 = tail call i32 (i32, i8*, i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @chk to i32 (i32, i8*, i32, i8*, i8*, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 25, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.test_something_good, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%2 = icmp eq i32 %1, 0
br i1 %2, label %14, label %3
3: ; preds = %0
%4 = tail call i32 (i32, i8*, i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @chk to i32 (i32, i8*, i32, i8*, i8*, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 26, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.test_something_good, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0))
%5 = icmp eq i32 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %3
%7 = tail call i32 (i32, i8*, i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @chk to i32 (i32, i8*, i32, i8*, i8*, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 27, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.test_something_good, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %6
%10 = tail call i32 (i32, i8*, i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @chk to i32 (i32, i8*, i32, i8*, i8*, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 28, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.test_something_good, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%11 = icmp eq i32 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %9
%13 = tail call i32 (i8*, ...) bitcast (i32 (...)* @pass to i32 (i8*, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.test_something_good, i64 0, i64 0))
br label %14
14: ; preds = %0, %3, %6, %9, %12
%15 = phi i32 [ %13, %12 ], [ 0, %9 ], [ 0, %6 ], [ 0, %3 ], [ 0, %0 ]
ret i32 %15
}