void test_plus_two(void) {
  do {
    if (!(n_plus_two(3) == 5)) {
      char buf[200];
      snprintf(buf, sizeof(buf), "%s:%d:%s(): %s",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/ShobhitSharma/chao/refs/"
               "heads/master/tests/tests_example.c",
               21, __func__, "Failed to add two.");
      test_failed(buf);
    } else {
      test_succeeded();
    }
  } while (0);
}


x86 assembly (clang, -O0):
<test_plus_two>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    $0x3,%edi
mov    $0x0,%al
call   1030 <n_plus_two@plt>
cmp    $0x5,%eax
je     11ac <test_plus_two+0x6c>
lea    -0xd0(%rbp),%rdi
mov    $0xc8,%esi
lea    0xe8d(%rip),%rdx
lea    0xe95(%rip),%rcx
mov    $0x15,%r8d
lea    0xf1d(%rip),%r9
lea    0xf24(%rip),%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   1040 <snprintf@plt>
lea    -0xd0(%rbp),%rdi
mov    $0x0,%al
call   1060 <test_failed@plt>
jmp    11b3 <test_plus_two+0x73>
mov    $0x0,%al
call   1050 <test_succeeded@plt>
jmp    11b8 <test_plus_two+0x78>
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_plus_two>:
push   %rbx
sub    $0xe0,%rsp
mov    $0x3,%edi
xor    %eax,%eax
call   1030 <n_plus_two@plt>
cmp    $0x5,%eax
jne    1168 <test_plus_two+0x28>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbx
jmp    1050 <test_succeeded@plt>
lea    0xf43(%rip),%rax
mov    %rax,(%rsp)
lea    0xe86(%rip),%rdx
lea    0xe8e(%rip),%rcx
lea    0xf1c(%rip),%r9
lea    0x10(%rsp),%rbx
mov    $0xc8,%esi
mov    %rbx,%rdi
mov    $0x15,%r8d
xor    %eax,%eax
call   1040 <snprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <test_failed@plt>
add    $0xe0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%s:%d:%s(): %s\00"
@.str.1 = [149 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ShobhitSharma/chao/refs/heads/master/tests/tests_example.c\00"
@__func__.test_plus_two = [14 x i8] c"test_plus_two\00"
@.str.2 = [19 x i8] c"Failed to add two.\00"
define void @test_plus_two() {
%1 = alloca [200 x i8]
br label %2
2: ; preds = %0
%3 = call i32 (i32, ...) bitcast (i32 (...)* @n_plus_two to i32 (i32, ...)*)(i32 3)
%4 = icmp eq i32 %3, 5
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%7 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %6, i64 200, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([149 x i8], [149 x i8]* @.str.1, i64 0, i64 0), i32 21, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.test_plus_two, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%8 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @test_failed to i32 (i8*, ...)*)(i8* %8)
br label %12
10: ; preds = %2
%11 = call i32 (...) @test_succeeded()
br label %12
12: ; preds = %10, %5
br label %13
13: ; preds = %12
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s:%d:%s(): %s\00"
@.str.1 = [149 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ShobhitSharma/chao/refs/heads/master/tests/tests_example.c\00"
@__func__.test_plus_two = [14 x i8] c"test_plus_two\00"
@.str.2 = [19 x i8] c"Failed to add two.\00"
define void @test_plus_two() {
%1 = alloca [200 x i8]
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @n_plus_two to i32 (i32, ...)*)(i32 3)
%3 = icmp eq i32 %2, 5
br i1 %3, label %8, label %4
4: ; preds = %0
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%6 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %5, i64 200, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([149 x i8], [149 x i8]* @.str.1, i64 0, i64 0), i32 21, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.test_plus_two, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @test_failed to i32 (i8*, ...)*)(i8* %5)
br label %10
8: ; preds = %0
%9 = tail call i32 (...) @test_succeeded()
br label %10
10: ; preds = %4, %8
ret void
}