#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*/ Sys_Exit(int /*<<< orphan*/);
int /*<<< orphan*/ Sys_PrintBinVersion(char *);
int /*<<< orphan*/ strcmp(char *, char *);
void Sys_ParseArgs(int argc, char *argv[]) {
  if (argc == 2) {
    if ((!strcmp(argv[1], "--version")) || (!strcmp(argv[1], "-v"))) {
      Sys_PrintBinVersion(argv[0]);
      Sys_Exit(0);
    }
  }
}


x86 assembly (clang, -O0):
<Sys_ParseArgs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
jne    119b <Sys_ParseArgs+0x6b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xea8(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
je     1183 <Sys_ParseArgs+0x53>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe95(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1196 <Sys_ParseArgs+0x66>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <Sys_PrintBinVersion@plt>
xor    %edi,%edi
call   1040 <Sys_Exit@plt>
jmp    119b <Sys_ParseArgs+0x6b>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sys_ParseArgs>:
push   %r14
push   %rbx
push   %rax
cmp    $0x2,%edi
jne    1166 <Sys_ParseArgs+0x36>
mov    %rsi,%r14
mov    0x8(%rsi),%rbx
lea    0xeb9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     116e <Sys_ParseArgs+0x3e>
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     116e <Sys_ParseArgs+0x3e>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    (%r14),%rdi
call   1050 <Sys_PrintBinVersion@plt>
xor    %edi,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <Sys_Exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"--version\00"
@.str.1 = [3 x i8] c"-v\00"
define void @Sys_ParseArgs(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 2
br i1 %6, label %7, label %26
7: ; preds = %2
%8 = load i8**, i8*** %4
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %10, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %19
13: ; preds = %7
%14 = load i8**, i8*** %4
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @strcmp(i8* %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%18 = icmp ne i32 %17, 0
br i1 %18, label %25, label %19
19: ; preds = %13, %7
%20 = load i8**, i8*** %4
%21 = getelementptr inbounds i8*, i8** %20, i64 0
%22 = load i8*, i8** %21
%23 = call i32 @Sys_PrintBinVersion(i8* %22)
%24 = call i32 @Sys_Exit(i32 0)
br label %25
25: ; preds = %19, %13
br label %26
26: ; preds = %25, %2
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"--version\00"
@.str.1 = [3 x i8] c"-v\00"
define void @Sys_ParseArgs(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %16
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %6, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = tail call i32 @strcmp(i8* dereferenceable(1) %6, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %9, %4
%13 = load i8*, i8** %1
%14 = tail call i32 @Sys_PrintBinVersion(i8* %13)
%15 = tail call i32 @Sys_Exit(i32 0)
br label %16
16: ; preds = %9, %12, %2
ret void
}