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


x86 assembly (clang, -O0):
<Sys_ParseArgs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    11a7 <Sys_ParseArgs+0x77>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xea8(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     1183 <Sys_ParseArgs+0x53>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe95(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11a2 <Sys_ParseArgs+0x72>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <Sys_BinName@plt>
mov    %eax,%edi
call   1050 <Sys_PrintBinVersion@plt>
movl   $0x1,-0x4(%rbp)
jmp    11ae <Sys_ParseArgs+0x7e>
jmp    11a7 <Sys_ParseArgs+0x77>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sys_ParseArgs>:
push   %r15
push   %r14
push   %rbx
xor    %ebx,%ebx
cmp    $0x2,%edi
jne    117d <Sys_ParseArgs+0x4d>
mov    %rsi,%r14
mov    0x8(%rsi),%r15
lea    0xeb6(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1169 <Sys_ParseArgs+0x39>
lea    0xead(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
jne    117d <Sys_ParseArgs+0x4d>
mov    (%r14),%rdi
call   1030 <Sys_BinName@plt>
mov    %eax,%edi
call   1050 <Sys_PrintBinVersion@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"--version\00"
@.str.1 = [3 x i8] c"-v\00"
define i32 @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_BinName(i8* %13)
%15 = tail call i32 @Sys_PrintBinVersion(i32 %14)
br label %16
16: ; preds = %2, %9, %12
%17 = phi i32 [ 1, %12 ], [ 0, %9 ], [ 0, %2 ]
ret i32 %17
}