xunge/DecIR huggingface dataset:
int f() {
  int a;
  return &a == (void *)"hello";
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
lea    -0x4(%rbp),%rax
lea    0xef1(%rip),%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
define i32 @f() {
%1 = alloca i32
%2 = icmp eq i32* %1, bitcast ([6 x i8]* @.str to i32*)
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @f() {
ret i32 0
}
int fib(int n) {
  if (n == 0) {
    return 0;
  }
  if (n == 1) {
    return 1;
  }
  return fib(n - 1) + fib(n - 2);
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <fib+0x21>
movl   $0x0,-0x4(%rbp)
jmp    116a <fib+0x5a>
cmpl   $0x1,-0x8(%rbp)
jne    1147 <fib+0x37>
movl   $0x1,-0x4(%rbp)
jmp    116a <fib+0x5a>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fib@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fib@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%ebx
jb     1132 <fib+0x22>
nopl   0x0(%rax)
lea    -0x1(%rbx),%edi
call   1030 <fib@plt>
add    %eax,%ebp
add    $0xfffffffe,%ebx
cmp    $0x2,%ebx
jae    1120 <fib+0x10>
add    %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fib(i32 %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i32 [ 0, %1 ], [ %10, %6 ]
%4 = phi i32 [ %0, %1 ], [ %9, %6 ]
%5 = icmp ult i32 %4, 2
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = add nsw i32 %4, -1
%8 = tail call i32 @fib(i32 %7)
%9 = add nsw i32 %4, -2
%10 = add nsw i32 %8, %3
br label %2
11: ; preds = %2
%12 = add nsw i32 %4, %3
ret i32 %12
}
void RTBldCfgRevisionStr(void) {}


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

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

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

LLVM IR (-O2):
define void @RTBldCfgRevisionStr() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GetKey();
int toupper(int /*<<< orphan*/);
int GetMenuChoice(void) {
  int lResult = 0;
  while ((lResult < '1') || (lResult > '9')) {
    lResult = toupper(GetKey());
    if ((lResult == 'Q') || (lResult == 27)) {
      break;
    }
  }
  return lResult;
}


x86 assembly (clang, -O0):
<GetMenuChoice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x31,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1148 <GetMenuChoice+0x28>
cmpl   $0x39,-0x4(%rbp)
setg   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    1158 <GetMenuChoice+0x38>
jmp    1187 <GetMenuChoice+0x67>
mov    $0x0,%al
call   1040 <GetKey@plt>
mov    %eax,%edi
call   1030 <toupper@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x51,-0x4(%rbp)
je     117d <GetMenuChoice+0x5d>
cmpl   $0x1b,-0x4(%rbp)
jne    1182 <GetMenuChoice+0x62>
jmp    1187 <GetMenuChoice+0x67>
jmp    112f <GetMenuChoice+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetMenuChoice>:
push   %rax
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    -0x3a(%rax),%ecx
cmp    $0xfffffff6,%ecx
ja     1150 <GetMenuChoice+0x30>
xor    %eax,%eax
call   1040 <GetKey@plt>
mov    %eax,%edi
call   1030 <toupper@plt>
cmp    $0x51,%eax
je     1150 <GetMenuChoice+0x30>
cmp    $0x1b,%eax
jne    1130 <GetMenuChoice+0x10>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @GetMenuChoice() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %19, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 49
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = load i32, i32* %1
%7 = icmp sgt i32 %6, 57
br label %8
8: ; preds = %5, %2
%9 = phi i1 [ true, %2 ], [ %7, %5 ]
br i1 %9, label %10, label %20
10: ; preds = %8
%11 = call i32 (...) @GetKey()
%12 = call i32 @toupper(i32 %11)
store i32 %12, i32* %1
%13 = load i32, i32* %1
%14 = icmp eq i32 %13, 81
br i1 %14, label %18, label %15
15: ; preds = %10
%16 = load i32, i32* %1
%17 = icmp eq i32 %16, 27
br i1 %17, label %18, label %19
18: ; preds = %15, %10
br label %20
19: ; preds = %15
br label %2
20: ; preds = %18, %8
%21 = load i32, i32* %1
ret i32 %21
}

LLVM IR (-O2):
define i32 @GetMenuChoice() {
br label %1
1: ; preds = %5, %0
%2 = phi i32 [ 0, %0 ], [ %7, %5 ]
%3 = add i32 %2, -58
%4 = icmp ult i32 %3, -9
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = tail call i32 (...) @GetKey()
%7 = tail call i32 @toupper(i32 %6)
switch i32 %7, label %1 [
i32 81, label %8
i32 27, label %8
]
8: ; preds = %5, %5, %1
%9 = phi i32 [ %7, %5 ], [ %2, %1 ], [ %7, %5 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ rul___emit_newline();
int /*<<< orphan*/ rul___emit_verify_newline();
void rul__emit_blank_line(void) {
  rul___emit_verify_newline();
  rul___emit_newline();
}


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

x86 assembly (clang, -O2):
<rul__emit_blank_line>:
push   %rax
xor    %eax,%eax
call   1030 <rul___emit_verify_newline@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <rul___emit_newline@plt>

LLVM IR (-O0):
define void @rul__emit_blank_line() {
%1 = call i32 (...) @rul___emit_verify_newline()
%2 = call i32 (...) @rul___emit_newline()
ret void
}

LLVM IR (-O2):
define void @rul__emit_blank_line() {
%1 = tail call i32 (...) @rul___emit_verify_newline()
%2 = tail call i32 (...) @rul___emit_newline()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t null_extra_bit_cells(int drive, int side) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @null_extra_bit_cells(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ cal_average(char *);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  assert(argc == 2 && "Usage: ./util-average <input_file>");
  printf("Average: %.6lf\n", cal_average(argv[1]));
  return 0;
}


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)
xor    %eax,%eax
cmpl   $0x2,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jne    115f <main+0x2f>
mov    $0x1,%al
mov    %al,-0x11(%rbp)
jmp    115f <main+0x2f>
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <cal_average@plt>
mov    %eax,%esi
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
xor    %eax,%eax
cmp    $0x2,%edi
sete   %al
mov    %eax,%edi
call   1050 <assert@plt>
mov    0x8(%rbx),%rdi
call   1030 <cal_average@plt>
lea    0xead(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Usage: ./util-average <input_file>\00"
@.str.1 = [16 x i8] c"Average: %.6lf\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 = load i32, i32* %4
%7 = icmp eq i32 %6, 2
br i1 %7, label %8, label %9
8: ; preds = %2
br label %9
9: ; preds = %8, %2
%10 = phi i1 [ false, %2 ], [ true, %8 ]
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @cal_average(i8* %15)
%17 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %16)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [16 x i8] c"Average: %.6lf\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 @cal_average(i8* %7)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
unsigned char getaddr(unsigned char address) { return (address & 0xF8) >> 3; }


x86 assembly (clang, -O0):
<getaddr>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xf8,%eax
sar    $0x3,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getaddr>:
mov    %edi,%eax
shr    $0x3,%al
ret

LLVM IR (-O0):
define zeroext i8 @getaddr(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 248
%6 = ashr i32 %5, 3
%7 = trunc i32 %6 to i8
ret i8 %7
}

LLVM IR (-O2):
define zeroext i8 @getaddr(i8 zeroext %0) {
%2 = lshr i8 %0, 3
ret i8 %2
}
/* Variables and functions */
int f();
main() {
  int write(int, void *, int);
  char *s = "hi\n";
  write(1, s, 3);
  return f();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x1,%edi
mov    $0x3,%edx
call   1030 <write@plt>
mov    $0x0,%al
call   1040 <f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x1,%edi
mov    $0x3,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <f@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"hi\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @write(i32 1, i8* %3, i32 3)
%5 = call i32 (...) @f()
ret i32 %5
}

LLVM IR (-O2):
@.str = [4 x i8] c"hi\0A\00"
define i32 @main() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%2 = tail call i32 (...) @f()
ret i32 %2
}
/* Variables and functions */
unsigned char inb(unsigned char);
int /*<<< orphan*/ outb(unsigned char, unsigned char);
unsigned char pnp_read_config(unsigned char port, unsigned char reg) {
  outb(reg, port);
  return inb(port + 1);
}


x86 assembly (clang, -O0):
<pnp_read_config>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
movzbl %al,%edi
movzbl -0x1(%rbp),%esi
call   1030 <outb@plt>
movzbl -0x1(%rbp),%eax
add    $0x1,%eax
movzbl %al,%edi
call   1040 <inb@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pnp_read_config>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
mov    %ebx,%esi
call   1030 <outb@plt>
lea    0x1(%rbx),%eax
movzbl %al,%edi
pop    %rbx
jmp    1040 <inb@plt>

LLVM IR (-O0):
define zeroext i8 @pnp_read_config(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i8, i8* %3
%7 = call i32 @outb(i8 zeroext %5, i8 zeroext %6)
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = add nsw i32 %9, 1
%11 = trunc i32 %10 to i8
%12 = call zeroext i8 @inb(i8 zeroext %11)
ret i8 %12
}

LLVM IR (-O2):
define zeroext i8 @pnp_read_config(i8 zeroext %0, i8 zeroext %1) {
%3 = tail call i32 @outb(i8 zeroext %1, i8 zeroext %0)
%4 = add i8 %0, 1
%5 = tail call zeroext i8 @inb(i8 zeroext %4)
ret i8 %5
}
int SDL_imageFilterShiftLeftUintMMX(unsigned char *Src1, unsigned char *Dest,
                                    unsigned int SrcLength, unsigned char N) {
  return (-1);
}


x86 assembly (clang, -O0):
<SDL_imageFilterShiftLeftUintMMX>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %al,-0x15(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @SDL_imageFilterShiftLeftUintMMX(i8* %0, i8* %1, i32 %2, i8 zeroext %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8 %3, i8* %8
ret i32 -1
}

LLVM IR (-O2):
define i32 @SDL_imageFilterShiftLeftUintMMX(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i8 zeroext %3) {
ret i32 -1
}
int bar(int x, char y) { return x + y; }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%eax
movsbl -0x5(%rbp),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @bar(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i32, i32* %3
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
%8 = add nsw i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @bar(i32 %0, i8 signext %1) {
%3 = sext i8 %1 to i32
%4 = add nsw i32 %3, %0
ret i32 %4
}
int calculate_total_minutes(int weekday_minutes, int night_minutes,
                            int weekend_minutes) {
  int total_minutes = weekday_minutes + night_minutes + weekend_minutes;
  return total_minutes;
}


x86 assembly (clang, -O0):
<calculate_total_minutes>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_total_minutes>:
lea    (%rdi,%rsi,1),%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @calculate_total_minutes(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* %4
%9 = load i32, i32* %5
%10 = add nsw i32 %8, %9
%11 = load i32, i32* %6
%12 = add nsw i32 %10, %11
store i32 %12, i32* %7
%13 = load i32, i32* %7
ret i32 %13
}

LLVM IR (-O2):
define i32 @calculate_total_minutes(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = add nsw i32 %4, %2
ret i32 %5
}
void handler(int s) {}


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

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

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

LLVM IR (-O2):
define void @handler(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGABRT;
int /*<<< orphan*/ SIGBUS;
int /*<<< orphan*/ SIGFPE;
int /*<<< orphan*/ SIGILL;
int /*<<< orphan*/ SIGSEGV;
int /*<<< orphan*/ unregister_handler(int /*<<< orphan*/);
void forensics_private_unregister_signal_handlers() {
  unregister_handler(SIGSEGV);
  unregister_handler(SIGILL);
  unregister_handler(SIGFPE);
  unregister_handler(SIGBUS);
  unregister_handler(SIGABRT);
}


x86 assembly (clang, -O0):
<forensics_private_unregister_signal_handlers>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <unregister_handler@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
call   1030 <unregister_handler@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
call   1030 <unregister_handler@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1030 <unregister_handler@plt>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
call   1030 <unregister_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<forensics_private_unregister_signal_handlers>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <unregister_handler@plt>
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
call   1030 <unregister_handler@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1030 <unregister_handler@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
call   1030 <unregister_handler@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1030 <unregister_handler@plt>

LLVM IR (-O0):
@SIGSEGV = global i32 0
@SIGILL = global i32 0
@SIGFPE = global i32 0
@SIGBUS = global i32 0
@SIGABRT = global i32 0
define void @forensics_private_unregister_signal_handlers() {
%1 = load i32, i32* @SIGSEGV
%2 = call i32 @unregister_handler(i32 %1)
%3 = load i32, i32* @SIGILL
%4 = call i32 @unregister_handler(i32 %3)
%5 = load i32, i32* @SIGFPE
%6 = call i32 @unregister_handler(i32 %5)
%7 = load i32, i32* @SIGBUS
%8 = call i32 @unregister_handler(i32 %7)
%9 = load i32, i32* @SIGABRT
%10 = call i32 @unregister_handler(i32 %9)
ret void
}

LLVM IR (-O2):
@SIGSEGV = global i32 0
@SIGILL = global i32 0
@SIGFPE = global i32 0
@SIGBUS = global i32 0
@SIGABRT = global i32 0
define void @forensics_private_unregister_signal_handlers() {
%1 = load i32, i32* @SIGSEGV
%2 = tail call i32 @unregister_handler(i32 %1)
%3 = load i32, i32* @SIGILL
%4 = tail call i32 @unregister_handler(i32 %3)
%5 = load i32, i32* @SIGFPE
%6 = tail call i32 @unregister_handler(i32 %5)
%7 = load i32, i32* @SIGBUS
%8 = tail call i32 @unregister_handler(i32 %7)
%9 = load i32, i32* @SIGABRT
%10 = tail call i32 @unregister_handler(i32 %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void usage(char *argv0) {
  printf("Usage: %s [-merge] [-purge] <grib filename>\n", argv0);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"Usage: %s [-merge] [-purge] <grib filename>\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 ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [45 x i8] c"Usage: %s [-merge] [-purge] <grib filename>\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int tres_mem_arch_pf_store_start();
int tres_mem_pf_store_start(void) { return tres_mem_arch_pf_store_start(); }


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

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

LLVM IR (-O0):
define i32 @tres_mem_pf_store_start() {
%1 = call i32 (...) @tres_mem_arch_pf_store_start()
ret i32 %1
}

LLVM IR (-O2):
define i32 @tres_mem_pf_store_start() {
%1 = tail call i32 (...) @tres_mem_arch_pf_store_start()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ _OS_Restore_Btemp();
int /*<<< orphan*/ _OS_Restore_TaskSP();
int /*<<< orphan*/ _OS_SET_FSR_CUR_TASK();
int /*<<< orphan*/ _OS_SET_PC();
int /*<<< orphan*/ _OS_STORE_SP();
void _OS_JumpToTask(void) {
  _OS_STORE_SP();
  _OS_SET_FSR_CUR_TASK();
  _OS_Restore_TaskSP();
  _OS_Restore_Btemp();
  _OS_SET_PC();
}


x86 assembly (clang, -O0):
<_OS_JumpToTask>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <_OS_STORE_SP@plt>
mov    $0x0,%al
call   1060 <_OS_SET_FSR_CUR_TASK@plt>
mov    $0x0,%al
call   1050 <_OS_Restore_TaskSP@plt>
mov    $0x0,%al
call   1030 <_OS_Restore_Btemp@plt>
mov    $0x0,%al
call   1070 <_OS_SET_PC@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_OS_JumpToTask>:
push   %rax
xor    %eax,%eax
call   1040 <_OS_STORE_SP@plt>
xor    %eax,%eax
call   1060 <_OS_SET_FSR_CUR_TASK@plt>
xor    %eax,%eax
call   1050 <_OS_Restore_TaskSP@plt>
xor    %eax,%eax
call   1030 <_OS_Restore_Btemp@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <_OS_SET_PC@plt>

LLVM IR (-O0):
define void @_OS_JumpToTask() {
%1 = call i32 (...) @_OS_STORE_SP()
%2 = call i32 (...) @_OS_SET_FSR_CUR_TASK()
%3 = call i32 (...) @_OS_Restore_TaskSP()
%4 = call i32 (...) @_OS_Restore_Btemp()
%5 = call i32 (...) @_OS_SET_PC()
ret void
}

LLVM IR (-O2):
define void @_OS_JumpToTask() {
%1 = tail call i32 (...) @_OS_STORE_SP()
%2 = tail call i32 (...) @_OS_SET_FSR_CUR_TASK()
%3 = tail call i32 (...) @_OS_Restore_TaskSP()
%4 = tail call i32 (...) @_OS_Restore_Btemp()
%5 = tail call i32 (...) @_OS_SET_PC()
ret void
}
int LOP1() { return 0; }


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

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

LLVM IR (-O0):
define i32 @LOP1() {
ret i32 0
}

LLVM IR (-O2):
define i32 @LOP1() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_poly1305_opp(uintptr_t, uintptr_t);
void fiat_poly1305_opp(uint64_t out1[3], const uint64_t arg1[3]) {
  internal_fiat_poly1305_opp((uintptr_t)out1, (uintptr_t)arg1);
}


x86 assembly (clang, -O0):
<fiat_poly1305_opp>:
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 <internal_fiat_poly1305_opp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fiat_poly1305_opp>:
jmp    1030 <internal_fiat_poly1305_opp@plt>

LLVM IR (-O0):
define void @fiat_poly1305_opp(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_poly1305_opp(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_poly1305_opp(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_poly1305_opp(i64 %3, i64 %4)
ret void
}
void X509_ATTRIBUTE_create_by_NID(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_ATTRIBUTE_create_by_NID() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  extern int num;
  num = 5;
  printf("The value of num is now %d\n", num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
movl   $0x5,(%rax)
mov    0x2ea5(%rip),%rax
mov    (%rax),%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
movl   $0x5,(%rax)
lea    0xedb(%rip),%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@num = external global i32
@.str = [28 x i8] c"The value of num is now %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
store i32 5, i32* @num
%2 = load i32, i32* @num
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@num = external global i32
@.str = [28 x i8] c"The value of num is now %d\0A\00"
define i32 @main() {
store i32 5, i32* @num
%1 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 5)
ret i32 0
}
void gpzrec_(scan_no, feed_no, rec_no, num_rec, record,
             return_code) int *scan_no,
    *feed_no, *rec_no, *num_rec;
char *record;
int *return_code;
{ *return_code = -1; }


x86 assembly (clang, -O0):
<gpzrec_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movl   $0xffffffff,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpzrec_>:
movl   $0xffffffff,(%r9)
ret

LLVM IR (-O0):
define void @gpzrec_(i32* %0, i32* %1, i32* %2, i32* %3, i8* %4, i32* %5) {
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i8*
%12 = alloca i32*
store i32* %0, i32** %7
store i32* %1, i32** %8
store i32* %2, i32** %9
store i32* %3, i32** %10
store i8* %4, i8** %11
store i32* %5, i32** %12
%13 = load i32*, i32** %12
store i32 -1, i32* %13
ret void
}

LLVM IR (-O2):
define void @gpzrec_(i32* nocapture readnone %0, i32* nocapture readnone %1, i32* nocapture readnone %2, i32* nocapture readnone %3, i8* nocapture readnone %4, i32* nocapture writeonly %5) {
store i32 -1, i32* %5
ret void
}
/* Variables and functions */
int int_input();
int /*<<< orphan*/ printf(char *);
int teacher_input(void) {
  int teacher = 0;
  printf("Is Teacher (1 = Teacher, 0 = Not Teacher)?");
  teacher = int_input();
  return teacher;
}


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

x86 assembly (clang, -O2):
<teacher_input>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <int_input@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"Is Teacher (1 = Teacher, 0 = Not Teacher)?\00"
define i32 @teacher_input() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @int_input()
store i32 %3, i32* %1
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [43 x i8] c"Is Teacher (1 = Teacher, 0 = Not Teacher)?\00"
define i32 @teacher_input() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @int_input()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ glClearColor(double, double, double, double);
void init(void) { glClearColor(0.0, 0.0, 0.0, 1.0); }


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm2,%xmm2
movsd  0xee1(%rip),%xmm3
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <glClearColor@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
movsd  0xee8(%rip),%xmm3
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
jmp    1030 <glClearColor@plt>

LLVM IR (-O0):
define void @init() {
%1 = call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
ret void
}

LLVM IR (-O2):
define void @init() {
%1 = tail call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ append(char *, char const *);
int /*<<< orphan*/ indent();
void on_dict_start(void *ctx, const char *code, const char *name) {
  append("%s:", name);
  indent();
}


x86 assembly (clang, -O0):
<on_dict_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xec1(%rip),%rdi
call   1030 <append@plt>
mov    $0x0,%al
call   1040 <indent@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<on_dict_start>:
push   %rax
lea    0xed8(%rip),%rdi
mov    %rdx,%rsi
call   1030 <append@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <indent@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s:\00"
define void @on_dict_start(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = call i32 @append(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = call i32 (...) @indent()
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s:\00"
define void @on_dict_start(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* %2) {
%4 = tail call i32 @append(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = tail call i32 (...) @indent()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo();
void bar() {
  foo();
  foo();
}


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

x86 assembly (clang, -O2):
<bar>:
push   %rax
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <foo@plt>

LLVM IR (-O0):
define void @bar() {
%1 = call i32 (...) @foo()
%2 = call i32 (...) @foo()
ret void
}

LLVM IR (-O2):
define void @bar() {
%1 = tail call i32 (...) @foo()
%2 = tail call i32 (...) @foo()
ret void
}
/* Variables and functions */
bool def_is_inc_comp(int *x, int *y) {
  if (*x < *y)
    return true;
  else
    return false;
}


x86 assembly (clang, -O0):
<def_is_inc_comp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    112a <def_is_inc_comp+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1131 <def_is_inc_comp+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<def_is_inc_comp>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
setl   %al
ret

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

LLVM IR (-O2):
define i32 @def_is_inc_comp(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
void gtk_radio_menu_item_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_radio_menu_item_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ calculate_reachable_squares();
int /*<<< orphan*/ find_corrals();
int pi_corrals_check();
int /*<<< orphan*/ prune_position_by_pi_corral(int);
void calculate_position() {
  calculate_reachable_squares();
  find_corrals();
  int prune = pi_corrals_check();
  if (prune)
    prune_position_by_pi_corral(prune);
}


x86 assembly (clang, -O0):
<calculate_position>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <calculate_reachable_squares@plt>
mov    $0x0,%al
call   1040 <find_corrals@plt>
mov    $0x0,%al
call   1060 <pi_corrals_check@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1172 <calculate_position+0x32>
mov    -0x4(%rbp),%edi
call   1050 <prune_position_by_pi_corral@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_position>:
push   %rax
xor    %eax,%eax
call   1030 <calculate_reachable_squares@plt>
xor    %eax,%eax
call   1040 <find_corrals@plt>
xor    %eax,%eax
call   1060 <pi_corrals_check@plt>
test   %eax,%eax
je     1162 <calculate_position+0x22>
mov    %eax,%edi
pop    %rax
jmp    1050 <prune_position_by_pi_corral@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @calculate_position() {
%1 = tail call i32 (...) @calculate_reachable_squares()
%2 = tail call i32 (...) @find_corrals()
%3 = tail call i32 (...) @pi_corrals_check()
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = tail call i32 @prune_position_by_pi_corral(i32 %3)
br label %7
7: ; preds = %5, %0
ret void
}
/* Variables and functions */
#define AF_INET 128
int /*<<< orphan*/ EAFNOSUPPORT;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int inet_net_pton_ipv4(char const *, void *, size_t);
int inet_net_pton(int af, const char *src, void *dst, size_t size) {
  switch (af) {
  case AF_INET:
    return (inet_net_pton_ipv4(src, dst, size));
  default:
    __set_errno(EAFNOSUPPORT);
    return (-1);
  }
}


x86 assembly (clang, -O0):
<inet_net_pton>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x80,%eax
jne    1163 <inet_net_pton+0x43>
jmp    114a <inet_net_pton+0x2a>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <inet_net_pton_ipv4@plt>
mov    %eax,-0x4(%rbp)
jmp    1178 <inet_net_pton+0x58>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inet_net_pton>:
cmp    $0x80,%edi
jne    1136 <inet_net_pton+0x16>
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rcx,%rdx
jmp    1040 <inet_net_pton_ipv4@plt>
push   %rax
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@EAFNOSUPPORT = global i32 0
define i32 @inet_net_pton(i32 %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i64
store i32 %0, i32* %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i64 %3, i64* %9
%10 = load i32, i32* %6
switch i32 %10, label %16 [
i32 128, label %11
]
11: ; preds = %4
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = load i64, i64* %9
%15 = call i32 @inet_net_pton_ipv4(i8* %12, i8* %13, i64 %14)
store i32 %15, i32* %5
br label %19
16: ; preds = %4
%17 = load i32, i32* @EAFNOSUPPORT
%18 = call i32 @__set_errno(i32 %17)
store i32 -1, i32* %5
br label %19
19: ; preds = %16, %11
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
@EAFNOSUPPORT = global i32 0
define i32 @inet_net_pton(i32 %0, i8* %1, i8* %2, i64 %3) {
%5 = icmp eq i32 %0, 128
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @inet_net_pton_ipv4(i8* %1, i8* %2, i64 %3)
br label %11
8: ; preds = %4
%9 = load i32, i32* @EAFNOSUPPORT
%10 = tail call i32 @__set_errno(i32 %9)
br label %11
11: ; preds = %8, %6
%12 = phi i32 [ %7, %6 ], [ -1, %8 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void f(int x) { exit(x); }


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

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

LLVM IR (-O0):
define void @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
define void @f(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char *applet(char *const);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void usage(FILE *f, char *const arg0) {
  fprintf(f,
          "Usage: %s [OPTIONS]\n\n"
          "Concatenate UEVENTS(s) to standard output.\n\n"
          "Read netlink socket.\n\n"
          "Options:\n"
          " -c or --scissors       Add a scissor line between event.\n"
          " -v or --verbose        Turn on verbose messages.\n"
          " -D or --debug          Turn on debug messages.\n"
          " -h or --help           Display this message.\n"
          " -V or --version        Display the version.\n"
          "",
          applet(arg0));
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <applet@plt>
mov    -0x18(%rbp),%rdi
mov    %rax,%rdx
lea    0xeb1(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <applet@plt>
lea    0xecd(%rip),%rsi
mov    %rbx,%rdi
mov    %rax,%rdx
pop    %rbx
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@.str = [344 x i8] c"Usage: %s [OPTIONS]\0A\0AConcatenate UEVENTS(s) to standard output.\0A\0ARead netlink socket.\0A\0AOptions:\0A -c or --scissors Add a scissor line between event.\0A -v or --verbose Turn on verbose messages.\0A -D or --debug Turn on debug messages.\0A -h or --help Display this message.\0A -V or --version Display the version.\0A\00"
define void @usage(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 = load i8*, i8** %4
%7 = call i8* @applet(i8* %6)
%8 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([344 x i8], [344 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [344 x i8] c"Usage: %s [OPTIONS]\0A\0AConcatenate UEVENTS(s) to standard output.\0A\0ARead netlink socket.\0A\0AOptions:\0A -c or --scissors Add a scissor line between event.\0A -v or --verbose Turn on verbose messages.\0A -D or --debug Turn on debug messages.\0A -h or --help Display this message.\0A -V or --version Display the version.\0A\00"
define void @usage(i32* nocapture %0, i8* %1) {
%3 = tail call i8* @applet(i8* %1)
%4 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([344 x i8], [344 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
void pixel_mul_by_ratio(float *p0, float *p1, float ratio) {
  int ic;
  for (ic = 0; ic < 3; ic++)
    p1[ic] = p0[ic] * ratio;
  p1[3] = p0[3];
}


x86 assembly (clang, -O0):
<pixel_mul_by_ratio>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x3,-0x18(%rbp)
jge    114f <pixel_mul_by_ratio+0x4f>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mulss  -0x14(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1118 <pixel_mul_by_ratio+0x18>
mov    -0x8(%rbp),%rax
movss  0xc(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<pixel_mul_by_ratio>:
movss  (%rdi),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,(%rsi)
movss  0x4(%rdi),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,0x4(%rsi)
mulss  0x8(%rdi),%xmm0
movss  %xmm0,0x8(%rsi)
movss  0xc(%rdi),%xmm0
movss  %xmm0,0xc(%rsi)
ret

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

LLVM IR (-O2):
define void @pixel_mul_by_ratio(float* nocapture %0, float* nocapture writeonly %1, float %2) {
%4 = load float, float* %0
%5 = fmul float %4, %2
store float %5, float* %1
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = fmul float %7, %2
%9 = getelementptr inbounds float, float* %1, i64 1
store float %8, float* %9
%10 = getelementptr inbounds float, float* %0, i64 2
%11 = load float, float* %10
%12 = fmul float %11, %2
%13 = getelementptr inbounds float, float* %1, i64 2
store float %12, float* %13
%14 = getelementptr inbounds float, float* %0, i64 3
%15 = load float, float* %14
%16 = getelementptr inbounds float, float* %1, i64 3
store float %15, float* %16
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void usage(char *fname) {
  printf("Usage: %s val1 val2 ...\n", fname);
  printf("Values may be given as hex patterns or as floating point numbers\n");
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed0(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Usage: %s val1 val2 ...\0A\00"
@.str.1 = [66 x i8] c"Values may be given as hex patterns or as floating point numbers\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [25 x i8] c"Usage: %s val1 val2 ...\0A\00"
@str = [65 x i8] c"Values may be given as hex patterns or as floating point numbers\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
int memory_page_size(struct _memory *memory) { return (64 * 1024); }


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

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

LLVM IR (-O0):
%struct._memory = type opaque
define i32 @memory_page_size(%struct._memory* %0) {
%2 = alloca %struct._memory*
store %struct._memory* %0, %struct._memory** %2
ret i32 65536
}

LLVM IR (-O2):
%struct._memory = type opaque
define i32 @memory_page_size(%struct._memory* nocapture readnone %0) {
ret i32 65536
}
int test_imm_3Euint16_reg(unsigned short val) {
  return ((val) & (0x3E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_3Euint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0x3e,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_3Euint16_reg>:
test   $0x3e,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_3Euint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 62
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
scalar_t__ errno;
int kill(unsigned long, int);
int kill_lwp(unsigned long lwpid, int signo) {
  static int tkill_failed;
  errno = 0;
  return kill(lwpid, signo);
}


x86 assembly (clang, -O0):
<kill_lwp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <kill@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kill_lwp>:
mov    0x2ec9(%rip),%rax
movq   $0x0,(%rax)
jmp    1030 <kill@plt>

LLVM IR (-O0):
@kill_lwp.tkill_failed = internal global i32 0
@errno = global i64 0
define i32 @kill_lwp(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
store i64 0, i64* @errno
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = call i32 @kill(i64 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@errno = global i64 0
define i32 @kill_lwp(i64 %0, i32 %1) {
store i64 0, i64* @errno
%3 = tail call i32 @kill(i64 %0, i32 %1)
ret i32 %3
}
void Exception_Trap(void) {
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<Exception_Trap>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Exception_Trap+0x9>
jmp    1109 <Exception_Trap+0x9>

x86 assembly (clang, -O2):
<Exception_Trap>:
jmp    1100 <Exception_Trap>

LLVM IR (-O0):
define void @Exception_Trap() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define void @Exception_Trap() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ decode(int /*<<< orphan*/ *);
int /*<<< orphan*/ eval(int *, int /*<<< orphan*/ *);
void run(uint32_t pc) {
  int running = 1;
  while (running) {
    decode(&pc);
    eval(&running, &pc);
  }
}


x86 assembly (clang, -O0):
<run>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1157 <run+0x37>
lea    -0x4(%rbp),%rdi
call   1030 <decode@plt>
lea    -0x8(%rbp),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <eval@plt>
jmp    1132 <run+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run>:
push   %r14
push   %rbx
push   %rax
mov    %edi,0x4(%rsp)
movl   $0x1,(%rsp)
lea    0x4(%rsp),%rbx
mov    %rsp,%r14
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <decode@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <eval@plt>
cmpl   $0x0,(%rsp)
jne    1140 <run+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @run(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = bitcast i32* %3 to i8*
store i32 1, i32* %3
br label %5
5: ; preds = %1, %5
%6 = call i32 @decode(i32* %2)
%7 = call i32 @eval(i32* %3, i32* %2)
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5
ret void
}