#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 check_permission(char *, char *, char *, char *);
int /*<<< orphan*/ finalize();
int /*<<< orphan*/ initialize(int);
int /*<<< orphan*/ printf(char *, int, int);
int main(int argc, char **argv) {
  initialize(4223);
  int result =
      check_permission("MIGJAoGBAPD+T3DFSp1VrcM4uvz8/"
                       "WPbWtyKGFdH8kqkYohTXw4HDQZo7YHIeF9K9Xo2ZAEc5XcjqegzCl/"
                       "jaaVLoybwRJ4/NKKdhVQW5/6ZOuSQDk2fVu3Waqi/PtOw/uav49a/"
                       "A06h+7K1mJTc7gadCEfqpH+vc1cqPoogojZIkjeRQ6YNAgMBAAE=",
                       "fs", "read", "/root");
  int result2 =
      check_permission("MIGJAoGBAPD+T3DFSp1VrcM4uvz8/"
                       "WPbWtyKGFdH8kqkYohTXw4HDQZo7YHIeF9K9Xo2ZAEc5XcjqegzCl/"
                       "jaaVLoybwRJ4/NKKdhVQW5/6ZOuSQDk2fVu3Waqi/PtOw/uav49a/"
                       "A06h+7K1mJTc7gadCEfqpH+vc1cqPoogojZIkjeRQ6YNAgMBAAE=",
                       "fs", "read", "/tmp");
  printf("Results: %d %d\n", result, result2);
  finalize();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x107f,%edi
call   1060 <initialize@plt>
lea    0xea0(%rip),%rdi
lea    0xf56(%rip),%rsi
lea    0xf52(%rip),%rdx
lea    0xf50(%rip),%rcx
call   1050 <check_permission@plt>
mov    %eax,-0x14(%rbp)
lea    0xe7c(%rip),%rdi
lea    0xf32(%rip),%rsi
lea    0xf2e(%rip),%rdx
lea    0xf32(%rip),%rcx
call   1050 <check_permission@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xf22(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <finalize@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x107f,%edi
call   1060 <initialize@plt>
lea    0xea8(%rip),%rbx
lea    0xf5e(%rip),%r14
lea    0xf5a(%rip),%r15
lea    0xf58(%rip),%rcx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1050 <check_permission@plt>
mov    %eax,%ebp
lea    0xf47(%rip),%rcx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1050 <check_permission@plt>
lea    0xf37(%rip),%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <finalize@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [189 x i8] c"MIGJAoGBAPD+T3DFSp1VrcM4uvz8/WPbWtyKGFdH8kqkYohTXw4HDQZo7YHIeF9K9Xo2ZAEc5XcjqegzCl/jaaVLoybwRJ4/NKKdhVQW5/6ZOuSQDk2fVu3Waqi/PtOw/uav49a/A06h+7K1mJTc7gadCEfqpH+vc1cqPoogojZIkjeRQ6YNAgMBAAE=\00"
@.str.1 = [3 x i8] c"fs\00"
@.str.2 = [5 x i8] c"read\00"
@.str.3 = [6 x i8] c"/root\00"
@.str.4 = [5 x i8] c"/tmp\00"
@.str.5 = [16 x i8] c"Results: %d %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = call i32 @initialize(i32 4223)
%8 = call i32 @check_permission(i8* getelementptr inbounds ([189 x i8], [189 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
store i32 %8, i32* %5
%9 = call i32 @check_permission(i8* getelementptr inbounds ([189 x i8], [189 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
store i32 %9, i32* %6
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 %10, i32 %11)
%13 = call i32 (...) @finalize()
ret i32 0
}

LLVM IR (-O2):
@.str = [189 x i8] c"MIGJAoGBAPD+T3DFSp1VrcM4uvz8/WPbWtyKGFdH8kqkYohTXw4HDQZo7YHIeF9K9Xo2ZAEc5XcjqegzCl/jaaVLoybwRJ4/NKKdhVQW5/6ZOuSQDk2fVu3Waqi/PtOw/uav49a/A06h+7K1mJTc7gadCEfqpH+vc1cqPoogojZIkjeRQ6YNAgMBAAE=\00"
@.str.1 = [3 x i8] c"fs\00"
@.str.2 = [5 x i8] c"read\00"
@.str.3 = [6 x i8] c"/root\00"
@.str.4 = [5 x i8] c"/tmp\00"
@.str.5 = [16 x i8] c"Results: %d %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @initialize(i32 4223)
%4 = tail call i32 @check_permission(i8* getelementptr inbounds ([189 x i8], [189 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @check_permission(i8* getelementptr inbounds ([189 x i8], [189 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 %4, i32 %5)
%7 = tail call i32 (...) @finalize()
ret i32 0
}