#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_string_failure_3(struct test_suite *test_suite,
                                struct test_context *test_context) {
  do {
    const char *value__ = NULL;
    const char *expected__ = "foo";
    const char *value_str_ = "NULL";
    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",
                   74,
                   "%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",
                 74, "%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",
                 74, "%s is the string \"%s\" but should be null", value_str_,
                 value__);
    }
  } while (0);
}


x86 assembly (clang, -O0):
<test_case_string_failure_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
lea    0xec1(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xeba(%rip),%rax
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     11ae <test_case_string_failure_3+0x8e>
cmpq   $0x0,-0x20(%rbp)
je     11ae <test_case_string_failure_3+0x8e>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     11a9 <test_case_string_failure_3+0x89>
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%r8
mov    -0x18(%rbp),%r9
mov    -0x20(%rbp),%rax
lea    0xe77(%rip),%rsi
mov    $0x4a,%edx
lea    0xef4(%rip),%rcx
mov    %rax,(%rsp)
mov    $0x0,%al
call   1040 <test_abort@plt>
jmp    121f <test_case_string_failure_3+0xff>
cmpq   $0x0,-0x20(%rbp)
je     11e4 <test_case_string_failure_3+0xc4>
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%r8
mov    -0x20(%rbp),%r9
lea    0xe3d(%rip),%rsi
mov    $0x4a,%edx
lea    0xeee(%rip),%rcx
mov    $0x0,%al
call   1040 <test_abort@plt>
jmp    121a <test_case_string_failure_3+0xfa>
cmpq   $0x0,-0x18(%rbp)
je     1215 <test_case_string_failure_3+0xf5>
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%r8
mov    -0x18(%rbp),%r9
lea    0xe07(%rip),%rsi
mov    $0x4a,%edx
lea    0xee1(%rip),%rcx
mov    $0x0,%al
call   1040 <test_abort@plt>
jmp    121a <test_case_string_failure_3+0xfa>
jmp    121f <test_case_string_failure_3+0xff>
jmp    1224 <test_case_string_failure_3+0x104>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_case_string_failure_3>:
mov    %rsi,%rdi
lea    0xeef(%rip),%rsi
lea    0xf71(%rip),%rcx
lea    0xedc(%rip),%r8
lea    0xed1(%rip),%r9
mov    $0x4a,%edx
xor    %eax,%eax
jmp    1030 <test_abort@plt>

LLVM IR (-O0):
%struct.test_suite = type { i32 }
%struct.test_context = type { i32 }
@.str = [4 x i8] c"foo\00"
@.str.1 = [5 x i8] c"NULL\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_string_failure_3(%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* null, i8** %5
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([5 x i8], [5 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 74, 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 74, 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 74, 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 = [5 x i8] c"NULL\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.4 = [41 x i8] c"%s is null but should be the string \22%s\22\00"
define void @test_case_string_failure_3(%struct.test_suite* nocapture readnone %0, %struct.test_context* %1) {
%3 = 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 74, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}