xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("int  : %ld\n", sizeof(float));
  printf("int* : %ld\n", sizeof(double));
  return (0);
}


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"int : %ld\0A\00"
@.str.1 = [12 x i8] c"int* : %ld\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 8)
ret i32 0
}
void foo_2_2_2_2_2_1_1_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_2_2_2_2_1_1_1_1() {
ret void
}
void list_del_leaf_rt_rq(struct rt_rq *rt_rq) {}


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

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

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

LLVM IR (-O2):
%struct.rt_rq = type opaque
define void @list_del_leaf_rt_rq(%struct.rt_rq* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int getgroups(int size, gid_t list[]) { return -1; }


x86 assembly (clang, -O0):
<getgroups>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @getgroups(i32 %0, i32* nocapture readnone %1) {
ret i32 -1
}
int test_imm_B4uint16_mem(unsigned short *val) {
  return ((*val) & (0xB4 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_B4uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 180
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ construct_vor();
int /*<<< orphan*/ get_file();
int main(int argc, char *argv[]) {
  get_file();
  construct_vor();
  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   1040 <get_file@plt>
mov    $0x0,%al
call   1030 <construct_vor@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <get_file@plt>
xor    %eax,%eax
call   1030 <construct_vor@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 (...) @get_file()
%7 = call i32 (...) @construct_vor()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @get_file()
%4 = tail call i32 (...) @construct_vor()
ret i32 0
}
int getValue(char c) {
  return (c >= '0' && c <= '9') ? (c - '0') : (c - 'A' + 10);
}


x86 assembly (clang, -O0):
<getValue>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x30,%eax
jl     1133 <getValue+0x33>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
jg     1133 <getValue+0x33>
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x8(%rbp)
jmp    1140 <getValue+0x40>
movsbl -0x1(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getValue>:
lea    -0x30(%rdi),%ecx
lea    -0x37(%rdi),%edx
lea    -0x30(%rdi),%eax
cmp    $0xa,%cl
cmovae %edx,%eax
ret

LLVM IR (-O0):
define i32 @getValue(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = sub nsw i32 %12, 48
br label %19
14: ; preds = %6, %1
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = sub nsw i32 %16, 65
%18 = add nsw i32 %17, 10
br label %19
19: ; preds = %14, %10
%20 = phi i32 [ %13, %10 ], [ %18, %14 ]
ret i32 %20
}

LLVM IR (-O2):
define i32 @getValue(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add i8 %0, -48
%4 = icmp ult i8 %3, 10
%5 = select i1 %4, i32 -48, i32 -55
%6 = add nsw i32 %5, %2
ret i32 %6
}
/* Variables and functions */
void *vmm_top_addr(void *addr) {
  return addr + (((uintptr_t)addr & 0xFFF) ^ 0xFFF) + 1;
}


x86 assembly (clang, -O0):
<vmm_top_addr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
and    $0xfff,%rcx
xor    $0xfff,%rcx
add    %rcx,%rax
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vmm_top_addr>:
mov    %edi,%eax
not    %eax
and    $0xfff,%eax
add    %rdi,%rax
add    $0x1,%rax
ret

LLVM IR (-O0):
define i8* @vmm_top_addr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i64
%6 = and i64 %5, 4095
%7 = xor i64 %6, 4095
%8 = getelementptr i8, i8* %3, i64 %7
%9 = getelementptr i8, i8* %8, i64 1
ret i8* %9
}

LLVM IR (-O2):
define i8* @vmm_top_addr(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = and i64 %2, 4095
%4 = xor i64 %3, 4095
%5 = getelementptr i8, i8* %0, i64 %4
%6 = getelementptr i8, i8* %5, i64 1
ret i8* %6
}
/* Type definitions */
struct itstree_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ do_record_new_rule(struct itstree_node *, int const *,
                                      size_t, int, size_t, size_t, size_t);
void record_its_private(struct itstree_node *itst, const int *its, size_t sz,
                        size_t rc30, size_t rc50, size_t rc70) {
  do_record_new_rule(itst, its, sz, 1, rc30, rc50, rc70);
}


x86 assembly (clang, -O0):
<record_its_private>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
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    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x30(%rbp),%rax
mov    $0x1,%ecx
mov    %rax,(%rsp)
call   1030 <do_record_new_rule@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<record_its_private>:
push   %rax
mov    %r8,%rax
mov    %rcx,%r8
mov    %r9,(%rsp)
mov    $0x1,%ecx
mov    %rax,%r9
call   1030 <do_record_new_rule@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.itstree_node = type { i32 }
define void @record_its_private(%struct.itstree_node* %0, i32* %1, i64 %2, i64 %3, i64 %4, i64 %5) {
%7 = alloca %struct.itstree_node*
%8 = alloca i32*
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
store %struct.itstree_node* %0, %struct.itstree_node** %7
store i32* %1, i32** %8
store i64 %2, i64* %9
store i64 %3, i64* %10
store i64 %4, i64* %11
store i64 %5, i64* %12
%13 = load %struct.itstree_node*, %struct.itstree_node** %7
%14 = load i32*, i32** %8
%15 = load i64, i64* %9
%16 = load i64, i64* %10
%17 = load i64, i64* %11
%18 = load i64, i64* %12
%19 = call i32 @do_record_new_rule(%struct.itstree_node* %13, i32* %14, i64 %15, i32 1, i64 %16, i64 %17, i64 %18)
ret void
}

LLVM IR (-O2):
%struct.itstree_node = type { i32 }
define void @record_its_private(%struct.itstree_node* %0, i32* %1, i64 %2, i64 %3, i64 %4, i64 %5) {
%7 = tail call i32 @do_record_new_rule(%struct.itstree_node* %0, i32* %1, i64 %2, i32 1, i64 %3, i64 %4, i64 %5)
ret void
}
long __syscall0(long num) {
  unsigned long result;
  asm volatile("syscall" : "=a"(result) : "a"(num) : "memory", "rcx", "r11");
  return result;
}


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

x86 assembly (clang, -O2):
<__syscall0>:
mov    %rdi,%rax
syscall
ret

LLVM IR (-O0):
define i64 @__syscall0(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 asm sideeffect "syscall", "={ax},{ax},~{memory},~{rcx},~{r11},~{dirflag},~{fpsr},~{flags}"(i64 %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
define i64 @__syscall0(i64 %0) {
%2 = tail call i64 asm sideeffect "syscall", "={ax},{ax},~{memory},~{rcx},~{r11},~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret i64 %2
}
int test_imm_AEuint16_reg(unsigned short val) {
  return ((val) & (-0xAE << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_AEuint16_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, -174
%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_AEuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -174
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
unsigned int Twist(unsigned int a, unsigned int b) {
  unsigned int mixbits = (a & 0x80000000) | (b & 0x7fffffff);
  unsigned int matrixA = (-(b & 1)) & 0x9908b0df;
  return (mixbits >> 1) ^ matrixA;
}


x86 assembly (clang, -O0):
<Twist>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x80000000,%eax
mov    -0x8(%rbp),%ecx
and    $0x7fffffff,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
and    $0x1,%ecx
xor    %eax,%eax
sub    %ecx,%eax
and    $0x9908b0df,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x1,%eax
xor    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Twist>:
and    $0x80000000,%edi
mov    %esi,%eax
and    $0x7ffffffe,%eax
or     %edi,%eax
and    $0x1,%esi
neg    %esi
and    $0x9908b0df,%esi
shr    %eax
xor    %esi,%eax
ret

LLVM IR (-O0):
define i32 @Twist(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = and i32 %7, -2147483648
%9 = load i32, i32* %4
%10 = and i32 %9, 2147483647
%11 = or i32 %8, %10
store i32 %11, i32* %5
%12 = load i32, i32* %4
%13 = and i32 %12, 1
%14 = sub i32 0, %13
%15 = and i32 %14, -1727483681
store i32 %15, i32* %6
%16 = load i32, i32* %5
%17 = lshr i32 %16, 1
%18 = load i32, i32* %6
%19 = xor i32 %17, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @Twist(i32 %0, i32 %1) {
%3 = and i32 %0, -2147483648
%4 = and i32 %1, 2147483646
%5 = or i32 %4, %3
%6 = and i32 %1, 1
%7 = sub nsw i32 0, %6
%8 = and i32 %7, -1727483681
%9 = lshr exact i32 %5, 1
%10 = xor i32 %9, %8
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void separator(void) {
  int j;
  for (j = 0; j < 74; j++)
    printf("-");
  printf("\n");
}


x86 assembly (clang, -O0):
<separator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x4a,-0x4(%rbp)
jge    1143 <separator+0x33>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <separator+0xf>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<separator>:
push   %rbx
mov    $0x4a,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <separator+0x10>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"-\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @separator() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %7, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 74
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %2
10: ; preds = %2
%11 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
define void @separator() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @putchar(i32 45)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 74
br i1 %5, label %6, label %1
6: ; preds = %1
%7 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ grg_get_all_grid_addresses(long **, long const *);
void ksp_get_all_grgrid_addresses(long grid_address[][3],
                                  const long D_diag[3]) {
  grg_get_all_grid_addresses(grid_address, D_diag);
}


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

x86 assembly (clang, -O2):
<ksp_get_all_grgrid_addresses>:
jmp    1030 <grg_get_all_grid_addresses@plt>

LLVM IR (-O0):
define void @ksp_get_all_grgrid_addresses([3 x i64]* %0, i64* %1) {
%3 = alloca [3 x i64]*
%4 = alloca i64*
store [3 x i64]* %0, [3 x i64]** %3
store i64* %1, i64** %4
%5 = load [3 x i64]*, [3 x i64]** %3
%6 = bitcast [3 x i64]* %5 to i64**
%7 = load i64*, i64** %4
%8 = call i32 @grg_get_all_grid_addresses(i64** %6, i64* %7)
ret void
}

LLVM IR (-O2):
define void @ksp_get_all_grgrid_addresses([3 x i64]* %0, i64* %1) {
%3 = bitcast [3 x i64]* %0 to i64**
%4 = tail call i32 @grg_get_all_grid_addresses(i64** %3, i64* %1)
ret void
}
/* Type definitions */
struct section_list {
  int dummy;
};
struct genlist {
  int dummy;
};

/* Variables and functions */
scalar_t__ genlist_copy(struct genlist const *);
struct section_list *section_list_copy(const struct section_list *tthis) {
  return (struct section_list *)genlist_copy((const struct genlist *)tthis);
}


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

x86 assembly (clang, -O2):
<section_list_copy>:
jmp    1030 <genlist_copy@plt>

LLVM IR (-O0):
%struct.section_list = type { i32 }
%struct.genlist = type { i32 }
define %struct.section_list* @section_list_copy(%struct.section_list* %0) {
%2 = alloca %struct.section_list*
store %struct.section_list* %0, %struct.section_list** %2
%3 = load %struct.section_list*, %struct.section_list** %2
%4 = bitcast %struct.section_list* %3 to %struct.genlist*
%5 = call i64 @genlist_copy(%struct.genlist* %4)
%6 = inttoptr i64 %5 to %struct.section_list*
ret %struct.section_list* %6
}

LLVM IR (-O2):
%struct.section_list = type { i32 }
%struct.genlist = type { i32 }
define %struct.section_list* @section_list_copy(%struct.section_list* %0) {
%2 = bitcast %struct.section_list* %0 to %struct.genlist*
%3 = tail call i64 @genlist_copy(%struct.genlist* %2)
%4 = inttoptr i64 %3 to %struct.section_list*
ret %struct.section_list* %4
}
/* Variables and functions */
char *libintl_ngettext(char const *, char const *, unsigned long);
char *ngettext(const char *msgid1, const char *msgid2, unsigned long int n) {
  return libintl_ngettext(msgid1, msgid2, n);
}


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

x86 assembly (clang, -O2):
<ngettext>:
jmp    1030 <libintl_ngettext@plt>

LLVM IR (-O0):
define i8* @ngettext(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i8* @libintl_ngettext(i8* %7, i8* %8, i64 %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @ngettext(i8* %0, i8* %1, i64 %2) {
%4 = tail call i8* @libintl_ngettext(i8* %0, i8* %1, i64 %2)
ret i8* %4
}
void ffi_test_20(double x1, double x2, double x3, double y1, double y2,
                 double y3, double z1, double z2, double z3) {
  (void)x1, (void)x2, (void)x3, (void)y1, (void)y2, (void)y3, (void)z1,
      (void)z2, (void)z3;
}


x86 assembly (clang, -O0):
<ffi_test_20>:
push   %rbp
mov    %rsp,%rbp
movsd  0x10(%rbp),%xmm8
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  %xmm7,-0x40(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @ffi_test_20(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8) {
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
store double %0, double* %10
store double %1, double* %11
store double %2, double* %12
store double %3, double* %13
store double %4, double* %14
store double %5, double* %15
store double %6, double* %16
store double %7, double* %17
store double %8, double* %18
%19 = load double, double* %10
%20 = load double, double* %11
%21 = load double, double* %12
%22 = load double, double* %13
%23 = load double, double* %14
%24 = load double, double* %15
%25 = load double, double* %16
%26 = load double, double* %17
%27 = load double, double* %18
ret void
}

LLVM IR (-O2):
define void @ffi_test_20(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8) {
ret void
}
double _sub(double a1, double a2) { return a1 - a2; }


x86 assembly (clang, -O0):
<_sub>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_sub>:
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @_sub(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fsub double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @_sub(double %0, double %1) {
%3 = fsub double %0, %1
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void help(const char *prog) { printf("usage: %s <command>\n", prog); }


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

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

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

LLVM IR (-O2):
@.str = [21 x i8] c"usage: %s <command>\0A\00"
define void @help(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dinoExit(int);
int /*<<< orphan*/ guitOutit();
int /*<<< orphan*/ shellOut(char *);
void finish(int n) {
  shellOut("\n");
  guitOutit();
  dinoExit(-1);
}


x86 assembly (clang, -O0):
<finish>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1050 <shellOut@plt>
mov    $0x0,%al
call   1030 <guitOutit@plt>
mov    $0xffffffff,%edi
call   1040 <dinoExit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<finish>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <shellOut@plt>
xor    %eax,%eax
call   1030 <guitOutit@plt>
mov    $0xffffffff,%edi
pop    %rax
jmp    1040 <dinoExit@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @finish(i32 %0) {
%2 = tail call i32 @shellOut(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @guitOutit()
%4 = tail call i32 @dinoExit(i32 -1)
ret void
}
int CL_GetClientState(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @CL_GetClientState() {
ret i32 0
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double gettimeinseconds(void) {
  struct timeval tmp;
  gettimeofday(&tmp, NULL);
  return (double)tmp.tv_sec + (double)tmp.tv_usec * .000001;
}


x86 assembly (clang, -O0):
<gettimeinseconds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq -0x8(%rbp),%xmm1
cvtsi2sdq -0x10(%rbp),%xmm0
movsd  0xec7(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettimeinseconds>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
cvtsi2sdq 0x8(%rsp),%xmm0
mulsd  0xeca(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define double @gettimeinseconds() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = sitofp i64 %4 to double
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = call double @llvm.fmuladd.f64(double %8, double 0x3EB0C6F7A0B5ED8D, double %5)
ret double %9
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define double @gettimeinseconds() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = tail call double @llvm.fmuladd.f64(double %9, double 0x3EB0C6F7A0B5ED8D, double %6)
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ syscall(int, char *, char *);
int main() {
  syscall(326, "task.c", "dest.c");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x146,%edi
lea    0xed5(%rip),%rsi
lea    0xed5(%rip),%rdx
call   1030 <syscall@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xee8(%rip),%rdx
mov    $0x146,%edi
call   1030 <syscall@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"task.c\00"
@.str.1 = [7 x i8] c"dest.c\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @syscall(i32 326, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"task.c\00"
@.str.1 = [7 x i8] c"dest.c\00"
define i32 @main() {
%1 = tail call i32 @syscall(i32 326, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
void pm_runtime_remove(struct device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define void @pm_runtime_remove(%struct.device* nocapture %0) {
ret void
}
/* Variables and functions */
unsigned int htonl(unsigned int);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned int *, int);
unsigned short saveInt32ToBuffer(unsigned int value, unsigned char *buffer,
                                 unsigned short offset) {
  value = htonl(value);
  memcpy(buffer + offset, &value, sizeof(unsigned int));
  return offset + sizeof(unsigned int);
}


x86 assembly (clang, -O0):
<saveInt32ToBuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dx,%ax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %ax,-0x12(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <htonl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rdi
movzwl -0x12(%rbp),%eax
cltq
add    %rax,%rdi
lea    -0x4(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
movzwl -0x12(%rbp),%eax
add    $0x4,%rax
movzwl %ax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<saveInt32ToBuffer>:
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %rsi,%r14
call   1030 <htonl@plt>
mov    %eax,0x4(%rsp)
mov    %ebx,%edi
add    %r14,%rdi
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
add    $0x4,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define zeroext i16 @saveInt32ToBuffer(i32 %0, i8* %1, i16 zeroext %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i16
store i32 %0, i32* %4
store i8* %1, i8** %5
store i16 %2, i16* %6
%7 = load i32, i32* %4
%8 = call i32 @htonl(i32 %7)
store i32 %8, i32* %4
%9 = load i8*, i8** %5
%10 = load i16, i16* %6
%11 = zext i16 %10 to i32
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %9, i64 %12
%14 = call i32 @memcpy(i8* %13, i32* %4, i32 4)
%15 = load i16, i16* %6
%16 = zext i16 %15 to i64
%17 = add i64 %16, 4
%18 = trunc i64 %17 to i16
ret i16 %18
}

LLVM IR (-O2):
define zeroext i16 @saveInt32ToBuffer(i32 %0, i8* %1, i16 zeroext %2) {
%4 = alloca i32
%5 = tail call i32 @htonl(i32 %0)
store i32 %5, i32* %4
%6 = zext i16 %2 to i64
%7 = getelementptr inbounds i8, i8* %1, i64 %6
%8 = call i32 @memcpy(i8* %7, i32* %4, i32 4)
%9 = add i16 %2, 4
ret i16 %9
}
/* Type definitions */
struct completion {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void complete_all(struct completion *c) { assert(0); }


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

x86 assembly (clang, -O2):
<complete_all>:
xor    %edi,%edi
jmp    1030 <assert@plt>

LLVM IR (-O0):
%struct.completion = type { i32 }
define void @complete_all(%struct.completion* %0) {
%2 = alloca %struct.completion*
store %struct.completion* %0, %struct.completion** %2
%3 = call i32 @assert(i32 0)
ret void
}

LLVM IR (-O2):
%struct.completion = type { i32 }
define void @complete_all(%struct.completion* nocapture readnone %0) {
%2 = tail call i32 @assert(i32 0)
ret void
}
float __ocl_clamp_float_float(float src, float minval, float maxval) {
  if (src < minval) {
    return minval;
  }
  if (src > maxval) {
    return maxval;
  }
  return src;
}


x86 assembly (clang, -O0):
<__ocl_clamp_float_float>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1135 <__ocl_clamp_float_float+0x35>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <__ocl_clamp_float_float+0x5d>
movss  -0x8(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1153 <__ocl_clamp_float_float+0x53>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <__ocl_clamp_float_float+0x5d>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_clamp_float_float>:
minss  %xmm0,%xmm2
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm3
andnps %xmm2,%xmm3
andps  %xmm1,%xmm0
orps   %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @__ocl_clamp_float_float(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
%8 = load float, float* %5
%9 = load float, float* %6
%10 = fcmp olt float %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load float, float* %6
store float %12, float* %4
br label %21
13: ; preds = %3
%14 = load float, float* %5
%15 = load float, float* %7
%16 = fcmp ogt float %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load float, float* %7
store float %18, float* %4
br label %21
19: ; preds = %13
%20 = load float, float* %5
store float %20, float* %4
br label %21
21: ; preds = %19, %17, %11
%22 = load float, float* %4
ret float %22
}

LLVM IR (-O2):
define float @__ocl_clamp_float_float(float %0, float %1, float %2) {
%4 = fcmp olt float %0, %1
%5 = fcmp ogt float %0, %2
%6 = select i1 %5, float %2, float %0
%7 = select i1 %4, float %1, float %6
ret float %7
}
float atanhf(float x) { return 0.0; }


x86 assembly (clang, -O0):
<atanhf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<atanhf>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @atanhf(float %0) {
%2 = alloca float
store float %0, float* %2
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @atanhf(float %0) {
ret float 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, char, int);
int /*<<< orphan*/ sprintf(char *, char *, double);
int strlen(char *);
int get_double_len(double value) {
  char n_str[2048];
  memset(n_str, '\0', 2048);
  sprintf(n_str, "%f", value);
  return strlen(n_str);
}


x86 assembly (clang, -O0):
<get_double_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x810,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    -0x810(%rbp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1040 <memset@plt>
lea    -0x810(%rbp),%rdi
movsd  -0x8(%rbp),%xmm0
lea    0xe9a(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x810(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x810,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_double_len>:
push   %rbx
sub    $0x810,%rsp
movsd  %xmm0,0x8(%rsp)
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1040 <memset@plt>
lea    0xea7(%rip),%rsi
mov    %rbx,%rdi
movsd  0x8(%rsp),%xmm0
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
add    $0x810,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define i32 @get_double_len(double %0) {
%2 = alloca double
%3 = alloca [2048 x i8]
store double %0, double* %2
%4 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%5 = call i32 @memset(i8* %4, i8 signext 0, i32 2048)
%6 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%7 = load double, double* %2
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %7)
%9 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%10 = call i32 @strlen(i8* %9)
ret i32 %10
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i32 @get_double_len(double %0) {
%2 = alloca [2048 x i8]
%3 = getelementptr inbounds [2048 x i8], [2048 x i8]* %2, i64 0, i64 0
%4 = call i32 @memset(i8* %3, i8 signext 0, i32 2048)
%5 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %0)
%6 = call i32 @strlen(i8* %3)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430InterruptP__Port15__default__fired();
void HplMsp430InterruptP__Port15__fired(void) {
  HplMsp430InterruptP__Port15__default__fired();
}


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

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

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

LLVM IR (-O2):
define void @HplMsp430InterruptP__Port15__fired() {
%1 = tail call i32 (...) @HplMsp430InterruptP__Port15__default__fired()
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ display_result(char **, size_t);
int /*<<< orphan*/ gen_result(char **, size_t);
size_t get_input(char **);
char **init_grid(size_t);
int main(int argc, char *argv[]) {
  size_t size = get_input(argv);
  char **grid = init_grid(size);
  gen_result(grid, size);
  display_result(grid, size);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <get_input@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <init_grid@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <gen_result@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <display_result@plt>
mov    0x2e4f(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rdi
call   1060 <get_input@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <init_grid@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <gen_result@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <display_result@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = call i64 @get_input(i8** %8)
store i64 %9, i64* %6
%10 = load i64, i64* %6
%11 = call i8** @init_grid(i64 %10)
store i8** %11, i8*** %7
%12 = load i8**, i8*** %7
%13 = load i64, i64* %6
%14 = call i32 @gen_result(i8** %12, i64 %13)
%15 = load i8**, i8*** %7
%16 = load i64, i64* %6
%17 = call i32 @display_result(i8** %15, i64 %16)
%18 = load i32, i32* @EXIT_SUCCESS
ret i32 %18
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i64 @get_input(i8** %1)
%4 = tail call i8** @init_grid(i64 %3)
%5 = tail call i32 @gen_result(i8** %4, i64 %3)
%6 = tail call i32 @display_result(i8** %4, i64 %3)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}
/* Variables and functions */
int archive_window_controller();
int main_window_controller();
void window_controller() {
  int i = 1;
  while (i != -1) {
    switch (i) {
    case 1:
      i = main_window_controller();
      break;
    case 2:
      i = archive_window_controller();
      break;
    }
  }
}


x86 assembly (clang, -O0):
<window_controller>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
je     117c <window_controller+0x5c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x1,%eax
je     115e <window_controller+0x3e>
jmp    114d <window_controller+0x2d>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
je     116d <window_controller+0x4d>
jmp    1177 <window_controller+0x57>
mov    $0x0,%al
call   1040 <main_window_controller@plt>
mov    %eax,-0x4(%rbp)
jmp    1177 <window_controller+0x57>
mov    $0x0,%al
call   1030 <archive_window_controller@plt>
mov    %eax,-0x4(%rbp)
jmp    112f <window_controller+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<window_controller>:
push   %rax
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
cmp    $0xffffffff,%eax
je     1151 <window_controller+0x31>
cmp    $0x2,%eax
je     1148 <window_controller+0x28>
cmp    $0x1,%eax
jne    1130 <window_controller+0x10>
xor    %eax,%eax
call   1040 <main_window_controller@plt>
jmp    1130 <window_controller+0x10>
xor    %eax,%eax
call   1030 <archive_window_controller@plt>
jmp    1130 <window_controller+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @window_controller() {
%1 = alloca i32
store i32 1, i32* %1
br label %2
2: ; preds = %11, %0
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, -1
br i1 %4, label %5, label %12
5: ; preds = %2
%6 = load i32, i32* %1
switch i32 %6, label %11 [
i32 1, label %7
i32 2, label %9
]
7: ; preds = %5
%8 = call i32 (...) @main_window_controller()
store i32 %8, i32* %1
br label %11
9: ; preds = %5
%10 = call i32 (...) @archive_window_controller()
store i32 %10, i32* %1
br label %11
11: ; preds = %5, %9, %7
br label %2
12: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @window_controller() {
br label %1
1: ; preds = %8, %0
%2 = phi i32 [ 1, %0 ], [ %9, %8 ]
br label %3
3: ; preds = %1, %3
switch i32 %2, label %3 [
i32 -1, label %10
i32 1, label %4
i32 2, label %6
]
4: ; preds = %3
%5 = tail call i32 (...) @main_window_controller()
br label %8
6: ; preds = %3
%7 = tail call i32 (...) @archive_window_controller()
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ %5, %4 ], [ %7, %6 ]
br label %1
10: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ c(char *);
int /*<<< orphan*/ resolve_back();
void PlusLoop() {
  c("(+loop)");
  resolve_back();
}


x86 assembly (clang, -O0):
<PlusLoop>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <c@plt>
mov    $0x0,%al
call   1040 <resolve_back@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"(+loop)\00"
define void @PlusLoop() {
%1 = call i32 @c(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @resolve_back()
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"(+loop)\00"
define void @PlusLoop() {
%1 = tail call i32 @c(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @resolve_back()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ qprintf(char *);
void q_init_task() { qprintf("*** init_task\n"); }


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"*** init_task\0A\00"
define void @q_init_task() {
%1 = tail call i32 @qprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
long round(long double value) {
  long intpart;
  intpart = (long)value;
  value = value - intpart;
  if (value >= 0.5)
    intpart++;
  return intpart;
}


x86 assembly (clang, -O0):
<round>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fnstcw -0x2a(%rbp)
movzwl -0x2a(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x2c(%rbp)
fldcw  -0x2c(%rbp)
fistpll -0x28(%rbp)
fldcw  -0x2a(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
fildll -0x20(%rbp)
fsubrp %st,%st(1)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
flds   0xeb6(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jb     1167 <round+0x67>
jmp    115b <round+0x5b>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<round>:
fldt   0x8(%rsp)
fnstcw -0x14(%rsp)
movzwl -0x14(%rsp),%eax
or     $0xc00,%eax
mov    %ax,-0x12(%rsp)
fldcw  -0x12(%rsp)
fld    %st(0)
fistpll -0x10(%rsp)
fldcw  -0x14(%rsp)
mov    -0x10(%rsp),%rax
mov    %rax,-0x8(%rsp)
fildll -0x8(%rsp)
fsubrp %st,%st(1)
flds   0xec5(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
sbb    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @round(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca i64
store x86_fp80 %0, x86_fp80* %2
%4 = load x86_fp80, x86_fp80* %2
%5 = fptosi x86_fp80 %4 to i64
store i64 %5, i64* %3
%6 = load x86_fp80, x86_fp80* %2
%7 = load i64, i64* %3
%8 = sitofp i64 %7 to x86_fp80
%9 = fsub x86_fp80 %6, %8
store x86_fp80 %9, x86_fp80* %2
%10 = load x86_fp80, x86_fp80* %2
%11 = fcmp oge x86_fp80 %10, 0xK3FFE8000000000000000
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load i64, i64* %3
%14 = add nsw i64 %13, 1
store i64 %14, i64* %3
br label %15
15: ; preds = %12, %1
%16 = load i64, i64* %3
ret i64 %16
}

LLVM IR (-O2):
define i64 @round(x86_fp80 %0) {
%2 = fptosi x86_fp80 %0 to i64
%3 = sitofp i64 %2 to x86_fp80
%4 = fsub x86_fp80 %0, %3
%5 = fcmp oge x86_fp80 %4, 0xK3FFE8000000000000000
%6 = zext i1 %5 to i64
%7 = add nsw i64 %6, %2
ret i64 %7
}
/* Type definitions */
struct stream {
  int dummy;
};

/* Variables and functions */
int decode_long_address(unsigned char const *, struct stream *);
int decode_long_address_64bit_is1(const unsigned char *pkt,
                                  struct stream *stream) {
  return decode_long_address(pkt, stream);
}


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

x86 assembly (clang, -O2):
<decode_long_address_64bit_is1>:
jmp    1030 <decode_long_address@plt>

LLVM IR (-O0):
%struct.stream = type { i32 }
define i32 @decode_long_address_64bit_is1(i8* %0, %struct.stream* %1) {
%3 = alloca i8*
%4 = alloca %struct.stream*
store i8* %0, i8** %3
store %struct.stream* %1, %struct.stream** %4
%5 = load i8*, i8** %3
%6 = load %struct.stream*, %struct.stream** %4
%7 = call i32 @decode_long_address(i8* %5, %struct.stream* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.stream = type { i32 }
define i32 @decode_long_address_64bit_is1(i8* %0, %struct.stream* %1) {
%3 = tail call i32 @decode_long_address(i8* %0, %struct.stream* %1)
ret i32 %3
}
void foo4d() {}


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

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

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

LLVM IR (-O2):
define void @foo4d() {
ret void
}
/* Variables and functions */
scalar_t__ EnvDeactivateRouter(void *, char *);
int EnvDeleteRouter(void *, char *);
int cDropIO(void *theEnv, char *logicalName) {
  if (EnvDeactivateRouter(theEnv, logicalName) != 0) {
    return EnvDeleteRouter(theEnv, logicalName);
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<cDropIO>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <EnvDeactivateRouter@plt>
cmp    $0x0,%rax
je     115c <cDropIO+0x3c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <EnvDeleteRouter@plt>
mov    %eax,-0x4(%rbp)
jmp    1163 <cDropIO+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cDropIO>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <EnvDeactivateRouter@plt>
test   %rax,%rax
je     1146 <cDropIO+0x26>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <EnvDeleteRouter@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @cDropIO(i8* %0, i8* %1) {
%3 = tail call i64 @EnvDeactivateRouter(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @EnvDeleteRouter(i8* %0, i8* %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ 0, %2 ]
ret i32 %8
}
/* Type definitions */
struct request {
  int dummy;
};

/* Variables and functions */
int blk_rq_err_bytes(struct request const *);
__attribute__((always_)) unsigned int
blk_rq_err_sectors(const struct request *rq) {
  return blk_rq_err_bytes(rq) >> 9;
}


x86 assembly (clang, -O0):
<blk_rq_err_sectors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <blk_rq_err_bytes@plt>
sar    $0x9,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blk_rq_err_sectors>:
push   %rax
call   1030 <blk_rq_err_bytes@plt>
sar    $0x9,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.request = type { i32 }
define i32 @blk_rq_err_sectors(%struct.request* %0) {
%2 = alloca %struct.request*
store %struct.request* %0, %struct.request** %2
%3 = load %struct.request*, %struct.request** %2
%4 = call i32 @blk_rq_err_bytes(%struct.request* %3)
%5 = ashr i32 %4, 9
ret i32 %5
}

LLVM IR (-O2):
%struct.request = type { i32 }
define i32 @blk_rq_err_sectors(%struct.request* %0) {
%2 = tail call i32 @blk_rq_err_bytes(%struct.request* %0)
%3 = ashr i32 %2, 9
ret i32 %3
}