xunge/DecIR huggingface dataset:
unsigned int hash(char *p) {
  unsigned int ret = 0;
  for (; *p != '\0'; p++)
    ret = ret * 31 + *p;
  return ret % 1001;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1140 <hash+0x40>
imul   $0x1f,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <hash+0xf>
mov    -0xc(%rbp),%eax
mov    $0x3e9,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     114a <hash+0x4a>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
mov    %eax,%edx
shl    $0x5,%edx
sub    %eax,%edx
mov    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
mov    %eax,%ecx
imul   $0x5e1d27b,%rcx,%rcx
shr    $0x20,%rcx
mov    %eax,%edx
sub    %ecx,%edx
shr    %edx
add    %ecx,%edx
shr    $0x9,%edx
imul   $0x3e9,%edx,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %16, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %19
9: ; preds = %4
%10 = load i32, i32* %3
%11 = mul i32 %10, 31
%12 = load i8*, i8** %2
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = add i32 %11, %14
store i32 %15, i32* %3
br label %16
16: ; preds = %9
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %2
br label %4
19: ; preds = %4
%20 = load i32, i32* %3
%21 = urem i32 %20, 1001
ret i32 %21
}

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = mul i32 %6, 31
%10 = add i32 %9, %8
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = urem i32 %10, 1001
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ test_stringops_1(int);
void test_stringops_with_values_1(int common, int not_common) {
  int i;
  for (i = 0; i < 1000; i++) {
    if (i > 990)
      test_stringops_1(not_common);
    else
      test_stringops_1(common);
  }
}


x86 assembly (clang, -O0):
<test_stringops_with_values_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3e8,-0xc(%rbp)
jge    1167 <test_stringops_with_values_1+0x57>
cmpl   $0x3de,-0xc(%rbp)
jle    114c <test_stringops_with_values_1+0x3c>
mov    -0x8(%rbp),%edi
call   1030 <test_stringops_1@plt>
jmp    1154 <test_stringops_with_values_1+0x44>
mov    -0x4(%rbp),%edi
call   1030 <test_stringops_1@plt>
jmp    1159 <test_stringops_with_values_1+0x49>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <test_stringops_with_values_1+0x15>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_stringops_with_values_1>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
cmp    $0x3df,%ebx
mov    %ebp,%edi
cmovae %r14d,%edi
call   1030 <test_stringops_1@plt>
add    $0x1,%ebx
cmp    $0x3e8,%ebx
jne    1120 <test_stringops_with_values_1+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @test_stringops_with_values_1(i32 %0, i32 %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i32 [ 0, %2 ], [ %8, %3 ]
%5 = icmp ugt i32 %4, 990
%6 = select i1 %5, i32 %1, i32 %0
%7 = tail call i32 @test_stringops_1(i32 %6)
%8 = add nuw nsw i32 %4, 1
%9 = icmp eq i32 %8, 1000
br i1 %9, label %10, label %3
10: ; preds = %3
ret void
}
long buff_to_sint8(unsigned char const *buff, unsigned int *off) {
  unsigned long tmp;
  long val;
  tmp = buff[*off + 0];
  *off += 1;
  if (tmp > 0x80UL) {
    tmp -= 0x81UL;
    val = ((long)tmp) - 0x7f;
  } else if (tmp == 0x80UL)
    val = -0x80;
  else
    val = tmp;
  return val;
}


