#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct test_suite {
  int dummy;
};
struct test_context {
  int dummy;
};

/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int /*<<< orphan*/ test_abort(struct test_context *, char *, int, char *,
                              char const *, char const *, ...);
void test_case_strings(struct test_suite *test_suite,
                       struct test_context *test_context) {
  do {
    const char *value__ = "foo";
    const char *expected__ = "foo";
    const char *value_str_ = "\"foo\"";
    if (value__ && expected__) {
      if (strcmp(value__, expected__) != 0) {
        test_abort(test_context,
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/galdor/libutest/refs/"
                   "heads/master/tests/main.c",
                   62,
                   "%s is the string \"%s\" "
                   "but should be the string \"%s\"",
                   value_str_, value__, expected__);
      }
    } else if (expected__) {
      test_abort(test_context,
                 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                 "outputs/2022-01-22/02-19-57/repos/galdor/libutest/refs/heads/"
                 "master/tests/main.c",
                 62, "%s is null but should be the string \"%s\"", value_str_,
                 expected__);
    } else if (value__) {
      test_abort(test_context,
                 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                 "outputs/2022-01-22/02-19-57/repos/galdor/libutest/refs/heads/"
                 "master/tests/main.c",
                 62, "%s is the string \"%s\" but should be null", value_str_,
                 value__);
    }
  } while (0);
}


x86 assembly (clang, -O0):
<test_case_strings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xebe(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xeb7(%rip),%rax
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     11b1 <test_case_strings+0x91>
cmpq   $0x0,-0x20(%rbp)
je     11b1 <test_case_strings+0x91>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     11ac <test_case_strings+0x8c>
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%r8
mov    -0x18(%rbp),%r9
mov    -0x20(%rbp),%rax
lea    0xe75(%rip),%rsi
mov    $0x3e,%edx
lea    0xef2(%rip),%rcx
mov    %rax,(%rsp)
mov    $0x0,%al
call   1040 <test_abort@plt>
jmp    1222 <test_case_strings+0x102>
cmpq   $0x0,-0x20(%rbp)
je     11e7 <test_case_strings+0xc7>
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%r8
mov    -0x20(%rbp),%r9
lea    0xe3b(%rip),%rsi
mov    $0x3e,%edx
lea    0xeec(%rip),%rcx
mov    $0x0,%al
call   1040 <test_abort@plt>
jmp    121d <test_case_strings+0xfd>
cmpq   $0x0,-0x18(%rbp)
je     1218 <test_case_strings+0xf8>
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%r8
mov    -0x18(%rbp),%r9
lea    0xe05(%rip),%rsi
mov    $0x3e,%edx
lea    0xedf(%rip),%rcx
mov    $0x0,%al
call   1040 <test_abort@plt>
jmp    121d <test_case_strings+0xfd>
jmp    1222 <test_case_strings+0x102>
jmp    1227 <test_case_strings+0x107>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_case_strings>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
lea    0xed2(%rip),%rbx
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1169 <test_case_strings+0x49>
mov    %rbx,(%rsp)
lea    0xec1(%rip),%rsi
lea    0xf43(%rip),%rcx
lea    0xead(%rip),%r8
mov    %r14,%rdi
mov    $0x3e,%edx
mov    %rbx,%r9
xor    %eax,%eax
call   1040 <test_abort@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.test_suite = type { i32 }
%struct.test_context = type { i32 }
@.str = [4 x i8] c"foo\00"
@.str.1 = [6 x i8] c"\22foo\22\00"
@.str.2 = [137 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/galdor/libutest/refs/heads/master/tests/main.c\00"
@.str.3 = [52 x i8] c"%s is the string \22%s\22 but should be the string \22%s\22\00"
@.str.4 = [41 x i8] c"%s is null but should be the string \22%s\22\00"
@.str.5 = [41 x i8] c"%s is the string \22%s\22 but should be null\00"
define void @test_case_strings(%struct.test_suite* %0, %struct.test_context* %1) {
%3 = alloca %struct.test_suite*
%4 = alloca %struct.test_context*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store %struct.test_suite* %0, %struct.test_suite** %3
store %struct.test_context* %1, %struct.test_context** %4
br label %8
8: ; preds = %2
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %5
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %7
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %26
11: ; preds = %8
%12 = load i8*, i8** %6
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %26
14: ; preds = %11
%15 = load i8*, i8** %5
%16 = load i8*, i8** %6
%17 = call i64 @strcmp(i8* %15, i8* %16)
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %25
19: ; preds = %14
%20 = load %struct.test_context*, %struct.test_context** %4
%21 = load i8*, i8** %7
%22 = load i8*, i8** %5
%23 = load i8*, i8** %6
%24 = call i32 (%struct.test_context*, i8*, i32, i8*, i8*, i8*, ...) @test_abort(%struct.test_context* %20, i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str.2, i64 0, i64 0), i32 62, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0), i8* %21, i8* %22, i8* %23)
br label %25
25: ; preds = %19, %14
br label %44
26: ; preds = %11, %8
%27 = load i8*, i8** %6
%28 = icmp ne i8* %27, null
br i1 %28, label %29, label %34
29: ; preds = %26
%30 = load %struct.test_context*, %struct.test_context** %4
%31 = load i8*, i8** %7
%32 = load i8*, i8** %6
%33 = call i32 (%struct.test_context*, i8*, i32, i8*, i8*, i8*, ...) @test_abort(%struct.test_context* %30, i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str.2, i64 0, i64 0), i32 62, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0), i8* %31, i8* %32)
br label %43
34: ; preds = %26
%35 = load i8*, i8** %5
%36 = icmp ne i8* %35, null
br i1 %36, label %37, label %42
37: ; preds = %34
%38 = load %struct.test_context*, %struct.test_context** %4
%39 = load i8*, i8** %7
%40 = load i8*, i8** %5
%41 = call i32 (%struct.test_context*, i8*, i32, i8*, i8*, i8*, ...) @test_abort(%struct.test_context* %38, i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str.2, i64 0, i64 0), i32 62, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i8* %39, i8* %40)
br label %42
42: ; preds = %37, %34
br label %43
43: ; preds = %42, %29
br label %44
44: ; preds = %43, %25
br label %45
45: ; preds = %44
ret void
}

LLVM IR (-O2):
%struct.test_suite = type { i32 }
%struct.test_context = type { i32 }
@.str = [4 x i8] c"foo\00"
@.str.1 = [6 x i8] c"\22foo\22\00"
@.str.2 = [137 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/galdor/libutest/refs/heads/master/tests/main.c\00"
@.str.3 = [52 x i8] c"%s is the string \22%s\22 but should be the string \22%s\22\00"
define void @test_case_strings(%struct.test_suite* nocapture readnone %0, %struct.test_context* %1) {
%3 = tail call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (%struct.test_context*, i8*, i32, i8*, i8*, i8*, ...) @test_abort(%struct.test_context* %1, i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str.2, i64 0, i64 0), i32 62, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %2, %5
ret void
}