xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ getpid();
scalar_t__ getppid();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("The process ID of mine is %d.\n", (int)getpid());
  printf("The process ID of my parent is %d.\n", (int)getppid());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getppid@plt>
mov    %eax,%esi
lea    0xebb(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getppid@plt>
lea    0xecb(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"The process ID of mine is %d.\0A\00"
@.str.1 = [36 x i8] c"The process ID of my parent is %d.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @getpid()
%3 = trunc i64 %2 to i32
%4 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i64 (...) @getppid()
%6 = trunc i64 %5 to i32
%7 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"The process ID of mine is %d.\0A\00"
@.str.1 = [36 x i8] c"The process ID of my parent is %d.\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @getpid()
%2 = trunc i64 %1 to i32
%3 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i64 (...) @getppid()
%5 = trunc i64 %4 to i32
%6 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
void ctl_volume(int channel, int val) {}


x86 assembly (clang, -O0):
<ctl_volume>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctl_volume>:
ret

LLVM IR (-O0):
define void @ctl_volume(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @ctl_volume(i32 %0, i32 %1) {
ret void
}
void gtk_menu_bar_get_type() {}


x86 assembly (clang, -O0):
<gtk_menu_bar_get_type>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtk_menu_bar_get_type>:
ret

LLVM IR (-O0):
define void @gtk_menu_bar_get_type() {
ret void
}

LLVM IR (-O2):
define void @gtk_menu_bar_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalpha(int);
void t_isalpha_0x51() {
  Assert_real((isalpha(81)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              410, ("isalpha should be 1 for Q"));
}


x86 assembly (clang, -O0):
<t_isalpha_0x51>:
push   %rbp
mov    %rsp,%rbp
mov    $0x51,%edi
call   1030 <isalpha@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x19a,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalpha_0x51>:
push   %rax
mov    $0x51,%edi
call   1030 <isalpha@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x19a,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 1 for Q\00"
define void @t_isalpha_0x51() {
%1 = call i32 @isalpha(i32 81)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 410, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 1 for Q\00"
define void @t_isalpha_0x51() {
%1 = tail call i32 @isalpha(i32 81)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 410, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *name) {
  printf("usage %s [options] \n"
         "-h\t\tthis text you see right here\n"
         "-V\t\tPrint version and exit.\n"
         "-D <dns>\tUse nameserver <dns> for host lookup.\n"
         "-H Add xstat histogram data to flow file.(default 'no')\n"
         "-M <expr>\tRead input from multiple directories.\n"
         "-r\t\tread input from file\n"
         "-f\t\tfilename with filter syntaxfile\n"
         "-p\t\tprofile data dir.\n"
         "-P\t\tprofile stat dir.\n"
         "-s\t\tprofile subdir.\n"
         "-Z\t\tCheck filter syntax and exit.\n"
         "-S subdir\tSub directory format. see nfcapd(1) for format\n"
         "-z\t\tCompress flows in output file.\n"
         "-t <time>\ttime for RRD update\n",
         name);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [514 x i8] c"usage %s [options] \0A-h\09\09this text you see right here\0A-V\09\09Print version and exit.\0A-D <dns>\09Use nameserver <dns> for host lookup.\0A-H Add xstat histogram data to flow file.(default 'no')\0A-M <expr>\09Read input from multiple directories.\0A-r\09\09read input from file\0A-f\09\09filename with filter syntaxfile\0A-p\09\09profile data dir.\0A-P\09\09profile stat dir.\0A-s\09\09profile subdir.\0A-Z\09\09Check filter syntax and exit.\0A-S subdir\09Sub directory format. see nfcapd(1) for format\0A-z\09\09Compress flows in output file.\0A-t <time>\09time for RRD update\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([514 x i8], [514 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [514 x i8] c"usage %s [options] \0A-h\09\09this text you see right here\0A-V\09\09Print version and exit.\0A-D <dns>\09Use nameserver <dns> for host lookup.\0A-H Add xstat histogram data to flow file.(default 'no')\0A-M <expr>\09Read input from multiple directories.\0A-r\09\09read input from file\0A-f\09\09filename with filter syntaxfile\0A-p\09\09profile data dir.\0A-P\09\09profile stat dir.\0A-s\09\09profile subdir.\0A-Z\09\09Check filter syntax and exit.\0A-S subdir\09Sub directory format. see nfcapd(1) for format\0A-z\09\09Compress flows in output file.\0A-t <time>\09time for RRD update\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([514 x i8], [514 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int gethostname(char *, int);
int tosNet_getHostName(char *pszName, int cbName) {
  int res;
  res = gethostname(pszName, cbName);
  return res;
}


x86 assembly (clang, -O0):
<tosNet_getHostName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <gethostname@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tosNet_getHostName>:
jmp    1030 <gethostname@plt>

LLVM IR (-O0):
define i32 @tosNet_getHostName(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @gethostname(i8* %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @tosNet_getHostName(i8* %0, i32 %1) {
%3 = tail call i32 @gethostname(i8* %0, i32 %1)
ret i32 %3
}
/* Type definitions */
typedef short uint64_t;

/* Variables and functions */
uint64_t get_bits(short lobit, short hibit, uint64_t mask) {
  short num_bits = hibit - lobit + 1;
  uint64_t ones_mask = (1ll << (num_bits)) - 1;
  return ((mask >> lobit) & ones_mask);
}


x86 assembly (clang, -O0):
<get_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %dx,%ax
mov    %si,%cx
mov    %di,%dx
mov    %dx,-0x2(%rbp)
mov    %cx,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
movswl -0x4(%rbp),%eax
movswl -0x2(%rbp),%ecx
sub    %ecx,%eax
add    $0x1,%eax
mov    %ax,-0x8(%rbp)
movswl -0x8(%rbp),%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
sub    $0x1,%rax
mov    %ax,-0xa(%rbp)
movswl -0x6(%rbp),%eax
movswl -0x2(%rbp),%ecx
sar    %cl,%eax
movswl -0xa(%rbp),%ecx
and    %ecx,%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bits>:
sub    %edi,%esi
lea    0x1(%rsi),%ecx
mov    $0xffffffffffffffff,%rax
shl    %cl,%rax
mov    %edi,%ecx
sar    %cl,%edx
not    %eax
and    %edx,%eax
ret

LLVM IR (-O0):
define signext i16 @get_bits(i16 signext %0, i16 signext %1, i16 signext %2) {
%4 = alloca i16
%5 = alloca i16
%6 = alloca i16
%7 = alloca i16
%8 = alloca i16
store i16 %0, i16* %4
store i16 %1, i16* %5
store i16 %2, i16* %6
%9 = load i16, i16* %5
%10 = sext i16 %9 to i32
%11 = load i16, i16* %4
%12 = sext i16 %11 to i32
%13 = sub nsw i32 %10, %12
%14 = add nsw i32 %13, 1
%15 = trunc i32 %14 to i16
store i16 %15, i16* %7
%16 = load i16, i16* %7
%17 = sext i16 %16 to i32
%18 = zext i32 %17 to i64
%19 = shl i64 1, %18
%20 = sub nsw i64 %19, 1
%21 = trunc i64 %20 to i16
store i16 %21, i16* %8
%22 = load i16, i16* %6
%23 = sext i16 %22 to i32
%24 = load i16, i16* %4
%25 = sext i16 %24 to i32
%26 = ashr i32 %23, %25
%27 = load i16, i16* %8
%28 = sext i16 %27 to i32
%29 = and i32 %26, %28
%30 = trunc i32 %29 to i16
ret i16 %30
}

LLVM IR (-O2):
define signext i16 @get_bits(i16 signext %0, i16 signext %1, i16 signext %2) {
%4 = sub i16 1, %0
%5 = add i16 %4, %1
%6 = sext i16 %5 to i64
%7 = and i64 %6, 4294967295
%8 = shl nsw i64 -1, %7
%9 = trunc i64 %8 to i32
%10 = sext i16 %2 to i32
%11 = zext i16 %0 to i32
%12 = ashr i32 %10, %11
%13 = xor i32 %9, -1
%14 = and i32 %12, %13
%15 = trunc i32 %14 to i16
ret i16 %15
}
int findmax(int a, int b) { return (a > b) ? a : b; }


x86 assembly (clang, -O0):
<findmax>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <findmax+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <findmax+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<findmax>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @findmax(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @findmax(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
void writeq(unsigned int b, volatile void *addr) {
  *(volatile unsigned long long *)addr = b;
}


x86 assembly (clang, -O0):
<writeq>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeq>:
mov    %edi,%eax
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @writeq(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = zext i32 %5 to i64
%7 = load i8*, i8** %4
%8 = bitcast i8* %7 to i64*
store volatile i64 %6, i64* %8
ret void
}

LLVM IR (-O2):
define void @writeq(i32 %0, i8* %1) {
%3 = zext i32 %0 to i64
%4 = bitcast i8* %1 to i64*
store volatile i64 %3, i64* %4
ret void
}
/* Variables and functions */
unsigned int vabsdiffs4(unsigned int, unsigned int);
unsigned int vsads4(unsigned int a, unsigned int b) {
  unsigned int r, s;
  r = vabsdiffs4(a, b);
  s = r >> 8;
  r = (r & 0x00ff00ff) + (s & 0x00ff00ff);
  r = ((r << 16) + r) >> 16;
  return r;
}


x86 assembly (clang, -O0):
<vsads4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <vabsdiffs4@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff00ff,%eax
mov    -0x10(%rbp),%ecx
and    $0xff00ff,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x10,%eax
add    -0xc(%rbp),%eax
shr    $0x10,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vsads4>:
push   %rax
call   1030 <vabsdiffs4@plt>
mov    %eax,%ecx
shr    $0x8,%ecx
and    $0xff00ff,%eax
and    $0xff00ff,%ecx
add    %ecx,%eax
mov    %eax,%ecx
shl    $0x10,%ecx
add    %ecx,%eax
shr    $0x10,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @vsads4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @vabsdiffs4(i32 %7, i32 %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = lshr i32 %10, 8
store i32 %11, i32* %6
%12 = load i32, i32* %5
%13 = and i32 %12, 16711935
%14 = load i32, i32* %6
%15 = and i32 %14, 16711935
%16 = add i32 %13, %15
store i32 %16, i32* %5
%17 = load i32, i32* %5
%18 = shl i32 %17, 16
%19 = load i32, i32* %5
%20 = add i32 %18, %19
%21 = lshr i32 %20, 16
store i32 %21, i32* %5
%22 = load i32, i32* %5
ret i32 %22
}

LLVM IR (-O2):
define i32 @vsads4(i32 %0, i32 %1) {
%3 = tail call i32 @vabsdiffs4(i32 %0, i32 %1)
%4 = lshr i32 %3, 8
%5 = and i32 %3, 16711935
%6 = and i32 %4, 16711935
%7 = add nuw nsw i32 %6, %5
%8 = mul i32 %7, 65537
%9 = lshr i32 %8, 16
ret i32 %9
}
/* Variables and functions */
void *__memrchr(const void *m, int c, size_t n) {
  const unsigned char *s = m;
  c = (unsigned char)c;
  while (n--)
    if (s[n] == c)
      return (void *)(s + n);
  return 0;
}


x86 assembly (clang, -O0):
<__memrchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x20(%rbp)
cmp    $0x0,%rax
je     1164 <__memrchr+0x64>
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    -0x14(%rbp),%eax
jne    115f <__memrchr+0x5f>
mov    -0x28(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116c <__memrchr+0x6c>
jmp    1120 <__memrchr+0x20>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__memrchr>:
xor    %eax,%eax
mov    %rdx,%rcx
cs nopw 0x0(%rax,%rax,1)
nop
sub    $0x1,%rcx
jb     1126 <__memrchr+0x26>
cmp    %sil,-0x1(%rdi,%rdx,1)
mov    %rcx,%rdx
jne    1110 <__memrchr+0x10>
add    %rcx,%rdi
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i8* @__memrchr(i8* %0, i32 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i64
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i64 %2, i64* %7
%9 = load i8*, i8** %5
store i8* %9, i8** %8
%10 = load i32, i32* %6
%11 = trunc i32 %10 to i8
%12 = zext i8 %11 to i32
store i32 %12, i32* %6
br label %13
13: ; preds = %29, %3
%14 = load i64, i64* %7
%15 = add i64 %14, -1
store i64 %15, i64* %7
%16 = icmp ne i64 %14, 0
br i1 %16, label %17, label %30
17: ; preds = %13
%18 = load i8*, i8** %8
%19 = load i64, i64* %7
%20 = getelementptr inbounds i8, i8* %18, i64 %19
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = load i32, i32* %6
%24 = icmp eq i32 %22, %23
br i1 %24, label %25, label %29
25: ; preds = %17
%26 = load i8*, i8** %8
%27 = load i64, i64* %7
%28 = getelementptr inbounds i8, i8* %26, i64 %27
store i8* %28, i8** %4
br label %31
29: ; preds = %17
br label %13
30: ; preds = %13
store i8* null, i8** %4
br label %31
31: ; preds = %30, %25
%32 = load i8*, i8** %4
ret i8* %32
}

LLVM IR (-O2):
define i8* @__memrchr(i8* %0, i32 %1, i64 %2) {
%4 = trunc i32 %1 to i8
br label %5
5: ; preds = %9, %3
%6 = phi i64 [ %2, %3 ], [ %7, %9 ]
%7 = add i64 %6, -1
%8 = icmp eq i64 %6, 0
br i1 %8, label %15, label %9
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %0, i64 %7
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, %4
br i1 %12, label %13, label %5
13: ; preds = %9
%14 = getelementptr inbounds i8, i8* %0, i64 %7
br label %15
15: ; preds = %5, %13
%16 = phi i8* [ %14, %13 ], [ null, %5 ]
ret i8* %16
}
void nonzeroMemseti64() {
  unsigned long long arr[7] = {
      0xAAAAAAAAAAAAAAAA, 0xAAAAAAAAAAAAAAAA, 0xAAAAAAAAAAAAAAAA,
      0xAAAAAAAAAAAAAAAA, 0xAAAAAAAAAAAAAAAA, 0xAAAAAAAAAAAAAAAA,
      0xAAAAAAAAAAAAAAAA,
  };
}


x86 assembly (clang, -O0):
<nonzeroMemseti64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x40(%rbp),%rdi
mov    $0xaa,%esi
mov    $0x38,%edx
call   1030 <memset@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nonzeroMemseti64>:
ret

LLVM IR (-O0):
define void @nonzeroMemseti64() {
%1 = alloca [7 x i64]
%2 = bitcast [7 x i64]* %1 to i8*
ret void
}

LLVM IR (-O2):
define void @nonzeroMemseti64() {
ret void
}
/* Variables and functions */
long strtoul(char *, char **, int);
long int t23(char **x) { return strtoul("1234", x, 10); }


x86 assembly (clang, -O0):
<t23>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0xa,%edx
call   1030 <strtoul@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t23>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
mov    $0xa,%edx
jmp    1030 <strtoul@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"1234\00"
define i64 @t23(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = call i64 @strtoul(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %3, i32 10)
ret i64 %4
}

LLVM IR (-O2):
@.str = [5 x i8] c"1234\00"
define i64 @t23(i8** nocapture %0) {
%2 = tail call i64 @strtoul(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %0, i32 10)
ret i64 %2
}
/* Variables and functions */
int split(int *, int, int);
void quicksort(int a[], int low, int high) {
  int middle;
  if (low >= high) {
    return;
  }
  middle = split(a, low, high);
  quicksort(a, low, middle - 1);
  quicksort(a, middle + 1, high);
}


x86 assembly (clang, -O0):
<quicksort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1143 <quicksort+0x23>
jmp    1179 <quicksort+0x59>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <split@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1030 <quicksort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1030 <quicksort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicksort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1166 <quicksort+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1040 <split@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1030 <quicksort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <quicksort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @quicksort(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp sge i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %3
br label %25
12: ; preds = %3
%13 = load i32*, i32** %4
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = call i32 @split(i32* %13, i32 %14, i32 %15)
store i32 %16, i32* %7
%17 = load i32*, i32** %4
%18 = load i32, i32* %5
%19 = load i32, i32* %7
%20 = sub nsw i32 %19, 1
%21 = load i32*, i32** %4
%22 = load i32, i32* %7
%23 = add nsw i32 %22, 1
%24 = load i32, i32* %6
br label %25
25: ; preds = %12, %11
ret void
}

LLVM IR (-O2):
define void @quicksort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @split(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @quicksort(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
int getRep(char c) {
  switch (c) {
  case 'I':
    return 1;
  case 'V':
    return 5;
  case 'X':
    return 10;
  case 'L':
    return 50;
  case 'C':
    return 100;
  case 'D':
    return 500;
  case 'M':
    return 1000;
  }
}


x86 assembly (clang, -O0):
<getRep>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffbd,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x15,%eax
ja     1183 <getRep+0x83>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    1183 <getRep+0x83>
movl   $0x5,-0x4(%rbp)
jmp    1183 <getRep+0x83>
movl   $0xa,-0x4(%rbp)
jmp    1183 <getRep+0x83>
movl   $0x32,-0x4(%rbp)
jmp    1183 <getRep+0x83>
movl   $0x64,-0x4(%rbp)
jmp    1183 <getRep+0x83>
movl   $0x1f4,-0x4(%rbp)
jmp    1183 <getRep+0x83>
movl   $0x3e8,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getRep>:
mov    $0x1,%eax
add    $0xffffffbd,%edi
cmp    $0x15,%edi
ja     1134 <getRep+0x34>
lea    0xeec(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x64,%eax
ret
mov    $0x1f4,%eax
ret
mov    $0x32,%eax
ret
mov    $0x3e8,%eax
ret
mov    $0x5,%eax
ret
mov    $0xa,%eax
ret

LLVM IR (-O0):
define i32 @getRep(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %13 [
i32 73, label %6
i32 86, label %7
i32 88, label %8
i32 76, label %9
i32 67, label %10
i32 68, label %11
i32 77, label %12
]
6: ; preds = %1
store i32 1, i32* %2
br label %13
7: ; preds = %1
store i32 5, i32* %2
br label %13
8: ; preds = %1
store i32 10, i32* %2
br label %13
9: ; preds = %1
store i32 50, i32* %2
br label %13
10: ; preds = %1
store i32 100, i32* %2
br label %13
11: ; preds = %1
store i32 500, i32* %2
br label %13
12: ; preds = %1
store i32 1000, i32* %2
br label %13
13: ; preds = %6, %7, %8, %9, %10, %11, %12, %1
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @getRep(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %9 [
i32 77, label %8
i32 86, label %3
i32 88, label %4
i32 76, label %5
i32 67, label %6
i32 68, label %7
]
3: ; preds = %1
br label %9
4: ; preds = %1
br label %9
5: ; preds = %1
br label %9
6: ; preds = %1
br label %9
7: ; preds = %1
br label %9
8: ; preds = %1
br label %9
9: ; preds = %3, %4, %5, %6, %7, %8, %1
%10 = phi i32 [ 1000, %8 ], [ 500, %7 ], [ 100, %6 ], [ 50, %5 ], [ 10, %4 ], [ 5, %3 ], [ 1, %1 ]
ret i32 %10
}
void sput(s) char *s;
{
  while (*s != '\0')
    put(*s++);
}


x86 assembly (clang, -O0):
<sput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114a <sput+0x3a>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
mov    $0x0,%al
call   1030 <put@plt>
jmp    111c <sput+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sput>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1135 <sput+0x25>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
xor    %eax,%eax
call   1030 <put@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <sput+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @sput(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
%11 = load i8, i8* %9
%12 = sext i8 %11 to i32
%13 = call i32 (i32, ...) bitcast (i32 (...)* @put to i32 (i32, ...)*)(i32 %12)
br label %3
14: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @sput(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @put to i32 (i32, ...)*)(i32 %7)
%10 = load i8, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dense();
int /*<<< orphan*/ linked();
int /*<<< orphan*/ malloc_ptr();
int /*<<< orphan*/ pad_struct();
int /*<<< orphan*/ padded();
int /*<<< orphan*/ padded3();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ self_ptr();
int /*<<< orphan*/ sleep(int);
int main(int argc, char **argv) {
  sleep(1);
  printf("DONE SLEEPING\n");
  dense();
  padded();
  padded3();
  pad_struct();
  self_ptr();
  malloc_ptr();
  linked();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
call   10b0 <sleep@plt>
lea    0xe49(%rip),%rdi
call   1070 <printf@plt>
mov    $0x0,%al
call   10a0 <dense@plt>
mov    $0x0,%al
call   1060 <padded@plt>
mov    $0x0,%al
call   1090 <padded3@plt>
mov    $0x0,%al
call   1040 <pad_struct@plt>
mov    $0x0,%al
call   1050 <self_ptr@plt>
mov    $0x0,%al
call   1030 <malloc_ptr@plt>
mov    $0x0,%al
call   1080 <linked@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   10b0 <sleep@plt>
lea    0xe5e(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   10a0 <dense@plt>
xor    %eax,%eax
call   1070 <padded@plt>
xor    %eax,%eax
call   1090 <padded3@plt>
xor    %eax,%eax
call   1050 <pad_struct@plt>
xor    %eax,%eax
call   1060 <self_ptr@plt>
xor    %eax,%eax
call   1030 <malloc_ptr@plt>
xor    %eax,%eax
call   1080 <linked@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"DONE SLEEPING\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @sleep(i32 1)
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (...) @dense()
%9 = call i32 (...) @padded()
%10 = call i32 (...) @padded3()
%11 = call i32 (...) @pad_struct()
%12 = call i32 (...) @self_ptr()
%13 = call i32 (...) @malloc_ptr()
%14 = call i32 (...) @linked()
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"DONE SLEEPING\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @sleep(i32 1)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (...) @dense()
%6 = tail call i32 (...) @padded()
%7 = tail call i32 (...) @padded3()
%8 = tail call i32 (...) @pad_struct()
%9 = tail call i32 (...) @self_ptr()
%10 = tail call i32 (...) @malloc_ptr()
%11 = tail call i32 (...) @linked()
ret i32 0
}
int test_imm_AEuint16_mem(unsigned short *val) {
  return ((*val) & (-0xAE << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_AEuint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffff52,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_AEuint16_mem>:
movzwl (%rdi),%eax
test   $0xff52,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_AEuint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -174
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_AEuint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -174
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ print_message(char *);
void teardown_fixture() { print_message("\n\n"); }


x86 assembly (clang, -O0):
<teardown_fixture>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <print_message@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<teardown_fixture>:
lea    0xee9(%rip),%rdi
jmp    1030 <print_message@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"\0A\0A\00"
define void @teardown_fixture() {
%1 = call i32 @print_message(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"\0A\0A\00"
define void @teardown_fixture() {
%1 = tail call i32 @print_message(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
void elf_header_get_imports(char *binaryName) {}


x86 assembly (clang, -O0):
<elf_header_get_imports>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<elf_header_get_imports>:
ret

LLVM IR (-O0):
define void @elf_header_get_imports(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @elf_header_get_imports(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, size_t);
void cli_print_size(size_t size) { printf("%zu", size); }


x86 assembly (clang, -O0):
<cli_print_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cli_print_size>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%zu\00"
define void @cli_print_size(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %3)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%zu\00"
define void @cli_print_size(i64 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %0)
ret void
}
/* Variables and functions */
char *strrchr(char *, char);
char *split_path(char *path) {
  char *dividor = strrchr(path, '/');
  *dividor = '\0';
  return dividor + 1;
}


x86 assembly (clang, -O0):
<split_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<split_path>:
push   %rax
mov    $0x2f,%esi
call   1030 <strrchr@plt>
movb   $0x0,(%rax)
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @split_path(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 47)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
store i8 0, i8* %6
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 1
ret i8* %8
}

LLVM IR (-O2):
define i8* @split_path(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
store i8 0, i8* %2
%3 = getelementptr inbounds i8, i8* %2, i64 1
ret i8* %3
}
int ptArrayIx(void *pt, void *array, int arraySize) {
  int i;
  void **a = array;
  for (i = 0; i < arraySize; ++i) {
    if (pt == a[i])
      return i;
  }
  return -1;
}


x86 assembly (clang, -O0):
<ptArrayIx>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    115e <ptArrayIx+0x5e>
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%rcx
movslq -0x20(%rbp),%rdx
cmp    (%rcx,%rdx,8),%rax
jne    114b <ptArrayIx+0x4b>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1165 <ptArrayIx+0x65>
jmp    1150 <ptArrayIx+0x50>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    111e <ptArrayIx+0x1e>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptArrayIx>:
mov    $0xffffffff,%eax
test   %edx,%edx
jle    111f <ptArrayIx+0x1f>
mov    %edx,%edx
xor    %ecx,%ecx
nopl   (%rax)
cmp    %rdi,(%rsi,%rcx,8)
je     1120 <ptArrayIx+0x20>
add    $0x1,%rcx
cmp    %rcx,%rdx
jne    1110 <ptArrayIx+0x10>
ret
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ptArrayIx(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8**
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%10 = load i8*, i8** %6
%11 = bitcast i8* %10 to i8**
store i8** %11, i8*** %9
store i32 0, i32* %8
br label %12
12: ; preds = %27, %3
%13 = load i32, i32* %8
%14 = load i32, i32* %7
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %30
16: ; preds = %12
%17 = load i8*, i8** %5
%18 = load i8**, i8*** %9
%19 = load i32, i32* %8
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8*, i8** %18, i64 %20
%22 = load i8*, i8** %21
%23 = icmp eq i8* %17, %22
br i1 %23, label %24, label %26
24: ; preds = %16
%25 = load i32, i32* %8
store i32 %25, i32* %4
br label %31
26: ; preds = %16
br label %27
27: ; preds = %26
%28 = load i32, i32* %8
%29 = add nsw i32 %28, 1
store i32 %29, i32* %8
br label %12
30: ; preds = %12
store i32 -1, i32* %4
br label %31
31: ; preds = %30, %24
%32 = load i32, i32* %4
ret i32 %32
}

LLVM IR (-O2):
define i32 @ptArrayIx(i8* readnone %0, i8* nocapture %1, i32 %2) {
%4 = bitcast i8* %1 to i8**
%5 = icmp sgt i32 %2, 0
br i1 %5, label %6, label %18
6: ; preds = %3
%7 = zext i32 %2 to i64
br label %8
8: ; preds = %6, %13
%9 = phi i64 [ 0, %6 ], [ %14, %13 ]
%10 = getelementptr inbounds i8*, i8** %4, i64 %9
%11 = load i8*, i8** %10
%12 = icmp eq i8* %11, %0
br i1 %12, label %16, label %13
13: ; preds = %8
%14 = add nuw nsw i64 %9, 1
%15 = icmp eq i64 %14, %7
br i1 %15, label %18, label %8
16: ; preds = %8
%17 = trunc i64 %9 to i32
br label %18
18: ; preds = %13, %16, %3
%19 = phi i32 [ -1, %3 ], [ %17, %16 ], [ -1, %13 ]
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help(void) { printf("This is help text.\n"); }


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"This is help text.\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [19 x i8] c"This is help text.\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret void
}
int pd_snk_is_vbus_provided(int port) { return 0; }


x86 assembly (clang, -O0):
<pd_snk_is_vbus_provided>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pd_snk_is_vbus_provided>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @pd_snk_is_vbus_provided(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @pd_snk_is_vbus_provided(i32 %0) {
ret i32 0
}
/* Variables and functions */
scalar_t__ lgamma(double);
int /*<<< orphan*/ link_failure_lgamma();
void test_lgamma(double d) {
  if (lgamma(d) != lgamma(d))
    link_failure_lgamma();
}


x86 assembly (clang, -O0):
<test_lgamma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <lgamma@plt>
mov    %rax,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <lgamma@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_lgamma+0x3c>
mov    $0x0,%al
call   1040 <link_failure_lgamma@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_lgamma>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
call   1030 <lgamma@plt>
mov    %rax,%rbx
movsd  0x8(%rsp),%xmm0
call   1030 <lgamma@plt>
cmp    %rax,%rbx
jne    1149 <test_lgamma+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1040 <link_failure_lgamma@plt>

LLVM IR (-O0):
define void @test_lgamma(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i64 @lgamma(double %3)
%5 = load double, double* %2
%6 = call i64 @lgamma(double %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_lgamma()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_lgamma(double %0) {
%2 = tail call i64 @lgamma(double %0)
%3 = tail call i64 @lgamma(double %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_lgamma()
br label %7
7: ; preds = %5, %1
ret void
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int /*<<< orphan*/ dobind(int);
int next_connect(int, struct sockaddr const *, int /*<<< orphan*/);
int /*<<< orphan*/ set_next_connect();
int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen) {
  set_next_connect();
  dobind(sockfd);
  return next_connect(sockfd, addr, addrlen);
}


x86 assembly (clang, -O0):
<connect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x0,%al
call   1030 <set_next_connect@plt>
mov    -0x4(%rbp),%edi
call   1040 <dobind@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1050 <next_connect@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<connect>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <set_next_connect@plt>
mov    %ebp,%edi
call   1040 <dobind@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <next_connect@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define i32 @connect(i32 %0, %struct.sockaddr* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.sockaddr*
%6 = alloca i32
store i32 %0, i32* %4
store %struct.sockaddr* %1, %struct.sockaddr** %5
store i32 %2, i32* %6
%7 = call i32 (...) @set_next_connect()
%8 = load i32, i32* %4
%9 = call i32 @dobind(i32 %8)
%10 = load i32, i32* %4
%11 = load %struct.sockaddr*, %struct.sockaddr** %5
%12 = load i32, i32* %6
%13 = call i32 @next_connect(i32 %10, %struct.sockaddr* %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @connect(i32 %0, %struct.sockaddr* %1, i32 %2) {
%4 = tail call i32 (...) @set_next_connect()
%5 = tail call i32 @dobind(i32 %0)
%6 = tail call i32 @next_connect(i32 %0, %struct.sockaddr* %1, i32 %2)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ prtime();
mymeot() {
  prtime();
  printf("Meta TrkEnd\n");
}


x86 assembly (clang, -O0):
<mymeot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <prtime@plt>
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mymeot>:
push   %rax
xor    %eax,%eax
call   1040 <prtime@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Meta TrkEnd\0A\00"
define i32 @mymeot() {
%1 = alloca i32
%2 = call i32 (...) @prtime()
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@str = [12 x i8] c"Meta TrkEnd\00"
define i32 @mymeot() {
%1 = tail call i32 (...) @prtime()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
struct itimerval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pitimes(struct itimerval *);
int /*<<< orphan*/ printf(char *, char *);
mpitimes(char *s, struct itimerval *itv) {
  printf("%s\n", s);
  pitimes(itv);
}


x86 assembly (clang, -O0):
<mpitimes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <pitimes@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpitimes>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <pitimes@plt>

LLVM IR (-O0):
%struct.itimerval = type { i32 }
@.str = [4 x i8] c"%s\0A\00"
define i32 @mpitimes(i8* %0, %struct.itimerval* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca %struct.itimerval*
store i8* %0, i8** %4
store %struct.itimerval* %1, %struct.itimerval** %5
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load %struct.itimerval*, %struct.itimerval** %5
%9 = call i32 @pitimes(%struct.itimerval* %8)
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
%struct.itimerval = type { i32 }
@.str = [4 x i8] c"%s\0A\00"
define i32 @mpitimes(i8* %0, %struct.itimerval* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @pitimes(%struct.itimerval* %1)
ret i32 undef
}
void glutInitWindowSize(int width, int height) {}


x86 assembly (clang, -O0):
<glutInitWindowSize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glutInitWindowSize>:
ret

LLVM IR (-O0):
define void @glutInitWindowSize(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @glutInitWindowSize(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
int main(int argc, char *argv[]) {
  int c;
  while ((c = getchar()) != EOF)
    putchar(c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
je     115c <main+0x3c>
mov    -0x14(%rbp),%edi
call   1030 <putchar@plt>
jmp    1136 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
cmp    (%rbx),%eax
je     1152 <main+0x32>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %7
7: ; preds = %11, %2
%8 = call i32 (...) @getchar()
store i32 %8, i32* %6
%9 = load i32, i32* @EOF
%10 = icmp ne i32 %8, %9
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i32, i32* %6
%13 = call i32 @putchar(i32 %12)
br label %7
14: ; preds = %7
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @getchar()
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %12, label %6
6: ; preds = %2, %6
%7 = phi i32 [ %9, %6 ], [ %3, %2 ]
%8 = tail call i32 @putchar(i32 %7)
%9 = tail call i32 (...) @getchar()
%10 = load i32, i32* @EOF
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret i32 0
}
unsigned int ip_sff_get_unused_bits_num(void) { return (1); }


x86 assembly (clang, -O0):
<ip_sff_get_unused_bits_num>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ip_sff_get_unused_bits_num>:
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @ip_sff_get_unused_bits_num() {
ret i32 1
}

LLVM IR (-O2):
define i32 @ip_sff_get_unused_bits_num() {
ret i32 1
}
int num_diagnostics(void) { return (48); }


x86 assembly (clang, -O0):
<num_diagnostics>:
push   %rbp
mov    %rsp,%rbp
mov    $0x30,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<num_diagnostics>:
mov    $0x30,%eax
ret

LLVM IR (-O0):
define i32 @num_diagnostics() {
ret i32 48
}

LLVM IR (-O2):
define i32 @num_diagnostics() {
ret i32 48
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int feof(int /*<<< orphan*/ *);
int eof(int fd) { return feof((FILE *)fd); }


x86 assembly (clang, -O0):
<eof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rdi
call   1030 <feof@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eof>:
movslq %edi,%rdi
jmp    1030 <feof@plt>

LLVM IR (-O0):
define i32 @eof(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = call i32 @feof(i32* %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @eof(i32 %0) {
%2 = sext i32 %0 to i64
%3 = inttoptr i64 %2 to i32*
%4 = tail call i32 @feof(i32* %3)
ret i32 %4
}
void gtk_window_set_accept_focus() {}


x86 assembly (clang, -O0):
<gtk_window_set_accept_focus>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtk_window_set_accept_focus>:
ret

LLVM IR (-O0):
define void @gtk_window_set_accept_focus() {
ret void
}

LLVM IR (-O2):
define void @gtk_window_set_accept_focus() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
void __attribute__((noreturn)) stress_child_atexit(void) { _exit((6)); }


x86 assembly (clang, -O0):
<stress_child_atexit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<stress_child_atexit>:
push   %rax
mov    $0x6,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @stress_child_atexit() {
%1 = call i32 @_exit(i32 6)
unreachable
}

LLVM IR (-O2):
define void @stress_child_atexit() {
%1 = tail call i32 @_exit(i32 6)
unreachable
}