#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 asp_main(int, char **, int, char *, char *, char *, int);
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *, int);
int main(int argc, char *argv[]) {
  int ret = 0x0000;
  ret = asp_main(argc, argv, true, "/system/etc/firmware/S_ANDRO_SFL.ini",
                 "/system/secro/S_SECRO_SFL.ini",
                 "/system/etc/firmware/modem.img", 5);
  if ((ret == 0x9007) || (ret == 0x9009)) {
    printf("[%s] no check. ret 0x%x\n", "ASP", ret);
    goto _end;
  }
  if (0x0000 != ret) {
    printf("[%s] check fail. ret '0x%x'\n", "ASP", ret);
    assert(0);
  }
_end:
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
lea    0xea0(%rip),%rcx
lea    0xebe(%rip),%r8
lea    0xed5(%rip),%r9
movl   $0x5,(%rsp)
call   1030 <asp_main@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x9007,-0x14(%rbp)
je     1197 <main+0x67>
cmpl   $0x9009,-0x14(%rbp)
jne    11b2 <main+0x82>
mov    -0x14(%rbp),%edx
lea    0xec1(%rip),%rdi
lea    0xed3(%rip),%rsi
call   1040 <printf@plt>
jmp    11df <main+0xaf>
xor    %eax,%eax
cmp    -0x14(%rbp),%eax
je     11da <main+0xaa>
mov    -0x14(%rbp),%edx
lea    0xeb8(%rip),%rdi
lea    0xead(%rip),%rsi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <assert@plt>
jmp    11df <main+0xaf>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x5,(%rsp)
lea    0xebd(%rip),%rcx
lea    0xedb(%rip),%r8
lea    0xef2(%rip),%r9
mov    $0x1,%edx
call   1030 <asp_main@plt>
mov    %eax,%ebx
test   %eax,%eax
je     11a4 <main+0x74>
cmp    $0x9009,%ebx
je     1171 <main+0x41>
cmp    $0x9007,%ebx
jne    1188 <main+0x58>
lea    0xeea(%rip),%rdi
lea    0xefc(%rip),%rsi
mov    %ebx,%edx
call   1040 <printf@plt>
jmp    11a4 <main+0x74>
lea    0xef0(%rip),%rdi
lea    0xee5(%rip),%rsi
mov    %ebx,%edx
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <assert@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"/system/etc/firmware/S_ANDRO_SFL.ini\00"
@.str.1 = [30 x i8] c"/system/secro/S_SECRO_SFL.ini\00"
@.str.2 = [31 x i8] c"/system/etc/firmware/modem.img\00"
@.str.3 = [25 x i8] c"[%s] no check. ret 0x%x\0A\00"
@.str.4 = [4 x i8] c"ASP\00"
@.str.5 = [29 x i8] c"[%s] check fail. ret '0x%x'\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = call i32 @asp_main(i32 %7, i8** %8, i32 1, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 5)
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp eq i32 %10, 36871
br i1 %11, label %15, label %12
12: ; preds = %2
%13 = load i32, i32* %6
%14 = icmp eq i32 %13, 36873
br i1 %14, label %15, label %18
15: ; preds = %12, %2
%16 = load i32, i32* %6
%17 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %16)
br label %26
18: ; preds = %12
%19 = load i32, i32* %6
%20 = icmp ne i32 0, %19
br i1 %20, label %21, label %25
21: ; preds = %18
%22 = load i32, i32* %6
%23 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %22)
%24 = call i32 @assert(i32 0)
br label %25
25: ; preds = %21, %18
br label %26
26: ; preds = %25, %15
%27 = load i32, i32* %6
ret i32 %27
}

LLVM IR (-O2):
@.str = [37 x i8] c"/system/etc/firmware/S_ANDRO_SFL.ini\00"
@.str.1 = [30 x i8] c"/system/secro/S_SECRO_SFL.ini\00"
@.str.2 = [31 x i8] c"/system/etc/firmware/modem.img\00"
@.str.3 = [25 x i8] c"[%s] no check. ret 0x%x\0A\00"
@.str.4 = [4 x i8] c"ASP\00"
@.str.5 = [29 x i8] c"[%s] check fail. ret '0x%x'\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @asp_main(i32 %0, i8** %1, i32 1, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 5)
switch i32 %3, label %6 [
i32 36873, label %4
i32 36871, label %4
i32 0, label %9
]
4: ; preds = %2, %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %3)
br label %9
6: ; preds = %2
%7 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %3)
%8 = tail call i32 @assert(i32 0)
br label %9
9: ; preds = %2, %6, %4
ret i32 %3
}