xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void am_free_ints(int *iarr, int size) { free(iarr); }


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

x86 assembly (clang, -O2):
<am_free_ints>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @am_free_ints(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 @free(i32* %5)
ret void
}

LLVM IR (-O2):
define void @am_free_ints(i32* nocapture %0, i32 %1) {
%3 = tail call i32 @free(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ global_data_pool_init();
int /*<<< orphan*/ global_meta_pool_init();
void global_pool_init(void) {
  global_meta_pool_init();
  global_data_pool_init();
}


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

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

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

LLVM IR (-O2):
define void @global_pool_init() {
%1 = tail call i32 (...) @global_meta_pool_init()
%2 = tail call i32 (...) @global_data_pool_init()
ret void
}
int owns(int bb) { return bb == (1 | 8) || bb == (2 | 4); }


x86 assembly (clang, -O0):
<owns>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1120 <owns+0x20>
cmpl   $0x6,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<owns>:
cmp    $0x9,%edi
sete   %al
cmp    $0x6,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @owns(i32 %0) {
%2 = icmp eq i32 %0, 9
%3 = icmp eq i32 %0, 6
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
char player_next(char currnt_player, char player1, char player2) {
  char next;
  if (currnt_player == player1) {
    next = player2;
  } else {
    next = player1;
  }
  return next;
}


x86 assembly (clang, -O0):
<player_next>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movsbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
cmp    %ecx,%eax
jne    1130 <player_next+0x30>
mov    -0x3(%rbp),%al
mov    %al,-0x4(%rbp)
jmp    1136 <player_next+0x36>
mov    -0x2(%rbp),%al
mov    %al,-0x4(%rbp)
movsbl -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<player_next>:
mov    %edx,%eax
cmp    %sil,%dil
cmovne %esi,%eax
ret

LLVM IR (-O0):
define signext i8 @player_next(i8 signext %0, i8 signext %1, i8 signext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8, i8* %4
%9 = sext i8 %8 to i32
%10 = load i8, i8* %5
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %9, %11
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = load i8, i8* %6
store i8 %14, i8* %7
br label %17
15: ; preds = %3
%16 = load i8, i8* %5
store i8 %16, i8* %7
br label %17
17: ; preds = %15, %13
%18 = load i8, i8* %7
ret i8 %18
}

LLVM IR (-O2):
define signext i8 @player_next(i8 signext %0, i8 signext %1, i8 signext %2) {
%4 = icmp eq i8 %0, %1
%5 = select i1 %4, i8 %2, i8 %1
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ lsmIoerrBkpt();
int IOERR_WRAPPER(int rc) {
  if (rc != 0)
    lsmIoerrBkpt();
  return rc;
}


x86 assembly (clang, -O0):
<IOERR_WRAPPER>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112c <IOERR_WRAPPER+0x1c>
mov    $0x0,%al
call   1030 <lsmIoerrBkpt@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IOERR_WRAPPER>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
je     111e <IOERR_WRAPPER+0xe>
xor    %eax,%eax
call   1030 <lsmIoerrBkpt@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @IOERR_WRAPPER(i32 returned %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @lsmIoerrBkpt()
br label %5
5: ; preds = %3, %1
ret i32 %0
}
/* Variables and functions */
size_t StringLen(register const char *String) {
  register size_t Inc = 0;
  while (*String)
    ++Inc, ++String;
  return Inc;
}


x86 assembly (clang, -O0):
<StringLen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113a <StringLen+0x3a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <StringLen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<StringLen>:
cmpb   $0x0,(%rdi)
je     111f <StringLen+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <StringLen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @StringLen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = add i64 %5, 1
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %7, %4 ]
ret i64 %12
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int major_code;
};
struct TYPE_4__ {
  TYPE_1__ xgraphicsexpose;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xgraphicsexpose_major_code(void *_p, int _v) {
  ((XEvent *)_p)->xgraphicsexpose.major_code = (int)_v;
}


x86 assembly (clang, -O0):
<set_XEvent_xgraphicsexpose_major_code>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XEvent_xgraphicsexpose_major_code>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XEvent_xgraphicsexpose_major_code(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
scalar_t__ efuse_reg_addr(int);
void efuse_init(void) {
  (*((volatile unsigned *)efuse_reg_addr((0x215c << 2))) =
       ((*((volatile unsigned *)efuse_reg_addr((0x215c << 2)))) &
        ~(((1L << (1)) - 1) << (10))) |
       ((unsigned)((0) & ((1L << (1)) - 1)) << (10)));
  (*((volatile unsigned *)efuse_reg_addr((0x2159 << 2))) =
       ((*((volatile unsigned *)efuse_reg_addr((0x2159 << 2)))) &
        ~(((1L << (1)) - 1) << (27))) |
       ((unsigned)((0) & ((1L << (1)) - 1)) << (27)));
}


x86 assembly (clang, -O0):
<efuse_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x8570,%edi
call   1030 <efuse_reg_addr@plt>
mov    (%rax),%eax
mov    %eax,%eax
and    $0xfffffffffffffbff,%rax
or     $0x0,%rax
mov    %eax,-0x8(%rbp)
mov    $0x8570,%edi
call   1030 <efuse_reg_addr@plt>
mov    -0x8(%rbp),%ecx
mov    %ecx,(%rax)
mov    $0x8564,%edi
call   1030 <efuse_reg_addr@plt>
mov    (%rax),%eax
mov    %eax,%eax
and    $0xfffffffff7ffffff,%rax
or     $0x0,%rax
mov    %eax,-0x4(%rbp)
mov    $0x8564,%edi
call   1030 <efuse_reg_addr@plt>
mov    -0x4(%rbp),%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<efuse_init>:
push   %rbx
mov    $0x8570,%edi
call   1030 <efuse_reg_addr@plt>
mov    $0xfffffbff,%ebx
and    (%rax),%ebx
mov    $0x8570,%edi
call   1030 <efuse_reg_addr@plt>
mov    %ebx,(%rax)
mov    $0x8564,%edi
call   1030 <efuse_reg_addr@plt>
mov    $0xf7ffffff,%ebx
and    (%rax),%ebx
mov    $0x8564,%edi
call   1030 <efuse_reg_addr@plt>
mov    %ebx,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @efuse_init() {
%1 = call i64 @efuse_reg_addr(i32 34160)
%2 = inttoptr i64 %1 to i32*
%3 = load volatile i32, i32* %2
%4 = zext i32 %3 to i64
%5 = and i64 %4, -1025
%6 = or i64 %5, 0
%7 = trunc i64 %6 to i32
%8 = call i64 @efuse_reg_addr(i32 34160)
%9 = inttoptr i64 %8 to i32*
store volatile i32 %7, i32* %9
%10 = call i64 @efuse_reg_addr(i32 34148)
%11 = inttoptr i64 %10 to i32*
%12 = load volatile i32, i32* %11
%13 = zext i32 %12 to i64
%14 = and i64 %13, -134217729
%15 = or i64 %14, 0
%16 = trunc i64 %15 to i32
%17 = call i64 @efuse_reg_addr(i32 34148)
%18 = inttoptr i64 %17 to i32*
store volatile i32 %16, i32* %18
ret void
}

LLVM IR (-O2):
define void @efuse_init() {
%1 = tail call i64 @efuse_reg_addr(i32 34160)
%2 = inttoptr i64 %1 to i32*
%3 = load volatile i32, i32* %2
%4 = and i32 %3, -1025
%5 = tail call i64 @efuse_reg_addr(i32 34160)
%6 = inttoptr i64 %5 to i32*
store volatile i32 %4, i32* %6
%7 = tail call i64 @efuse_reg_addr(i32 34148)
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = and i32 %9, -134217729
%11 = tail call i64 @efuse_reg_addr(i32 34148)
%12 = inttoptr i64 %11 to i32*
store volatile i32 %10, i32* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ system(char *);
void remove_file(char *c_file) {
  char c_aux[500];
  strcpy(c_aux, "rm ");
  strcat(c_aux, c_file);
  system(c_aux);
}


x86 assembly (clang, -O0):
<remove_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x200(%rbp),%rdi
lea    0xeb3(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x200(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <strcat@plt>
lea    -0x200(%rbp),%rdi
call   1040 <system@plt>
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_file>:
push   %r14
push   %rbx
sub    $0x1f8,%rsp
mov    %rdi,%rbx
lea    0xebc(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1030 <strcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <strcat@plt>
mov    %r14,%rdi
call   1040 <system@plt>
add    $0x1f8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"rm \00"
define void @remove_file(i8* %0) {
%2 = alloca i8*
%3 = alloca [500 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 0
%7 = load i8*, i8** %2
%8 = call i32 @strcat(i8* %6, i8* %7)
%9 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 0
%10 = call i32 @system(i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"rm \00"
define void @remove_file(i8* %0) {
%2 = alloca [500 x i8]
%3 = getelementptr inbounds [500 x i8], [500 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @strcat(i8* %3, i8* %0)
%6 = call i32 @system(i8* %3)
ret void
}
/* Variables and functions */
int omap_rev();
int is_omap310(void) {
  return (((omap_rev() >> 16) & 0xffff) == (0x0310)) ? 1 : 0;
}


x86 assembly (clang, -O0):
<is_omap310>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <omap_rev@plt>
mov    %eax,%edx
sar    $0x10,%edx
and    $0xffff,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x310,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_omap310>:
push   %rax
xor    %eax,%eax
call   1030 <omap_rev@plt>
and    $0xffff0000,%eax
xor    %ecx,%ecx
cmp    $0x3100000,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_omap310() {
%1 = call i32 (...) @omap_rev()
%2 = ashr i32 %1, 16
%3 = and i32 %2, 65535
%4 = icmp eq i32 %3, 784
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 1, i32 0
ret i32 %6
}

LLVM IR (-O2):
define i32 @is_omap310() {
%1 = tail call i32 (...) @omap_rev()
%2 = and i32 %1, -65536
%3 = icmp eq i32 %2, 51380224
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int raw();
int wrap_raw(void) { return raw(); }


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

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

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

LLVM IR (-O2):
define i32 @wrap_raw() {
%1 = tail call i32 (...) @raw()
ret i32 %1
}
int __attribute__((always_)) arith_shift_right(int x, int shift) {
  if (x >= 0)
    return x << shift;
  return ~((~x) << shift);
}


x86 assembly (clang, -O0):
<arith_shift_right>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1124 <arith_shift_right+0x24>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x4(%rbp)
jmp    1135 <arith_shift_right+0x35>
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<arith_shift_right>:
mov    %esi,%ecx
mov    %edi,%edx
shl    %cl,%edx
mov    %edi,%eax
not    %eax
shl    %cl,%eax
test   %edi,%edi
not    %eax
cmovns %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @arith_shift_right(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, -1
%4 = shl i32 %0, %1
%5 = xor i32 %0, -1
%6 = shl i32 %5, %1
%7 = xor i32 %6, -1
%8 = select i1 %3, i32 %4, i32 %7
ret i32 %8
}
int main(void) {
  static char op1[256], op2[256];
  static char *op[2] = {op1, op2};
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@main.op1 = internal global [256 x i8] zeroinitializer
@main.op2 = internal global [256 x i8] zeroinitializer
@main.op = internal global [2 x i8*] [i8* getelementptr inbounds ([256 x i8], [256 x i8]* @main.op1, i32 0, i32 0), i8* getelementptr inbounds ([256 x i8], [256 x i8]* @main.op2, i32 0, i32 0)]
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t __rbeu16(uint8_t *buffer) {
  return ((uint16_t)buffer[0] << 8) | ((uint16_t)buffer[1] << 0);
}


x86 assembly (clang, -O0):
<__rbeu16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rcx
shl    $0x0,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__rbeu16>:
mov    (%rdi),%eax
shl    $0x8,%eax
or     0x8(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @__rbeu16(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = getelementptr inbounds i64, i64* %3, i64 0
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 8
%8 = load i64*, i64** %2
%9 = getelementptr inbounds i64, i64* %8, i64 1
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
%12 = shl i32 %11, 0
%13 = or i32 %7, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @__rbeu16(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i32
%4 = shl i32 %3, 8
%5 = getelementptr inbounds i64, i64* %0, i64 1
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = or i32 %4, %7
ret i32 %8
}
void acpi_dock_init(void) {}


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

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

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

LLVM IR (-O2):
define void @acpi_dock_init() {
ret void
}
/* Variables and functions */
scalar_t__ isspace(char);
char *sob(char *p) {
  while (p && *p && isspace(*p))
    p++;
  return (p);
}


x86 assembly (clang, -O0):
<sob>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1157 <sob+0x47>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1157 <sob+0x47>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1167 <sob+0x57>
jmp    1178 <sob+0x68>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <sob+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sob>:
push   %rbx
test   %rdi,%rdi
je     113b <sob+0x2b>
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     113d <sob+0x2d>
nop
movsbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     113d <sob+0x2d>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <sob+0x10>
jmp    113d <sob+0x2d>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @sob(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %18, %1
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = load i8*, i8** %2
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %6
%12 = load i8*, i8** %2
%13 = load i8, i8* %12
%14 = call i64 @isspace(i8 signext %13)
%15 = icmp ne i64 %14, 0
br label %16
16: ; preds = %11, %6, %3
%17 = phi i1 [ false, %6 ], [ false, %3 ], [ %15, %11 ]
br i1 %17, label %18, label %21
18: ; preds = %16
%19 = load i8*, i8** %2
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %2
br label %3
21: ; preds = %16
%22 = load i8*, i8** %2
ret i8* %22
}

LLVM IR (-O2):
define i8* @sob(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %3, %11
%7 = phi i8 [ %13, %11 ], [ %4, %3 ]
%8 = phi i8* [ %12, %11 ], [ %0, %3 ]
%9 = tail call i64 @isspace(i8 signext %7)
%10 = icmp eq i64 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %6
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %6
15: ; preds = %11, %6, %3, %1
%16 = phi i8* [ null, %1 ], [ %0, %3 ], [ %8, %6 ], [ %12, %11 ]
ret i8* %16
}
void ASRT_PrintBeforeSuite(const char *suiteName) {}


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

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

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

LLVM IR (-O2):
define void @ASRT_PrintBeforeSuite(i8* nocapture %0) {
ret void
}
int fib(int n) {
  int x, y, z, p, q;
  if (n == 0) {
    z = 0;
  } else if (n == 1) {
    z = 1;
  } else {
    p = n - 1;
    q = n - 2;
    x = fib(p);
    y = fib(q);
    z = x + y;
  }
  return z;
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1131 <fib+0x21>
movl   $0x0,-0x10(%rbp)
jmp    117d <fib+0x6d>
cmpl   $0x1,-0x4(%rbp)
jne    1147 <fib+0x37>
movl   $0x1,-0x10(%rbp)
jmp    1178 <fib+0x68>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <fib@plt>
mov    %eax,-0x8(%rbp)
mov    -0x18(%rbp),%edi
call   1030 <fib@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    117d <fib+0x6d>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

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


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

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

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

LLVM IR (-O2):
define void @RTCircBufReleaseWriteBlock() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int dif = 0, i, j, tmp;
  for (i = 1; i <= 100; i++) {
    tmp = 0;
    for (j = 1; j <= 100; j++) {
      tmp += i * j;
    }
    dif += tmp - i * i;
  }
  printf("%d", dif);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jg     118a <main+0x7a>
movl   $0x0,-0x14(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0x64,-0x10(%rbp)
jg     116a <main+0x5a>
mov    -0xc(%rbp),%eax
imul   -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1145 <main+0x35>
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
sub    %ecx,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
mov    -0x8(%rbp),%esi
lea    0xe6c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 1, i32* %3
br label %6
6: ; preds = %30, %0
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 100
br i1 %8, label %9, label %33
9: ; preds = %6
store i32 0, i32* %5
store i32 1, i32* %4
br label %10
10: ; preds = %19, %9
%11 = load i32, i32* %4
%12 = icmp sle i32 %11, 100
br i1 %12, label %13, label %22
13: ; preds = %10
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = mul nsw i32 %14, %15
%17 = load i32, i32* %5
%18 = add nsw i32 %17, %16
store i32 %18, i32* %5
br label %19
19: ; preds = %13
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 1
store i32 %21, i32* %4
br label %10
22: ; preds = %10
%23 = load i32, i32* %5
%24 = load i32, i32* %3
%25 = load i32, i32* %3
%26 = mul nsw i32 %24, %25
%27 = sub nsw i32 %23, %26
%28 = load i32, i32* %2
%29 = add nsw i32 %28, %27
store i32 %29, i32* %2
br label %30
30: ; preds = %22
%31 = load i32, i32* %3
%32 = add nsw i32 %31, 1
store i32 %32, i32* %3
br label %6
33: ; preds = %6
%34 = load i32, i32* %2
%35 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %34)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 25164150)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bcopy(void const *, void *, int);
void *malloc(int);
void *y_memdup(const void *addr, int n) {
  void *new_chunk = malloc(n);
  if (new_chunk)
    bcopy((addr), (new_chunk), (n));
  return new_chunk;
}


x86 assembly (clang, -O0):
<y_memdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1156 <y_memdup+0x36>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <bcopy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<y_memdup>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%r15
mov    %esi,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1148 <y_memdup+0x28>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define noalias i8* @y_memdup(i8* nocapture %0, i32 %1) {
%3 = tail call i8* @malloc(i32 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %6, label %5
5: ; preds = %2
tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %3, i8* align 1 %0, i32 %1, i1 false)
br label %6
6: ; preds = %5, %2
ret i8* %3
}
unsigned short test3(unsigned short a) {
  a &= 0xd123;
  a ^= 0x6040;
  a |= 0xc031;
  return a;
}


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
and    $0xd123,%eax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
xor    $0x6040,%eax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
or     $0xc031,%eax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
and    $0x1102,%edi
lea    0xe071(%rdi),%eax
ret

LLVM IR (-O0):
define zeroext i16 @test3(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, 53539
%6 = trunc i32 %5 to i16
store i16 %6, i16* %2
%7 = load i16, i16* %2
%8 = zext i16 %7 to i32
%9 = xor i32 %8, 24640
%10 = trunc i32 %9 to i16
store i16 %10, i16* %2
%11 = load i16, i16* %2
%12 = zext i16 %11 to i32
%13 = or i32 %12, 49201
%14 = trunc i32 %13 to i16
store i16 %14, i16* %2
%15 = load i16, i16* %2
ret i16 %15
}

LLVM IR (-O2):
define zeroext i16 @test3(i16 zeroext %0) {
%2 = and i16 %0, 4354
%3 = or i16 %2, -8079
ret i16 %3
}
/* Variables and functions */
int compute(char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("9 + (3 - 1) * 5 + 8 / 2 = %d\n", compute("931-5*+82/+"));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"9 + (3 - 1) * 5 + 8 / 2 = %d\0A\00"
@.str.1 = [12 x i8] c"931-5*+82/+\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @compute(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"9 + (3 - 1) * 5 + 8 / 2 = %d\0A\00"
@.str.1 = [12 x i8] c"931-5*+82/+\00"
define i32 @main() {
%1 = tail call i32 @compute(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void *testChat(void *param) { return param; }


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

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

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

LLVM IR (-O2):
define i8* @testChat(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
unsigned int m68ki_get_ea_pcix();
int /*<<< orphan*/ m68ki_push_32(unsigned int);
void m68k_op_pea_32_pcix(void) {
  unsigned int ea = m68ki_get_ea_pcix();
  m68ki_push_32(ea);
}


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

x86 assembly (clang, -O2):
<m68k_op_pea_32_pcix>:
push   %rax
xor    %eax,%eax
call   1030 <m68ki_get_ea_pcix@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <m68ki_push_32@plt>

LLVM IR (-O0):
define void @m68k_op_pea_32_pcix() {
%1 = alloca i32
%2 = call i32 (...) @m68ki_get_ea_pcix()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @m68ki_push_32(i32 %3)
ret void
}

LLVM IR (-O2):
define void @m68k_op_pea_32_pcix() {
%1 = tail call i32 (...) @m68ki_get_ea_pcix()
%2 = tail call i32 @m68ki_push_32(i32 %1)
ret void
}
void drm_fence_manager_takedown(struct drm_device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.drm_device = type opaque
define void @drm_fence_manager_takedown(%struct.drm_device* nocapture %0) {
ret void
}
void store2z(long long *array) {
  array[200] = 0;
  array[201] = 0;
  array[202] = 0;
  array[203] = 0;
}


x86 assembly (clang, -O0):
<store2z>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,0x640(%rax)
mov    -0x8(%rbp),%rax
movq   $0x0,0x648(%rax)
mov    -0x8(%rbp),%rax
movq   $0x0,0x650(%rax)
mov    -0x8(%rbp),%rax
movq   $0x0,0x658(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<store2z>:
xorps  %xmm0,%xmm0
movups %xmm0,0x650(%rdi)
movups %xmm0,0x640(%rdi)
ret

LLVM IR (-O0):
define void @store2z(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = getelementptr inbounds i64, i64* %3, i64 200
store i64 0, i64* %4
%5 = load i64*, i64** %2
%6 = getelementptr inbounds i64, i64* %5, i64 201
store i64 0, i64* %6
%7 = load i64*, i64** %2
%8 = getelementptr inbounds i64, i64* %7, i64 202
store i64 0, i64* %8
%9 = load i64*, i64** %2
%10 = getelementptr inbounds i64, i64* %9, i64 203
store i64 0, i64* %10
ret void
}

LLVM IR (-O2):
define void @store2z(i64* nocapture writeonly %0) {
%2 = getelementptr inbounds i64, i64* %0, i64 200
%3 = bitcast i64* %2 to i8*
ret void
}
/* Variables and functions */
int /*<<< orphan*/ um_crtf();
int /*<<< orphan*/ um_crti();
void um_destroy_world(void) {
  ((void)0);
  um_crtf();
  um_crti();
}


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

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

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

LLVM IR (-O2):
define void @um_destroy_world() {
%1 = tail call i32 (...) @um_crtf()
%2 = tail call i32 (...) @um_crti()
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ name;
};
typedef TYPE_1__ XFontProp;

/* Variables and functions */
unsigned long get_XFontProp_name(void *_p) {
  return (unsigned long)((XFontProp *)_p)->name;
}


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

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

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

LLVM IR (-O2):
define i64 @get_XFontProp_name(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ cdio_add_device_list(char ***, void *, unsigned int *);
char **cdio_get_devices_bincue(void) {
  char **drives = ((void *)0);
  unsigned int num_files = 0;
  cdio_add_device_list(&drives, "videocd.bin", &num_files);
  cdio_add_device_list(&drives, ((void *)0), &num_files);
  return drives;
}


x86 assembly (clang, -O0):
<cdio_get_devices_bincue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    -0x8(%rbp),%rdi
lea    0xece(%rip),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <cdio_add_device_list@plt>
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
lea    -0xc(%rbp),%rdx
call   1030 <cdio_add_device_list@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdio_get_devices_bincue>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
lea    0xed1(%rip),%rsi
lea    0x10(%rsp),%rbx
lea    0xc(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <cdio_add_device_list@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <cdio_add_device_list@plt>
mov    0x10(%rsp),%rax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"videocd.bin\00"
define i8** @cdio_get_devices_bincue() {
%1 = alloca i8**
%2 = alloca i32
store i8** null, i8*** %1
store i32 0, i32* %2
%3 = call i32 @cdio_add_device_list(i8*** %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = call i32 @cdio_add_device_list(i8*** %1, i8* null, i32* %2)
%5 = load i8**, i8*** %1
ret i8** %5
}

LLVM IR (-O2):
@.str = [12 x i8] c"videocd.bin\00"
define i8** @cdio_get_devices_bincue() {
%1 = alloca i8**
%2 = alloca i32
%3 = bitcast i8*** %1 to i8*
store i8** null, i8*** %1
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = call i32 @cdio_add_device_list(i8*** %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = call i32 @cdio_add_device_list(i8*** %1, i8* null, i32* %2)
%7 = load i8**, i8*** %1
ret i8** %7
}
void ff_hevc_put_hevc_qpel_hv32_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_qpel_hv32_12_sse4() {
ret void
}
unsigned char readChar(char **pptr) {
  unsigned char c = **pptr;
  (*pptr)++;
  return c;
}


x86 assembly (clang, -O0):
<readChar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
movzbl -0x9(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<readChar>:
mov    (%rdi),%rcx
mov    (%rcx),%al
add    $0x1,%rcx
mov    %rcx,(%rdi)
ret

LLVM IR (-O0):
define zeroext i8 @readChar(i8** %0) {
%2 = alloca i8**
%3 = alloca i8
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = load i8, i8* %5
store i8 %6, i8* %3
%7 = load i8**, i8*** %2
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %7
%10 = load i8, i8* %3
ret i8 %10
}

LLVM IR (-O2):
define zeroext i8 @readChar(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = getelementptr inbounds i8, i8* %2, i64 1
store i8* %4, i8** %0
ret i8 %3
}
/* Variables and functions */
scalar_t__ isdigit(char);
int is16digit(char c) {
  return (isdigit(c)) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F') ? 1
                                                                          : 0;
}


x86 assembly (clang, -O0):
<is16digit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    117d <is16digit+0x6d>
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1158 <is16digit+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x66,%ecx
mov    %al,-0x2(%rbp)
jle    117d <is16digit+0x6d>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x3(%rbp)
jl     1177 <is16digit+0x67>
movsbl -0x1(%rbp),%eax
cmp    $0x46,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is16digit>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
setne  %al
and    $0xdf,%bl
add    $0xbf,%bl
cmp    $0x6,%bl
setb   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @is16digit(i8 signext %0) {
%2 = tail call i64 @isdigit(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 6
%7 = or i1 %6, %3
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ vga_putchar(int);
int vga_cons_writeb(__attribute__((unused)) void *private, int data) {
  vga_putchar(data);
  return 0;
}


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

x86 assembly (clang, -O2):
<vga_cons_writeb>:
push   %rax
mov    %esi,%edi
call   1030 <vga_putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @vga_cons_writeb(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @vga_putchar(i32 %1)
ret i32 0
}
/* Variables and functions */
double const sqrt(double const);
void sqrt_value(const double r, const double *p, double *f) {
  *f = p[0] * sqrt(r / p[1]);
}


x86 assembly (clang, -O0):
<sqrt_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
divsd  0x8(%rax),%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrt_value>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
divsd  0x8(%rdi),%xmm0
movsd  (%rdi),%xmm2
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1131 <sqrt_value+0x21>
sqrtsd %xmm0,%xmm0
jmp    1142 <sqrt_value+0x32>
movsd  %xmm2,0x8(%rsp)
call   1030 <sqrt@plt>
movsd  0x8(%rsp),%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @sqrt_value(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** %5
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double, double* %4
%11 = load double*, double** %5
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = fdiv double %10, %13
%15 = call double @sqrt(double %14)
%16 = fmul double %9, %15
%17 = load double*, double** %6
store double %16, double* %17
ret void
}

LLVM IR (-O2):
define void @sqrt_value(double %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = load double, double* %5
%7 = fdiv double %0, %6
%8 = tail call double @sqrt(double %7)
%9 = fmul double %4, %8
store double %9, double* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, size_t);
void *realloc(void *, size_t);
int /*<<< orphan*/ stderr;
void *esock_realloc(void *p, size_t size) {
  void *np;
  np = realloc(p, size);
  if (!np) {
    fprintf(stderr, "esock_realloc: cannot realloc %d bytes\n", size);
    exit(EXIT_FAILURE);
  }
  return np;
}


x86 assembly (clang, -O0):
<esock_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1183 <esock_realloc+0x53>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe90(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<esock_realloc>:
push   %rbx
mov    %rsi,%rbx
call   1040 <realloc@plt>
test   %rax,%rax
je     1140 <esock_realloc+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [40 x i8] c"esock_realloc: cannot realloc %d bytes\0A\00"
@EXIT_FAILURE = global i32 0
define i8* @esock_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %17, label %11
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i64, i64* %4
%14 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i64 %13)
%15 = load i32, i32* @EXIT_FAILURE
%16 = call i32 @exit(i32 %15)
unreachable
17: ; preds = %2
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [40 x i8] c"esock_realloc: cannot realloc %d bytes\0A\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @esock_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i64 %1)
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %2
ret i8* %3
}
void ep93xx_pwm_release_gpio(struct platform_device *pdev) {}


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

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

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

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