xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ param;

/* Variables and functions */
int fill_normal_config_req(unsigned char *, int, int, int, unsigned char *);
int fill_find_network_req(unsigned char *buf, unsigned short level) {
  unsigned char param[0x2] = {level >> 8, level & 0xff};
  return fill_normal_config_req(buf, 0x1, 0x1, sizeof(param), param);
}


x86 assembly (clang, -O0):
<fill_find_network_req>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
sar    $0x8,%eax
mov    %al,-0xc(%rbp)
movzwl -0xa(%rbp),%eax
and    $0xff,%eax
mov    %al,-0xb(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%r8
mov    $0x1,%edx
mov    $0x2,%ecx
mov    %edx,%esi
call   1030 <fill_normal_config_req@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_find_network_req>:
push   %rax
rol    $0x8,%si
mov    %si,0x6(%rsp)
lea    0x6(%rsp),%r8
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x2,%ecx
call   1030 <fill_normal_config_req@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fill_find_network_req(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
%5 = alloca [2 x i8]
store i8* %0, i8** %3
store i16 %1, i16* %4
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%7 = load i16, i16* %4
%8 = zext i16 %7 to i32
%9 = ashr i32 %8, 8
%10 = trunc i32 %9 to i8
store i8 %10, i8* %6
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = load i16, i16* %4
%13 = zext i16 %12 to i32
%14 = and i32 %13, 255
%15 = trunc i32 %14 to i8
store i8 %15, i8* %11
%16 = load i8*, i8** %3
%17 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%18 = call i32 @fill_normal_config_req(i8* %16, i32 1, i32 1, i32 2, i8* %17)
ret i32 %18
}

LLVM IR (-O2):
define i32 @fill_find_network_req(i8* %0, i16 zeroext %1) {
%3 = alloca [2 x i8]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = lshr i16 %1, 8
%6 = trunc i16 %5 to i8
store i8 %6, i8* %4
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
%8 = trunc i16 %1 to i8
store i8 %8, i8* %7
%9 = call i32 @fill_normal_config_req(i8* %0, i32 1, i32 1, i32 2, i8* %4)
ret i32 %9
}
void XkbFreeGeomProperties() {}


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

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

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

LLVM IR (-O2):
define void @XkbFreeGeomProperties() {
ret void
}
int string_length_short(char *string) {
  int count = 0;
  while (*string++) {
    ++count;
  }
  return count;
}


x86 assembly (clang, -O0):
<string_length_short>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1135 <string_length_short+0x35>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <string_length_short+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_length_short>:
cmpb   $0x0,(%rdi)
je     111c <string_length_short+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <string_length_short+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @string_length_short(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 i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
uint8_t bmax_uint8(uint8_t a, uint8_t b) { return (a > b ? a : b); }


x86 assembly (clang, -O0):
<bmax_uint8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1127 <bmax_uint8+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <bmax_uint8+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bmax_uint8>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @bmax_uint8(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sgt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @bmax_uint8(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int send_event;
};
struct TYPE_4__ {
  TYPE_1__ xconfigurerequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xconfigurerequest_send_event(void *_p, int _v) {
  ((XEvent *)_p)->xconfigurerequest.send_event = (int)_v;
}


x86 assembly (clang, -O0):
<set_XEvent_xconfigurerequest_send_event>:
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_xconfigurerequest_send_event>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xconfigurerequest_send_event(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_xconfigurerequest_send_event(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
char *gcvt(double, int, char *);
char *c_gcvt(double arg0, int arg1, char *arg2) {
  return gcvt(arg0, arg1, arg2);
}


x86 assembly (clang, -O0):
<c_gcvt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1030 <gcvt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_gcvt>:
jmp    1030 <gcvt@plt>

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

LLVM IR (-O2):
define i8* @c_gcvt(double %0, i32 %1, i8* %2) {
%4 = tail call i8* @gcvt(double %0, i32 %1, i8* %2)
ret i8* %4
}
int fib(int n) {
  if (n == 0)
    return 0;
  if (n == 1)
    return 1;
  return fib(n - 1) + fib(n - 2);
}


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

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

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

LLVM IR (-O2):
define i32 @fib(i32 %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i32 [ 0, %1 ], [ %10, %6 ]
%4 = phi i32 [ %0, %1 ], [ %9, %6 ]
%5 = icmp ult i32 %4, 2
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = add nsw i32 %4, -1
%8 = tail call i32 @fib(i32 %7)
%9 = add nsw i32 %4, -2
%10 = add nsw i32 %8, %3
br label %2
11: ; preds = %2
%12 = add nsw i32 %4, %3
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ test30_AvrPin_clear__E();
int /*<<< orphan*/ test30_AvrPin_makeOutput__E();
void test30_Led_targetInit__I() {
  test30_AvrPin_clear__E();
  test30_AvrPin_makeOutput__E();
}


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

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

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

LLVM IR (-O2):
define void @test30_Led_targetInit__I() {
%1 = tail call i32 (...) @test30_AvrPin_clear__E()
%2 = tail call i32 (...) @test30_AvrPin_makeOutput__E()
ret void
}
/* Type definitions */
struct board {
  int dummy;
};

/* Variables and functions */
char board_merge_left(struct board *);
char board_shift_left(struct board *);
int board_move_left(struct board *board) {
  char a = board_merge_left(board);
  return a | board_shift_left(board);
}


x86 assembly (clang, -O0):
<board_move_left>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <board_merge_left@plt>
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <board_shift_left@plt>
mov    %al,%cl
mov    -0x10(%rbp),%eax
movsbl %cl,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<board_move_left>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <board_merge_left@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <board_shift_left@plt>
or     %bpl,%al
movsbl %al,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.board = type { i32 }
define i32 @board_move_left(%struct.board* %0) {
%2 = alloca %struct.board*
%3 = alloca i8
store %struct.board* %0, %struct.board** %2
%4 = load %struct.board*, %struct.board** %2
%5 = call signext i8 @board_merge_left(%struct.board* %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
%8 = load %struct.board*, %struct.board** %2
%9 = call signext i8 @board_shift_left(%struct.board* %8)
%10 = sext i8 %9 to i32
%11 = or i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
%struct.board = type { i32 }
define i32 @board_move_left(%struct.board* %0) {
%2 = tail call signext i8 @board_merge_left(%struct.board* %0)
%3 = tail call signext i8 @board_shift_left(%struct.board* %0)
%4 = or i8 %3, %2
%5 = sext i8 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void libc_free(void *ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @libc_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  printf("hola mundo!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"hola mundo!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"hola mundo!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int gcd(int a, int b) {
  if (a < 0)
    a = -a;
  if (b < 0)
    b = -b;
  if (a == 0)
    return b;
  if (b == 0)
    return a;
  return gcd(b, a % b);
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1130 <gcd+0x20>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1142 <gcd+0x32>
xor    %eax,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1157 <gcd+0x47>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1180 <gcd+0x70>
cmpl   $0x0,-0xc(%rbp)
jne    116c <gcd+0x5c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1180 <gcd+0x70>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%esi
call   1030 <gcd@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %esi,%edx
neg    %edx
cmovs  %esi,%edx
test   %edi,%edi
je     1132 <gcd+0x32>
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %esi,%esi
je     1134 <gcd+0x34>
mov    %edx,%ecx
xor    %edx,%edx
div    %ecx
mov    %ecx,%eax
mov    %edx,%esi
test   %ecx,%ecx
jne    1120 <gcd+0x20>
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @gcd(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 slt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* %4
%10 = sub nsw i32 0, %9
store i32 %10, i32* %4
br label %11
11: ; preds = %8, %2
%12 = load i32, i32* %5
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = load i32, i32* %5
%16 = sub nsw i32 0, %15
store i32 %16, i32* %5
br label %17
17: ; preds = %14, %11
%18 = load i32, i32* %4
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = load i32, i32* %5
store i32 %21, i32* %3
br label %33
22: ; preds = %17
%23 = load i32, i32* %5
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = load i32, i32* %4
store i32 %26, i32* %3
br label %33
27: ; preds = %22
%28 = load i32, i32* %5
%29 = load i32, i32* %4
%30 = load i32, i32* %5
%31 = srem i32 %29, %30
%32 = call i32 @gcd(i32 %28, i32 %31)
store i32 %32, i32* %3
br label %33
33: ; preds = %27, %25, %20
%34 = load i32, i32* %3
ret i32 %34
}

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.abs.i32(i32 %1, i1 true)
%4 = icmp eq i32 %0, 0
br i1 %4, label %15, label %5
5: ; preds = %2
%6 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
br label %7
7: ; preds = %5, %12
%8 = phi i32 [ %13, %12 ], [ %3, %5 ]
%9 = phi i32 [ %8, %12 ], [ %6, %5 ]
%10 = phi i32 [ %13, %12 ], [ %1, %5 ]
%11 = icmp eq i32 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = urem i32 %9, %8
%14 = icmp eq i32 %8, 0
br i1 %14, label %15, label %7
15: ; preds = %12, %7, %2
%16 = phi i32 [ %3, %2 ], [ %9, %7 ], [ %13, %12 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int x = 1;
  for (int i = 0; i < 100; ++i)
    ;
  ++x;
  printf("%d\n", x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    114a <main+0x3a>
jmp    113c <main+0x2c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ sscanf(char *, char *, int *);
int /*<<< orphan*/ strrev2(char *);
int reverse(int num) {
  char temp[6];
  int ret;
  sprintf(temp, "%d", num);
  strrev2(temp);
  sscanf(temp, "%d", &ret);
  return ret;
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0xa(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xeb7(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0xa(%rbp),%rdi
call   1030 <strrev2@plt>
lea    -0xa(%rbp),%rdi
lea    0xe9e(%rip),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <sscanf@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %edi,%edx
lea    0xec0(%rip),%r14
lea    0x12(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <strrev2@plt>
lea    0xc(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <sscanf@plt>
mov    0xc(%rsp),%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @reverse(i32 %0) {
%2 = alloca i32
%3 = alloca [6 x i8]
%4 = alloca i32
store i32 %0, i32* %2
%5 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%6 = load i32, i32* %2
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%9 = call i32 @strrev2(i8* %8)
%10 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%11 = call i32 @sscanf(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%12 = load i32, i32* %4
ret i32 %12
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @reverse(i32 %0) {
%2 = alloca [6 x i8]
%3 = alloca i32
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%5 = bitcast i32* %3 to i8*
%6 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
%7 = call i32 @strrev2(i8* %4)
%8 = call i32 @sscanf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%9 = load i32, i32* %3
ret i32 %9
}
double Fahr2Cent(double F) {
  double C;
  C = (F - 32) / 1.8;
  return C;
}


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

x86 assembly (clang, -O2):
<Fahr2Cent>:
addsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @Fahr2Cent(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fsub double %4, 3.200000e+01
%6 = fdiv double %5, 1.800000e+00
store double %6, double* %3
%7 = load double, double* %3
ret double %7
}

LLVM IR (-O2):
define double @Fahr2Cent(double %0) {
%2 = fadd double %0, -3.200000e+01
%3 = fdiv double %2, 1.800000e+00
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, int, int /*<<< orphan*/);
void gnu_compiler(char *compiler_version) {
  sprintf(compiler_version, "v%d.%d.%d", 9, 4, 0);
}


x86 assembly (clang, -O0):
<gnu_compiler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x9,%edx
mov    $0x4,%ecx
xor    %r8d,%r8d
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gnu_compiler>:
lea    0xee9(%rip),%rsi
mov    $0x9,%edx
mov    $0x4,%ecx
xor    %r8d,%r8d
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"v%d.%d.%d\00"
define void @gnu_compiler(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @sprintf(i8* %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9, i32 4, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"v%d.%d.%d\00"
define void @gnu_compiler(i8* nocapture writeonly %0) {
%2 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9, i32 4, i32 0)
ret void
}
int radix_tree_exceptional_entry(void *arg) { return (unsigned long)arg & 2; }


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

x86 assembly (clang, -O2):
<radix_tree_exceptional_entry>:
mov    %rdi,%rax
and    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @radix_tree_exceptional_entry(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = and i64 %4, 2
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @radix_tree_exceptional_entry(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = and i32 %3, 2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void BusFault_Handler() { default_handler(); }


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

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

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

LLVM IR (-O2):
define weak void @BusFault_Handler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
/* Variables and functions */
bool is_eos(int c) {
  if (c == '\0') {
    return true;
  }
  return false;
}


x86 assembly (clang, -O0):
<is_eos>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <is_eos+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1124 <is_eos+0x24>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_eos>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_eos(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
varput(s, out) register char *s;
{
  if (letnum(*s)) {
    write(out, s, strlen(s));
    write(out, "\n", 1);
  }
}


x86 assembly (clang, -O0):
<varput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
mov    $0x0,%al
call   1050 <letnum@plt>
cmp    $0x0,%eax
je     1194 <varput+0x64>
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    %rax,%rdx
mov    $0x0,%al
call   1030 <write@plt>
mov    -0x14(%rbp),%edi
lea    0xe78(%rip),%rsi
mov    $0x1,%edx
mov    $0x0,%al
call   1030 <write@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<varput>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
movsbl (%rdi),%edi
xor    %eax,%eax
call   1050 <letnum@plt>
test   %eax,%eax
je     1172 <varput+0x42>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1030 <write@plt>
lea    0xe9c(%rip),%rsi
mov    %ebp,%edi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <write@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define i32 @varput(i8* %0, i32 %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @letnum to i32 (i32, ...)*)(i32 %4)
%6 = icmp eq i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = tail call i64 @strlen(i8* %0)
%9 = tail call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i64, ...)*)(i32 %1, i8* %0, i64 %8)
%10 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
br label %11
11: ; preds = %7, %2
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_poly1305_to_bytes(uintptr_t, uintptr_t);
void fiat_poly1305_to_bytes(uint8_t out1[17], const uint32_t arg1[5]) {
  internal_fiat_poly1305_to_bytes((uintptr_t)out1, (uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_poly1305_to_bytes>:
jmp    1030 <internal_fiat_poly1305_to_bytes@plt>

LLVM IR (-O0):
define void @fiat_poly1305_to_bytes(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_poly1305_to_bytes(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_poly1305_to_bytes(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_poly1305_to_bytes(i64 %3, i64 %4)
ret void
}
void *test_pointer_mul(void *a, void *b) { return (long)a * (long)b; }


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

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

LLVM IR (-O0):
define i8* @test_pointer_mul(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 = ptrtoint i8* %5 to i64
%7 = load i8*, i8** %4
%8 = ptrtoint i8* %7 to i64
%9 = mul nsw i64 %6, %8
%10 = inttoptr i64 %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @test_pointer_mul(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = ptrtoint i8* %1 to i64
%5 = mul nsw i64 %4, %3
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}
/* Variables and functions */
int checker_read_unsigned_long_long(int, char const *, int,
                                    unsigned long long *);
int checker_read_corr_unsigned_long_long(const char *name, int eof_error_flag,
                                         unsigned long long *p_val) {
  return checker_read_unsigned_long_long(2, name, eof_error_flag, p_val);
}


x86 assembly (clang, -O0):
<checker_read_corr_unsigned_long_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x2,%edi
call   1030 <checker_read_unsigned_long_long@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checker_read_corr_unsigned_long_long>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x2,%edi
jmp    1030 <checker_read_unsigned_long_long@plt>

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

LLVM IR (-O2):
define i32 @checker_read_corr_unsigned_long_long(i8* %0, i32 %1, i64* %2) {
%4 = tail call i32 @checker_read_unsigned_long_long(i32 2, i8* %0, i32 %1, i64* %2)
ret i32 %4
}
int tumbleweed_initialize(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @tumbleweed_initialize() {
ret i32 0
}
/* Variables and functions */
int pipe2(int *, int const);
int sfd_pipe(int fds[2], const int flags) { return pipe2(fds, flags); }


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

x86 assembly (clang, -O2):
<sfd_pipe>:
jmp    1030 <pipe2@plt>

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

LLVM IR (-O2):
define i32 @sfd_pipe(i32* %0, i32 %1) {
%3 = tail call i32 @pipe2(i32* %0, i32 %1)
ret i32 %3
}
float evalBezier1D_ddt(float e1, float e2, float c1, float c2, float t) {
  return (6 * (1 - t) * (c2 - c1 - c1 + e1)) + (6 * t * (e2 - c2 - c2 - c1));
}


x86 assembly (clang, -O0):
<evalBezier1D_ddt>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  0xedf(%rip),%xmm1
subss  -0x14(%rbp),%xmm1
movss  0xece(%rip),%xmm0
mulss  %xmm1,%xmm0
movss  -0x10(%rbp),%xmm2
subss  -0xc(%rbp),%xmm2
subss  -0xc(%rbp),%xmm2
addss  -0x4(%rbp),%xmm2
movss  0xeae(%rip),%xmm1
mulss  -0x14(%rbp),%xmm1
movss  -0x8(%rbp),%xmm3
subss  -0x10(%rbp),%xmm3
subss  -0x10(%rbp),%xmm3
subss  -0xc(%rbp),%xmm3
mulss  %xmm3,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<evalBezier1D_ddt>:
movss  0xef8(%rip),%xmm5
subss  %xmm4,%xmm5
movss  0xef0(%rip),%xmm6
mulss  %xmm6,%xmm5
subss  %xmm3,%xmm1
subss  %xmm3,%xmm1
subss  %xmm2,%xmm3
subss  %xmm2,%xmm3
addss  %xmm3,%xmm0
mulss  %xmm5,%xmm0
mulss  %xmm4,%xmm6
subss  %xmm2,%xmm1
mulss  %xmm1,%xmm6
addss  %xmm6,%xmm0
ret

LLVM IR (-O0):
define float @evalBezier1D_ddt(float %0, float %1, float %2, float %3, float %4) {
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%11 = load float, float* %10
%12 = fsub float 1.000000e+00, %11
%13 = fmul float 6.000000e+00, %12
%14 = load float, float* %9
%15 = load float, float* %8
%16 = fsub float %14, %15
%17 = load float, float* %8
%18 = fsub float %16, %17
%19 = load float, float* %6
%20 = fadd float %18, %19
%21 = load float, float* %10
%22 = fmul float 6.000000e+00, %21
%23 = load float, float* %7
%24 = load float, float* %9
%25 = fsub float %23, %24
%26 = load float, float* %9
%27 = fsub float %25, %26
%28 = load float, float* %8
%29 = fsub float %27, %28
%30 = fmul float %22, %29
%31 = call float @llvm.fmuladd.f32(float %13, float %20, float %30)
ret float %31
}

LLVM IR (-O2):
define float @evalBezier1D_ddt(float %0, float %1, float %2, float %3, float %4) {
%6 = fsub float 1.000000e+00, %4
%7 = fmul float %6, 6.000000e+00
%8 = fsub float %3, %2
%9 = fsub float %8, %2
%10 = fadd float %9, %0
%11 = fmul float %4, 6.000000e+00
%12 = fsub float %1, %3
%13 = fsub float %12, %3
%14 = fsub float %13, %2
%15 = fmul float %11, %14
%16 = tail call float @llvm.fmuladd.f32(float %7, float %10, float %15)
ret float %16
}
/* Type definitions */
typedef int /*<<< orphan*/ RSA;

/* Variables and functions */
int keymgr_rsa_finish(RSA *rsa) { return (1); }


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

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

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

LLVM IR (-O2):
define i32 @keymgr_rsa_finish(i32* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ error(int, char *);
long add(register long a, register long b, char *s) {
  a += b;
  if (a >= 04000000L * 8)
    error(1, s);
  return a;
}


x86 assembly (clang, -O0):
<add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x800000,-0x8(%rbp)
jl     114c <add+0x3c>
mov    -0x18(%rbp),%rsi
mov    $0x1,%edi
call   1030 <error@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add>:
push   %rbx
mov    %rdi,%rbx
add    %rsi,%rbx
cmp    $0x800000,%rbx
jl     112d <add+0x1d>
mov    $0x1,%edi
mov    %rdx,%rsi
call   1030 <error@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i64 @add(i64 %0, i64 %1, i8* %2) {
%4 = add nsw i64 %1, %0
%5 = icmp sgt i64 %4, 8388607
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @error(i32 1, i8* %2)
br label %8
8: ; preds = %6, %3
ret i64 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_unpackhi_pi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 __attribute__((no, unused)) test(__m64 s1, __m64 s2) {
  return _mm_unpackhi_pi16(s1, s2);
}


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

x86 assembly (clang, -O2):
<test>:
jmp    1030 <_mm_unpackhi_pi16@plt>

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

LLVM IR (-O2):
define i32 @test(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_unpackhi_pi16(i32 %0, i32 %1)
ret i32 %3
}
int intcmp(const void *i1, const void *i2) {
  return (*(int *)i1) - (*(int *)i2);
}


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

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

LLVM IR (-O0):
define i32 @intcmp(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @intcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Type definitions */
typedef int uint64_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int qemu_get_be32(int /*<<< orphan*/ *);
uint64_t qemu_get_be64(FILE *f) {
  uint64_t v;
  v = (uint64_t)qemu_get_be32(f) << 32;
  v |= qemu_get_be32(f);
  return v;
}


x86 assembly (clang, -O0):
<qemu_get_be64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <qemu_get_be32@plt>
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <qemu_get_be32@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qemu_get_be64>:
push   %rbx
mov    %rdi,%rbx
call   1030 <qemu_get_be32@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <qemu_get_be32@plt>

LLVM IR (-O0):
define i32 @qemu_get_be64(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @qemu_get_be32(i32* %4)
%6 = shl i32 %5, 32
store i32 %6, i32* %3
%7 = load i32*, i32** %2
%8 = call i32 @qemu_get_be32(i32* %7)
%9 = load i32, i32* %3
%10 = or i32 %9, %8
store i32 %10, i32* %3
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @qemu_get_be64(i32* %0) {
%2 = tail call i32 @qemu_get_be32(i32* %0)
%3 = tail call i32 @qemu_get_be32(i32* %0)
ret i32 poison
}
/* Variables and functions */
int cbuf(int, int, int);
cbuf28(int f, int n) { return (cbuf(f, n, 28)); }


x86 assembly (clang, -O0):
<cbuf28>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x1c,%edx
call   1030 <cbuf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbuf28>:
mov    $0x1c,%edx
jmp    1030 <cbuf@plt>

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

LLVM IR (-O2):
define i32 @cbuf28(i32 %0, i32 %1) {
%3 = tail call i32 @cbuf(i32 %0, i32 %1, i32 28)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ fork();
int /*<<< orphan*/ lseek(int, int, int /*<<< orphan*/);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello World!\n");
  int filedesc = open("/home/pi/Desktop/image.bin", O_RDWR);
  fork();
  fork();
  lseek(filedesc, 4, SEEK_CUR);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%esi
lea    0xea3(%rip),%rdi
call   1050 <open@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1060 <fork@plt>
mov    $0x0,%al
call   1060 <fork@plt>
mov    -0x8(%rbp),%edi
mov    0x2e55(%rip),%rax
mov    (%rax),%edx
mov    $0x4,%esi
call   1040 <lseek@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%esi
lea    0xea3(%rip),%rdi
call   1050 <open@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1060 <fork@plt>
xor    %eax,%eax
call   1060 <fork@plt>
mov    0x2e67(%rip),%rax
mov    (%rax),%edx
mov    %ebx,%edi
mov    $0x4,%esi
call   1040 <lseek@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello World!\0A\00"
@.str.1 = [27 x i8] c"/home/pi/Desktop/image.bin\00"
@O_RDWR = global i32 0
@SEEK_CUR = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @O_RDWR
%5 = call i32 @open(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %4)
store i32 %5, i32* %2
%6 = call i32 (...) @fork()
%7 = call i32 (...) @fork()
%8 = load i32, i32* %2
%9 = load i32, i32* @SEEK_CUR
%10 = call i32 @lseek(i32 %8, i32 4, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [27 x i8] c"/home/pi/Desktop/image.bin\00"
@O_RDWR = global i32 0
@SEEK_CUR = global i32 0
@str = [13 x i8] c"Hello World!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @O_RDWR
%3 = tail call i32 @open(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = tail call i32 (...) @fork()
%5 = tail call i32 (...) @fork()
%6 = load i32, i32* @SEEK_CUR
%7 = tail call i32 @lseek(i32 %3, i32 4, i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ nextPermutation(int *, int);
int /*<<< orphan*/ print(int *, int);
int main(int argc, char **argv) {
  int d[] = {1, 1};
  nextPermutation(d, 2);
  print(d, 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
mov    $0x2,%esi
call   1040 <nextPermutation@plt>
lea    -0x18(%rbp),%rdi
mov    $0x2,%esi
call   1030 <print@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x100000001,%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x2,%esi
call   1040 <nextPermutation@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <print@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.d = [2 x i32] [i32 1, i32 1]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [2 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [2 x i32]* %6 to i8*
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%9 = call i32 @nextPermutation(i32* %8, i32 2)
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%11 = call i32 @print(i32* %10, i32 2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
store i64 4294967297, i64* %3
%5 = bitcast i64* %3 to i32*
%6 = call i32 @nextPermutation(i32* %5, i32 2)
%7 = call i32 @print(i32* %5, i32 2)
ret i32 0
}
void enable_scratch_hw_bp(struct task *task, struct breakpoint *bp) {
  (void)task;
  (void)bp;
}


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

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

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

LLVM IR (-O2):
%struct.task = type opaque
%struct.breakpoint = type opaque
define void @enable_scratch_hw_bp(%struct.task* nocapture %0, %struct.breakpoint* nocapture %1) {
ret void
}