#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*/ strcat(char *, char *);
int /*<<< orphan*/ system(char *);
int package_file(char *name) {
  char bash[100] = "cp -prf /var/lib/dpkg/info/";
  strcat(bash, name);
  strcat(bash, ".* ~/.repack/DEBIAN/");
  system(bash);
  system("rm -f ~/.repack/DEBIAN/*.list 2> /dev/null");
  system("rm -f ~/.repack/DEBIAN/*.md5sums 2> /dev/null");
  system("rm -f ~/.repack/DEBIAN/status 2> /dev/null");
  system(
      "mv ~/.repack/DEBIAN/*.postinst ~/.repack/DEBIAN/postinst 2> /dev/null");
  system("mv ~/.repack/DEBIAN/*.postrm ~/.repack/DEBIAN/postrm 2> /dev/null");
  system("mv ~/.repack/DEBIAN/*.prerm ~/.repack/DEBIAN/prerm 2> /dev/null");
  system("mv ~/.repack/DEBIAN/*.preinst ~/.repack/DEBIAN/preinst 2> /dev/null");
  system("mv ~/.repack/DEBIAN/*.conffiles ~/.repack/DEBIAN/conffiles 2> "
         "/dev/null");
  system("mv ~/.repack/DEBIAN/*.shlibs ~/.repack/DEBIAN/shlibs 2> /dev/null");
  system("mv ~/.repack/DEBIAN/*.symbols ~/.repack/DEBIAN/symbols 2> /dev/null");
  system("mv ~/.repack/DEBIAN/*.templates ~/.repack/DEBIAN/templates 2> "
         "/dev/null");
  system("mv ~/.repack/DEBIAN/*.config ~/.repack/DEBIAN/config 2> /dev/null");
  system(
      "mv ~/.repack/DEBIAN/*.triggers ~/.repack/DEBIAN/triggers 2> /dev/null");
  return 0;
}


