#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*/ execl(char *, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ msgbox(char *, char *);
int /*<<< orphan*/ partEditor();
int /*<<< orphan*/ partFlush();
int /*<<< orphan*/ partUnmount();
int /*<<< orphan*/ pkgInstall();
int /*<<< orphan*/ pkgSelection();
int /*<<< orphan*/ promptUserInfo();
int /*<<< orphan*/ userSetup();
void doInstall() {
  partEditor();
  promptUserInfo();
  pkgSelection();
  partFlush();
  userSetup();
  pkgInstall();
  partUnmount();
  msgbox("COMPLETED", "Glidix has been installed. Press ENTER to reboot");
  execl("/usr/bin/halt", "reboot", NULL);
  exit(1);
}


x86 assembly (clang, -O0):
<doInstall>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <partEditor@plt>
mov    $0x0,%al
call   1030 <promptUserInfo@plt>
mov    $0x0,%al
call   1060 <pkgSelection@plt>
mov    $0x0,%al
call   10a0 <partFlush@plt>
mov    $0x0,%al
call   1070 <userSetup@plt>
mov    $0x0,%al
call   1050 <pkgInstall@plt>
mov    $0x0,%al
call   1080 <partUnmount@plt>
lea    0xe24(%rip),%rdi
lea    0xe27(%rip),%rsi
call   1090 <msgbox@plt>
lea    0xe4c(%rip),%rdi
lea    0xe3e(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   10c0 <execl@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>

x86 assembly (clang, -O2):
<doInstall>:
push   %rax
xor    %eax,%eax
call   1040 <partEditor@plt>
xor    %eax,%eax
call   1030 <promptUserInfo@plt>
xor    %eax,%eax
call   1060 <pkgSelection@plt>
xor    %eax,%eax
call   10a0 <partFlush@plt>
xor    %eax,%eax
call   1070 <userSetup@plt>
xor    %eax,%eax
call   1050 <pkgInstall@plt>
xor    %eax,%eax
call   1080 <partUnmount@plt>
lea    0xe27(%rip),%rdi
lea    0xe2a(%rip),%rsi
call   1090 <msgbox@plt>
lea    0xe4f(%rip),%rdi
lea    0xe41(%rip),%rsi
xor    %edx,%edx
call   10c0 <execl@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"COMPLETED\00"
@.str.1 = [49 x i8] c"Glidix has been installed. Press ENTER to reboot\00"
@.str.2 = [14 x i8] c"/usr/bin/halt\00"
@.str.3 = [7 x i8] c"reboot\00"
define void @doInstall() {
%1 = call i32 (...) @partEditor()
%2 = call i32 (...) @promptUserInfo()
%3 = call i32 (...) @pkgSelection()
%4 = call i32 (...) @partFlush()
%5 = call i32 (...) @userSetup()
%6 = call i32 (...) @pkgInstall()
%7 = call i32 (...) @partUnmount()
%8 = call i32 @msgbox(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @execl(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32* null)
%10 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [10 x i8] c"COMPLETED\00"
@.str.1 = [49 x i8] c"Glidix has been installed. Press ENTER to reboot\00"
@.str.2 = [14 x i8] c"/usr/bin/halt\00"
@.str.3 = [7 x i8] c"reboot\00"
define void @doInstall() {
%1 = tail call i32 (...) @partEditor()
%2 = tail call i32 (...) @promptUserInfo()
%3 = tail call i32 (...) @pkgSelection()
%4 = tail call i32 (...) @partFlush()
%5 = tail call i32 (...) @userSetup()
%6 = tail call i32 (...) @pkgInstall()
%7 = tail call i32 (...) @partUnmount()
%8 = tail call i32 @msgbox(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32 @execl(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32* null)
%10 = tail call i32 @exit(i32 1)
unreachable
}