#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*/ clParseError(int, char **, int, char *);
int checkBadOption(int argc, char **argv, int *i) {
  {
    if (*i < argc) {
      if ((int)*(*(argv + *i) + 0) == 45) {
        clParseError(argc, argv, *i, (char *)"Unrecognized option.");
      }
    } else {
      clParseError(argc, argv, *i, (char *)"Error parsing command line.");
    }
    return (0);
  }
}


x86 assembly (clang, -O0):
<checkBadOption>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
cmp    -0x4(%rbp),%eax
jge    116b <checkBadOption+0x5b>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1166 <checkBadOption+0x56>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
lea    0xe9f(%rip),%rcx
call   1030 <clParseError@plt>
jmp    1184 <checkBadOption+0x74>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
lea    0xe96(%rip),%rcx
call   1030 <clParseError@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkBadOption>:
push   %rax
movslq (%rdx),%rdx
cmp    %edi,%edx
jge    112a <checkBadOption+0x1a>
mov    (%rsi,%rdx,8),%rax
cmpb   $0x2d,(%rax)
jne    1136 <checkBadOption+0x26>
lea    0xed8(%rip),%rcx
jmp    1131 <checkBadOption+0x21>
lea    0xee4(%rip),%rcx
call   1030 <clParseError@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Unrecognized option.\00"
@.str.1 = [28 x i8] c"Error parsing command line.\00"
define i32 @checkBadOption(i32 %0, i8** %1, i32* %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %6
%8 = load i32, i32* %7
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %29
11: ; preds = %3
%12 = load i8**, i8*** %5
%13 = load i32*, i32** %6
%14 = load i32, i32* %13
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %12, i64 %15
%17 = load i8*, i8** %16
%18 = getelementptr inbounds i8, i8* %17, i64 0
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 45
br i1 %21, label %22, label %28
22: ; preds = %11
%23 = load i32, i32* %4
%24 = load i8**, i8*** %5
%25 = load i32*, i32** %6
%26 = load i32, i32* %25
%27 = call i32 @clParseError(i32 %23, i8** %24, i32 %26, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %28
28: ; preds = %22, %11
br label %35
29: ; preds = %3
%30 = load i32, i32* %4
%31 = load i8**, i8*** %5
%32 = load i32*, i32** %6
%33 = load i32, i32* %32
%34 = call i32 @clParseError(i32 %30, i8** %31, i32 %33, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
br label %35
35: ; preds = %29, %28
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Unrecognized option.\00"
@.str.1 = [28 x i8] c"Error parsing command line.\00"
define i32 @checkBadOption(i32 %0, i8** %1, i32* nocapture %2) {
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, %0
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = sext i32 %4 to i64
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 45
br i1 %11, label %12, label %16
12: ; preds = %6
%13 = tail call i32 @clParseError(i32 %0, i8** %1, i32 %4, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %16
14: ; preds = %3
%15 = tail call i32 @clParseError(i32 %0, i8** %1, i32 %4, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
br label %16
16: ; preds = %6, %12, %14
ret i32 0
}