#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*/ fflush(int /*<<< orphan*/);
char *firetalk_strerror(int const);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int, int const,
                           char const *const, char const *const, ...);
int /*<<< orphan*/ stderr;
void error(void *c, void *cs, const int error, const char *const roomoruser,
           const char *const description) {
  if (roomoruser == NULL)
    fprintf(stderr, " [%s:%i: error %i (%s): %s]",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/jwise/naim/refs/heads/lua-experimental/"
            "libfiretalk/tester.c",
            162, error, firetalk_strerror(error), description);
  else
    fprintf(stderr, " [%s:%i: error %i in %s (%s): %s]",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/jwise/naim/refs/heads/lua-experimental/"
            "libfiretalk/tester.c",
            164, error, roomoruser, firetalk_strerror(error), description);
  fflush(stderr);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    11a1 <error+0x71>
mov    0x2e83(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x30(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <firetalk_strerror@plt>
mov    -0x30(%rbp),%edi
mov    -0x2c(%rbp),%r8d
mov    %rax,%r9
mov    -0x28(%rbp),%rax
lea    0xe7b(%rip),%rsi
lea    0xe90(%rip),%rdx
mov    $0xa2,%ecx
mov    %rax,(%rsp)
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    11f8 <error+0xc8>
mov    0x2e38(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <firetalk_strerror@plt>
mov    -0x40(%rbp),%edi
mov    -0x3c(%rbp),%r8d
mov    -0x38(%rbp),%r9
mov    %rax,%r10
mov    -0x28(%rbp),%rax
lea    0xed6(%rip),%rsi
lea    0xe39(%rip),%rdx
mov    $0xa4,%ecx
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2de1(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8,%r14
mov    %rcx,%rbx
mov    %edx,%ebp
mov    0x2e99(%rip),%r12
mov    (%r12),%r15d
mov    %edx,%edi
call   1050 <firetalk_strerror@plt>
mov    %rax,%r10
test   %rbx,%rbx
je     117e <error+0x4e>
lea    0xf51(%rip),%rsi
lea    0xeb4(%rip),%rdx
mov    %r15d,%edi
mov    $0xa4,%ecx
mov    %ebp,%r8d
mov    %rbx,%r9
xor    %eax,%eax
push   %r14
push   %r10
jmp    11a2 <error+0x72>
sub    $0x8,%rsp
lea    0xe77(%rip),%rsi
lea    0xe8c(%rip),%rdx
mov    %r15d,%edi
mov    $0xa2,%ecx
mov    %ebp,%r8d
mov    %r10,%r9
xor    %eax,%eax
push   %r14
call   1030 <fprintf@plt>
add    $0x10,%rsp
mov    (%r12),%edi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c" [%s:%i: error %i (%s): %s]\00"
@.str.1 = [150 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jwise/naim/refs/heads/lua-experimental/libfiretalk/tester.c\00"
@.str.2 = [34 x i8] c" [%s:%i: error %i in %s (%s): %s]\00"
define void @error(i8* %0, i8* %1, i32 %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load i8*, i8** %9
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %20
13: ; preds = %5
%14 = load i32, i32* @stderr
%15 = load i32, i32* %8
%16 = load i32, i32* %8
%17 = call i8* @firetalk_strerror(i32 %16)
%18 = load i8*, i8** %10
%19 = call i32 (i32, i8*, i8*, i32, i32, i8*, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str.1, i64 0, i64 0), i32 162, i32 %15, i8* %17, i8* %18)
br label %28
20: ; preds = %5
%21 = load i32, i32* @stderr
%22 = load i32, i32* %8
%23 = load i8*, i8** %9
%24 = load i32, i32* %8
%25 = call i8* @firetalk_strerror(i32 %24)
%26 = load i8*, i8** %10
%27 = call i32 (i32, i8*, i8*, i32, i32, i8*, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str.1, i64 0, i64 0), i32 164, i32 %22, i8* %23, i8* %25, i8* %26)
br label %28
28: ; preds = %20, %13
%29 = load i32, i32* @stderr
%30 = call i32 @fflush(i32 %29)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c" [%s:%i: error %i (%s): %s]\00"
@.str.1 = [150 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jwise/naim/refs/heads/lua-experimental/libfiretalk/tester.c\00"
@.str.2 = [34 x i8] c" [%s:%i: error %i in %s (%s): %s]\00"
define void @error(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i8* %3, i8* %4) {
%6 = icmp eq i8* %3, null
%7 = load i32, i32* @stderr
%8 = tail call i8* @firetalk_strerror(i32 %2)
br i1 %6, label %9, label %11
9: ; preds = %5
%10 = tail call i32 (i32, i8*, i8*, i32, i32, i8*, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str.1, i64 0, i64 0), i32 162, i32 %2, i8* %8, i8* %4)
br label %13
11: ; preds = %5
%12 = tail call i32 (i32, i8*, i8*, i32, i32, i8*, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str.1, i64 0, i64 0), i32 164, i32 %2, i8* %3, i8* %8, i8* %4)
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* @stderr
%15 = tail call i32 @fflush(i32 %14)
ret void
}