#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*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ run(char *, char *, char *, char *, ...);
int /*<<< orphan*/ setreuid(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void do_mount(void) {
  fprintf(stdout, "Mounting %s on %s\n", "/data/MyDocuments/SECURE/vault",
          "/home/pp/Private");
  setreuid(0, 0);
  run("/sbin/cryptsetup", "luksOpen", "/data/MyDocuments/SECURE/vault", "vault",
      NULL);
  run("/bin/mount",
      "/dev/mapper/"
      "vault",
      "/home/pp/Private", NULL);
}


x86 assembly (clang, -O0):
<do_mount>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
lea    0xec8(%rip),%rdx
lea    0xee0(%rip),%rcx
call   1040 <fprintf@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1050 <setreuid@plt>
lea    0xedc(%rip),%rdi
lea    0xee6(%rip),%rsi
lea    0xe9e(%rip),%rdx
lea    0xeb0(%rip),%rcx
xor    %eax,%eax
mov    %eax,%r8d
mov    $0x0,%al
call   1030 <run@plt>
lea    0xece(%rip),%rdi
lea    0xed2(%rip),%rsi
lea    0xe95(%rip),%rdx
xor    %eax,%eax
mov    %eax,%ecx
mov    $0x0,%al
call   1030 <run@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_mount>:
push   %r14
push   %rbx
push   %rax
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
lea    0xec8(%rip),%rbx
lea    0xee0(%rip),%r14
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <fprintf@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1050 <setreuid@plt>
lea    0xed6(%rip),%rdi
lea    0xee0(%rip),%rsi
lea    0xeb1(%rip),%rcx
mov    %rbx,%rdx
xor    %r8d,%r8d
xor    %eax,%eax
call   1030 <run@plt>
lea    0xece(%rip),%rdi
lea    0xed2(%rip),%rsi
mov    %r14,%rdx
xor    %ecx,%ecx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <run@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [19 x i8] c"Mounting %s on %s\0A\00"
@.str.1 = [31 x i8] c"/data/MyDocuments/SECURE/vault\00"
@.str.2 = [17 x i8] c"/home/pp/Private\00"
@.str.3 = [17 x i8] c"/sbin/cryptsetup\00"
@.str.4 = [9 x i8] c"luksOpen\00"
@.str.5 = [6 x i8] c"vault\00"
@.str.6 = [11 x i8] c"/bin/mount\00"
@.str.7 = [18 x i8] c"/dev/mapper/vault\00"
define void @do_mount() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @setreuid(i32 0, i32 0)
%4 = call i32 (i8*, i8*, i8*, i8*, ...) @run(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* null)
%5 = call i32 (i8*, i8*, i8*, i8*, ...) @run(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* null)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [19 x i8] c"Mounting %s on %s\0A\00"
@.str.1 = [31 x i8] c"/data/MyDocuments/SECURE/vault\00"
@.str.2 = [17 x i8] c"/home/pp/Private\00"
@.str.3 = [17 x i8] c"/sbin/cryptsetup\00"
@.str.4 = [9 x i8] c"luksOpen\00"
@.str.5 = [6 x i8] c"vault\00"
@.str.6 = [11 x i8] c"/bin/mount\00"
@.str.7 = [18 x i8] c"/dev/mapper/vault\00"
define void @do_mount() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @setreuid(i32 0, i32 0)
%4 = tail call i32 (i8*, i8*, i8*, i8*, ...) @run(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* null)
%5 = tail call i32 (i8*, i8*, i8*, i8*, ...) @run(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* null)
ret void
}