#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*/ writeline(char const *, int);
void echoerr(const char *app, const char *operate, const char *error) {
  writeline("-", 1);
  writeline(app, 1);
  writeline(": ", 1);
  writeline(operate, 1);
  writeline(": ", 1);
  writeline(error, 1);
  writeline("\n", 1);
  return;
}


x86 assembly (clang, -O0):
<echoerr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xed5(%rip),%rdi
mov    $0x1,%esi
call   1030 <writeline@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <writeline@plt>
lea    0xeb8(%rip),%rdi
mov    $0x1,%esi
call   1030 <writeline@plt>
mov    -0x10(%rbp),%rdi
mov    $0x1,%esi
call   1030 <writeline@plt>
lea    0xe99(%rip),%rdi
mov    $0x1,%esi
call   1030 <writeline@plt>
mov    -0x18(%rbp),%rdi
mov    $0x1,%esi
call   1030 <writeline@plt>
lea    0xe7d(%rip),%rdi
mov    $0x1,%esi
call   1030 <writeline@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<echoerr>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0xedb(%rip),%rdi
mov    $0x1,%esi
call   1030 <writeline@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <writeline@plt>
lea    0xebf(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <writeline@plt>
mov    %r15,%rdi
mov    $0x1,%esi
call   1030 <writeline@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <writeline@plt>
mov    %r14,%rdi
mov    $0x1,%esi
call   1030 <writeline@plt>
lea    0xe87(%rip),%rdi
mov    $0x1,%esi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <writeline@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"-\00"
@.str.1 = [3 x i8] c": \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @echoerr(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = call i32 @writeline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%8 = load i8*, i8** %4
%9 = call i32 @writeline(i8* %8, i32 1)
%10 = call i32 @writeline(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 1)
%11 = load i8*, i8** %5
%12 = call i32 @writeline(i8* %11, i32 1)
%13 = call i32 @writeline(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 1)
%14 = load i8*, i8** %6
%15 = call i32 @writeline(i8* %14, i32 1)
%16 = call i32 @writeline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"-\00"
@.str.1 = [3 x i8] c": \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @echoerr(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @writeline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%5 = tail call i32 @writeline(i8* %0, i32 1)
%6 = tail call i32 @writeline(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 1)
%7 = tail call i32 @writeline(i8* %1, i32 1)
%8 = tail call i32 @writeline(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 1)
%9 = tail call i32 @writeline(i8* %2, i32 1)
%10 = tail call i32 @writeline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 1)
ret void
}