x86 assembly (clang, -O0):
<buff_to_sint8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rcx),%ecx
add    $0x0,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
cmpq   $0x80,-0x18(%rbp)
jbe    115b <buff_to_sint8+0x5b>
mov    -0x18(%rbp),%rax
sub    $0x81,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
sub    $0x7f,%rax
mov    %rax,-0x20(%rbp)
jmp    1183 <buff_to_sint8+0x83>
cmpq   $0x80,-0x18(%rbp)
jne    1176 <buff_to_sint8+0x76>
movq   $0xffffffffffffff80,-0x20(%rbp)
ff
jmp    117e <buff_to_sint8+0x7e>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1183 <buff_to_sint8+0x83>
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<buff_to_sint8>:
mov    (%rsi),%eax
movzbl (%rdi,%rax,1),%ecx
lea    0x1(%rax),%edx
lea    -0x100(%rcx),%rdi
cmp    $0x80,%rcx
mov    $0xffffffffffffff80,%rax
cmovne %rcx,%rax
mov    %edx,(%rsi)
cmova  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @buff_to_sint8(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i32* %1, i32** %4
%7 = load i8*, i8** %3
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = add i32 %9, 0
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %7, i64 %11
%13 = load i8, i8* %12
%14 = zext i8 %13 to i64
store i64 %14, i64* %5
%15 = load i32*, i32** %4
%16 = load i32, i32* %15
%17 = add i32 %16, 1
store i32 %17, i32* %15
%18 = load i64, i64* %5
%19 = icmp ugt i64 %18, 128
br i1 %19, label %20, label %25
20: ; preds = %2
%21 = load i64, i64* %5
%22 = sub i64 %21, 129
store i64 %22, i64* %5
%23 = load i64, i64* %5
%24 = sub nsw i64 %23, 127
store i64 %24, i64* %6
br label %32
25: ; preds = %2
%26 = load i64, i64* %5
%27 = icmp eq i64 %26, 128
br i1 %27, label %28, label %29
28: ; preds = %25
store i64 -128, i64* %6
br label %31
29: ; preds = %25
%30 = load i64, i64* %5
store i64 %30, i64* %6
br label %31
31: ; preds = %29, %28
br label %32
32: ; preds = %31, %20
%33 = load i64, i64* %6
ret i64 %33
}

LLVM IR (-O2):
define i64 @buff_to_sint8(i8* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = zext i8 %6 to i64
%8 = add i32 %3, 1
store i32 %8, i32* %1
%9 = icmp ugt i8 %6, -128
%10 = or i64 %7, -256
%11 = icmp eq i8 %6, -128
%12 = select i1 %11, i64 -128, i64 %7
%13 = select i1 %9, i64 %10, i64 %12
ret i64 %13
}
/* Type definitions */
struct ring_buff {
  int dummy;
};

/* Variables and functions */
int calc_data_size(struct ring_buff *);
int calc_rest_size(struct ring_buff *rb) { return (256 - calc_data_size(rb)); }


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

x86 assembly (clang, -O2):
<calc_rest_size>:
push   %rax
call   1030 <calc_data_size@plt>
mov    $0x100,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.ring_buff = type { i32 }
define i32 @calc_rest_size(%struct.ring_buff* %0) {
%2 = alloca %struct.ring_buff*
store %struct.ring_buff* %0, %struct.ring_buff** %2
%3 = load %struct.ring_buff*, %struct.ring_buff** %2
%4 = call i32 @calc_data_size(%struct.ring_buff* %3)
%5 = sub nsw i32 256, %4
ret i32 %5
}

