#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 /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ usage(char *);
void clParseError(int argc, char **argv, int i, char *message) {
  fprintf(stdout, "Error: %s\n", message);
  fprintf(stdout, "       for command at command line argument <%d: %s >\n", i,
          (i < argc) ? argv[i] : "(Error: passed end of line)");
  usage((0 < argc) ? argv[0] : "(Error: No program name)");
  exit(1);
}


x86 assembly (clang, -O0):
<clParseError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rdx
lea    0xea6(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1194 <clParseError+0x64>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x30(%rbp)
jmp    11a4 <clParseError+0x74>
lea    0xea7(%rip),%rax
mov    %rax,-0x30(%rbp)
jmp    11a4 <clParseError+0x74>
mov    -0x24(%rbp),%edx
mov    -0x28(%rbp),%edi
mov    -0x30(%rbp),%rcx
lea    0xe56(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
xor    %eax,%eax
cmp    -0x4(%rbp),%eax
jge    11d7 <clParseError+0xa7>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x38(%rbp)
jmp    11e7 <clParseError+0xb7>
lea    0xe80(%rip),%rax
mov    %rax,-0x38(%rbp)
jmp    11e7 <clParseError+0xb7>
mov    -0x38(%rbp),%rdi
call   1040 <usage@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<clParseError>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %rsi,%r14
mov    %edi,%ebp
mov    0x2e9b(%rip),%r15
mov    (%r15),%edi
lea    0xeb1(%rip),%rsi
mov    %rcx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r15),%edi
cmp    %ebp,%ebx
jge    1169 <clParseError+0x39>
movslq %ebx,%rax
mov    (%r14,%rax,8),%rcx
jmp    1170 <clParseError+0x40>
lea    0xed2(%rip),%rcx
lea    0xe94(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <fprintf@plt>
test   %ebp,%ebp
jle    1189 <clParseError+0x59>
mov    (%r14),%rdi
jmp    1190 <clParseError+0x60>
lea    0xece(%rip),%rdi
call   1040 <usage@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
@.str.1 = [55 x i8] c" for command at command line argument <%d: %s >\0A\00"
@.str.2 = [28 x i8] c"(Error: passed end of line)\00"
@.str.3 = [25 x i8] c"(Error: No program name)\00"
define void @clParseError(i32 %0, i8** %1, i32 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i32
%8 = alloca i8*
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* @stdout
%10 = load i8*, i8** %8
%11 = call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i32, i32* @stdout
%13 = load i32, i32* %7
%14 = load i32, i32* %7
%15 = load i32, i32* %5
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %23
17: ; preds = %4
%18 = load i8**, i8*** %6
%19 = load i32, i32* %7
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8*, i8** %18, i64 %20
%22 = load i8*, i8** %21
br label %24
23: ; preds = %4
br label %24
24: ; preds = %23, %17
%25 = phi i8* [ %22, %17 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), %23 ]
%26 = call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i32 %13, i8* %25)
%27 = load i32, i32* %5
%28 = icmp slt i32 0, %27
br i1 %28, label %29, label %33
29: ; preds = %24
%30 = load i8**, i8*** %6
%31 = getelementptr inbounds i8*, i8** %30, i64 0
%32 = load i8*, i8** %31
br label %34
33: ; preds = %24
br label %34
34: ; preds = %33, %29
%35 = phi i8* [ %32, %29 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), %33 ]
%36 = call i32 @usage(i8* %35)
%37 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
@.str.1 = [55 x i8] c" for command at command line argument <%d: %s >\0A\00"
@.str.2 = [28 x i8] c"(Error: passed end of line)\00"
@.str.3 = [25 x i8] c"(Error: No program name)\00"
define void @clParseError(i32 %0, i8** nocapture %1, i32 %2, i8* %3) {
%5 = load i32, i32* @stdout
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3)
%7 = load i32, i32* @stdout
%8 = icmp slt i32 %2, %0
br i1 %8, label %9, label %13
9: ; preds = %4
%10 = sext i32 %2 to i64
%11 = getelementptr inbounds i8*, i8** %1, i64 %10
%12 = load i8*, i8** %11
br label %13
13: ; preds = %4, %9
%14 = phi i8* [ %12, %9 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), %4 ]
%15 = tail call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i32 %2, i8* %14)
%16 = icmp sgt i32 %0, 0
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load i8*, i8** %1
br label %19
19: ; preds = %13, %17
%20 = phi i8* [ %18, %17 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), %13 ]
%21 = tail call i32 @usage(i8* %20)
%22 = tail call i32 @exit(i32 1)
unreachable
}