#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 */

/* Variables and functions */
int /*<<< orphan*/ errorf(char *, int, char *, int, char *, char *);
scalar_t__ strcmp(char *, char *);
void assert_string2(int line, char *s, char *t) {
  if (strcmp(s, t))
    errorf("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/zhuzhaoyuan/8cc/refs/heads/master/"
           "utiltest.c",
           24, "%d: Expected \"%s\" but got \"%s\"", line, s, t);
}


x86 assembly (clang, -O0):
<assert_string2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     116d <assert_string2+0x4d>
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%r8
mov    -0x18(%rbp),%r9
lea    0xea4(%rip),%rdi
mov    $0x18,%esi
lea    0xf1f(%rip),%rdx
call   1040 <errorf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_string2>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1160 <assert_string2+0x40>
lea    0xebd(%rip),%rdi
lea    0xf3d(%rip),%rdx
mov    $0x18,%esi
mov    %ebp,%ecx
mov    %rbx,%r8
mov    %r14,%r9
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <errorf@plt>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [135 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/zhuzhaoyuan/8cc/refs/heads/master/utiltest.c\00"
@.str.1 = [31 x i8] c"%d: Expected \22%s\22 but got \22%s\22\00"
define void @assert_string2(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = load i8*, i8** %6
%9 = call i64 @strcmp(i8* %7, i8* %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %3
%12 = load i32, i32* %4
%13 = load i8*, i8** %5
%14 = load i8*, i8** %6
%15 = call i32 @errorf(i8* getelementptr inbounds ([135 x i8], [135 x i8]* @.str, i64 0, i64 0), i32 24, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %12, i8* %13, i8* %14)
br label %16
16: ; preds = %11, %3
ret void
}

LLVM IR (-O2):
@.str = [135 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/zhuzhaoyuan/8cc/refs/heads/master/utiltest.c\00"
@.str.1 = [31 x i8] c"%d: Expected \22%s\22 but got \22%s\22\00"
define void @assert_string2(i32 %0, i8* %1, i8* %2) {
%4 = tail call i64 @strcmp(i8* %1, i8* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @errorf(i8* getelementptr inbounds ([135 x i8], [135 x i8]* @.str, i64 0, i64 0), i32 24, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %0, i8* %1, i8* %2)
br label %8
8: ; preds = %6, %3
ret void
}