#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*/ printf(char *, char *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ system(char *);
int install_to_fakeroot(char *fakeroot) {
  char install_cmd[4096];
  strcat(install_cmd, "make DESTDIR=");
  strcat(install_cmd, fakeroot);
  strcat(install_cmd, " install");
  printf("INSTALL CMD: %s\n", install_cmd);
  system(install_cmd);
  return 0;
}


x86 assembly (clang, -O0):
<install_to_fakeroot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1010,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x1010(%rbp),%rdi
lea    0xeb3(%rip),%rsi
call   1050 <strcat@plt>
lea    -0x1010(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <strcat@plt>
lea    -0x1010(%rbp),%rdi
lea    0xe9e(%rip),%rsi
call   1050 <strcat@plt>
lea    -0x1010(%rbp),%rsi
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
lea    -0x1010(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x1010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<install_to_fakeroot>:
push   %r14
push   %rbx
sub    $0x1008,%rsp
mov    %rdi,%r14
lea    0xebc(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <strcat@plt>
lea    0xead(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcat@plt>
lea    0xea7(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x1008,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"make DESTDIR=\00"
@.str.1 = [9 x i8] c" install\00"
@.str.2 = [17 x i8] c"INSTALL CMD: %s\0A\00"
define i32 @install_to_fakeroot(i8* %0) {
%2 = alloca i8*
%3 = alloca [4096 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcat(i8* %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%7 = load i8*, i8** %2
%8 = call i32 @strcat(i8* %6, i8* %7)
%9 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%10 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%11 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %11)
%13 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%14 = call i32 @system(i8* %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"make DESTDIR=\00"
@.str.1 = [9 x i8] c" install\00"
@.str.2 = [17 x i8] c"INSTALL CMD: %s\0A\00"
define i32 @install_to_fakeroot(i8* %0) {
%2 = alloca [4096 x i8]
%3 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcat(i8* %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @strcat(i8* %3, i8* %0)
%6 = call i32 @strcat(i8* %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%8 = call i32 @system(i8* %3)
ret i32 0
}