void test_some_strings() {
  char *foo = "This is foo";
  char *bar = "This is bar";
  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_basic_strings.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_basic_strings.c",
             __func__, 16);
      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 ((foo) && (bar) && strcmp((foo), (bar)) == 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_basic_strings.c",
             __func__, 17);
    } 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_basic_strings.c",
             __func__, 17);
      printf("  [TST] ASSERT_EQUAL_STR("
             "foo"
             ", "
             "bar"
             ")\n");
      printf("  [EXP] %s\n", (foo) ? (foo) : "(null)");
      printf("  [GOT] %s\n", (bar) ? (bar) : "(null)");
    }
  } while (0);
  ;
}


x86 assembly (clang, -O0):
<test_some_strings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xed2(%rip),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1190 <test_some_strings+0x70>
cmpq   $0x0,-0x8(%rbp)
je     1190 <test_some_strings+0x70>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1190 <test_some_strings+0x70>
lea    0xea7(%rip),%rdi
lea    0xeb4(%rip),%rsi
lea    0xf51(%rip),%rdx
mov    $0x10,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1233 <test_some_strings+0x113>
lea    0xf4b(%rip),%rdi
lea    0xe8e(%rip),%rsi
lea    0xf2b(%rip),%rdx
mov    $0x10,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf3e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x8(%rbp)
je     11d7 <test_some_strings+0xb7>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    11e7 <test_some_strings+0xc7>
lea    0xf48(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    11e7 <test_some_strings+0xc7>
mov    -0x18(%rbp),%rsi
lea    0xf28(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x8(%rbp)
je     1211 <test_some_strings+0xf1>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1221 <test_some_strings+0x101>
lea    0xf0e(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    1221 <test_some_strings+0x101>
mov    -0x20(%rbp),%rsi
lea    0xf01(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1238 <test_some_strings+0x118>
jmp    123d <test_some_strings+0x11d>
cmpq   $0x0,-0x8(%rbp)
je     128f <test_some_strings+0x16f>
cmpq   $0x0,-0x10(%rbp)
je     128f <test_some_strings+0x16f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    128f <test_some_strings+0x16f>
lea    0xda8(%rip),%rdi
lea    0xdb5(%rip),%rsi
lea    0xe52(%rip),%rdx
mov    $0x11,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1332 <test_some_strings+0x212>
lea    0xe4c(%rip),%rdi
lea    0xd8f(%rip),%rsi
lea    0xe2c(%rip),%rdx
mov    $0x11,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe82(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x8(%rbp)
je     12d6 <test_some_strings+0x1b6>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    12e6 <test_some_strings+0x1c6>
lea    0xe49(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    12e6 <test_some_strings+0x1c6>
mov    -0x28(%rbp),%rsi
lea    0xe29(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x10(%rbp)
je     1310 <test_some_strings+0x1f0>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    1320 <test_some_strings+0x200>
lea    0xe0f(%rip),%rax
mov    %rax,-0x30(%rbp)
jmp    1320 <test_some_strings+0x200>
mov    -0x30(%rbp),%rsi
lea    0xe02(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1337 <test_some_strings+0x217>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_some_strings>:
push   %r14
push   %rbx
push   %rax
lea    0xeed(%rip),%rdi
lea    0xefa(%rip),%rbx
lea    0xf97(%rip),%r14
mov    %rbx,%rsi
mov    %r14,%rdx
mov    $0x10,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf90(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    $0x11,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfa3(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7f(%rip),%rdi
lea    0xe82(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf76(%rip),%rdi
lea    0xe79(%rip),%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"This is foo\00"
@.str.1 = [12 x i8] c"This is bar\00"
@.str.2 = [20 x i8] c"\0A[PASS] %s:%s():%d\0A\00"
@.str.3 = [164 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_basic_strings.c\00"
@__func__.test_some_strings = [18 x i8] c"test_some_strings\00"
@.str.4 = [20 x i8] c"\0A[FAIL] %s:%s():%d\0A\00"
@.str.5 = [36 x i8] c" [TST] ASSERT_EQUAL_STR(foo, foo)\0A\00"
@.str.6 = [12 x i8] c" [EXP] %s\0A\00"
@.str.7 = [7 x i8] c"(null)\00"
@.str.8 = [12 x i8] c" [GOT] %s\0A\00"
@.str.9 = [36 x i8] c" [TST] ASSERT_EQUAL_STR(foo, bar)\0A\00"
define void @test_some_strings() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %3
3: ; preds = %0
%4 = load i8*, i8** %1
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = load i8*, i8** %1
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %16
9: ; preds = %6
%10 = load i8*, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcmp(i8* %10, i8* %11)
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %9
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.test_some_strings, i64 0, i64 0), i32 16)
br label %35
16: ; preds = %9, %6, %3
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.test_some_strings, i64 0, i64 0), i32 16)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0))
%19 = load i8*, i8** %1
%20 = icmp ne i8* %19, null
br i1 %20, label %21, label %23
21: ; preds = %16
%22 = load i8*, i8** %1
br label %24
23: ; preds = %16
br label %24
24: ; preds = %23, %21
%25 = phi i8* [ %22, %21 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), %23 ]
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8* %25)
%27 = load i8*, i8** %1
%28 = icmp ne i8* %27, null
br i1 %28, label %29, label %31
29: ; preds = %24
%30 = load i8*, i8** %1
br label %32
31: ; preds = %24
br label %32
32: ; preds = %31, %29
%33 = phi i8* [ %30, %29 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), %31 ]
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i8* %33)
br label %35
35: ; preds = %32, %14
br label %36
36: ; preds = %35
br label %37
37: ; preds = %36
%38 = load i8*, i8** %1
%39 = icmp ne i8* %38, null
br i1 %39, label %40, label %50
40: ; preds = %37
%41 = load i8*, i8** %2
%42 = icmp ne i8* %41, null
br i1 %42, label %43, label %50
43: ; preds = %40
%44 = load i8*, i8** %1
%45 = load i8*, i8** %2
%46 = call i32 @strcmp(i8* %44, i8* %45)
%47 = icmp eq i32 %46, 0
br i1 %47, label %48, label %50
48: ; preds = %43
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.test_some_strings, i64 0, i64 0), i32 17)
br label %69
50: ; preds = %43, %40, %37
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.test_some_strings, i64 0, i64 0), i32 17)
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0))
%53 = load i8*, i8** %1
%54 = icmp ne i8* %53, null
br i1 %54, label %55, label %57
55: ; preds = %50
%56 = load i8*, i8** %1
br label %58
57: ; preds = %50
br label %58
58: ; preds = %57, %55
%59 = phi i8* [ %56, %55 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), %57 ]
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8* %59)
%61 = load i8*, i8** %2
%62 = icmp ne i8* %61, null
br i1 %62, label %63, label %65
63: ; preds = %58
%64 = load i8*, i8** %2
br label %66
65: ; preds = %58
br label %66
66: ; preds = %65, %63
%67 = phi i8* [ %64, %63 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), %65 ]
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i8* %67)
br label %69
69: ; preds = %66, %48
br label %70
70: ; preds = %69
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"This is foo\00"
@.str.1 = [12 x i8] c"This is bar\00"
@.str.2 = [20 x i8] c"\0A[PASS] %s:%s():%d\0A\00"
@.str.3 = [164 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_basic_strings.c\00"
@__func__.test_some_strings = [18 x i8] c"test_some_strings\00"
@.str.4 = [20 x i8] c"\0A[FAIL] %s:%s():%d\0A\00"
@.str.6 = [12 x i8] c" [EXP] %s\0A\00"
@.str.8 = [12 x i8] c" [GOT] %s\0A\00"
@str.10 = [35 x i8] c" [TST] ASSERT_EQUAL_STR(foo, bar)\00"
define void @test_some_strings() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.test_some_strings, i64 0, i64 0), i32 16)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.test_some_strings, i64 0, i64 0), i32 17)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.10, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret void
}