void test_passing() {
  char *foo = "This is foo";
  do {
    if ((foo) && (foo) && strcmp((foo), (foo)) == 0) {
      printf("\n[PASS] %s:%s():%d\n",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/jmcnamara/pytest_c_testrunner/refs/"
             "heads/master/test/test_passing.c",
             __func__, 15);
    } else {
      printf("\n[FAIL] %s:%s():%d\n",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/jmcnamara/pytest_c_testrunner/refs/"
             "heads/master/test/test_passing.c",
             __func__, 15);
      printf("  [TST] ASSERT_EQUAL_STR("
             "foo"
             ", "
             "foo"
             ")\n");
      printf("  [EXP] %s\n", (foo) ? (foo) : "(null)");
      printf("  [GOT] %s\n", (foo) ? (foo) : "(null)");
    }
  } while (0);
  ;
  do {
    if ((1) == (1)) {
      printf("\n[PASS] %s:%s():%d\n",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/jmcnamara/pytest_c_testrunner/refs/"
             "heads/master/test/test_passing.c",
             __func__, 16);
    } else {
      printf("\n[FAIL] %s:%s():%d\n",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/jmcnamara/pytest_c_testrunner/refs/"
             "heads/master/test/test_passing.c",
             __func__, 16);
      printf("  [TST] ASSERT_EQUAL_STR("
             "1"
             ", "
             "1"
             ")\n");
      printf("  [EXP] %d\n", (1));
      printf("  [GOT] %d\n", (1));
    }
  } while (0);
  ;
}


x86 assembly (clang, -O0):
<test_passing>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1185 <test_passing+0x65>
cmpq   $0x0,-0x8(%rbp)
je     1185 <test_passing+0x65>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1185 <test_passing+0x65>
lea    0xea6(%rip),%rdi
lea    0xeb3(%rip),%rsi
lea    0xf4a(%rip),%rdx
mov    $0xf,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1228 <test_passing+0x108>
lea    0xf3f(%rip),%rdi
lea    0xe8d(%rip),%rsi
lea    0xf24(%rip),%rdx
mov    $0xf,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf32(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x8(%rbp)
je     11cc <test_passing+0xac>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    11dc <test_passing+0xbc>
lea    0xf3c(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    11dc <test_passing+0xbc>
mov    -0x10(%rbp),%rsi
lea    0xf1c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x8(%rbp)
je     1206 <test_passing+0xe6>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1216 <test_passing+0xf6>
lea    0xf02(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1216 <test_passing+0xf6>
mov    -0x18(%rbp),%rsi
lea    0xef5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    122d <test_passing+0x10d>
jmp    1232 <test_passing+0x112>
lea    0xdd3(%rip),%rdi
lea    0xde0(%rip),%rsi
lea    0xe77(%rip),%rdx
mov    $0x10,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_passing>:
push   %r15
push   %r14
push   %rbx
lea    0xee4(%rip),%rbx
lea    0xef1(%rip),%r14
lea    0xf88(%rip),%r15
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
mov    $0xf,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
mov    $0x10,%ecx
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"This is foo\00"
@.str.1 = [20 x i8] c"\0A[PASS] %s:%s():%d\0A\00"
@.str.2 = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jmcnamara/pytest_c_testrunner/refs/heads/master/test/test_passing.c\00"
@__func__.test_passing = [13 x i8] c"test_passing\00"
@.str.3 = [20 x i8] c"\0A[FAIL] %s:%s():%d\0A\00"
@.str.4 = [36 x i8] c" [TST] ASSERT_EQUAL_STR(foo, foo)\0A\00"
@.str.5 = [12 x i8] c" [EXP] %s\0A\00"
@.str.6 = [7 x i8] c"(null)\00"
@.str.7 = [12 x i8] c" [GOT] %s\0A\00"
define void @test_passing() {
%1 = alloca i8*
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %1
br label %2
2: ; preds = %0
%3 = load i8*, i8** %1
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %15
5: ; preds = %2
%6 = load i8*, i8** %1
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %15
8: ; preds = %5
%9 = load i8*, i8** %1
%10 = load i8*, i8** %1
%11 = call i32 @strcmp(i8* %9, i8* %10)
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.test_passing, i64 0, i64 0), i32 15)
br label %34
15: ; preds = %8, %5, %2
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.test_passing, i64 0, i64 0), i32 15)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
%18 = load i8*, i8** %1
%19 = icmp ne i8* %18, null
br i1 %19, label %20, label %22
20: ; preds = %15
%21 = load i8*, i8** %1
br label %23
22: ; preds = %15
br label %23
23: ; preds = %22, %20
%24 = phi i8* [ %21, %20 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), %22 ]
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8* %24)
%26 = load i8*, i8** %1
%27 = icmp ne i8* %26, null
br i1 %27, label %28, label %30
28: ; preds = %23
%29 = load i8*, i8** %1
br label %31
30: ; preds = %23
br label %31
31: ; preds = %30, %28
%32 = phi i8* [ %29, %28 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), %30 ]
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* %32)
br label %34
34: ; preds = %31, %13
br label %35
35: ; preds = %34
br label %36
36: ; preds = %35
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.test_passing, i64 0, i64 0), i32 16)
br label %38
38: ; preds = %36
ret void
}

LLVM IR (-O2):
@.str.1 = [20 x i8] c"\0A[PASS] %s:%s():%d\0A\00"
@.str.2 = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jmcnamara/pytest_c_testrunner/refs/heads/master/test/test_passing.c\00"
@__func__.test_passing = [13 x i8] c"test_passing\00"
define void @test_passing() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.test_passing, i64 0, i64 0), i32 15)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.test_passing, i64 0, i64 0), i32 16)
ret void
}