#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 *, ...);
int /*<<< orphan*/ setreuid(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void do_umount(void) {
  fprintf(stdout, "Un-mounting %s from %s\n", "vault", "/home/pp/Private");
  setreuid(0, 0);
  run("/bin/umount", "/home/pp/Private", 0);
  run("/sbin/cryptsetup", "luksClose", "vault", 0);
}


x86 assembly (clang, -O0):
<do_umount>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
lea    0xecd(%rip),%rdx
lea    0xecc(%rip),%rcx
call   1040 <fprintf@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1050 <setreuid@plt>
lea    0xec8(%rip),%rdi
lea    0xeb0(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
mov    $0x0,%al
call   1030 <run@plt>
lea    0xebb(%rip),%rdi
lea    0xec5(%rip),%rsi
lea    0xe8a(%rip),%rdx
xor    %ecx,%ecx
mov    $0x0,%al
call   1030 <run@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_umount>:
push   %r14
push   %rbx
push   %rax
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
lea    0xecd(%rip),%r14
lea    0xecc(%rip),%rbx
mov    %r14,%rdx
mov    %rbx,%rcx
call   1040 <fprintf@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1050 <setreuid@plt>
lea    0xec2(%rip),%rdi
mov    %rbx,%rsi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <run@plt>
lea    0xebb(%rip),%rdi
lea    0xec5(%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 = [24 x i8] c"Un-mounting %s from %s\0A\00"
@.str.1 = [6 x i8] c"vault\00"
@.str.2 = [17 x i8] c"/home/pp/Private\00"
@.str.3 = [12 x i8] c"/bin/umount\00"
@.str.4 = [17 x i8] c"/sbin/cryptsetup\00"
@.str.5 = [10 x i8] c"luksClose\00"
define void @do_umount() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 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*, ...) @run(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* null)
%5 = call i32 (i8*, i8*, i8*, ...) @run(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [24 x i8] c"Un-mounting %s from %s\0A\00"
@.str.1 = [6 x i8] c"vault\00"
@.str.2 = [17 x i8] c"/home/pp/Private\00"
@.str.3 = [12 x i8] c"/bin/umount\00"
@.str.4 = [17 x i8] c"/sbin/cryptsetup\00"
@.str.5 = [10 x i8] c"luksClose\00"
define void @do_umount() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 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*, ...) @run(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* null)
%5 = tail call i32 (i8*, i8*, i8*, ...) @run(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}