int main(int argc, char *argv[]) {
  unsigned int rc = 0;
  rc = plan_tests(2);
  diag("Returned: %d", rc);
  rc = ((0) ? _gen_result(1, __func__,
                          "/scratch/repos/new/home/jordi_armengol_estape/"
                          "c-scraper/outputs/2022-01-22/02-19-57/repos/"
                          "ByteFoundryAU/monitoring-plugins/refs/heads/fedora/"
                          "t/libtap-tests/fail/test.c",
                          39, "test to fail")
            : _gen_result(0, __func__,
                          "/scratch/repos/new/home/jordi_armengol_estape/"
                          "c-scraper/outputs/2022-01-22/02-19-57/repos/"
                          "ByteFoundryAU/monitoring-plugins/refs/heads/fedora/"
                          "t/libtap-tests/fail/test.c",
                          39, "test to fail"));
  ;
  diag("Returned: %d", rc);
  rc = ((0) ? _gen_result(1, __func__,
                          "/scratch/repos/new/home/jordi_armengol_estape/"
                          "c-scraper/outputs/2022-01-22/02-19-57/repos/"
                          "ByteFoundryAU/monitoring-plugins/refs/heads/fedora/"
                          "t/libtap-tests/fail/test.c",
                          42, "test to fail %s", "with extra string")
            : _gen_result(0, __func__,
                          "/scratch/repos/new/home/jordi_armengol_estape/"
                          "c-scraper/outputs/2022-01-22/02-19-57/repos/"
                          "ByteFoundryAU/monitoring-plugins/refs/heads/fedora/"
                          "t/libtap-tests/fail/test.c",
                          42, "test to fail %s", "with extra string"));
  ;
  diag("Returned: %d", rc);
  return exit_status();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x2,%edi
mov    $0x0,%al
call   1060 <plan_tests@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1040 <diag@plt>
xor    %edi,%edi
lea    0xe87(%rip),%rsi
lea    0xe85(%rip),%rdx
mov    $0x27,%ecx
lea    0xf21(%rip),%r8
mov    $0x0,%al
call   1050 <_gen_result@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe53(%rip),%rdi
mov    $0x0,%al
call   1040 <diag@plt>
xor    %edi,%edi
lea    0xe50(%rip),%rsi
lea    0xe4e(%rip),%rdx
mov    $0x2a,%ecx
lea    0xef7(%rip),%r8
lea    0xf00(%rip),%r9
mov    $0x0,%al
call   1050 <_gen_result@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe15(%rip),%rdi
mov    $0x0,%al
call   1040 <diag@plt>
mov    $0x0,%al
call   1030 <exit_status@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    $0x2,%edi
xor    %eax,%eax
call   1060 <plan_tests@plt>
lea    0xea8(%rip),%r14
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <diag@plt>
lea    0xea2(%rip),%rbx
lea    0xea0(%rip),%r15
lea    0xf41(%rip),%r8
xor    %edi,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    $0x27,%ecx
xor    %eax,%eax
call   1050 <_gen_result@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <diag@plt>
lea    0xf27(%rip),%r8
lea    0xf30(%rip),%r9
xor    %edi,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    $0x2a,%ecx
xor    %eax,%eax
call   1050 <_gen_result@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <diag@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <exit_status@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Returned: %d\00"
@__func__.main = [5 x i8] c"main\00"
@.str.1 = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ByteFoundryAU/monitoring-plugins/refs/heads/fedora/t/libtap-tests/fail/test.c\00"
@.str.2 = [13 x i8] c"test to fail\00"
@.str.3 = [16 x i8] c"test to fail %s\00"
@.str.4 = [18 x i8] c"with extra string\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = call i32 (i32, ...) bitcast (i32 (...)* @plan_tests to i32 (i32, ...)*)(i32 2)
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @diag to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = call i32 (i32, i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @_gen_result to i32 (i32, i8*, i8*, i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0), i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str.1, i64 0, i64 0), i32 39, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @diag to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = call i32 (i32, i8*, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_gen_result to i32 (i32, i8*, i8*, i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0), i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str.1, i64 0, i64 0), i32 42, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @diag to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = call i32 (...) @exit_status()
ret i32 %16
}

LLVM IR (-O2):
@.str = [13 x i8] c"Returned: %d\00"
@__func__.main = [5 x i8] c"main\00"
@.str.1 = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ByteFoundryAU/monitoring-plugins/refs/heads/fedora/t/libtap-tests/fail/test.c\00"
@.str.2 = [13 x i8] c"test to fail\00"
@.str.3 = [16 x i8] c"test to fail %s\00"
@.str.4 = [18 x i8] c"with extra string\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @plan_tests to i32 (i32, ...)*)(i32 2)
%4 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @diag to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 (i32, i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @_gen_result to i32 (i32, i8*, i8*, i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0), i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str.1, i64 0, i64 0), i32 39, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @diag to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 (i32, i8*, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_gen_result to i32 (i32, i8*, i8*, i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0), i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str.1, i64 0, i64 0), i32 42, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%8 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @diag to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = tail call i32 (...) @exit_status()
ret i32 %9
}