#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*/ exit(int);
int strlen(char const *);
int /*<<< orphan*/ write(int, char const *, int);
void error(char **argv, const char *str) {
  write(2, *argv, strlen(*argv));
  write(2, " ", sizeof(" "));
  while (*++argv != NULL) {
    write(2, *argv, strlen(*argv));
    write(2, " ", sizeof(" "));
  }
  write(2, ": ", sizeof(": "));
  write(2, str, strlen(str));
  write(2, "\n", sizeof("\n"));
  exit(2);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1040 <strlen@plt>
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
mov    $0x2,%edx
lea    0xe8e(%rip),%rsi
mov    %edx,%edi
call   1030 <write@plt>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
cmpq   $0x0,0x8(%rax)
je     11d3 <error+0xa3>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
mov    $0x2,%edx
lea    0xe3a(%rip),%rsi
mov    %edx,%edi
call   1030 <write@plt>
jmp    117a <error+0x4a>
mov    $0x2,%edi
lea    0xe21(%rip),%rsi
mov    $0x3,%edx
call   1030 <write@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x28(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
mov    $0x2,%edx
lea    0xded(%rip),%rsi
mov    %edx,%edi
call   1030 <write@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r12
mov    (%rdi),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
lea    0xea2(%rip),%rsi
mov    $0x2,%edi
mov    $0x2,%edx
call   1030 <write@plt>
mov    0x8(%r12),%rbx
test   %rbx,%rbx
je     11c6 <error+0x96>
add    $0x10,%r12
lea    0xe7e(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    $0x2,%edi
mov    %r15,%rsi
mov    $0x2,%edx
call   1030 <write@plt>
mov    (%r12),%rbx
add    $0x8,%r12
test   %rbx,%rbx
jne    1190 <error+0x60>
lea    0xe33(%rip),%rsi
mov    $0x2,%edi
mov    $0x3,%edx
call   1030 <write@plt>
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    $0x2,%edi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <write@plt>
lea    0xe09(%rip),%rsi
mov    $0x2,%edi
mov    $0x2,%edx
call   1030 <write@plt>
mov    $0x2,%edi
call   1050 <exit@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 @error(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%5 = load i8**, i8*** %3
%6 = load i8*, i8** %5
%7 = load i8**, i8*** %3
%8 = load i8*, i8** %7
%9 = call i32 @strlen(i8* %8)
%10 = call i32 @write(i32 2, i8* %6, i32 %9)
%11 = call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 2)
br label %12
12: ; preds = %17, %2
%13 = load i8**, i8*** %3
%14 = getelementptr inbounds i8*, i8** %13, i32 1
store i8** %14, i8*** %3
%15 = load i8*, i8** %14
%16 = icmp ne i8* %15, null
br i1 %16, label %17, label %25
17: ; preds = %12
%18 = load i8**, i8*** %3
%19 = load i8*, i8** %18
%20 = load i8**, i8*** %3
%21 = load i8*, i8** %20
%22 = call i32 @strlen(i8* %21)
%23 = call i32 @write(i32 2, i8* %19, i32 %22)
%24 = call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 2)
br label %12
25: ; preds = %12
%26 = call i32 @write(i32 2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 3)
%27 = load i8*, i8** %4
%28 = load i8*, i8** %4
%29 = call i32 @strlen(i8* %28)
%30 = call i32 @write(i32 2, i8* %27, i32 %29)
%31 = call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 2)
%32 = call i32 @exit(i32 2)
unreachable
}

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 @error(i8** nocapture %0, i8* %1) {
%3 = load i8*, i8** %0
%4 = tail call i32 @strlen(i8* %3)
%5 = tail call i32 @write(i32 2, i8* %3, i32 %4)
%6 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 2)
%7 = getelementptr inbounds i8*, i8** %0, i64 1
%8 = load i8*, i8** %7
%9 = icmp eq i8* %8, null
br i1 %9, label %19, label %10
10: ; preds = %2, %10
%11 = phi i8* [ %17, %10 ], [ %8, %2 ]
%12 = phi i8** [ %16, %10 ], [ %7, %2 ]
%13 = tail call i32 @strlen(i8* %11)
%14 = tail call i32 @write(i32 2, i8* %11, i32 %13)
%15 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 2)
%16 = getelementptr inbounds i8*, i8** %12, i64 1
%17 = load i8*, i8** %16
%18 = icmp eq i8* %17, null
br i1 %18, label %19, label %10
19: ; preds = %10, %2
%20 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 3)
%21 = tail call i32 @strlen(i8* %1)
%22 = tail call i32 @write(i32 2, i8* %1, i32 %21)
%23 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 2)
%24 = tail call i32 @exit(i32 2)
unreachable
}