xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int write(int, char *, int);
void die(void) {
  if (write(2, "error\n", 6) == -1)
    _exit(2);
  _exit(1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
lea    0xed0(%rip),%rsi
mov    $0x6,%edx
call   1040 <write@plt>
cmp    $0xffffffff,%eax
jne    114d <die+0x2d>
mov    $0x2,%edi
call   1030 <_exit@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x2,%edi
mov    $0x6,%edx
call   1040 <write@plt>
cmp    $0xffffffff,%eax
jne    1146 <die+0x26>
mov    $0x2,%edi
call   1030 <_exit@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"error\0A\00"
define void @die() {
%1 = call i32 @write(i32 2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @_exit(i32 2)
unreachable
5: ; preds = %0
%6 = call i32 @_exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [7 x i8] c"error\0A\00"
define void @die() {
%1 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @_exit(i32 2)
unreachable
5: ; preds = %0
%6 = tail call i32 @_exit(i32 1)
unreachable
}
/* Variables and functions */
long meat_time_find_begin_of_day(long const);
long meat_time_find_end_of_day(long const);
void meat_time_align_range_to_day(signed long int const i_begin,
                                  signed long int const i_end,
                                  signed long int *const pi_begin,
                                  signed long int *const pi_end) {
  *pi_begin = meat_time_find_begin_of_day(i_begin);
  *pi_end = meat_time_find_end_of_day(i_end);
}


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

x86 assembly (clang, -O2):
<meat_time_align_range_to_day>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %rsi,%r15
call   1040 <meat_time_find_begin_of_day@plt>
mov    %rax,(%rbx)
mov    %r15,%rdi
call   1030 <meat_time_find_end_of_day@plt>
mov    %rax,(%r14)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @meat_time_align_range_to_day(i64 %0, i64 %1, i64* %2, i64* %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64*
%8 = alloca i64*
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64* %2, i64** %7
store i64* %3, i64** %8
%9 = load i64, i64* %5
%10 = call i64 @meat_time_find_begin_of_day(i64 %9)
%11 = load i64*, i64** %7
store i64 %10, i64* %11
%12 = load i64, i64* %6
%13 = call i64 @meat_time_find_end_of_day(i64 %12)
%14 = load i64*, i64** %8
store i64 %13, i64* %14
ret void
}

LLVM IR (-O2):
define void @meat_time_align_range_to_day(i64 %0, i64 %1, i64* nocapture writeonly %2, i64* nocapture writeonly %3) {
%5 = tail call i64 @meat_time_find_begin_of_day(i64 %0)
store i64 %5, i64* %2
%6 = tail call i64 @meat_time_find_end_of_day(i64 %1)
store i64 %6, i64* %3
ret void
}
/* Type definitions */
struct flashrom_flashctx {
  int dummy;
};

/* Variables and functions */
int nicintel_ee_write_i210(struct flashrom_flashctx *, int /*<<< orphan*/ *,
                           unsigned int, unsigned int);
int nicintel_ee_erase_i210(struct flashrom_flashctx *flash, unsigned int addr,
                           unsigned int len) {
  return nicintel_ee_write_i210(flash, NULL, addr, len);
}


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

x86 assembly (clang, -O2):
<nicintel_ee_erase_i210>:
mov    %edx,%ecx
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <nicintel_ee_write_i210@plt>

LLVM IR (-O0):
%struct.flashrom_flashctx = type { i32 }
define i32 @nicintel_ee_erase_i210(%struct.flashrom_flashctx* %0, i32 %1, i32 %2) {
%4 = alloca %struct.flashrom_flashctx*
%5 = alloca i32
%6 = alloca i32
store %struct.flashrom_flashctx* %0, %struct.flashrom_flashctx** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load %struct.flashrom_flashctx*, %struct.flashrom_flashctx** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @nicintel_ee_write_i210(%struct.flashrom_flashctx* %7, i32* null, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.flashrom_flashctx = type { i32 }
define i32 @nicintel_ee_erase_i210(%struct.flashrom_flashctx* %0, i32 %1, i32 %2) {
%4 = tail call i32 @nicintel_ee_write_i210(%struct.flashrom_flashctx* %0, i32* null, i32 %1, i32 %2)
ret i32 %4
}
void clear_bit(unsigned long *bitmap, int entry) {
  int i, j, mask;
  i = (entry >> 5);
  j = entry & 31;
  mask = 1 << j;
  bitmap[i] &= ~mask;
}


x86 assembly (clang, -O0):
<clear_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x5,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1f,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
movslq %eax,%rdx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
and    (%rax,%rcx,8),%rdx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_bit>:
mov    %esi,%ecx
mov    %esi,%eax
sar    $0x5,%eax
mov    $0xfffffffe,%edx
rol    %cl,%edx
movslq %edx,%rcx
cltq
and    %rcx,(%rdi,%rax,8)
ret

LLVM IR (-O0):
define void @clear_bit(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%8 = load i32, i32* %4
%9 = ashr i32 %8, 5
store i32 %9, i32* %5
%10 = load i32, i32* %4
%11 = and i32 %10, 31
store i32 %11, i32* %6
%12 = load i32, i32* %6
%13 = shl i32 1, %12
store i32 %13, i32* %7
%14 = load i32, i32* %7
%15 = xor i32 %14, -1
%16 = sext i32 %15 to i64
%17 = load i64*, i64** %3
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i64, i64* %17, i64 %19
%21 = load i64, i64* %20
%22 = and i64 %21, %16
store i64 %22, i64* %20
ret void
}

LLVM IR (-O2):
define void @clear_bit(i64* nocapture %0, i32 %1) {
%3 = ashr i32 %1, 5
%4 = and i32 %1, 31
%5 = shl nuw i32 1, %4
%6 = xor i32 %5, -1
%7 = sext i32 %6 to i64
%8 = sext i32 %3 to i64
%9 = getelementptr inbounds i64, i64* %0, i64 %8
%10 = load i64, i64* %9
%11 = and i64 %10, %7
store i64 %11, i64* %9
ret void
}
int ZEND_EXIT_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) {
  zend_bailout();
  ZEND_VM_NEXT_OPCODE();
}


x86 assembly (clang, -O0):
<ZEND_EXIT_SPEC_VAR_HANDLER>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <zend_bailout@plt>
mov    $0x0,%al
call   1040 <ZEND_VM_NEXT_OPCODE@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ZEND_EXIT_SPEC_VAR_HANDLER(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (...) @zend_bailout()
%5 = call i32 (...) @ZEND_VM_NEXT_OPCODE()
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @ZEND_EXIT_SPEC_VAR_HANDLER(i32 %0) {
%2 = tail call i32 (...) @zend_bailout()
%3 = tail call i32 (...) @ZEND_VM_NEXT_OPCODE()
ret i32 undef
}
int bitSwapRequired(int a, int b) {
  int required = 0;
  while (a != 0 || b != 0) {
    if ((unsigned int)a % 2 != (unsigned int)b % 2) {
      required++;
    }
    a = (unsigned int)a >> 1;
    b = (unsigned int)b >> 1;
  }
  return required;
}


x86 assembly (clang, -O0):
<bitSwapRequired>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0xd(%rbp)
jne    112a <bitSwapRequired+0x2a>
cmpl   $0x0,-0x8(%rbp)
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    113a <bitSwapRequired+0x3a>
jmp    116e <bitSwapRequired+0x6e>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
mov    -0x8(%rbp),%ecx
and    $0x1,%ecx
cmp    %ecx,%eax
je     1157 <bitSwapRequired+0x57>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1111 <bitSwapRequired+0x11>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitSwapRequired>:
mov    %edi,%eax
or     %esi,%eax
je     112e <bitSwapRequired+0x2e>
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
mov    %esi,%r8d
mov    %esi,%ecx
xor    %edi,%ecx
and    $0x1,%ecx
add    %ecx,%eax
shr    %edi
shr    %esi
cmp    $0x1,%edx
ja     1110 <bitSwapRequired+0x10>
cmp    $0x1,%r8d
ja     1110 <bitSwapRequired+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @bitSwapRequired(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %23, %2
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = load i32, i32* %4
%11 = icmp ne i32 %10, 0
br label %12
12: ; preds = %9, %6
%13 = phi i1 [ true, %6 ], [ %11, %9 ]
br i1 %13, label %14, label %28
14: ; preds = %12
%15 = load i32, i32* %3
%16 = urem i32 %15, 2
%17 = load i32, i32* %4
%18 = urem i32 %17, 2
%19 = icmp ne i32 %16, %18
br i1 %19, label %20, label %23
20: ; preds = %14
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 1
store i32 %22, i32* %5
br label %23
23: ; preds = %20, %14
%24 = load i32, i32* %3
%25 = lshr i32 %24, 1
store i32 %25, i32* %3
%26 = load i32, i32* %4
%27 = lshr i32 %26, 1
store i32 %27, i32* %4
br label %6
28: ; preds = %12
%29 = load i32, i32* %5
ret i32 %29
}

LLVM IR (-O2):
define i32 @bitSwapRequired(i32 %0, i32 %1) {
%3 = or i32 %0, %1
%4 = icmp eq i32 %3, 0
br i1 %4, label %17, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %11, %5 ], [ 0, %2 ]
%7 = phi i32 [ %13, %5 ], [ %1, %2 ]
%8 = phi i32 [ %12, %5 ], [ %0, %2 ]
%9 = xor i32 %7, %8
%10 = and i32 %9, 1
%11 = add nuw nsw i32 %10, %6
%12 = lshr i32 %8, 1
%13 = lshr i32 %7, 1
%14 = icmp ugt i32 %8, 1
%15 = icmp ugt i32 %7, 1
%16 = select i1 %14, i1 true, i1 %15
br i1 %16, label %5, label %17
17: ; preds = %5, %2
%18 = phi i32 [ 0, %2 ], [ %11, %5 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: sha1sum [-c|-0] [--] FILENAMES|-\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"usage: sha1sum [-c|-0] [--] FILENAMES|-\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"usage: sha1sum [-c|-0] [--] FILENAMES|-\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void http_post(FILE *client_write) {}


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

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

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

LLVM IR (-O2):
define void @http_post(i32* nocapture %0) {
ret void
}
char *hasmntopt(const struct mntent *mnt, const char *opt) {}


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

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

LLVM IR (-O0):
%struct.mntent = type opaque
define i8* @hasmntopt(%struct.mntent* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca %struct.mntent*
%5 = alloca i8*
store %struct.mntent* %0, %struct.mntent** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %3
ret i8* %6
}

LLVM IR (-O2):
%struct.mntent = type opaque
define noalias i8* @hasmntopt(%struct.mntent* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ gpio_set_dir(int);
int /*<<< orphan*/ gpio_write_data(int);
int /*<<< orphan*/ set_gpio_pad(int);
int /*<<< orphan*/ unfreeze_gpio_out();
void operation_i2c_start() {
  unfreeze_gpio_out();
  gpio_write_data((1 << 5) | (1 << 6));
  set_gpio_pad((1 << 5) | (1 << 6));
  gpio_set_dir((1 << 5) | (1 << 6));
  gpio_write_data((0 << 5) | (1 << 6));
  gpio_write_data((0 << 5) | (0 << 6));
}


x86 assembly (clang, -O0):
<operation_i2c_start>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <unfreeze_gpio_out@plt>
mov    $0x60,%edi
call   1060 <gpio_write_data@plt>
mov    $0x60,%edi
call   1030 <set_gpio_pad@plt>
mov    $0x60,%edi
call   1040 <gpio_set_dir@plt>
mov    $0x40,%edi
call   1060 <gpio_write_data@plt>
xor    %edi,%edi
call   1060 <gpio_write_data@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<operation_i2c_start>:
push   %rax
xor    %eax,%eax
call   1050 <unfreeze_gpio_out@plt>
mov    $0x60,%edi
call   1060 <gpio_write_data@plt>
mov    $0x60,%edi
call   1030 <set_gpio_pad@plt>
mov    $0x60,%edi
call   1040 <gpio_set_dir@plt>
mov    $0x40,%edi
call   1060 <gpio_write_data@plt>
xor    %edi,%edi
pop    %rax
jmp    1060 <gpio_write_data@plt>

LLVM IR (-O0):
define void @operation_i2c_start() {
%1 = call i32 (...) @unfreeze_gpio_out()
%2 = call i32 @gpio_write_data(i32 96)
%3 = call i32 @set_gpio_pad(i32 96)
%4 = call i32 @gpio_set_dir(i32 96)
%5 = call i32 @gpio_write_data(i32 64)
%6 = call i32 @gpio_write_data(i32 0)
ret void
}

LLVM IR (-O2):
define void @operation_i2c_start() {
%1 = tail call i32 (...) @unfreeze_gpio_out()
%2 = tail call i32 @gpio_write_data(i32 96)
%3 = tail call i32 @set_gpio_pad(i32 96)
%4 = tail call i32 @gpio_set_dir(i32 96)
%5 = tail call i32 @gpio_write_data(i32 64)
%6 = tail call i32 @gpio_write_data(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bfdutil_iprules(int, unsigned char *, unsigned char *,
                                   unsigned char *, unsigned char *,
                                   int /*<<< orphan*/);
void bfdutil_clear_iprules(int debug, unsigned char *intfname,
                           unsigned char *localip, unsigned char *remoteip,
                           unsigned char *echoremoteip) {
  bfdutil_iprules(debug, intfname, localip, remoteip, echoremoteip, 0);
  return;
}


x86 assembly (clang, -O0):
<bfdutil_clear_iprules>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
xor    %r9d,%r9d
call   1030 <bfdutil_iprules@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bfdutil_clear_iprules>:
xor    %r9d,%r9d
jmp    1030 <bfdutil_iprules@plt>

LLVM IR (-O0):
define void @bfdutil_clear_iprules(i32 %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i32 %0, i32* %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load i32, i32* %6
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = load i8*, i8** %9
%15 = load i8*, i8** %10
%16 = call i32 @bfdutil_iprules(i32 %11, i8* %12, i8* %13, i8* %14, i8* %15, i32 0)
ret void
}

LLVM IR (-O2):
define void @bfdutil_clear_iprules(i32 %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = tail call i32 @bfdutil_iprules(i32 %0, i8* %1, i8* %2, i8* %3, i8* %4, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ not_prune_multiple2(int *);
void call_not_prune_multiple2_Good() {
  int m[2] = {0, 4};
  not_prune_multiple2(m);
}


x86 assembly (clang, -O0):
<call_not_prune_multiple2_Good>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <not_prune_multiple2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_not_prune_multiple2_Good>:
push   %rax
movabs $0x400000000,%rax
mov    %rax,(%rsp)
mov    %rsp,%rdi
call   1030 <not_prune_multiple2@plt>
pop    %rax
ret

LLVM IR (-O0):
@__const.call_not_prune_multiple2_Good.m = [2 x i32] [i32 0, i32 4]
define void @call_not_prune_multiple2_Good() {
%1 = alloca [2 x i32]
%2 = bitcast [2 x i32]* %1 to i8*
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
%4 = call i32 @not_prune_multiple2(i32* %3)
ret void
}

LLVM IR (-O2):
define void @call_not_prune_multiple2_Good() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store i64 17179869184, i64* %1
%3 = bitcast i64* %1 to i32*
%4 = call i32 @not_prune_multiple2(i32* %3)
ret void
}
float tdDot(float *va, float *vb) {
  return va[0] * vb[0] + va[1] * vb[1] + va[2] * vb[2];
}


x86 assembly (clang, -O0):
<tdDot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulss  0x4(%rax),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @tdDot(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %4
%9 = getelementptr inbounds float, float* %8, i64 0
%10 = load float, float* %9
%11 = load float*, float** %3
%12 = getelementptr inbounds float, float* %11, i64 1
%13 = load float, float* %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = fmul float %13, %16
%18 = call float @llvm.fmuladd.f32(float %7, float %10, float %17)
%19 = load float*, float** %3
%20 = getelementptr inbounds float, float* %19, i64 2
%21 = load float, float* %20
%22 = load float*, float** %4
%23 = getelementptr inbounds float, float* %22, i64 2
%24 = load float, float* %23
%25 = call float @llvm.fmuladd.f32(float %21, float %24, float %18)
ret float %25
}

LLVM IR (-O2):
define float @tdDot(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = fmul float %6, %8
%10 = tail call float @llvm.fmuladd.f32(float %3, float %4, float %9)
%11 = getelementptr inbounds float, float* %0, i64 2
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = tail call float @llvm.fmuladd.f32(float %12, float %14, float %10)
ret float %15
}
/* Variables and functions */
int /*<<< orphan*/ Mouse_EndTickNotify();
int /*<<< orphan*/ Screen_EndTickNotify();
int /*<<< orphan*/ SubTickTaskEnd();
void SixtiethEndNotify(void) {
  SubTickTaskEnd();
  Mouse_EndTickNotify();
  Screen_EndTickNotify();
}


x86 assembly (clang, -O0):
<SixtiethEndNotify>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <SubTickTaskEnd@plt>
mov    $0x0,%al
call   1040 <Mouse_EndTickNotify@plt>
mov    $0x0,%al
call   1050 <Screen_EndTickNotify@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SixtiethEndNotify>:
push   %rax
xor    %eax,%eax
call   1030 <SubTickTaskEnd@plt>
xor    %eax,%eax
call   1040 <Mouse_EndTickNotify@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <Screen_EndTickNotify@plt>

LLVM IR (-O0):
define void @SixtiethEndNotify() {
%1 = call i32 (...) @SubTickTaskEnd()
%2 = call i32 (...) @Mouse_EndTickNotify()
%3 = call i32 (...) @Screen_EndTickNotify()
ret void
}

LLVM IR (-O2):
define void @SixtiethEndNotify() {
%1 = tail call i32 (...) @SubTickTaskEnd()
%2 = tail call i32 (...) @Mouse_EndTickNotify()
%3 = tail call i32 (...) @Screen_EndTickNotify()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ recv(int, void *, size_t, int /*<<< orphan*/);
ssize_t myread_swift(int fd, void *buf, size_t len) {
  return recv(fd, buf, len, 0);
}


x86 assembly (clang, -O0):
<myread_swift>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <recv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myread_swift>:
xor    %ecx,%ecx
jmp    1030 <recv@plt>

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

LLVM IR (-O2):
define i32 @myread_swift(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @recv(i32 %0, i8* %1, i64 %2, i32 0)
ret i32 %4
}
void xol_read(void) {}


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

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

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

LLVM IR (-O2):
define void @xol_read() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ registers_read_word(int, int);
uint16_t timer_get(void) { return registers_read_word(0x06, 0x07); }


x86 assembly (clang, -O0):
<timer_get>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
mov    $0x7,%esi
call   1030 <registers_read_word@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_get>:
mov    $0x6,%edi
mov    $0x7,%esi
jmp    1030 <registers_read_word@plt>

LLVM IR (-O0):
define i32 @timer_get() {
%1 = call i32 @registers_read_word(i32 6, i32 7)
ret i32 %1
}

LLVM IR (-O2):
define i32 @timer_get() {
%1 = tail call i32 @registers_read_word(i32 6, i32 7)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
void LerVetor(int n[], int num) {
  int i;
  for (i = 0; i < num; i++) {
    scanf("%d", &n[i]);
  }
}


x86 assembly (clang, -O0):
<LerVetor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115b <LerVetor+0x4b>
mov    -0x8(%rbp),%rsi
movslq -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xeb8(%rip),%rdi
call   1030 <scanf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <LerVetor+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LerVetor>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1145 <LerVetor+0x35>
mov    %rdi,%rbx
mov    %esi,%r15d
lea    0xeda(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <scanf@plt>
add    $0x4,%rbx
add    $0xffffffffffffffff,%r15
jne    1130 <LerVetor+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @LerVetor(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %16, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %14)
br label %16
16: ; preds = %10
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
br label %6
19: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @LerVetor(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %8)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ str;

/* Variables and functions */
int /*<<< orphan*/ iface_set_status(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int const);
void iface_show_num_files(const int num) {
  char str[20];
  snprintf(str, sizeof(str), "Files: %d", num);
  iface_set_status(str);
}


x86 assembly (clang, -O0):
<iface_show_num_files>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%ecx
mov    $0x14,%esi
lea    0xec2(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x20(%rbp),%rdi
call   1040 <iface_set_status@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iface_show_num_files>:
push   %rbx
sub    $0x20,%rsp
mov    %edi,%ecx
lea    0xed2(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x14,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <iface_set_status@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Files: %d\00"
define void @iface_show_num_files(i32 %0) {
%2 = alloca i32
%3 = alloca [20 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @snprintf(i8* %4, i32 20, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%8 = call i32 @iface_set_status(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"Files: %d\00"
define void @iface_show_num_files(i32 %0) {
%2 = alloca [20 x i8]
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 20, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i32 @iface_set_status(i8* %3)
ret void
}
/* Variables and functions */
void _set_float(char *data, size_t pos, double value) {
  float *buf = (float *)data;
  buf[pos] = (float)value;
  return;
}


x86 assembly (clang, -O0):
<_set_float>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_set_float>:
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rdi,%rsi,4)
ret

LLVM IR (-O0):
define void @_set_float(i8* %0, i64 %1, double %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca double
%7 = alloca float*
store i8* %0, i8** %4
store i64 %1, i64* %5
store double %2, double* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to float*
store float* %9, float** %7
%10 = load double, double* %6
%11 = fptrunc double %10 to float
%12 = load float*, float** %7
%13 = load i64, i64* %5
%14 = getelementptr inbounds float, float* %12, i64 %13
store float %11, float* %14
ret void
}

LLVM IR (-O2):
define void @_set_float(i8* nocapture writeonly %0, i64 %1, double %2) {
%4 = bitcast i8* %0 to float*
%5 = fptrunc double %2 to float
%6 = getelementptr inbounds float, float* %4, i64 %1
store float %5, float* %6
ret void
}
double clamp(double k, double min, double max) {
  return (k > max) ? max : ((k < min) ? min : k);
}


x86 assembly (clang, -O0):
<clamp>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1132 <clamp+0x32>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1169 <clamp+0x69>
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1155 <clamp+0x55>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    115f <clamp+0x5f>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp>:
maxsd  %xmm0,%xmm1
movapd %xmm2,%xmm3
cmpltsd %xmm0,%xmm3
movapd %xmm3,%xmm0
andnpd %xmm1,%xmm0
andpd  %xmm2,%xmm3
orpd   %xmm0,%xmm3
movapd %xmm3,%xmm0
ret

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

LLVM IR (-O2):
define double @clamp(double %0, double %1, double %2) {
%4 = fcmp ogt double %0, %2
%5 = fcmp olt double %0, %1
%6 = select i1 %5, double %1, double %0
%7 = select i1 %4, double %2, double %6
ret double %7
}
int mem_cgroup_prepare_migration(struct page *page) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.page = type opaque
define i32 @mem_cgroup_prepare_migration(%struct.page* nocapture readnone %0) {
ret i32 0
}
unsigned *g(unsigned *p) {
  unsigned char c = 0;
  return p + c;
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movb   $0x0,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movzbl -0x9(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32* @g(i32* %0) {
%2 = alloca i32*
%3 = alloca i8
store i32* %0, i32** %2
store i8 0, i8* %3
%4 = load i32*, i32** %2
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %4, i64 %7
ret i32* %8
}

LLVM IR (-O2):
define i32* @g(i32* readnone returned %0) {
ret i32* %0
}
/* Variables and functions */
int /*<<< orphan*/ bubbleSort(int *);
scalar_t__ getNumbers(int *);
int /*<<< orphan*/ putNumbers(int *);
int main(int argc, char const *argv[]) {
  int nums[10] = {0};
  while (getNumbers(nums)) {
    bubbleSort(nums);
    putNumbers(nums);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
lea    -0x40(%rbp),%rdi
call   1050 <getNumbers@plt>
cmp    $0x0,%rax
je     1190 <main+0x50>
lea    -0x40(%rbp),%rdi
call   1040 <bubbleSort@plt>
lea    -0x40(%rbp),%rdi
call   1060 <putNumbers@plt>
jmp    1166 <main+0x26>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movq   $0x0,0x20(%rsp)
mov    %rsp,%rdi
call   1040 <getNumbers@plt>
test   %rax,%rax
je     117d <main+0x4d>
mov    %rsp,%rbx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <bubbleSort@plt>
mov    %rbx,%rdi
call   1050 <putNumbers@plt>
mov    %rbx,%rdi
call   1040 <getNumbers@plt>
test   %rax,%rax
jne    1160 <main+0x30>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [10 x i32]* %6 to i8*
br label %8
8: ; preds = %12, %2
%9 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%10 = call i64 @getNumbers(i32* %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %8
%13 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%14 = call i32 @bubbleSort(i32* %13)
%15 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%16 = call i32 @putNumbers(i32* %15)
br label %8
17: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x i32]
%4 = bitcast [10 x i32]* %3 to i8*
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%6 = call i64 @getNumbers(i32* %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %2, %8
%9 = call i32 @bubbleSort(i32* %5)
%10 = call i32 @putNumbers(i32* %5)
%11 = call i64 @getNumbers(i32* %5)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %8
13: ; preds = %8, %2
ret i32 0
}
/* Variables and functions */
int pow(int, int);
double Tween_ExponentialOutEasing(double k) {
  return k == 1 ? 1 : 1 - pow(2, -10 * k);
}


x86 assembly (clang, -O0):
<Tween_ExponentialOutEasing>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1147 <Tween_ExponentialOutEasing+0x37>
jp     1147 <Tween_ExponentialOutEasing+0x37>
mov    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116e <Tween_ExponentialOutEasing+0x5e>
movsd  0xeb9(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%esi
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %eax,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Tween_ExponentialOutEasing>:
push   %rax
movsd  0xee7(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1121 <Tween_ExponentialOutEasing+0x11>
jnp    1145 <Tween_ExponentialOutEasing+0x35>
mulsd  0xedf(%rip),%xmm0
cvttsd2si %xmm0,%esi
mov    $0x2,%edi
call   1030 <pow@plt>
mov    $0x1,%ecx
sub    %eax,%ecx
xorps  %xmm1,%xmm1
cvtsi2sd %ecx,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @Tween_ExponentialOutEasing(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oeq double %3, 1.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %12
6: ; preds = %1
%7 = load double, double* %2
%8 = fmul double -1.000000e+01, %7
%9 = fptosi double %8 to i32
%10 = call i32 @pow(i32 2, i32 %9)
%11 = sub nsw i32 1, %10
br label %12
12: ; preds = %6, %5
%13 = phi i32 [ 1, %5 ], [ %11, %6 ]
%14 = sitofp i32 %13 to double
ret double %14
}

LLVM IR (-O2):
define double @Tween_ExponentialOutEasing(double %0) {
%2 = fcmp oeq double %0, 1.000000e+00
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = fmul double %0, -1.000000e+01
%5 = fptosi double %4 to i32
%6 = tail call i32 @pow(i32 2, i32 %5)
%7 = sub nsw i32 1, %6
%8 = sitofp i32 %7 to double
br label %9
9: ; preds = %1, %3
%10 = phi double [ %8, %3 ], [ 1.000000e+00, %1 ]
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "Usage: kill [-sig] pid\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Usage: kill [-sig] pid\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Usage: kill [-sig] pid\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
size_t strlen(char *);
bool is_valid_text(char *text) {
  size_t len = strlen(text);
  return len > 1 && len < 254;
}


x86 assembly (clang, -O0):
<is_valid_text>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x1,-0x10(%rbp)
mov    %al,-0x11(%rbp)
jbe    1147 <is_valid_text+0x37>
cmpq   $0xfe,-0x10(%rbp)
setb   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_text>:
push   %rax
call   1030 <strlen@plt>
add    $0xfffffffffffffffe,%rax
xor    %ecx,%ecx
cmp    $0xfc,%rax
setb   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_valid_text(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = icmp ugt i64 %6, 1
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i64, i64* %3
%10 = icmp ult i64 %9, 254
br label %11
11: ; preds = %8, %1
%12 = phi i1 [ false, %1 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @is_valid_text(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, -2
%4 = icmp ult i64 %3, 252
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char const *, char const *);
FILE *fopen64(const char *path, const char *mode) { return fopen(path, mode); }


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

x86 assembly (clang, -O2):
<fopen64>:
jmp    1030 <fopen@plt>

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

LLVM IR (-O2):
define noalias i32* @fopen64(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
ret i32* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, void *);
int main() {
  int students;
  int *studentsp;
  students = 12;
  studentsp = &students;
  *studentsp = 17;
  printf("students:  %d\n", students);
  printf("studentsp: %p\n", (void *)studentsp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xc,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x11,(%rax)
movslq -0x8(%rbp),%rsi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x11,0x4(%rsp)
lea    0xee0(%rip),%rdi
mov    $0x11,%esi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"students: %d\0A\00"
@.str.1 = [15 x i8] c"studentsp: %p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
store i32 12, i32* %2
store i32* %2, i32** %3
%4 = load i32*, i32** %3
store i32 17, i32* %4
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i32*, i32** %3
%10 = bitcast i32* %9 to i8*
%11 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"students: %d\0A\00"
@.str.1 = [15 x i8] c"studentsp: %p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 17, i32* %1
%3 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* inttoptr (i64 17 to i8*))
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getafield(int, int);
int inlist(int /*<<< orphan*/, int);
int haspreposition(int act, int preposition) {
  return (inlist(getafield(act, 2), preposition));
}


x86 assembly (clang, -O0):
<haspreposition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
call   1040 <getafield@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%esi
call   1030 <inlist@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<haspreposition>:
push   %rbx
mov    %esi,%ebx
mov    $0x2,%esi
call   1040 <getafield@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <inlist@plt>

LLVM IR (-O0):
define i32 @haspreposition(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 = call i32 @getafield(i32 %5, i32 2)
%7 = load i32, i32* %4
%8 = call i32 @inlist(i32 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @haspreposition(i32 %0, i32 %1) {
%3 = tail call i32 @getafield(i32 %0, i32 2)
%4 = tail call i32 @inlist(i32 %3, i32 %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
int main(void) {
  for (;;)
    putchar('a');
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x61,%edi
call   1030 <putchar@plt>
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x61,%edi
call   1030 <putchar@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %2, %0
%3 = call i32 @putchar(i8 signext 97)
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @putchar(i8 signext 97)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ printAsBinary(int);
int /*<<< orphan*/ printf(char *, int);
void printNum(int num) {
  printf("%d\t", num);
  if (num < 0) {
    printf("0x%03x\t", num);
  } else {
    printf("0x%03x\t\t", num);
  }
  printAsBinary(num);
}


x86 assembly (clang, -O0):
<printNum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x4(%rbp)
jge    1158 <printNum+0x38>
mov    -0x4(%rbp),%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
jmp    1167 <printNum+0x47>
mov    -0x4(%rbp),%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <printAsBinary@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printNum>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
test   %ebx,%ebx
lea    0xeca(%rip),%rax
lea    0xecb(%rip),%rdi
cmovs  %rax,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <printAsBinary@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\09\00"
@.str.1 = [8 x i8] c"0x%03x\09\00"
@.str.2 = [9 x i8] c"0x%03x\09\09\00"
define void @printNum(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %8)
br label %13
10: ; preds = %1
%11 = load i32, i32* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %11)
br label %13
13: ; preds = %10, %7
%14 = load i32, i32* %2
%15 = call i32 @printAsBinary(i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\09\00"
@.str.1 = [8 x i8] c"0x%03x\09\00"
@.str.2 = [9 x i8] c"0x%03x\09\09\00"
define void @printNum(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = icmp slt i32 %0, 0
%4 = select i1 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0)
%5 = tail call i32 @printf(i8* %4, i32 %0)
%6 = tail call i32 @printAsBinary(i32 %0)
ret void
}
int test_imm_88uint8_mem(unsigned char *val) {
  return ((*val) & (0x88 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_88uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 136
%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_88uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -120
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int ntohl(int /*<<< orphan*/ const);
int msglen(const void *p) { return 4 + ntohl(*(const uint32_t *)p); }


x86 assembly (clang, -O0):
<msglen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <ntohl@plt>
add    $0x4,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msglen>:
push   %rax
mov    (%rdi),%edi
call   1030 <ntohl@plt>
add    $0x4,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @msglen(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = call i32 @ntohl(i32 %5)
%7 = add nsw i32 4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @msglen(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @ntohl(i32 %3)
%5 = add nsw i32 %4, 4
ret i32 %5
}