xunge/DecIR huggingface dataset:
int main() {
  int x;
  while (x != 0) {
    if (-5 <= x && x <= 35) {
      if (x < 0) {
        x = -5;
      } else {
        if (x > 30) {
          x = 35;
        } else {
          x = x - 1;
        }
      }
    } else {
      x = 0;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1178 <main+0x78>
mov    $0xfffffffb,%eax
cmp    -0x8(%rbp),%eax
jg     116c <main+0x6c>
cmpl   $0x23,-0x8(%rbp)
jg     116c <main+0x6c>
cmpl   $0x0,-0x8(%rbp)
jge    1143 <main+0x43>
movl   $0xfffffffb,-0x8(%rbp)
jmp    1167 <main+0x67>
cmpl   $0x1e,-0x8(%rbp)
jle    1159 <main+0x59>
movl   $0x23,-0x8(%rbp)
jmp    1162 <main+0x62>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1167 <main+0x67>
jmp    1173 <main+0x73>
movl   $0x0,-0x8(%rbp)
jmp    110b <main+0xb>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %26, %0
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %27
6: ; preds = %3
%7 = load i32, i32* %2
%8 = icmp sle i32 -5, %7
br i1 %8, label %9, label %25
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp sle i32 %10, 35
br i1 %11, label %12, label %25
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %12
store i32 -5, i32* %2
br label %24
16: ; preds = %12
%17 = load i32, i32* %2
%18 = icmp sgt i32 %17, 30
br i1 %18, label %19, label %20
19: ; preds = %16
store i32 35, i32* %2
br label %23
20: ; preds = %16
%21 = load i32, i32* %2
%22 = sub nsw i32 %21, 1
store i32 %22, i32* %2
br label %23
23: ; preds = %20, %19
br label %24
24: ; preds = %23, %15
br label %26
25: ; preds = %9, %6
store i32 0, i32* %2
br label %26
26: ; preds = %25, %24
br label %3
27: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
double *f() {}


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

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

LLVM IR (-O0):
define double* @f() {
%1 = alloca double*
%2 = load double*, double** %1
ret double* %2
}

LLVM IR (-O2):
define noalias double* @f() {
ret double* undef
}
/* Variables and functions */
scalar_t__ islower(int);
int toupper(int c) {
  if (islower(c)) {
    return c & ~0x20;
  } else {
    return c;
  }
}


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     113b <toupper+0x2b>
mov    -0x8(%rbp),%eax
and    $0xffffffdf,%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <toupper+0x31>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
push   %rbx
mov    %edi,%ebx
call   1030 <islower@plt>
mov    %ebx,%ecx
and    $0xffffffdf,%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @toupper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @islower(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = and i32 %8, -33
store i32 %9, i32* %2
br label %12
10: ; preds = %1
%11 = load i32, i32* %3
store i32 %11, i32* %2
br label %12
12: ; preds = %10, %7
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = tail call i64 @islower(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = and i32 %0, -33
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ packi32(unsigned char *, unsigned long);
extern void serialize_int32(unsigned char *buf, unsigned long int i) {
  packi32(buf, i);
}


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

x86 assembly (clang, -O2):
<serialize_int32>:
jmp    1030 <packi32@plt>

LLVM IR (-O0):
define void @serialize_int32(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i32 @packi32(i8* %5, i64 %6)
ret void
}

LLVM IR (-O2):
define void @serialize_int32(i8* %0, i64 %1) {
%3 = tail call i32 @packi32(i8* %0, i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
void strncpyTest() {
  char str1[] = "To be or not to be";
  char str2[6];
  strncpy(str2, str1, 5);
  str2[5] = '\0';
  puts(str2);
}


x86 assembly (clang, -O0):
<strncpyTest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%ax
mov    %ax,-0x10(%rbp)
mov    0xec3(%rip),%al
mov    %al,-0xe(%rbp)
lea    -0x26(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x5,%edx
call   1030 <strncpy@plt>
movb   $0x0,-0x21(%rbp)
lea    -0x26(%rbp),%rdi
call   1040 <puts@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncpyTest>:
push   %rbx
sub    $0x30,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x656220,0x1f(%rsp)
lea    0xa(%rsp),%rbx
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x5,%edx
call   1030 <strncpy@plt>
movb   $0x0,0xf(%rsp)
mov    %rbx,%rdi
call   1040 <puts@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.strncpyTest.str1 = [19 x i8] c"To be or not to be\00"
define void @strncpyTest() {
%1 = alloca [19 x i8]
%2 = alloca [6 x i8]
%3 = bitcast [19 x i8]* %1 to i8*
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [19 x i8], [19 x i8]* %1, i64 0, i64 0
%6 = call i32 @strncpy(i8* %4, i8* %5, i32 5)
%7 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 5
store i8 0, i8* %7
%8 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%9 = call i32 @puts(i8* %8)
ret void
}

LLVM IR (-O2):
@__const.strncpyTest.str1 = [19 x i8] c"To be or not to be\00"
define void @strncpyTest() {
%1 = alloca [19 x i8]
%2 = alloca [6 x i8]
%3 = getelementptr inbounds [19 x i8], [19 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%5 = call i32 @strncpy(i8* %4, i8* %3, i32 5)
%6 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 5
store i8 0, i8* %6
%7 = call i32 @puts(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ show_linux_proc_branch();
void show_proc_branch(void) { show_linux_proc_branch(); }


x86 assembly (clang, -O0):
<show_proc_branch>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <show_linux_proc_branch@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_proc_branch>:
xor    %eax,%eax
jmp    1030 <show_linux_proc_branch@plt>

LLVM IR (-O0):
define void @show_proc_branch() {
%1 = call i32 (...) @show_linux_proc_branch()
ret void
}

LLVM IR (-O2):
define void @show_proc_branch() {
%1 = tail call i32 (...) @show_linux_proc_branch()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TIOCMBIS;
int /*<<< orphan*/ assert(int);
int ioctl(int, int /*<<< orphan*/, int *);
void serial_mbis(int fd, int flags) {
  int res = ioctl(fd, TIOCMBIS, &flags);
  assert(res == 0);
}


x86 assembly (clang, -O0):
<serial_mbis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_mbis>:
push   %rax
mov    %esi,0x4(%rsp)
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <ioctl@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
pop    %rax
ret

LLVM IR (-O0):
@TIOCMBIS = global i32 0
define void @serial_mbis(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* @TIOCMBIS
%8 = call i32 @ioctl(i32 %6, i32 %7, i32* %4)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
ret void
}

LLVM IR (-O2):
@TIOCMBIS = global i32 0
define void @serial_mbis(i32 %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = load i32, i32* @TIOCMBIS
%5 = call i32 @ioctl(i32 %0, i32 %4, i32* %3)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ngen(char *, char *, int /*<<< orphan*/);
void cgstoriw(void) { ngen("%s\t[bx],ax", "mov", 0); }


x86 assembly (clang, -O0):
<cgstoriw>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee9(%rip),%rsi
xor    %edx,%edx
call   1030 <ngen@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgstoriw>:
lea    0xee9(%rip),%rdi
lea    0xeed(%rip),%rsi
xor    %edx,%edx
jmp    1030 <ngen@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"%s\09[bx],ax\00"
@.str.1 = [4 x i8] c"mov\00"
define void @cgstoriw() {
%1 = call i32 @ngen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"%s\09[bx],ax\00"
@.str.1 = [4 x i8] c"mov\00"
define void @cgstoriw() {
%1 = tail call i32 @ngen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}
unsigned long game_time_microsecs(void) {
  static int i = 0;
  return i++;
}


x86 assembly (clang, -O0):
<game_time_microsecs>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f1a(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x2f0f(%rip)
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<game_time_microsecs>:
movslq 0x2f1d(%rip),%rax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f14(%rip)
ret

LLVM IR (-O0):
@game_time_microsecs.i = internal global i32 0
define i64 @game_time_microsecs() {
%1 = load i32, i32* @game_time_microsecs.i
%2 = add nsw i32 %1, 1
store i32 %2, i32* @game_time_microsecs.i
%3 = sext i32 %1 to i64
ret i64 %3
}

LLVM IR (-O2):
@game_time_microsecs.i = internal unnamed_addr global i32 0
define i64 @game_time_microsecs() {
%1 = load i32, i32* @game_time_microsecs.i
%2 = add nsw i32 %1, 1
store i32 %2, i32* @game_time_microsecs.i
%3 = sext i32 %1 to i64
ret i64 %3
}
void call0d(long l, char c, short s, int i) {
  l = 7;
  c = 'z';
  s = 8;
  i = 9;
}


x86 assembly (clang, -O0):
<call0d>:
push   %rbp
mov    %rsp,%rbp
mov    %dx,%ax
mov    %sil,%dl
mov    %rdi,-0x8(%rbp)
mov    %dl,-0x9(%rbp)
mov    %ax,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movq   $0x7,-0x8(%rbp)
movb   $0x7a,-0x9(%rbp)
movw   $0x8,-0xc(%rbp)
movl   $0x9,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @call0d(i64 %0, i8 signext %1, i16 signext %2, i32 %3) {
%5 = alloca i64
%6 = alloca i8
%7 = alloca i16
%8 = alloca i32
store i64 %0, i64* %5
store i8 %1, i8* %6
store i16 %2, i16* %7
store i32 %3, i32* %8
store i64 7, i64* %5
store i8 122, i8* %6
store i16 8, i16* %7
store i32 9, i32* %8
ret void
}

LLVM IR (-O2):
define void @call0d(i64 %0, i8 signext %1, i16 signext %2, i32 %3) {
ret void
}
int isxdigit(int ch) {
  return ((ch >= '0' && ch <= '9') | (ch >= 'A' && ch <= 'F') |
          (ch >= 'a' && ch <= 'f'));
}


x86 assembly (clang, -O0):
<isxdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isxdigit+0x20>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1144 <isxdigit+0x44>
cmpl   $0x46,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x6(%rbp),%cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0xd(%rbp)
jl     116e <isxdigit+0x6e>
cmpl   $0x66,-0x4(%rbp)
setle  %al
mov    %al,-0xd(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xd(%rbp),%cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isxdigit>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
setb   %al
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
cmp    $0x6,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isxdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = load i32, i32* %2
%12 = icmp sge i32 %11, 65
br i1 %12, label %13, label %16
13: ; preds = %8
%14 = load i32, i32* %2
%15 = icmp sle i32 %14, 70
br label %16
16: ; preds = %13, %8
%17 = phi i1 [ false, %8 ], [ %15, %13 ]
%18 = zext i1 %17 to i32
%19 = or i32 %10, %18
%20 = load i32, i32* %2
%21 = icmp sge i32 %20, 97
br i1 %21, label %22, label %25
22: ; preds = %16
%23 = load i32, i32* %2
%24 = icmp sle i32 %23, 102
br label %25
25: ; preds = %22, %16
%26 = phi i1 [ false, %16 ], [ %24, %22 ]
%27 = zext i1 %26 to i32
%28 = or i32 %19, %27
ret i32 %28
}

LLVM IR (-O2):
define i32 @isxdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = and i32 %0, -33
%5 = add i32 %4, -65
%6 = icmp ult i32 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ f();
int main(int argc, char *argv[]) {
  f();
  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    $0x0,%al
call   1030 <f@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
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 (...) @f()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @f()
ret i32 0
}
/* Type definitions */
struct tokens {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int cmd_exit(struct tokens *tokens) { exit(0); }


x86 assembly (clang, -O0):
<cmd_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<cmd_exit>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
%struct.tokens = type { i32 }
define i32 @cmd_exit(%struct.tokens* %0) {
%2 = alloca %struct.tokens*
store %struct.tokens* %0, %struct.tokens** %2
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
%struct.tokens = type { i32 }
define i32 @cmd_exit(%struct.tokens* nocapture readnone %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
char *strrchr(char const *, char);
char *get_file_name(const char *file_name) {
  char *p;
  if (!file_name)
    return (NULL);
  if ((p = strrchr(file_name, '/')))
    return (p + 1);
  else
    return (NULL);
}


x86 assembly (clang, -O0):
<get_file_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <get_file_name+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1169 <get_file_name+0x59>
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1161 <get_file_name+0x51>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1169 <get_file_name+0x59>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_file_name>:
test   %rdi,%rdi
je     1133 <get_file_name+0x23>
push   %rax
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,%rcx
add    $0x1,%rax
test   %rcx,%rcx
cmove  %rcx,%rax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @get_file_name(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %8, label %7
7: ; preds = %1
store i8* null, i8** %2
br label %16
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i8* @strrchr(i8* %9, i8 signext 47)
store i8* %10, i8** %4
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %15
12: ; preds = %8
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i64 1
store i8* %14, i8** %2
br label %16
15: ; preds = %8
store i8* null, i8** %2
br label %16
16: ; preds = %15, %12, %7
%17 = load i8*, i8** %2
ret i8* %17
}

LLVM IR (-O2):
define i8* @get_file_name(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i8* @strrchr(i8* %0, i8 signext 47)
%5 = icmp eq i8* %4, null
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = select i1 %5, i8* null, i8* %6
br label %8
8: ; preds = %3, %1
%9 = phi i8* [ null, %1 ], [ %7, %3 ]
ret i8* %9
}
/* Variables and functions */
long F2(void *, int /*<<< orphan*/, void *);
int /*<<< orphan*/ F3(void *);
long F1(void *tree) { return F2(tree, F3(tree), (void *)0); }


x86 assembly (clang, -O0):
<F1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <F3@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1040 <F2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<F1>:
push   %rbx
mov    %rdi,%rbx
call   1030 <F3@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %edx,%edx
pop    %rbx
jmp    1040 <F2@plt>

LLVM IR (-O0):
define i64 @F1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @F3(i8* %4)
%6 = call i64 @F2(i8* %3, i32 %5, i8* null)
ret i64 %6
}

LLVM IR (-O2):
define i64 @F1(i8* %0) {
%2 = tail call i32 @F3(i8* %0)
%3 = tail call i64 @F2(i8* %0, i32 %2, i8* null)
ret i64 %3
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
int read(int, scalar_t__ *, int);
int SerialGetchar(int fd) {
  uint8_t x;
  if (read(fd, &x, 1) != 1)
    return -1;
  return ((int)x) & 0xFF;
}


x86 assembly (clang, -O0):
<SerialGetchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
cmp    $0x1,%eax
je     1141 <SerialGetchar+0x31>
movl   $0xffffffff,-0x4(%rbp)
jmp    114d <SerialGetchar+0x3d>
mov    -0x10(%rbp),%rax
and    $0xff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SerialGetchar>:
push   %rax
mov    %rsp,%rsi
mov    $0x1,%edx
call   1030 <read@plt>
cmp    $0x1,%eax
movzbl (%rsp),%ecx
mov    $0xffffffff,%eax
cmove  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @SerialGetchar(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @read(i32 %5, i64* %4, i32 1)
%7 = icmp ne i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 -1, i32* %2
br label %13
9: ; preds = %1
%10 = load i64, i64* %4
%11 = trunc i64 %10 to i32
%12 = and i32 %11, 255
store i32 %12, i32* %2
br label %13
13: ; preds = %9, %8
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @SerialGetchar(i32 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = call i32 @read(i32 %0, i64* %2, i32 1)
%5 = icmp eq i32 %4, 1
%6 = load i64, i64* %2
%7 = trunc i64 %6 to i32
%8 = and i32 %7, 255
%9 = select i1 %5, i32 %8, i32 -1
ret i32 %9
}
int test_imm_FCint64_midword_mem(long long *val) {
  return ((*val >> 16) & (0xFC << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_FCint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x10,%rdx
and    $0xfc,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_FCint64_midword_mem>:
testb  $0xfc,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_FCint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 16
%6 = and i64 %5, 252
%7 = icmp ne i64 %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_FCint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 16515072
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void UI_new_method(void) {}


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

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

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

LLVM IR (-O2):
define void @UI_new_method() {
ret void
}
void jinit_2pass_quantizer(void) {}


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

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

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

LLVM IR (-O2):
define void @jinit_2pass_quantizer() {
ret void
}
void dummy_destroymutex(void *m) {}


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

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

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

LLVM IR (-O2):
define void @dummy_destroymutex(i8* nocapture %0) {
ret void
}
void tdefault_terminal_init(struct target_ops *self) {}


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

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

LLVM IR (-O0):
%struct.target_ops = type opaque
define void @tdefault_terminal_init(%struct.target_ops* %0) {
%2 = alloca %struct.target_ops*
store %struct.target_ops* %0, %struct.target_ops** %2
ret void
}

LLVM IR (-O2):
%struct.target_ops = type opaque
define void @tdefault_terminal_init(%struct.target_ops* nocapture %0) {
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;
struct TYPE_3__ {
  int /*<<< orphan*/ __ss;
};
typedef TYPE_1__ posix_spawnattr_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
int posix_spawnattr_getsigmask(const posix_spawnattr_t *attr,
                               sigset_t *sigmask) {
  memcpy(sigmask, &attr->__ss, sizeof(sigset_t));
  return 0;
}


x86 assembly (clang, -O0):
<posix_spawnattr_getsigmask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<posix_spawnattr_getsigmask>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
define i32 @posix_spawnattr_getsigmask(%struct.TYPE_3__* %0, i32* %1) {
%3 = alloca %struct.TYPE_3__*
%4 = alloca i32*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load %struct.TYPE_3__*, %struct.TYPE_3__** %3
%7 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %6, i32 0, i32 0
%8 = call i32 @memcpy(i32* %5, i32* %7, i32 4)
ret i32 0
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
define i32 @posix_spawnattr_getsigmask(%struct.TYPE_3__* %0, i32* %1) {
%3 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%4 = tail call i32 @memcpy(i32* %1, i32* %3, i32 4)
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long time;
};
typedef TYPE_1__ XPointerMovedEvent;

/* Variables and functions */
void set_XPointerMovedEvent_time(void *_p, unsigned long _v) {
  ((XPointerMovedEvent *)_p)->time = (unsigned long)_v;
}


x86 assembly (clang, -O0):
<set_XPointerMovedEvent_time>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XPointerMovedEvent_time>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XPointerMovedEvent_time(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XPointerMovedEvent_time(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
const char *dummy() { return "I do nothing."; }


x86 assembly (clang, -O0):
<dummy>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dummy>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [14 x i8] c"I do nothing.\00"
define i8* @dummy() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [14 x i8] c"I do nothing.\00"
define i8* @dummy() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputs(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ gettext(char *);
void print_usage(FILE *stream) {
  fputs(gettext("Usage: ypmatch [-d domain] [-kt] key ... mapname | -x\n"),
        stream);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <gettext@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
call   1040 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <gettext@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <fputs@plt>

LLVM IR (-O0):
@.str = [55 x i8] c"Usage: ypmatch [-d domain] [-kt] key ... mapname | -x\0A\00"
define void @print_usage(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @gettext(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%4 = load i32*, i32** %2
%5 = call i32 @fputs(i32 %3, i32* %4)
ret void
}

LLVM IR (-O2):
@.str = [55 x i8] c"Usage: ypmatch [-d domain] [-kt] key ... mapname | -x\0A\00"
define void @print_usage(i32* %0) {
%2 = tail call i32 @gettext(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @fputs(i32 %2, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void handler(int sig) {
  printf("SIGINT %d\n", sig);
  (void)sig;
}


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handler>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"SIGINT %d\0A\00"
define void @handler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
void writeDataTypeF(FILE *f, int data) { fprintf(f, "%d ", data); }


x86 assembly (clang, -O0):
<writeDataTypeF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeDataTypeF>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
define void @writeDataTypeF(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 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @writeDataTypeF(i32* nocapture %0, i32 %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
void init_wordbreak(void) {}


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

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

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

LLVM IR (-O2):
define void @init_wordbreak() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *progname) {
  fprintf(
      stderr,
      "Usage: %s [OPTIONS] [CMD [ARG]...]\nOptions:\n  -g MAP    set the user "
      "namespace GID map\n  -u MAP    set the user namespace UID map\nGID and "
      "UID maps are specified as START:LOWER:COUNT[,START:LOWER:COUNT]...\n",
      progname);
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [206 x i8] c"Usage: %s [OPTIONS] [CMD [ARG]...]\0AOptions:\0A -g MAP set the user namespace GID map\0A -u MAP set the user namespace UID map\0AGID and UID maps are specified as START:LOWER:COUNT[,START:LOWER:COUNT]...\0A\00"
@EX_USAGE = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([206 x i8], [206 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EX_USAGE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [206 x i8] c"Usage: %s [OPTIONS] [CMD [ARG]...]\0AOptions:\0A -g MAP set the user namespace GID map\0A -u MAP set the user namespace UID map\0AGID and UID maps are specified as START:LOWER:COUNT[,START:LOWER:COUNT]...\0A\00"
@EX_USAGE = global i32 0
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([206 x i8], [206 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EX_USAGE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ dposv_(char *, int *, int *, double *, int *, double *,
                          int *, int *);
int aa_cla_dposv(char uplo, int n, int nrhs, double *A, int lda, double *B,
                 int ldb) {
  int info = 0;
  dposv_(&uplo, &n, &nrhs, A, &lda, B, &ldb, &info);
  return info;
}


x86 assembly (clang, -O0):
<aa_cla_dposv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %dil,%al
mov    0x10(%rbp),%edi
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x28(%rbp),%r9
lea    -0x1(%rbp),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x1c(%rbp),%r8
lea    0x10(%rbp),%r10
lea    -0x2c(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <dposv_@plt>
mov    -0x2c(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aa_cla_dposv>:
sub    $0x18,%rsp
mov    %dil,0x7(%rsp)
mov    %esi,0x14(%rsp)
mov    %edx,0x10(%rsp)
mov    %r8d,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rax
lea    0x20(%rsp),%r10
lea    0x7(%rsp),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%r8
push   %rax
push   %r10
call   1030 <dposv_@plt>
add    $0x10,%rsp
mov    0x8(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @aa_cla_dposv(i8 signext %0, i32 %1, i32 %2, double* %3, i32 %4, double* %5, i32 %6) {
%8 = alloca i8
%9 = alloca i32
%10 = alloca i32
%11 = alloca double*
%12 = alloca i32
%13 = alloca double*
%14 = alloca i32
%15 = alloca i32
store i8 %0, i8* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store double* %3, double** %11
store i32 %4, i32* %12
store double* %5, double** %13
store i32 %6, i32* %14
store i32 0, i32* %15
%16 = load double*, double** %11
%17 = load double*, double** %13
%18 = call i32 @dposv_(i8* %8, i32* %9, i32* %10, double* %16, i32* %12, double* %17, i32* %14, i32* %15)
%19 = load i32, i32* %15
ret i32 %19
}

LLVM IR (-O2):
define i32 @aa_cla_dposv(i8 signext %0, i32 %1, i32 %2, double* %3, i32 %4, double* %5, i32 %6) {
%8 = alloca i8
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i8 %0, i8* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %4, i32* %11
store i32 %6, i32* %12
%14 = bitcast i32* %13 to i8*
store i32 0, i32* %13
%15 = call i32 @dposv_(i8* %8, i32* %9, i32* %10, double* %3, i32* %11, double* %5, i32* %12, i32* %13)
%16 = load i32, i32* %13
ret i32 %16
}
/* Variables and functions */
char *my_alloc1(int, int);
int test3(int len) {
  int i;
  char *p = my_alloc1(len, 16);
  return ((long int)p) & 15;
}


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x10,%esi
call   1030 <my_alloc1@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0xf,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
push   %rax
mov    $0x10,%esi
call   1030 <my_alloc1@plt>
and    $0xf,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test3(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i8* @my_alloc1(i32 %5, i32 16)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = ptrtoint i8* %7 to i64
%9 = and i64 %8, 15
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @test3(i32 %0) {
%2 = tail call i8* @my_alloc1(i32 %0, i32 16)
%3 = ptrtoint i8* %2 to i64
%4 = trunc i64 %3 to i32
%5 = and i32 %4, 15
ret i32 %5
}
/* Type definitions */
typedef int off_t;

/* Variables and functions */
int __syscall(int, int, int, int);
int errno;
off_t _lseek(int fd, off_t offset, int whence) {
  int err;
  err = __syscall(19, fd, offset, whence);
  if (err < 0) {
    errno = -err;
    return (off_t)-1;
  }
  return err;
}


x86 assembly (clang, -O0):
<_lseek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    $0x13,%edi
call   1030 <__syscall@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    115b <_lseek+0x4b>
xor    %ecx,%ecx
sub    -0x14(%rbp),%ecx
mov    0x2e93(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
jmp    1161 <_lseek+0x51>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_lseek>:
push   %rax
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    $0x13,%edi
call   1030 <__syscall@plt>
test   %eax,%eax
js     1127 <_lseek+0x17>
pop    %rcx
ret
neg    %eax
mov    0x2eb0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @_lseek(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = call i32 @__syscall(i32 19, i32 %9, i32 %10, i32 %11)
store i32 %12, i32* %8
%13 = load i32, i32* %8
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %3
%16 = load i32, i32* %8
%17 = sub nsw i32 0, %16
store i32 %17, i32* @errno
store i32 -1, i32* %4
br label %20
18: ; preds = %3
%19 = load i32, i32* %8
store i32 %19, i32* %4
br label %20
20: ; preds = %18, %15
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @_lseek(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @__syscall(i32 19, i32 %0, i32 %1, i32 %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = sub nsw i32 0, %4
store i32 %7, i32* @errno
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ -1, %6 ], [ %4, %3 ]
ret i32 %9
}
void weak_update_Good_FP() {
  int a[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 15};
  a[a[3]] = 3;
}


x86 assembly (clang, -O0):
<weak_update_Good_FP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xedd(%rip),%rsi
mov    $0x28,%edx
call   1030 <memcpy@plt>
movslq -0x24(%rbp),%rax
movl   $0x3,-0x30(%rbp,%rax,4)
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.weak_update_Good_FP.a = [10 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 15]
define void @weak_update_Good_FP() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 3
%4 = load i32, i32* %3
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %5
store i32 3, i32* %6
ret void
}

LLVM IR (-O2):
define void @weak_update_Good_FP() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(int, double);
int main() { f(5, 34.23); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
movsd  0xedf(%rip),%xmm0
call   1030 <f@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xee7(%rip),%xmm0
mov    $0x5,%edi
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @f(i32 5, double 3.423000e+01)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 5, double 3.423000e+01)
ret i32 0
}
void init_int_vec(int *vector, int dim) {
  int i;
  for (i = 0; i < dim; i++)
    vector[i] = 0;
}


x86 assembly (clang, -O0):
<init_int_vec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113b <init_int_vec+0x3b>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <init_int_vec+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_int_vec>:
test   %esi,%esi
jle    1126 <init_int_vec+0x16>
push   %rax
mov    %esi,%edx
shl    $0x2,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @init_int_vec(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %15, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
store i32 0, i32* %14
br label %15
15: ; preds = %10
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %6
18: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @init_int_vec(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast i32* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 2
br label %8
8: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Reserved172_DriverIRQHandler();
__attribute__((weak)) void Reserved172_IRQHandler(void) {
  Reserved172_DriverIRQHandler();
}


x86 assembly (clang, -O0):
<Reserved172_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <Reserved172_DriverIRQHandler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Reserved172_IRQHandler>:
xor    %eax,%eax
jmp    1030 <Reserved172_DriverIRQHandler@plt>

LLVM IR (-O0):
define weak void @Reserved172_IRQHandler() {
%1 = call i32 (...) @Reserved172_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @Reserved172_IRQHandler() {
%1 = tail call i32 (...) @Reserved172_DriverIRQHandler()
ret void
}
const char *RhoGetRootPath() { return "\\Data\\Rho\\"; }


x86 assembly (clang, -O0):
<RhoGetRootPath>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RhoGetRootPath>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [11 x i8] c"\\Data\\Rho\\\00"
define i8* @RhoGetRootPath() {
ret i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [11 x i8] c"\\Data\\Rho\\\00"
define i8* @RhoGetRootPath() {
ret i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0)
}
int f(long long a, int b) {
  int c = a == 20;
  return c + b;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x14,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
xor    %eax,%eax
cmp    $0x14,%rdi
sete   %al
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @f(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%6 = load i64, i64* %3
%7 = icmp eq i64 %6, 20
%8 = zext i1 %7 to i32
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = add nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @f(i64 %0, i32 %1) {
%3 = icmp eq i64 %0, 20
%4 = zext i1 %3 to i32
%5 = add nsw i32 %4, %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ bin_conv(int);
int /*<<< orphan*/ bin_convf(int);
void converter(float a) {
  int b = (int)a;
  if (b == a) {
    bin_conv((int)a);
  } else {
    bin_conv((int)a);
    a = a - b;
    a = a * 100;
    bin_convf((int)a);
  }
}


x86 assembly (clang, -O0):
<converter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
cvttss2si -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cvtsi2ssl -0x8(%rbp),%xmm0
ucomiss -0x4(%rbp),%xmm0
jne    1159 <converter+0x39>
jp     1159 <converter+0x39>
cvttss2si -0x4(%rbp),%edi
call   1030 <bin_conv@plt>
jmp    1192 <converter+0x72>
cvttss2si -0x4(%rbp),%edi
call   1030 <bin_conv@plt>
movss  -0x4(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  0xe82(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
cvttss2si -0x4(%rbp),%edi
call   1040 <bin_convf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<converter>:
sub    $0x28,%rsp
movaps %xmm0,0x10(%rsp)
cvttss2si %xmm0,%edi
cvttps2dq %xmm0,%xmm1
cvtdq2ps %xmm1,%xmm0
movaps %xmm0,(%rsp)
call   1030 <bin_conv@plt>
movaps (%rsp),%xmm1
movaps 0x10(%rsp),%xmm0
ucomiss %xmm0,%xmm1
jne    1152 <converter+0x32>
jp     1152 <converter+0x32>
add    $0x28,%rsp
ret
subss  %xmm1,%xmm0
mulss  0xea2(%rip),%xmm0
cvttss2si %xmm0,%edi
add    $0x28,%rsp
jmp    1040 <bin_convf@plt>

LLVM IR (-O0):
define void @converter(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = load float, float* %2
%5 = fptosi float %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = sitofp i32 %6 to float
%8 = load float, float* %2
%9 = fcmp oeq float %7, %8
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = load float, float* %2
%12 = fptosi float %11 to i32
%13 = call i32 @bin_conv(i32 %12)
br label %27
14: ; preds = %1
%15 = load float, float* %2
%16 = fptosi float %15 to i32
%17 = call i32 @bin_conv(i32 %16)
%18 = load float, float* %2
%19 = load i32, i32* %3
%20 = sitofp i32 %19 to float
%21 = fsub float %18, %20
store float %21, float* %2
%22 = load float, float* %2
%23 = fmul float %22, 1.000000e+02
store float %23, float* %2
%24 = load float, float* %2
%25 = fptosi float %24 to i32
%26 = call i32 @bin_convf(i32 %25)
br label %27
27: ; preds = %14, %10
ret void
}

LLVM IR (-O2):
define void @converter(float %0) {
%2 = fptosi float %0 to i32
%3 = sitofp i32 %2 to float
%4 = fcmp oeq float %3, %0
%5 = tail call i32 @bin_conv(i32 %2)
br i1 %4, label %11, label %6
6: ; preds = %1
%7 = fsub float %0, %3
%8 = fmul float %7, 1.000000e+02
%9 = fptosi float %8 to i32
%10 = tail call i32 @bin_convf(i32 %9)
br label %11
11: ; preds = %1, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bp_sw_error_flag_on(int, int);
void bp_sw_error_on(int type) { bp_sw_error_flag_on(type, 1); }


x86 assembly (clang, -O0):
<bp_sw_error_on>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <bp_sw_error_flag_on@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bp_sw_error_on>:
mov    $0x1,%esi
jmp    1030 <bp_sw_error_flag_on@plt>

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

LLVM IR (-O2):
define void @bp_sw_error_on(i32 %0) {
%2 = tail call i32 @bp_sw_error_flag_on(i32 %0, i32 1)
ret void
}
void msm_xo_put(struct msm_xo_voter *xo_voter) {}


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

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

LLVM IR (-O0):
%struct.msm_xo_voter = type opaque
define void @msm_xo_put(%struct.msm_xo_voter* %0) {
%2 = alloca %struct.msm_xo_voter*
store %struct.msm_xo_voter* %0, %struct.msm_xo_voter** %2
ret void
}

LLVM IR (-O2):
%struct.msm_xo_voter = type opaque
define void @msm_xo_put(%struct.msm_xo_voter* nocapture %0) {
ret void
}