#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*/ nanotest_putnl();
int /*<<< orphan*/ nanotest_putstr(char const *);
int /*<<< orphan*/ nanotest_putuint(unsigned int);
void nanotest_putfileline(char const *fname, unsigned int lineno,
                          char const *desc) {
  nanotest_putstr("  - ");
  nanotest_putstr(fname);
  nanotest_putstr(" (");
  nanotest_putuint(lineno);
  nanotest_putstr(") : ");
  if (desc != NULL)
    nanotest_putstr(desc);
  nanotest_putnl();
}


x86 assembly (clang, -O0):
<nanotest_putfileline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xeb6(%rip),%rdi
call   1040 <nanotest_putstr@plt>
mov    -0x8(%rbp),%rdi
call   1040 <nanotest_putstr@plt>
lea    0xea6(%rip),%rdi
call   1040 <nanotest_putstr@plt>
mov    -0xc(%rbp),%edi
call   1030 <nanotest_putuint@plt>
lea    0xe95(%rip),%rdi
call   1040 <nanotest_putstr@plt>
cmpq   $0x0,-0x18(%rbp)
je     118c <nanotest_putfileline+0x5c>
mov    -0x18(%rbp),%rdi
call   1040 <nanotest_putstr@plt>
mov    $0x0,%al
call   1050 <nanotest_putnl@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nanotest_putfileline>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xebd(%rip),%rdi
call   1040 <nanotest_putstr@plt>
mov    %rbx,%rdi
call   1040 <nanotest_putstr@plt>
lea    0xeae(%rip),%rdi
call   1040 <nanotest_putstr@plt>
mov    %ebp,%edi
call   1030 <nanotest_putuint@plt>
lea    0xe9e(%rip),%rdi
call   1040 <nanotest_putstr@plt>
test   %r14,%r14
je     117c <nanotest_putfileline+0x4c>
mov    %r14,%rdi
call   1040 <nanotest_putstr@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <nanotest_putnl@plt>

LLVM IR (-O0):
@.str = [5 x i8] c" - \00"
@.str.1 = [3 x i8] c" (\00"
@.str.2 = [5 x i8] c") : \00"
define void @nanotest_putfileline(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = call i32 @nanotest_putstr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = load i8*, i8** %4
%9 = call i32 @nanotest_putstr(i8* %8)
%10 = call i32 @nanotest_putstr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%11 = load i32, i32* %5
%12 = call i32 @nanotest_putuint(i32 %11)
%13 = call i32 @nanotest_putstr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%14 = load i8*, i8** %6
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %19
16: ; preds = %3
%17 = load i8*, i8** %6
%18 = call i32 @nanotest_putstr(i8* %17)
br label %19
19: ; preds = %16, %3
%20 = call i32 (...) @nanotest_putnl()
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c" - \00"
@.str.1 = [3 x i8] c" (\00"
@.str.2 = [5 x i8] c") : \00"
define void @nanotest_putfileline(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @nanotest_putstr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @nanotest_putstr(i8* %0)
%6 = tail call i32 @nanotest_putstr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @nanotest_putuint(i32 %1)
%8 = tail call i32 @nanotest_putstr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%9 = icmp eq i8* %2, null
br i1 %9, label %12, label %10
10: ; preds = %3
%11 = tail call i32 @nanotest_putstr(i8* %2)
br label %12
12: ; preds = %10, %3
%13 = tail call i32 (...) @nanotest_putnl()
ret void
}