#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int strlen(char const *);
void ILL_report(const char *msg, const char *fct, const char *file,
                unsigned int line, int with_src_info) {
  if (msg != NULL) {
    fprintf(stderr, "FAILURE: %s", msg);
    if (msg[strlen(msg) - 1] != '\n') {
      fprintf(stderr, "\n");
    }
    if (with_src_info == 1) {
      fprintf(stderr, "\t");
      if (fct != NULL) {
        fprintf(stderr, "in function %s ", fct);
      }
      fprintf(stderr, "in file %s line %d", file, line);
    }
    fprintf(stderr, ".\n");
  }
}


x86 assembly (clang, -O0):
<ILL_report>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     121e <ILL_report+0xfe>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xea6(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
je     11a2 <ILL_report+0x82>
mov    0x2e4e(%rip),%rax
mov    (%rax),%edi
lea    0xe97(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
cmpl   $0x1,-0x20(%rbp)
jne    1207 <ILL_report+0xe7>
mov    0x2e2d(%rip),%rax
mov    (%rax),%edi
lea    0xe50(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
cmpq   $0x0,-0x10(%rbp)
je     11e9 <ILL_report+0xc9>
mov    0x2e0b(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe2c(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2df0(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
lea    0xe1e(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2dd2(%rip),%rax
mov    (%rax),%edi
lea    0xe1a(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ILL_report>:
test   %rdi,%rdi
je     11eb <ILL_report+0xcb>
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8d,%ebx
mov    %ecx,%r14d
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbp
mov    0x2e96(%rip),%r13
mov    0x0(%r13),%edi
lea    0xeab(%rip),%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbp,%rdi
call   1030 <strlen@plt>
cltq
cmpb   $0xa,-0x1(%rax,%rbp,1)
je     1182 <ILL_report+0x62>
mov    0x0(%r13),%edi
lea    0xeb7(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
cmp    $0x1,%ebx
jne    11cb <ILL_report+0xab>
mov    0x0(%r13),%edi
lea    0xe7a(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
test   %r12,%r12
je     11b3 <ILL_report+0x93>
mov    0x0(%r13),%edi
lea    0xe65(%rip),%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x0(%r13),%edi
lea    0xe60(%rip),%rsi
mov    %r15,%rdx
mov    %r14d,%ecx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x0(%r13),%edi
lea    0xe5b(%rip),%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <fprintf@plt>
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"FAILURE: %s\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [2 x i8] c"\09\00"
@.str.3 = [16 x i8] c"in function %s \00"
@.str.4 = [19 x i8] c"in file %s line %d\00"
@.str.5 = [3 x i8] c".\0A\00"
define void @ILL_report(i8* %0, i8* %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %49
13: ; preds = %5
%14 = load i32, i32* @stderr
%15 = load i8*, i8** %6
%16 = call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %15)
%17 = load i8*, i8** %6
%18 = load i8*, i8** %6
%19 = call i32 @strlen(i8* %18)
%20 = sub nsw i32 %19, 1
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %17, i64 %21
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp ne i32 %24, 10
br i1 %25, label %26, label %29
26: ; preds = %13
%27 = load i32, i32* @stderr
%28 = call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %29
29: ; preds = %26, %13
%30 = load i32, i32* %10
%31 = icmp eq i32 %30, 1
br i1 %31, label %32, label %46
32: ; preds = %29
%33 = load i32, i32* @stderr
%34 = call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%35 = load i8*, i8** %7
%36 = icmp ne i8* %35, null
br i1 %36, label %37, label %41
37: ; preds = %32
%38 = load i32, i32* @stderr
%39 = load i8*, i8** %7
%40 = call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %39)
br label %41
41: ; preds = %37, %32
%42 = load i32, i32* @stderr
%43 = load i8*, i8** %8
%44 = load i32, i32* %9
%45 = call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i8* %43, i32 %44)
br label %46
46: ; preds = %41, %29
%47 = load i32, i32* @stderr
%48 = call i32 (i32, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %49
49: ; preds = %46, %5
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"FAILURE: %s\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [2 x i8] c"\09\00"
@.str.3 = [16 x i8] c"in function %s \00"
@.str.4 = [19 x i8] c"in file %s line %d\00"
@.str.5 = [3 x i8] c".\0A\00"
define void @ILL_report(i8* %0, i8* %1, i8* %2, i32 %3, i32 %4) {
%6 = icmp eq i8* %0, null
br i1 %6, label %34, label %7
7: ; preds = %5
%8 = load i32, i32* @stderr
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
%10 = tail call i32 @strlen(i8* %0)
%11 = add nsw i32 %10, -1
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 10
br i1 %15, label %19, label %16
16: ; preds = %7
%17 = load i32, i32* @stderr
%18 = tail call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %19
19: ; preds = %16, %7
%20 = icmp eq i32 %4, 1
br i1 %20, label %21, label %31
21: ; preds = %19
%22 = load i32, i32* @stderr
%23 = tail call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%24 = icmp eq i8* %1, null
br i1 %24, label %28, label %25
25: ; preds = %21
%26 = load i32, i32* @stderr
%27 = tail call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %1)
br label %28
28: ; preds = %25, %21
%29 = load i32, i32* @stderr
%30 = tail call i32 (i32, i8*, ...) @fprintf(i32 %29, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i8* %2, i32 %3)
br label %31
31: ; preds = %28, %19
%32 = load i32, i32* @stderr
%33 = tail call i32 (i32, i8*, ...) @fprintf(i32 %32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %34
34: ; preds = %31, %5
ret void
}