#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 */
typedef int /*<<< orphan*/ argv_mbox;

/* Variables and functions */
int main_mbox(int, char **);
int prepare_mbox() {
  char *argv_mbox[] = {"hypermail", "-m", "/dev/input", "-d", "temp_dir"};
  int argc_mbox = sizeof(argv_mbox) / sizeof(char *);
  return main_mbox(argc_mbox, argv_mbox);
}


x86 assembly (clang, -O0):
<prepare_mbox>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
lea    0xec1(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xec0(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xeb8(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xeb8(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xeb0(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x5,-0x34(%rbp)
mov    -0x34(%rbp),%edi
lea    -0x30(%rbp),%rsi
call   1040 <main_mbox@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prepare_mbox>:
sub    $0x28,%rsp
lea    0xee5(%rip),%rax
mov    %rax,(%rsp)
lea    0xee4(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0xedb(%rip),%rax
mov    %rax,0x10(%rsp)
lea    0xeda(%rip),%rax
mov    %rax,0x18(%rsp)
lea    0xed1(%rip),%rax
mov    %rax,0x20(%rsp)
mov    %rsp,%rsi
mov    $0x5,%edi
call   1030 <main_mbox@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"hypermail\00"
@.str.1 = [3 x i8] c"-m\00"
@.str.2 = [11 x i8] c"/dev/input\00"
@.str.3 = [3 x i8] c"-d\00"
@.str.4 = [9 x i8] c"temp_dir\00"
define i32 @prepare_mbox() {
%1 = alloca [5 x i8*]
%2 = alloca i32
%3 = bitcast [5 x i8*]* %1 to i8*
%4 = bitcast i8* %3 to [5 x i8*]*
%5 = getelementptr inbounds [5 x i8*], [5 x i8*]* %4, i32 0, i32 0
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i32 0, i32 0), i8** %5
%6 = getelementptr inbounds [5 x i8*], [5 x i8*]* %4, i32 0, i32 1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i32 0, i32 0), i8** %6
%7 = getelementptr inbounds [5 x i8*], [5 x i8*]* %4, i32 0, i32 2
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i32 0, i32 0), i8** %7
%8 = getelementptr inbounds [5 x i8*], [5 x i8*]* %4, i32 0, i32 3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i32 0, i32 0), i8** %8
%9 = getelementptr inbounds [5 x i8*], [5 x i8*]* %4, i32 0, i32 4
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i32 0, i32 0), i8** %9
store i32 5, i32* %2
%10 = load i32, i32* %2
%11 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 0
%12 = call i32 @main_mbox(i32 %10, i8** %11)
ret i32 %12
}

LLVM IR (-O2):
@.str = [10 x i8] c"hypermail\00"
@.str.1 = [3 x i8] c"-m\00"
@.str.2 = [11 x i8] c"/dev/input\00"
@.str.3 = [3 x i8] c"-d\00"
@.str.4 = [9 x i8] c"temp_dir\00"
define i32 @prepare_mbox() {
%1 = alloca [5 x i8*]
%2 = bitcast [5 x i8*]* %1 to i8*
%3 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 0
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 2
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 4
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8** %7
%8 = call i32 @main_mbox(i32 5, i8** %3)
ret i32 %8
}