xunge/DecIR huggingface dataset:
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int N = __VERIFIER_nondet_int();
  int j;
  int i = N;
  while (i > 0) {
    j = N;
    while (j > 0)
      j--;
    i--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    1165 <main+0x55>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1157 <main+0x47>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    113f <main+0x2f>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    112f <main+0x1f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
int test_imm_6Aint16_reg(short val) {
  return ((val) & (0x6A << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_6Aint16_reg>:
test   $0x6a,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_6Aint16_reg(i16 signext %0) {
%2 = and i16 %0, 106
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void Convert8To16Row_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @Convert8To16Row_AVX2() {
ret void
}
void ExttRRTypeAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttRRTypeAuxTable() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *progname) {
  static char options[] = "\t-i input file\n"
                          "\t-o output file\n";
  fprintf(stderr, "usage:\t%s [option]\n\noption:\n%s\n", progname, options);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
lea    0x2ef9(%rip),%rcx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
lea    0x2f06(%rip),%rcx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@usage.options = internal global [32 x i8] c"\09-i input file\0A\09-o output file\0A\00"
@stderr = global i32 0
@.str = [32 x i8] c"usage:\09%s [option]\0A\0Aoption:\0A%s\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %4, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @usage.options, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@usage.options = internal global [32 x i8] c"\09-i input file\0A\09-o output file\0A\00"
@stderr = global i32 0
@.str = [32 x i8] c"usage:\09%s [option]\0A\0Aoption:\0A%s\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @usage.options, i64 0, i64 0))
ret void
}
void mark_as_page_table() {}


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

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

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

LLVM IR (-O2):
define void @mark_as_page_table() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xc6() {
  Assert_real((isalnum(198) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              995, ("isalnum should be 0 for 0xc6"));
}


x86 assembly (clang, -O0):
<t_isalnum_0xc6>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc6,%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x3e3,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0xc6>:
push   %rax
mov    $0xc6,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3e3,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xc6\00"
define void @t_isalnum_0xc6() {
%1 = call i64 @isalnum(i32 198)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 995, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xc6\00"
define void @t_isalnum_0xc6() {
%1 = tail call i64 @isalnum(i32 198)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 995, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *avro_allocator_system_malloc(size_t size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<avro_allocator_system_malloc>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @avro_allocator_system_malloc(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @malloc(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define noalias i8* @avro_allocator_system_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ _heap_sink(int *, int, int);
void _heapify(int *arr, int size) {
  int i;
  for (i = size / 2; i >= 0; --i) {
    _heap_sink(arr, size, i);
  }
}


x86 assembly (clang, -O0):
<_heapify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1154 <_heapify+0x44>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <_heap_sink@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <_heapify+0x1d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_heapify>:
push   %rbp
push   %r14
push   %rbx
cmp    $0xffffffff,%esi
jl     1141 <_heapify+0x31>
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%ebp
shr    $0x1f,%ebp
add    %esi,%ebp
sar    %ebp
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
call   1030 <_heap_sink@plt>
add    $0xffffffff,%ebp
jb     1130 <_heapify+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @_heapify(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, -2
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = sdiv i32 %1, 2
br label %6
6: ; preds = %4, %6
%7 = phi i32 [ %9, %6 ], [ %5, %4 ]
%8 = tail call i32 @_heap_sink(i32* %0, i32 %1, i32 %7)
%9 = add nsw i32 %7, -1
%10 = icmp eq i32 %7, 0
br i1 %10, label %11, label %6
11: ; preds = %6, %2
ret void
}
int check_int() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @check_int() {
ret i32 0
}
int smp_rescan_cpus(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @smp_rescan_cpus() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void memfail() {
  fprintf(stderr, "Memory allocation error!\n");
  exit(EXIT_FAILURE);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"Memory allocation error!\0A\00"
@EXIT_FAILURE = global i32 0
define void @memfail() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"Memory allocation error!\0A\00"
@EXIT_FAILURE = global i32 0
define void @memfail() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ foo(long long, int);
int main(void) {
  foo(2LL, 0x7fffffffffffffffLL);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%edi
mov    $0xffffffff,%esi
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
mov    $0xffffffff,%esi
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i64 2, i32 -1)
ret i32 0
}
/* Variables and functions */
unsigned long PEEK32(unsigned long);
char is_ADC_busy(unsigned long adc_page) {
  unsigned long val;
  val = PEEK32(adc_page + 0x0008);
  if ((val & 0x80000000) == 0x80000000)
    return 0x01;
  return 0x00;
}


x86 assembly (clang, -O0):
<is_ADC_busy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
call   1030 <PEEK32@plt>
mov    %rax,-0x18(%rbp)
movabs $0x80000000,%rax
and    -0x18(%rbp),%rax
mov    $0x80000000,%ecx
cmp    %rcx,%rax
jne    1152 <is_ADC_busy+0x42>
movb   $0x1,-0x1(%rbp)
jmp    1156 <is_ADC_busy+0x46>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ADC_busy>:
push   %rax
add    $0x8,%rdi
call   1030 <PEEK32@plt>
shr    $0x1f,%rax
and    $0x1,%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @is_ADC_busy(i64 %0) {
%2 = alloca i8
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = add i64 %5, 8
%7 = call i64 @PEEK32(i64 %6)
store i64 %7, i64* %4
%8 = load i64, i64* %4
%9 = and i64 %8, 2147483648
%10 = icmp eq i64 %9, 2147483648
br i1 %10, label %11, label %12
11: ; preds = %1
store i8 1, i8* %2
br label %13
12: ; preds = %1
store i8 0, i8* %2
br label %13
13: ; preds = %12, %11
%14 = load i8, i8* %2
ret i8 %14
}

LLVM IR (-O2):
define signext i8 @is_ADC_busy(i64 %0) {
%2 = add i64 %0, 8
%3 = tail call i64 @PEEK32(i64 %2)
%4 = lshr i64 %3, 31
%5 = trunc i64 %4 to i8
%6 = and i8 %5, 1
ret i8 %6
}
void RSA_set_ex_data(void) {}


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

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

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

LLVM IR (-O2):
define void @RSA_set_ex_data() {
ret void
}
int test_imm_4Bint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x4B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_4Bint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0x4b,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_4Bint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 322122547200
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
char *ft_strcpy(char *dest, const char *src) {
  int i;
  i = 0;
  while (src[i]) {
    dest[i] = src[i];
    i++;
  }
  dest[i] = '\0';
  return (dest);
}


x86 assembly (clang, -O0):
<ft_strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1149 <ft_strcpy+0x49>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <ft_strcpy+0x13>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
test   %cl,%cl
je     1127 <ft_strcpy+0x27>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
mov    %cl,(%rax,%rdx,1)
movzbl 0x1(%rsi,%rdx,1),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1110 <ft_strcpy+0x10>
mov    %edx,%ecx
movb   $0x0,(%rax,%rcx,1)
ret
xor    %ecx,%ecx
movb   $0x0,(%rax,%rcx,1)
ret

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

LLVM IR (-O2):
define i8* @ft_strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = phi i8 [ %11, %5 ], [ %3, %2 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 %7, i8* %8
%9 = add nuw nsw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %1, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5
%14 = and i64 %9, 4294967295
br label %15
15: ; preds = %13, %2
%16 = phi i64 [ 0, %2 ], [ %14, %13 ]
%17 = getelementptr inbounds i8, i8* %0, i64 %16
store i8 0, i8* %17
ret i8* %0
}
void rotr(int *pa, int *pb, int *pc) {
  int temp1 = 0;
  temp1 = *pa;
  *pa = *pc;
  *pc = *pb;
  *pb = temp1;
}


x86 assembly (clang, -O0):
<rotr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotr>:
mov    (%rdi),%eax
mov    (%rdx),%ecx
mov    %ecx,(%rdi)
mov    (%rsi),%ecx
mov    %ecx,(%rdx)
mov    %eax,(%rsi)
ret

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

LLVM IR (-O2):
define void @rotr(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %2
store i32 %5, i32* %0
%6 = load i32, i32* %1
store i32 %6, i32* %2
store i32 %4, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ is_pow2(unsigned int);
int log2i(unsigned int);
unsigned int ceil_pow2(unsigned int x) {
  if (!is_pow2(x))
    return (unsigned int)1 << (log2i(x) + 1);
  else
    return x;
}


x86 assembly (clang, -O0):
<ceil_pow2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <is_pow2@plt>
cmp    $0x0,%eax
jne    1158 <ceil_pow2+0x38>
mov    -0x8(%rbp),%edi
call   1030 <log2i@plt>
mov    %eax,%ecx
add    $0x1,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x4(%rbp)
jmp    115e <ceil_pow2+0x3e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceil_pow2>:
push   %rbx
mov    %edi,%ebx
call   1040 <is_pow2@plt>
test   %eax,%eax
jne    113d <ceil_pow2+0x1d>
mov    %ebx,%edi
call   1030 <log2i@plt>
lea    0x1(%rax),%ecx
mov    $0x1,%ebx
shl    %cl,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ceil_pow2(i32 %0) {
%2 = tail call i32 @is_pow2(i32 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @log2i(i32 %0)
%6 = add nsw i32 %5, 1
%7 = shl nuw i32 1, %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ %0, %1 ]
ret i32 %9
}
unsigned long _get_base(char *addr) {
  unsigned long __base;
  __asm__("movb %3,%%dh\n\t"
          "movb %2,%%dl\n\t"
          "shll $16,%%edx\n\t"
          "movw %1,%%dx"
          : "=&d"(__base)
          : "m"(*((addr) + 2)), "m"(*((addr) + 4)), "m"(*((addr) + 7)));
  return __base;
}


x86 assembly (clang, -O0):
<_get_base>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    -0x8(%rbp),%rcx
add    $0x4,%rcx
mov    -0x8(%rbp),%rsi
add    $0x7,%rsi
mov    (%rsi),%dh
mov    (%rcx),%dl
shl    $0x10,%edx
mov    (%rax),%dx
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_get_base>:
mov    0x7(%rdi),%dh
mov    0x4(%rdi),%dl
shl    $0x10,%edx
mov    0x2(%rdi),%dx
mov    %rdx,%rax
ret

LLVM IR (-O0):
define i64 @_get_base(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 2
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 4
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 7
%10 = call i64 asm "movb $3,%dh\0A\09movb $2,%dl\0A\09shll $$16,%edx\0A\09movw $1,%dx", "=&{dx},*m,*m,*m,~{dirflag},~{fpsr},~{flags}"(i8* elementtype(i8) %5, i8* elementtype(i8) %7, i8* elementtype(i8) %9)
store i64 %10, i64* %3
%11 = load i64, i64* %3
ret i64 %11
}

LLVM IR (-O2):
define i64 @_get_base(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 2
%3 = getelementptr inbounds i8, i8* %0, i64 4
%4 = getelementptr inbounds i8, i8* %0, i64 7
%5 = tail call i64 asm "movb $3,%dh\0A\09movb $2,%dl\0A\09shll $$16,%edx\0A\09movw $1,%dx", "=&{dx},*m,*m,*m,~{dirflag},~{fpsr},~{flags}"(i8* elementtype(i8) %2, i8* elementtype(i8) %3, i8* elementtype(i8) %4)
ret i64 %5
}
void acpi_gpiochip_remove(struct gpio_chip *chip) {}


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

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

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

LLVM IR (-O2):
%struct.gpio_chip = type opaque
define void @acpi_gpiochip_remove(%struct.gpio_chip* nocapture %0) {
ret void
}
int main() {
  int arr[2];
  arr[1] = 2;
  if (arr[1] != 2)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1128 <main+0x28>
movl   $0x1,-0x4(%rbp)
jmp    112f <main+0x2f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i32]
store i32 0, i32* %1
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
store i32 2, i32* %3
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 2
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 1, i32* %1
br label %9
8: ; preds = %0
store i32 0, i32* %1
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
char *stnputs(char const *, int /*<<< orphan*/, char *);
int /*<<< orphan*/ strlen(char const *);
char *stputs(const char *s, char *p) { return stnputs(s, strlen(s), p); }


x86 assembly (clang, -O0):
<stputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
call   1040 <stnputs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stputs>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <stnputs@plt>

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

LLVM IR (-O2):
define i8* @stputs(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i8* @stnputs(i8* %0, i32 %3, i8* %1)
ret i8* %4
}
long long int longlongint_ignoring_longlongint(long long int x,
                                               long long int y) {
  return x;
}


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

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

LLVM IR (-O0):
define i64 @longlongint_ignoring_longlongint(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
ret i64 %5
}

LLVM IR (-O2):
define i64 @longlongint_ignoring_longlongint(i64 returned %0, i64 %1) {
ret i64 %0
}
/* Variables and functions */
int ei_get_type_internal(char const *, int const *, int *, int *);
int ei_get_type(const char *buf, const int *index, int *type, int *len) {
  return ei_get_type_internal(buf, index, type, len);
}


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

x86 assembly (clang, -O2):
<ei_get_type>:
jmp    1030 <ei_get_type_internal@plt>

LLVM IR (-O0):
define i32 @ei_get_type(i8* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i8* %0, i8** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i8*, i8** %5
%10 = load i32*, i32** %6
%11 = load i32*, i32** %7
%12 = load i32*, i32** %8
%13 = call i32 @ei_get_type_internal(i8* %9, i32* %10, i32* %11, i32* %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @ei_get_type(i8* %0, i32* %1, i32* %2, i32* %3) {
%5 = tail call i32 @ei_get_type_internal(i8* %0, i32* %1, i32* %2, i32* %3)
ret i32 %5
}
unsigned int get_id(int len, unsigned char **ps, int i) {
  union UINT_UCHAR {
    unsigned int i;
    unsigned char c[4];
  } u;
  unsigned char *s = *ps;
  u.i = i;
  i = 0;
  do {
    u.c[i++] = *s++;
  } while (--len >= 0);
  *ps = s;
  return u.i;
}


x86 assembly (clang, -O0):
<get_id>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
mov    (%rax),%cl
mov    -0x14(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
cltq
mov    %cl,-0x18(%rbp,%rax,1)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
jge    1126 <get_id+0x26>
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_id>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %edi,%ebx
mov    (%rsi),%r15
mov    %edx,0xc(%rsp)
xor    %eax,%eax
test   %edi,%edi
cmovs  %edi,%eax
sub    %eax,%ebx
lea    0x1(%rbx),%rdx
lea    0xc(%rsp),%rdi
mov    %r15,%rsi
call   1030 <memcpy@plt>
lea    (%r15,%rbx,1),%rax
add    $0x1,%rax
mov    %rax,(%r14)
mov    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%union.UINT_UCHAR = type { i32 }
define i32 @get_id(i32 %0, i8** %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca %union.UINT_UCHAR
%8 = alloca i8*
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 %2, i32* %6
%9 = load i8**, i8*** %5
%10 = load i8*, i8** %9
store i8* %10, i8** %8
%11 = load i32, i32* %6
%12 = bitcast %union.UINT_UCHAR* %7 to i32*
store i32 %11, i32* %12
store i32 0, i32* %6
br label %13
13: ; preds = %22, %3
%14 = load i8*, i8** %8
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %8
%16 = load i8, i8* %14
%17 = bitcast %union.UINT_UCHAR* %7 to [4 x i8]*
%18 = load i32, i32* %6
%19 = add nsw i32 %18, 1
store i32 %19, i32* %6
%20 = sext i32 %18 to i64
%21 = getelementptr inbounds [4 x i8], [4 x i8]* %17, i64 0, i64 %20
store i8 %16, i8* %21
br label %22
22: ; preds = %13
%23 = load i32, i32* %4
%24 = add nsw i32 %23, -1
store i32 %24, i32* %4
%25 = icmp sge i32 %24, 0
br i1 %25, label %13, label %26
26: ; preds = %22
%27 = load i8*, i8** %8
%28 = load i8**, i8*** %5
store i8* %27, i8** %28
%29 = bitcast %union.UINT_UCHAR* %7 to i32*
%30 = load i32, i32* %29
ret i32 %30
}

LLVM IR (-O2):
define i32 @get_id(i32 %0, i8** nocapture %1, i32 %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = load i8*, i8** %1
store i32 %2, i32* %4
%7 = call i32 @llvm.smin.i32(i32 %0, i32 0)
%8 = sub i32 %0, %7
%9 = zext i32 %8 to i64
%10 = add nuw nsw i64 %9, 1
%11 = getelementptr i8, i8* %6, i64 %10
store i8* %11, i8** %1
%12 = load i32, i32* %4
ret i32 %12
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
unsigned long get_tick(void) {
  struct timeval now;
  gettimeofday(&now, NULL);
  return ((now.tv_sec * 1000) + (now.tv_usec / 1000));
}


x86 assembly (clang, -O0):
<get_tick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,-0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_tick>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movslq (%rsp),%rax
imul   $0x3e8,%rax,%rcx
movslq 0x4(%rsp),%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
cltq
add    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i64 @get_tick() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 1000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%7 = load i32, i32* %6
%8 = sdiv i32 %7, 1000
%9 = add nsw i32 %5, %8
%10 = sext i32 %9 to i64
ret i64 %10
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i64 @get_tick() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i32, i32* %7
%9 = sdiv i32 %8, 1000
%10 = add nsw i32 %9, %6
%11 = sext i32 %10 to i64
ret i64 %11
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int, size_t);
void __aeabi_memset8(void *dest, size_t n, int c) { memset(dest, c, n); }


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

x86 assembly (clang, -O2):
<__aeabi_memset8>:
mov    %rsi,%rax
mov    %edx,%esi
mov    %rax,%rdx
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @__aeabi_memset8(i8* %0, i64 %1, i32 %2) {
%4 = tail call i32 @memset(i8* %0, i32 %2, i64 %1)
ret void
}
double wind_chill(double T_a, double v) {
  double T_wc = 0.0;
  return T_wc;
}


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

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

LLVM IR (-O0):
define double @wind_chill(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
store double 0.000000e+00, double* %5
%6 = load double, double* %5
ret double %6
}

LLVM IR (-O2):
define double @wind_chill(double %0, double %1) {
ret double 0.000000e+00
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int /*<<< orphan*/ clamp(int, int, int);
int8_t signed_char_clamp(int t) { return (int8_t)clamp(t, -128, 127); }


x86 assembly (clang, -O0):
<signed_char_clamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xffffff80,%esi
mov    $0x7f,%edx
call   1030 <clamp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signed_char_clamp>:
mov    $0xffffff80,%esi
mov    $0x7f,%edx
jmp    1030 <clamp@plt>

LLVM IR (-O0):
define i32 @signed_char_clamp(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @clamp(i32 %3, i32 -128, i32 127)
ret i32 %4
}

LLVM IR (-O2):
define i32 @signed_char_clamp(i32 %0) {
%2 = tail call i32 @clamp(i32 %0, i32 -128, i32 127)
ret i32 %2
}
float div_float(float arg1, float arg2) { return arg1 / arg2; }


x86 assembly (clang, -O0):
<div_float>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<div_float>:
divss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @div_float(float %0, float %1) {
%3 = fdiv float %0, %1
ret float %3
}
update_umask(str) char *str;
{
  int u;
  sscanf(str, "%o", &u);
  umask(u);
  return (1);
}


x86 assembly (clang, -O0):
<update_umask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
lea    -0xc(%rbp),%rdx
mov    $0x0,%al
call   1040 <sscanf@plt>
mov    -0xc(%rbp),%edi
mov    $0x0,%al
call   1030 <umask@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_umask>:
push   %rax
lea    0xed8(%rip),%rsi
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1040 <sscanf@plt>
mov    0x4(%rsp),%edi
xor    %eax,%eax
call   1030 <umask@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%o\00"
define i32 @update_umask(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 (i8*, i8*, ...) @sscanf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = call i32 (i32, ...) bitcast (i32 (...)* @umask to i32 (i32, ...)*)(i32 %6)
ret i32 1
}

LLVM IR (-O2):
@.str = [3 x i8] c"%o\00"
define i32 @update_umask(i8* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 (i8*, i8*, ...) @sscanf(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 (i32, ...) bitcast (i32 (...)* @umask to i32 (i32, ...)*)(i32 %5)
ret i32 1
}
void gc314LoadGC4016s(int filedes) {
  int retval;
  int status = 0;
  int temp = 0;
}


x86 assembly (clang, -O0):
<gc314LoadGC4016s>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @gc314LoadGC4016s(i32 %0) {
ret void
}
int isInRange(long x, long minx, long maxx) {
  if (minx <= x && x < maxx)
    return 1;
  if (x < minx)
    x += 360000000;
  else
    x -= 360000000;
  if (minx <= x && x < maxx)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isInRange>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jg     1138 <isInRange+0x38>
mov    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    1138 <isInRange+0x38>
movl   $0x1,-0x4(%rbp)
jmp    1196 <isInRange+0x96>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1159 <isInRange+0x59>
mov    -0x10(%rbp),%rax
add    $0x15752a00,%rax
mov    %rax,-0x10(%rbp)
jmp    1167 <isInRange+0x67>
mov    -0x10(%rbp),%rax
sub    $0x15752a00,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jg     118f <isInRange+0x8f>
mov    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    118f <isInRange+0x8f>
movl   $0x1,-0x4(%rbp)
jmp    1196 <isInRange+0x96>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isInRange>:
cmp    %rdi,%rsi
jg     1110 <isInRange+0x10>
mov    $0x1,%eax
cmp    %rdx,%rdi
jge    1110 <isInRange+0x10>
ret
lea    -0x15752a00(%rdi),%rax
lea    0x15752a00(%rdi),%rcx
cmp    %rsi,%rdi
cmovl  %rcx,%rax
cmp    %rsi,%rax
setge  %cl
cmp    %rdx,%rax
setl   %al
and    %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @isInRange(i64 %0, i64 %1, i64 %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
%8 = load i64, i64* %6
%9 = load i64, i64* %5
%10 = icmp sle i64 %8, %9
br i1 %10, label %11, label %16
11: ; preds = %3
%12 = load i64, i64* %5
%13 = load i64, i64* %7
%14 = icmp slt i64 %12, %13
br i1 %14, label %15, label %16
15: ; preds = %11
store i32 1, i32* %4
br label %36
16: ; preds = %11, %3
%17 = load i64, i64* %5
%18 = load i64, i64* %6
%19 = icmp slt i64 %17, %18
br i1 %19, label %20, label %23
20: ; preds = %16
%21 = load i64, i64* %5
%22 = add nsw i64 %21, 360000000
store i64 %22, i64* %5
br label %26
23: ; preds = %16
%24 = load i64, i64* %5
%25 = sub nsw i64 %24, 360000000
store i64 %25, i64* %5
br label %26
26: ; preds = %23, %20
%27 = load i64, i64* %6
%28 = load i64, i64* %5
%29 = icmp sle i64 %27, %28
br i1 %29, label %30, label %35
30: ; preds = %26
%31 = load i64, i64* %5
%32 = load i64, i64* %7
%33 = icmp slt i64 %31, %32
br i1 %33, label %34, label %35
34: ; preds = %30
store i32 1, i32* %4
br label %36
35: ; preds = %30, %26
store i32 0, i32* %4
br label %36
36: ; preds = %35, %34, %15
%37 = load i32, i32* %4
ret i32 %37
}

LLVM IR (-O2):
define i32 @isInRange(i64 %0, i64 %1, i64 %2) {
%4 = icmp sle i64 %1, %0
%5 = icmp slt i64 %0, %2
%6 = and i1 %4, %5
br i1 %6, label %15, label %7
7: ; preds = %3
%8 = icmp slt i64 %0, %1
%9 = select i1 %8, i64 360000000, i64 -360000000
%10 = add nsw i64 %9, %0
%11 = icmp sge i64 %10, %1
%12 = icmp slt i64 %10, %2
%13 = and i1 %11, %12
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %7, %3
%16 = phi i32 [ 1, %3 ], [ %14, %7 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ recv_msgq(int, int);
int main() {
  printf("adasrun forever, press ctrl-C to quit...\n");
  recv_msgq(0x0ADA5000, 9);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"adasrun forever, press ctrl-C to quit...\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @recv_msgq(i32 182079488, i32 9)
ret i32 0
}

LLVM IR (-O2):
@str = [41 x i8] c"adasrun forever, press ctrl-C to quit...\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @recv_msgq(i32 182079488, i32 9)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ hash;

/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned int *, char const **, int);
int strlen(char const *);
unsigned int lazy_hash(const char *val) {
  unsigned int hash = 0;
  int len = strlen(val);
  memcpy(&hash, &val, len < sizeof(hash) ? len : sizeof(hash));
  return hash;
}


x86 assembly (clang, -O0):
<lazy_hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10(%rbp)
movslq -0x10(%rbp),%rax
cmp    $0x4,%rax
jae    115a <lazy_hash+0x3a>
movslq -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1168 <lazy_hash+0x48>
mov    $0x4,%eax
mov    %rax,-0x18(%rbp)
jmp    1168 <lazy_hash+0x48>
mov    -0x18(%rbp),%rax
mov    %eax,%edx
lea    -0xc(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <memcpy@plt>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lazy_hash>:
sub    $0x18,%rsp
mov    %rdi,0x10(%rsp)
movl   $0x0,0xc(%rsp)
call   1030 <strlen@plt>
cmp    $0x4,%eax
mov    $0x4,%edx
cmovb  %eax,%edx
lea    0xc(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1040 <memcpy@plt>
mov    0xc(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @lazy_hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = icmp ult i64 %8, 4
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
br label %14
13: ; preds = %1
br label %14
14: ; preds = %13, %10
%15 = phi i64 [ %12, %10 ], [ 4, %13 ]
%16 = trunc i64 %15 to i32
%17 = call i32 @memcpy(i32* %3, i8** %2, i32 %16)
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @lazy_hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = tail call i32 @strlen(i8* %0)
%6 = icmp ult i32 %5, 4
%7 = select i1 %6, i32 %5, i32 4
%8 = call i32 @memcpy(i32* %3, i8** %2, i32 %7)
%9 = load i32, i32* %3
ret i32 %9
}
/* Variables and functions */
double sqrt(double);
double isoscelesArea(double x, double y) {
  double h = sqrt(x * x - y * y / 4);
  double b = y;
  double a = b * h / 2.0;
  return a;
}


x86 assembly (clang, -O0):
<isoscelesArea>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xeca(%rip),%xmm3
divsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xe79(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isoscelesArea>:
push   %rax
movapd %xmm1,%xmm2
mulsd  %xmm1,%xmm2
mulsd  0xedf(%rip),%xmm2
mulsd  %xmm0,%xmm0
addsd  %xmm2,%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jb     1139 <isoscelesArea+0x29>
sqrtsd %xmm0,%xmm0
jmp    1148 <isoscelesArea+0x38>
movsd  %xmm1,(%rsp)
call   1030 <sqrt@plt>
movsd  (%rsp),%xmm1
mulsd  %xmm1,%xmm0
mulsd  0xeb4(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @isoscelesArea(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %3
store double %1, double* %4
%8 = load double, double* %3
%9 = load double, double* %3
%10 = load double, double* %4
%11 = load double, double* %4
%12 = fmul double %10, %11
%13 = fdiv double %12, 4.000000e+00
%14 = fneg double %13
%15 = call double @llvm.fmuladd.f64(double %8, double %9, double %14)
%16 = call double @sqrt(double %15)
store double %16, double* %5
%17 = load double, double* %4
store double %17, double* %6
%18 = load double, double* %6
%19 = load double, double* %5
%20 = fmul double %18, %19
%21 = fdiv double %20, 2.000000e+00
store double %21, double* %7
%22 = load double, double* %7
ret double %22
}

LLVM IR (-O2):
define double @isoscelesArea(double %0, double %1) {
%3 = fmul double %1, %1
%4 = fmul double %3, -2.500000e-01
%5 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %4)
%6 = tail call double @sqrt(double %5)
%7 = fmul double %6, %1
%8 = fmul double %7, 5.000000e-01
ret double %8
}