#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*/ error(char *, ...);
int /*<<< orphan*/ fatalerror(char *);
void argerrortxt(char *s, char *message) {
  if (s != NULL)
    error("Error parsing option -%s:\n\t", s);
  else
    error("Error parsing command line:\n\t");
  error("%s\n", message);
  fatalerror("\nTry --help for help.\n");
}


x86 assembly (clang, -O0):
<argerrortxt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1152 <argerrortxt+0x32>
mov    -0x8(%rbp),%rsi
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <error@plt>
jmp    1160 <argerrortxt+0x40>
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <error@plt>
mov    -0x10(%rbp),%rsi
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <error@plt>
lea    0xec5(%rip),%rdi
call   1040 <fatalerror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<argerrortxt>:
push   %rbx
mov    %rsi,%rbx
test   %rdi,%rdi
je     113c <argerrortxt+0x1c>
mov    %rdi,%rsi
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <error@plt>
jmp    114a <argerrortxt+0x2a>
lea    0xed9(%rip),%rdi
xor    %eax,%eax
call   1030 <error@plt>
lea    0xee9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <error@plt>
lea    0xedc(%rip),%rdi
pop    %rbx
jmp    1040 <fatalerror@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Error parsing option -%s:\0A\09\00"
@.str.1 = [30 x i8] c"Error parsing command line:\0A\09\00"
@.str.2 = [4 x i8] c"%s\0A\00"
@.str.3 = [23 x i8] c"\0ATry --help for help.\0A\00"
define void @argerrortxt(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 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = call i32 (i8*, ...) @error(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %12
10: ; preds = %2
%11 = call i32 (i8*, ...) @error(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10, %7
%13 = load i8*, i8** %4
%14 = call i32 (i8*, ...) @error(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %13)
%15 = call i32 @fatalerror(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"Error parsing option -%s:\0A\09\00"
@.str.1 = [30 x i8] c"Error parsing command line:\0A\09\00"
@.str.2 = [4 x i8] c"%s\0A\00"
@.str.3 = [23 x i8] c"\0ATry --help for help.\0A\00"
define void @argerrortxt(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 (i8*, ...) @error(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %8
6: ; preds = %2
%7 = tail call i32 (i8*, ...) @error(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
%9 = tail call i32 (i8*, ...) @error(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %1)
%10 = tail call i32 @fatalerror(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
ret void
}