LLVM IR (-O2):
%struct.ring_buff = type { i32 }
define i32 @calc_rest_size(%struct.ring_buff* %0) {
%2 = tail call i32 @calc_data_size(%struct.ring_buff* %0)
%3 = sub nsw i32 256, %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ permute(int *, int /*<<< orphan*/, int *, int);
int main() {
  int L[8];
  int R[8] = {1, 2, 3, 4, 5, 6, 7, 8};
  permute(L, 0, R, 8);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xec1(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    -0x30(%rbp),%rdi
lea    -0x50(%rbp),%rdx
xor    %esi,%esi
mov    $0x8,%ecx
call   1030 <permute@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x20(%rsp),%rdi
mov    %rsp,%rdx
xor    %esi,%esi
mov    $0x8,%ecx
call   1030 <permute@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

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

LLVM IR (-O2):
@__const.main.R = [8 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8]
define i32 @main() {
%1 = alloca [8 x i32]
%2 = alloca [8 x i32]
%3 = bitcast [8 x i32]* %1 to i8*
%4 = bitcast [8 x i32]* %2 to i8*
%5 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%6 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 0
%7 = call i32 @permute(i32* %5, i32 0, i32* %6, i32 8)
%8 = call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
double db10_0_(int /*<<< orphan*/, double *);
double db10_(double *x) { return db10_0_(0, x); }


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

x86 assembly (clang, -O2):
<db10_>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <db10_0_@plt>

LLVM IR (-O0):
define double @db10_(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = call double @db10_0_(i32 0, double* %3)
ret double %4
}

LLVM IR (-O2):
define double @db10_(double* %0) {
%2 = tail call double @db10_0_(i32 0, double* %0)
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS12_BAGS;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS12_BAGS_it;
PKCS12_BAGS *PKCS12_BAGS_new(void) {
  return (PKCS12_BAGS *)ASN1_item_new(&PKCS12_BAGS_it);
}


x86 assembly (clang, -O0):
<PKCS12_BAGS_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PKCS12_BAGS_new>:
mov    0x2ec9(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@PKCS12_BAGS_it = global i32 0
define i32* @PKCS12_BAGS_new() {
%1 = call i64 @ASN1_item_new(i32* @PKCS12_BAGS_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@PKCS12_BAGS_it = global i32 0
define i32* @PKCS12_BAGS_new() {
%1 = tail call i64 @ASN1_item_new(i32* @PKCS12_BAGS_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Variables and functions */
int add(int);
int /*<<< orphan*/ primary_eight(int);
int /*<<< orphan*/ primary_seven(int);
int adagain_more(int input) {
  static int one = 1;
  int two = 2;
  two += input;
  two += one;
  two = add(two);
  primary_seven(two);
  primary_eight(two);
  return two;
}


x86 assembly (clang, -O0):
<adagain_more>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    0x2ee7(%rip),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <add@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <primary_seven@plt>
mov    -0x8(%rbp),%edi
call   1040 <primary_eight@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adagain_more>:
push   %rbx
add    $0x3,%edi
call   1030 <add@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1050 <primary_seven@plt>
mov    %ebx,%edi
call   1040 <primary_eight@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@adagain_more.one = internal global i32 1
define i32 @adagain_more(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 2, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = add nsw i32 %5, %4
store i32 %6, i32* %3
%7 = load i32, i32* @adagain_more.one
%8 = load i32, i32* %3
%9 = add nsw i32 %8, %7
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = call i32 @add(i32 %10)
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = call i32 @primary_seven(i32 %12)
%14 = load i32, i32* %3
%15 = call i32 @primary_eight(i32 %14)
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @adagain_more(i32 %0) {
%2 = add nsw i32 %0, 3
%3 = tail call i32 @add(i32 %2)
%4 = tail call i32 @primary_seven(i32 %3)
%5 = tail call i32 @primary_eight(i32 %3)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ clean_d_cache();
int /*<<< orphan*/ flush_i_cache();
__attribute__((always_)) void sync_caches() {
  clean_d_cache();
  flush_i_cache();
}


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

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

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

LLVM IR (-O2):
define void @sync_caches() {
%1 = tail call i32 (...) @clean_d_cache()
%2 = tail call i32 (...) @flush_i_cache()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void redisFreeCommand(char *cmd) { free(cmd); }


x86 assembly (clang, -O0):
<redisFreeCommand>:
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):
<redisFreeCommand>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @redisFreeCommand(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 @redisFreeCommand(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_foo() { printf("print_foo\n"); }


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

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

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

LLVM IR (-O2):
@str = [10 x i8] c"print_foo\00"
define void @print_foo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int spi_command_read(int, char *, int, char *);
int nrf_read_rx_pl_width(int *width, char *retstatus) {
  return spi_command_read(0x60, (char *)width, 1, retstatus);
}


x86 assembly (clang, -O0):
<nrf_read_rx_pl_width>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rcx
mov    $0x60,%edi
mov    $0x1,%edx
call   1030 <spi_command_read@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf_read_rx_pl_width>:
mov    %rsi,%rcx
mov    %rdi,%rsi
mov    $0x60,%edi
mov    $0x1,%edx
jmp    1030 <spi_command_read@plt>

LLVM IR (-O0):
define i32 @nrf_read_rx_pl_width(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = bitcast i32* %5 to i8*
%7 = load i8*, i8** %4
%8 = call i32 @spi_command_read(i32 96, i8* %6, i32 1, i8* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @nrf_read_rx_pl_width(i32* %0, i8* %1) {
%3 = bitcast i32* %0 to i8*
%4 = tail call i32 @spi_command_read(i32 96, i8* %3, i32 1, i8* %1)
ret i32 %4
}
void __DELETE_java_lang_IndexOutOfBoundsException(void *me, void *client_data) {
}


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

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

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

LLVM IR (-O2):
define void @__DELETE_java_lang_IndexOutOfBoundsException(i8* nocapture %0, i8* nocapture %1) {
ret void
}
void ptr_set_array_element(void **ptrArray, int arrayIndex, void *value) {
  ptrArray[arrayIndex] = value;
}


x86 assembly (clang, -O0):
<ptr_set_array_element>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptr_set_array_element>:
movslq %esi,%rax
mov    %rdx,(%rdi,%rax,8)
ret

LLVM IR (-O0):
define void @ptr_set_array_element(i8** %0, i32 %1, i8* %2) {
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i8*
store i8** %0, i8*** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load i8**, i8*** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8*, i8** %8, i64 %10
store i8* %7, i8** %11
ret void
}

LLVM IR (-O2):
define void @ptr_set_array_element(i8** nocapture writeonly %0, i32 %1, i8* %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8*, i8** %0, i64 %4
store i8* %2, i8** %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BITHLm(int);
void BIT4HLm() { BITHLm(0x10); }


x86 assembly (clang, -O0):
<BIT4HLm>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10,%edi
call   1030 <BITHLm@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<BIT4HLm>:
mov    $0x10,%edi
jmp    1030 <BITHLm@plt>

LLVM IR (-O0):
define void @BIT4HLm() {
%1 = call i32 @BITHLm(i32 16)
ret void
}

LLVM IR (-O2):
define void @BIT4HLm() {
%1 = tail call i32 @BITHLm(i32 16)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SYS_read;
int syscall(int /*<<< orphan*/, int, void *, int);
int xread(int fd, void *buf, int len) {
  return syscall((SYS_read), fd, buf, len);
}


x86 assembly (clang, -O0):
<xread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xread>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x2eca(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
@SYS_read = global i32 0
define i32 @xread(i32 %0, i8* %1, i32 %2) {
%4 = load i32, i32* @SYS_read
%5 = tail call i32 @syscall(i32 %4, i32 %0, i8* %1, i32 %2)
ret i32 %5
}
void av_get_frame_filename2() {}


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

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

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

LLVM IR (-O2):
define void @av_get_frame_filename2() {
ret void
}
/* Variables and functions */
int color_eqn(int, int, int, int, int, int);
int g_cyg_yeg_yemg(int entrycyg, int entrycymg, int entryyeg, int entryyemg) {
  return color_eqn(23, entrycyg, 67, entryyeg, -51, entryyemg);
}


x86 assembly (clang, -O0):
<g_cyg_yeg_yemg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r9d
mov    $0x17,%edi
mov    $0x43,%edx
mov    $0xffffffcd,%r8d
call   1030 <color_eqn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_cyg_yeg_yemg>:
mov    %ecx,%r9d
mov    %edx,%ecx
mov    %edi,%esi
mov    $0x17,%edi
mov    $0x43,%edx
mov    $0xffffffcd,%r8d
jmp    1030 <color_eqn@plt>

LLVM IR (-O0):
define i32 @g_cyg_yeg_yemg(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %7
%11 = load i32, i32* %8
%12 = call i32 @color_eqn(i32 23, i32 %9, i32 67, i32 %10, i32 -51, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @g_cyg_yeg_yemg(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @color_eqn(i32 23, i32 %0, i32 67, i32 %2, i32 -51, i32 %3)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ __u8;

/* Variables and functions */
int /*<<< orphan*/ SPI_IOC_WR_LSB_FIRST;
int ioctl(int, int /*<<< orphan*/, int /*<<< orphan*/ *);
int spi_set_lsb_first(int fd, __u8 lsb) {
  return ioctl(fd, SPI_IOC_WR_LSB_FIRST, &lsb);
}


x86 assembly (clang, -O0):
<spi_set_lsb_first>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spi_set_lsb_first>:
push   %rax
mov    %esi,0x4(%rsp)
mov    0x2ec4(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <ioctl@plt>
pop    %rcx
ret

LLVM IR (-O0):
@SPI_IOC_WR_LSB_FIRST = global i32 0
define i32 @spi_set_lsb_first(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* @SPI_IOC_WR_LSB_FIRST
%7 = call i32 @ioctl(i32 %5, i32 %6, i32* %4)
ret i32 %7
}

LLVM IR (-O2):
@SPI_IOC_WR_LSB_FIRST = global i32 0
define i32 @spi_set_lsb_first(i32 %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = load i32, i32* @SPI_IOC_WR_LSB_FIRST
%5 = call i32 @ioctl(i32 %0, i32 %4, i32* %3)
ret i32 %5
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
int strlen(char const *);
int is_super_type(const char *mime) {
  int length;
  const char *type;
  length = strlen(mime);
  type = &(mime[length - 2]);
  if (strcmp(type, "/*") == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_super_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1172 <is_super_type+0x52>
movl   $0x1,-0x4(%rbp)
jmp    1179 <is_super_type+0x59>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_super_type>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
lea    (%rax,%rbx,1),%rdi
add    $0xfffffffffffffffe,%rdi
lea    0xec6(%rip),%rsi
call   1040 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"/*\00"
define i32 @is_super_type(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, -2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
long index_of_number(long number, long array[]) {
  long i = 0;
  bool found = false;
  while (found == false) {
    if (number == array[i]) {
      found = true;
    } else {
      i++;
    }
  }
  return i;
}


x86 assembly (clang, -O0):
<index_of_number>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    1158 <index_of_number+0x58>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rdx
cmp    (%rcx,%rdx,8),%rax
jne    1147 <index_of_number+0x47>
movl   $0x1,-0x1c(%rbp)
jmp    1153 <index_of_number+0x53>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    111b <index_of_number+0x1b>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<index_of_number>:
mov    $0xffffffffffffffff,%rcx
nopw   0x0(%rax,%rax,1)
mov    %rcx,%rax
add    $0x1,%rcx
cmp    %rdi,0x8(%rsi,%rax,8)
jne    1110 <index_of_number+0x10>
sete   %al
add    $0x1,%al
movzbl %al,%eax
and    $0x1,%eax
add    %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @index_of_number(i64 %0, i64* nocapture %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i64 [ 0, %2 ], [ %10, %3 ]
%5 = getelementptr inbounds i64, i64* %1, i64 %4
%6 = load i64, i64* %5
%7 = icmp eq i64 %6, %0
%8 = xor i1 %7, true
%9 = zext i1 %8 to i64
%10 = add nuw nsw i64 %4, %9
br i1 %7, label %11, label %3
11: ; preds = %3
ret i64 %10
}
int g(char **a) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @g(i8** nocapture readnone %0) {
ret i32 0
}
long __ccaprice_syscall_args_0(long A0) {
  unsigned long R;
  __asm__ __volatile__("int $0x80" : "=a"(R) : "a"(A0) : "memory");
  return R;
}


x86 assembly (clang, -O0):
<__ccaprice_syscall_args_0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
int    $0x80
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ccaprice_syscall_args_0>:
mov    %rdi,%rax
int    $0x80
ret

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

LLVM IR (-O2):
define i64 @__ccaprice_syscall_args_0(i64 %0) {
%2 = tail call i64 asm sideeffect "int $$0x80", "={ax},{ax},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ ot(char *);
int /*<<< orphan*/ outdec(int);
int /*<<< orphan*/ outstr(char *);
void addbchl(int val) {
  ot("ld\tbc,");
  outdec(val);
  outstr("\n\tadd\thl,bc\n");
}


x86 assembly (clang, -O0):
<addbchl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1050 <ot@plt>
mov    -0x4(%rbp),%edi
call   1040 <outdec@plt>
lea    0xeb1(%rip),%rdi
call   1030 <outstr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addbchl>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
call   1050 <ot@plt>
mov    %ebx,%edi
call   1040 <outdec@plt>
lea    0xeba(%rip),%rdi
pop    %rbx
jmp    1030 <outstr@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"ld\09bc,\00"
@.str.1 = [13 x i8] c"\0A\09add\09hl,bc\0A\00"
define void @addbchl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @ot(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @outdec(i32 %4)
%6 = call i32 @outstr(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"ld\09bc,\00"
@.str.1 = [13 x i8] c"\0A\09add\09hl,bc\0A\00"
define void @addbchl(i32 %0) {
%2 = tail call i32 @ot(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @outdec(i32 %0)
%4 = tail call i32 @outstr(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void gtk_toggle_button_set_mode() {}


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

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

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

LLVM IR (-O2):
define void @gtk_toggle_button_set_mode() {
ret void
}
void n4(int zb) {
  while (zb < 1)
    ++zb;
}


x86 assembly (clang, -O0):
<n4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jge    111f <n4+0x1f>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <n4+0x7>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @n4(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct timespec {
  long tv_nsec;
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec const *, int /*<<< orphan*/ *);
__attribute__((unused)) void fio_throttle_thread(size_t nano_sec) {
  const struct timespec tm = {.tv_nsec = (long)(nano_sec % 1000000000),
                              .tv_sec = (time_t)(nano_sec / 1000000000)};
  nanosleep(&tm, NULL);
}


x86 assembly (clang, -O0):
<fio_throttle_thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3b9aca00,%ecx
xor    %edx,%edx
div    %rcx
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3b9aca00,%ecx
xor    %edx,%edx
div    %rcx
mov    %eax,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fio_throttle_thread>:
sub    $0x18,%rsp
mov    %rdi,%rax
shr    $0x9,%rax
movabs $0x44b82fa09b5a53,%rcx
mul    %rcx
shr    $0xb,%rdx
imul   $0x3b9aca00,%rdx,%rax
sub    %rax,%rdi
mov    %rdi,0x8(%rsp)
mov    %edx,0x10(%rsp)
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i32 }
define void @fio_throttle_thread(i64 %0) {
%2 = alloca i64
%3 = alloca %struct.timespec
store i64 %0, i64* %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
%5 = load i64, i64* %2
%6 = urem i64 %5, 1000000000
store i64 %6, i64* %4
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
%8 = load i64, i64* %2
%9 = udiv i64 %8, 1000000000
%10 = trunc i64 %9 to i32
store i32 %10, i32* %7
%11 = call i32 @nanosleep(%struct.timespec* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i64, i32 }
define void @fio_throttle_thread(i64 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
%5 = urem i64 %0, 1000000000
store i64 %5, i64* %4
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
%7 = udiv i64 %0, 1000000000
%8 = trunc i64 %7 to i32
store i32 %8, i32* %6
%9 = call i32 @nanosleep(%struct.timespec* %2, i32* null)
ret void
}
void *heapAlloc(void *userData, unsigned int size) {
  do {
    (void)(1 ? (void)0 : ((void)(userData)));
  } while (0);
  return malloc(size);
}


x86 assembly (clang, -O0):
<heapAlloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
jmp    1124 <heapAlloc+0x14>
mov    -0xc(%rbp),%eax
mov    %eax,%edi
call   1030 <malloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<heapAlloc>:
mov    %esi,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @heapAlloc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i32, i32* %4
%8 = zext i32 %7 to i64
%9 = call i8* @malloc(i64 %8)
ret i8* %9
}

LLVM IR (-O2):
define noalias i8* @heapAlloc(i8* nocapture readnone %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = tail call i8* @malloc(i64 %3)
ret i8* %4
}
int execute_writev() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_writev() {
ret i32 0
}
int pointers(int *a) {
  return a > 0;
  return a > 42;
  return a > (void *)0;
}


x86 assembly (clang, -O0):
<pointers>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pointers>:
xor    %eax,%eax
test   %rdi,%rdi
setne  %al
ret

LLVM IR (-O0):
define i32 @pointers(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp ugt i32* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @pointers(i32* readnone %0) {
%2 = icmp ne i32* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
struct tms {
  scalar_t__ tms_stime;
  scalar_t__ tms_utime;
};
typedef scalar_t__ clock_t;

/* Variables and functions */
scalar_t__ __times(struct tms *);
clock_t clock() {
  struct tms buf;
  if (__times(&buf) < 0)
    return (clock_t)-1;
  return buf.tms_utime + buf.tms_stime;
}


x86 assembly (clang, -O0):
<clock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x18(%rbp),%rdi
call   1030 <__times@plt>
cmp    $0x0,%rax
jge    1138 <clock+0x28>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    1144 <clock+0x34>
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clock>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
call   1030 <__times@plt>
mov    0x8(%rsp),%rcx
add    0x10(%rsp),%rcx
test   %rax,%rax
mov    $0xffffffffffffffff,%rax
cmovns %rcx,%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.tms = type { i64, i64 }
define i64 @clock() {
%1 = alloca i64
%2 = alloca %struct.tms
%3 = call i64 @__times(%struct.tms* %2)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i64 -1, i64* %1
br label %12
6: ; preds = %0
%7 = getelementptr inbounds %struct.tms, %struct.tms* %2, i32 0, i32 1
%8 = load i64, i64* %7
%9 = getelementptr inbounds %struct.tms, %struct.tms* %2, i32 0, i32 0
%10 = load i64, i64* %9
%11 = add nsw i64 %8, %10
store i64 %11, i64* %1
br label %12
12: ; preds = %6, %5
%13 = load i64, i64* %1
ret i64 %13
}

LLVM IR (-O2):
%struct.tms = type { i64, i64 }
define i64 @clock() {
%1 = alloca %struct.tms
%2 = bitcast %struct.tms* %1 to i8*
%3 = call i64 @__times(%struct.tms* %1)
%4 = getelementptr inbounds %struct.tms, %struct.tms* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = getelementptr inbounds %struct.tms, %struct.tms* %1, i64 0, i32 0
%7 = load i64, i64* %6
%8 = add nsw i64 %7, %5
%9 = icmp sgt i64 %3, -1
%10 = select i1 %9, i64 %8, i64 -1
ret i64 %10
}
/* Variables and functions */
float ilogbf(float);
int /*<<< orphan*/ isfinite(float);
float logbf(float x) {
  if (!isfinite(x))
    return x * x;
  if (x == 0)
    return -1 / (x * x);
  return ilogbf(x);
}


x86 assembly (clang, -O0):
<logbf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1040 <isfinite@plt>
cmp    $0x0,%eax
jne    1154 <logbf+0x34>
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    119a <logbf+0x7a>
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    118b <logbf+0x6b>
jp     118b <logbf+0x6b>
movss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
movss  0xe83(%rip),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    119a <logbf+0x7a>
movss  -0x8(%rbp),%xmm0
call   1030 <ilogbf@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logbf>:
push   %rax
movss  %xmm0,0x4(%rsp)
call   1040 <isfinite@plt>
test   %eax,%eax
je     1155 <logbf+0x35>
xorps  %xmm1,%xmm1
movss  0x4(%rsp),%xmm0
ucomiss %xmm1,%xmm0
jne    1161 <logbf+0x41>
jp     1161 <logbf+0x41>
mulss  %xmm0,%xmm0
movss  0xeb4(%rip),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret
movss  0x4(%rsp),%xmm0
mulss  %xmm0,%xmm0
pop    %rax
ret
pop    %rax
jmp    1030 <ilogbf@plt>

LLVM IR (-O0):
define float @logbf(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = call i32 @isfinite(float %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load float, float* %3
%9 = load float, float* %3
%10 = fmul float %8, %9
store float %10, float* %2
br label %22
11: ; preds = %1
%12 = load float, float* %3
%13 = fcmp oeq float %12, 0.000000e+00
br i1 %13, label %14, label %19
14: ; preds = %11
%15 = load float, float* %3
%16 = load float, float* %3
%17 = fmul float %15, %16
%18 = fdiv float -1.000000e+00, %17
store float %18, float* %2
br label %22
19: ; preds = %11
%20 = load float, float* %3
%21 = call float @ilogbf(float %20)
store float %21, float* %2
br label %22
22: ; preds = %19, %14, %7
%23 = load float, float* %2
ret float %23
}

LLVM IR (-O2):
define float @logbf(float %0) {
%2 = tail call i32 @isfinite(float %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = fmul float %0, %0
br label %13
6: ; preds = %1
%7 = fcmp oeq float %0, 0.000000e+00
br i1 %7, label %8, label %11
8: ; preds = %6
%9 = fmul float %0, %0
%10 = fdiv float -1.000000e+00, %9
br label %13
11: ; preds = %6
%12 = tail call float @ilogbf(float %0)
br label %13
13: ; preds = %11, %8, %4
%14 = phi float [ %10, %8 ], [ %12, %11 ], [ %5, %4 ]
ret float %14
}
float psnd_unscale_xref(float xref, float aref, float bref, int shift) {
  if (aref < 0.1)
    return xref;
  return 1.0 + (xref - bref + shift - 1) / aref;
}


x86 assembly (clang, -O0):
<psnd_unscale_xref>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xed9(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1140 <psnd_unscale_xref+0x40>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    117d <psnd_unscale_xref+0x7d>
movss  -0x8(%rbp),%xmm0
subss  -0x10(%rbp),%xmm0
cvtsi2ssl -0x14(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  0xeb5(%rip),%xmm1
subss  %xmm1,%xmm0
divss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe98(%rip),%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<psnd_unscale_xref>:
cvtss2sd %xmm1,%xmm3
movsd  0xef4(%rip),%xmm4
ucomisd %xmm3,%xmm4
ja     1138 <psnd_unscale_xref+0x38>
xorps  %xmm3,%xmm3
cvtsi2ss %edi,%xmm3
subss  %xmm2,%xmm0
addss  %xmm0,%xmm3
addss  0xedf(%rip),%xmm3
divss  %xmm1,%xmm3
addss  0xed7(%rip),%xmm3
movaps %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @psnd_unscale_xref(float %0, float %1, float %2, i32 %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca i32
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store i32 %3, i32* %9
%10 = load float, float* %7
%11 = fpext float %10 to double
%12 = fcmp olt double %11, 1.000000e-01
br i1 %12, label %13, label %15
13: ; preds = %4
%14 = load float, float* %6
store float %14, float* %5
br label %28
15: ; preds = %4
%16 = load float, float* %6
%17 = load float, float* %8
%18 = fsub float %16, %17
%19 = load i32, i32* %9
%20 = sitofp i32 %19 to float
%21 = fadd float %18, %20
%22 = fsub float %21, 1.000000e+00
%23 = load float, float* %7
%24 = fdiv float %22, %23
%25 = fpext float %24 to double
%26 = fadd double 1.000000e+00, %25
%27 = fptrunc double %26 to float
store float %27, float* %5
br label %28
28: ; preds = %15, %13
%29 = load float, float* %5
ret float %29
}

LLVM IR (-O2):
define float @psnd_unscale_xref(float %0, float %1, float %2, i32 %3) {
%5 = fpext float %1 to double
%6 = fcmp olt double %5, 1.000000e-01
br i1 %6, label %14, label %7
7: ; preds = %4
%8 = fsub float %0, %2
%9 = sitofp i32 %3 to float
%10 = fadd float %8, %9
%11 = fadd float %10, -1.000000e+00
%12 = fdiv float %11, %1
%13 = fadd float %12, 1.000000e+00
br label %14
14: ; preds = %4, %7
%15 = phi float [ %13, %7 ], [ %0, %4 ]
ret float %15
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ puts(char *);
main(void) {
  assert(L"name"[0] == L'n');
  puts("1.a");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x6e,0xeca(%rip)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <assert@plt>
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i32] [i32 110, i32 97, i32 109, i32 101, i32 0]
@.str.1 = [4 x i8] c"1.a\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @.str, i64 0, i64 0)
%3 = icmp eq i32 %2, 110
%4 = zext i1 %3 to i32
%5 = call i32 @assert(i32 %4)
%6 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"1.a\00"
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ esc(char *);
decdwl() { esc("#6"); }


x86 assembly (clang, -O0):
<decdwl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <esc@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"\00"
define i32 @decdwl() {
%1 = alloca i32
%2 = call i32 @esc(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [3 x i8] c"\00"
define i32 @decdwl() {
%1 = tail call i32 @esc(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void USBClockDisable(uint32_t ui32Base) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000FC8))) = 0;
}


x86 assembly (clang, -O0):
<USBClockDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,0xfc8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBClockDisable>:
movq   $0x0,0xfc8(%rdi)
ret

LLVM IR (-O0):
define void @USBClockDisable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 4040
%5 = inttoptr i64 %4 to i64*
store volatile i64 0, i64* %5
ret void
}

LLVM IR (-O2):
define void @USBClockDisable(i64 %0) {
%2 = add nsw i64 %0, 4040
%3 = inttoptr i64 %2 to i64*
store volatile i64 0, i64* %3
ret void
}
/* Type definitions */
struct __test_metadata {
  int dummy;
};
struct __fixture_variant_metadata {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ epoll59(struct __test_metadata *);
void wrapper_epoll59(struct __test_metadata *_metadata,
                     struct __fixture_variant_metadata *variant) {
  epoll59(_metadata);
}


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

x86 assembly (clang, -O2):
<wrapper_epoll59>:
jmp    1030 <epoll59@plt>

LLVM IR (-O0):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll59(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* %1) {
%3 = alloca %struct.__test_metadata*
%4 = alloca %struct.__fixture_variant_metadata*
store %struct.__test_metadata* %0, %struct.__test_metadata** %3
store %struct.__fixture_variant_metadata* %1, %struct.__fixture_variant_metadata** %4
%5 = load %struct.__test_metadata*, %struct.__test_metadata** %3
%6 = call i32 @epoll59(%struct.__test_metadata* %5)
ret void
}

LLVM IR (-O2):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll59(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* nocapture readnone %1) {
%3 = tail call i32 @epoll59(%struct.__test_metadata* %0)
ret void
}