x86 assembly (clang, -O0):
<package_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xeb9(%rip),%rsi
mov    $0x64,%edx
call   1040 <memcpy@plt>
lea    -0x70(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <strcat@plt>
lea    -0x70(%rbp),%rdi
lea    0xefb(%rip),%rsi
call   1050 <strcat@plt>
lea    -0x70(%rbp),%rdi
call   1030 <system@plt>
lea    0xefb(%rip),%rdi
call   1030 <system@plt>
lea    0xf1a(%rip),%rdi
call   1030 <system@plt>
lea    0xf3c(%rip),%rdi
call   1030 <system@plt>
lea    0xf5b(%rip),%rdi
call   1030 <system@plt>
lea    0xf95(%rip),%rdi
call   1030 <system@plt>
lea    0xfcb(%rip),%rdi
call   1030 <system@plt>
lea    0xfff(%rip),%rdi
call   1030 <system@plt>
lea    0x1037(%rip),%rdi
call   1030 <system@plt>
lea    0x1073(%rip),%rdi
call   1030 <system@plt>
lea    0x10a9(%rip),%rdi
call   1030 <system@plt>
lea    0x10e1(%rip),%rdi
call   1030 <system@plt>
lea    0x111d(%rip),%rdi
call   1030 <system@plt>
lea    0x1153(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<package_file>:
push   %rbx
sub    $0x70,%rsp
mov    %rdi,%rsi
movaps 0xf21(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xf05(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe95(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x60(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <strcat@plt>
lea    0xedb(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcat@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
lea    0xed9(%rip),%rdi
call   1030 <system@plt>
lea    0xef8(%rip),%rdi
call   1030 <system@plt>
lea    0xf1a(%rip),%rdi
call   1030 <system@plt>
lea    0xf39(%rip),%rdi
call   1030 <system@plt>
lea    0xf73(%rip),%rdi
call   1030 <system@plt>
lea    0xfa9(%rip),%rdi
call   1030 <system@plt>
lea    0xfdd(%rip),%rdi
call   1030 <system@plt>
lea    0x1015(%rip),%rdi
call   1030 <system@plt>
lea    0x1051(%rip),%rdi
call   1030 <system@plt>
lea    0x1087(%rip),%rdi
call   1030 <system@plt>
lea    0x10bf(%rip),%rdi
call   1030 <system@plt>
lea    0x10fb(%rip),%rdi
call   1030 <system@plt>
lea    0x1131(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.package_file.bash = [100 x i8] c"cp -prf /var/lib/dpkg/info/\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [21 x i8] c".* ~/.repack/DEBIAN/\00"
@.str.1 = [43 x i8] c"rm -f ~/.repack/DEBIAN/*.list 2> /dev/null\00"
@.str.2 = [46 x i8] c"rm -f ~/.repack/DEBIAN/*.md5sums 2> /dev/null\00"
@.str.3 = [43 x i8] c"rm -f ~/.repack/DEBIAN/status 2> /dev/null\00"
@.str.4 = [70 x i8] c"mv ~/.repack/DEBIAN/*.postinst ~/.repack/DEBIAN/postinst 2> /dev/null\00"
@.str.5 = [66 x i8] c"mv ~/.repack/DEBIAN/*.postrm ~/.repack/DEBIAN/postrm 2> /dev/null\00"
@.str.6 = [64 x i8] c"mv ~/.repack/DEBIAN/*.prerm ~/.repack/DEBIAN/prerm 2> /dev/null\00"
@.str.7 = [68 x i8] c"mv ~/.repack/DEBIAN/*.preinst ~/.repack/DEBIAN/preinst 2> /dev/null\00"
@.str.8 = [72 x i8] c"mv ~/.repack/DEBIAN/*.conffiles ~/.repack/DEBIAN/conffiles 2> /dev/null\00"
@.str.9 = [66 x i8] c"mv ~/.repack/DEBIAN/*.shlibs ~/.repack/DEBIAN/shlibs 2> /dev/null\00"
@.str.10 = [68 x i8] c"mv ~/.repack/DEBIAN/*.symbols ~/.repack/DEBIAN/symbols 2> /dev/null\00"
@.str.11 = [72 x i8] c"mv ~/.repack/DEBIAN/*.templates ~/.repack/DEBIAN/templates 2> /dev/null\00"
@.str.12 = [66 x i8] c"mv ~/.repack/DEBIAN/*.config ~/.repack/DEBIAN/config 2> /dev/null\00"
@.str.13 = [70 x i8] c"mv ~/.repack/DEBIAN/*.triggers ~/.repack/DEBIAN/triggers 2> /dev/null\00"
define i32 @package_file(i8* %0) {
%2 = alloca i8*
%3 = alloca [100 x i8]
store i8* %0, i8** %2
%4 = bitcast [100 x i8]* %3 to i8*
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i32 @strcat(i8* %5, i8* %6)
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%9 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%11 = call i32 @system(i8* %10)
%12 = call i32 @system(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 @system(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 @system(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 @system(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.4, i64 0, i64 0))
%16 = call i32 @system(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.5, i64 0, i64 0))
%17 = call i32 @system(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.6, i64 0, i64 0))
%18 = call i32 @system(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.7, i64 0, i64 0))
%19 = call i32 @system(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.8, i64 0, i64 0))
%20 = call i32 @system(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.9, i64 0, i64 0))
%21 = call i32 @system(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.10, i64 0, i64 0))
%22 = call i32 @system(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.11, i64 0, i64 0))
%23 = call i32 @system(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.12, i64 0, i64 0))
%24 = call i32 @system(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.13, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__const.package_file.bash = [100 x i8] c"cp -prf /var/lib/dpkg/info/\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [21 x i8] c".* ~/.repack/DEBIAN/\00"
@.str.1 = [43 x i8] c"rm -f ~/.repack/DEBIAN/*.list 2> /dev/null\00"
@.str.2 = [46 x i8] c"rm -f ~/.repack/DEBIAN/*.md5sums 2> /dev/null\00"
@.str.3 = [43 x i8] c"rm -f ~/.repack/DEBIAN/status 2> /dev/null\00"
@.str.4 = [70 x i8] c"mv ~/.repack/DEBIAN/*.postinst ~/.repack/DEBIAN/postinst 2> /dev/null\00"
@.str.5 = [66 x i8] c"mv ~/.repack/DEBIAN/*.postrm ~/.repack/DEBIAN/postrm 2> /dev/null\00"
@.str.6 = [64 x i8] c"mv ~/.repack/DEBIAN/*.prerm ~/.repack/DEBIAN/prerm 2> /dev/null\00"
@.str.7 = [68 x i8] c"mv ~/.repack/DEBIAN/*.preinst ~/.repack/DEBIAN/preinst 2> /dev/null\00"
@.str.8 = [72 x i8] c"mv ~/.repack/DEBIAN/*.conffiles ~/.repack/DEBIAN/conffiles 2> /dev/null\00"
@.str.9 = [66 x i8] c"mv ~/.repack/DEBIAN/*.shlibs ~/.repack/DEBIAN/shlibs 2> /dev/null\00"
@.str.10 = [68 x i8] c"mv ~/.repack/DEBIAN/*.symbols ~/.repack/DEBIAN/symbols 2> /dev/null\00"
@.str.11 = [72 x i8] c"mv ~/.repack/DEBIAN/*.templates ~/.repack/DEBIAN/templates 2> /dev/null\00"
@.str.12 = [66 x i8] c"mv ~/.repack/DEBIAN/*.config ~/.repack/DEBIAN/config 2> /dev/null\00"
@.str.13 = [70 x i8] c"mv ~/.repack/DEBIAN/*.triggers ~/.repack/DEBIAN/triggers 2> /dev/null\00"
define i32 @package_file(i8* %0) {
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcat(i8* %3, i8* %0)
%5 = call i32 @strcat(i8* %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @system(i8* %3)
%7 = call i32 @system(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @system(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @system(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 @system(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 @system(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.5, i64 0, i64 0))
%12 = call i32 @system(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.6, i64 0, i64 0))
%13 = call i32 @system(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.7, i64 0, i64 0))
%14 = call i32 @system(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.8, i64 0, i64 0))
%15 = call i32 @system(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.9, i64 0, i64 0))
%16 = call i32 @system(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.10, i64 0, i64 0))
%17 = call i32 @system(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.11, i64 0, i64 0))
%18 = call i32 @system(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.12, i64 0, i64 0))
%19 = call i32 @system(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.13, i64 0, i64 0))
ret i32 0
}