xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void USBDevConnect(uint32_t ui32Base) {
  ASSERT(ui32Base == 0x40050000);
  (*((volatile uint8_t *)(ui32Base + 0x00000001))) |= 0x00000040;
}


x86 assembly (clang, -O0):
<USBDevConnect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x40050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cltq
mov    (%rax),%ecx
or     $0x40,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBDevConnect>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x40050000,%ebx
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
orl    $0x40,0x1(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @USBDevConnect(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1074069504
%5 = zext i1 %4 to i32
%6 = call i32 @ASSERT(i32 %5)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = or i32 %11, 64
store volatile i32 %12, i32* %10
ret void
}

LLVM IR (-O2):
define void @USBDevConnect(i32 %0) {
%2 = icmp eq i32 %0, 1074069504
%3 = zext i1 %2 to i32
%4 = tail call i32 @ASSERT(i32 %3)
%5 = add nsw i32 %0, 1
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = or i32 %8, 64
store volatile i32 %9, i32* %7
ret void
}
void _backlight_on(void) {}


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

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

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

LLVM IR (-O2):
define void @_backlight_on() {
ret void
}
int socket(int namespace, int style, int protocol) {
  int *ret = malloc(sizeof(int));
  if (ret) {
    __set_file_attribute(ret);
    if (ret < (int *)1)
      while (1)
        ;
    return ret;
  }
  return -1;
}


x86 assembly (clang, -O0):
<socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     117a <socket+0x5a>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1040 <__set_file_attribute@plt>
mov    $0x1,%eax
cmp    %rax,-0x18(%rbp)
jae    116e <socket+0x4e>
jmp    1169 <socket+0x49>
jmp    1169 <socket+0x49>
mov    -0x18(%rbp),%rax
mov    %eax,-0x4(%rbp)
jmp    1181 <socket+0x61>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket>:
push   %rbx
mov    $0x4,%edi
call   1030 <malloc@plt>
test   %rax,%rax
je     1152 <socket+0x32>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %eax,%eax
call   1040 <__set_file_attribute@plt>
test   %rbx,%rbx
jne    1157 <socket+0x37>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
jmp    1150 <socket+0x30>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @socket(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%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
%9 = call i8* @malloc(i64 4)
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %8
%11 = load i32*, i32** %8
%12 = icmp ne i32* %11, null
br i1 %12, label %13, label %23
13: ; preds = %3
%14 = load i32*, i32** %8
%15 = call i32 (i32*, ...) bitcast (i32 (...)* @__set_file_attribute to i32 (i32*, ...)*)(i32* %14)
%16 = load i32*, i32** %8
%17 = icmp ult i32* %16, inttoptr (i64 1 to i32*)
br i1 %17, label %18, label %20
18: ; preds = %13
br label %19
19: ; preds = %18, %19
br label %19
20: ; preds = %13
%21 = load i32*, i32** %8
%22 = ptrtoint i32* %21 to i32
store i32 %22, i32* %4
br label %24
23: ; preds = %3
store i32 -1, i32* %4
br label %24
24: ; preds = %23, %20
%25 = load i32, i32* %4
ret i32 %25
}

LLVM IR (-O2):
define i32 @socket(i32 %0, i32 %1, i32 %2) {
%4 = tail call dereferenceable_or_null(4) i8* @malloc(i64 4)
%5 = icmp eq i8* %4, null
br i1 %5, label %14, label %6
6: ; preds = %3
%7 = bitcast i8* %4 to i32*
%8 = tail call i32 (i32*, ...) bitcast (i32 (...)* @__set_file_attribute to i32 (i32*, ...)*)(i32* %7)
%9 = icmp ult i8* %4, inttoptr (i64 1 to i8*)
br i1 %9, label %10, label %11
10: ; preds = %6, %10
br label %10
11: ; preds = %6
%12 = ptrtoint i8* %4 to i64
%13 = trunc i64 %12 to i32
br label %14
14: ; preds = %3, %11
%15 = phi i32 [ %13, %11 ], [ -1, %3 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ do_clear_work();
int /*<<< orphan*/ printf(char *);
void process_signal(int signo) {
  printf("Please wait for clear operations\n");
  do_clear_work();
}


x86 assembly (clang, -O0):
<process_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <do_clear_work@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_signal>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <do_clear_work@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"Please wait for clear operations\0A\00"
define void @process_signal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @do_clear_work()
ret void
}

LLVM IR (-O2):
@str = [33 x i8] c"Please wait for clear operations\00"
define void @process_signal(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @do_clear_work()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const);
int /*<<< orphan*/ putchar(char);
void show_array(const int ar[], int n) {
  int i;
  for (i = 0; i < n; i++) {
    printf("%d ", ar[i]);
  }
  putchar('\n');
}


x86 assembly (clang, -O0):
<show_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1167 <show_array+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <show_array+0x16>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1155 <show_array+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xec5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <show_array+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @show_array(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_assert(int);
int main(void) {
  int a, b, c;
  int *p;
  a = 0;
  p = &b;
  *p = 1;
  p = &c;
  *p = 3;
  a = b + c;
  b = 3;
  c = 5;
  p = &a;
  *p = 9;
  test_assert(a == 9);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x3,(%rax)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
movl   $0x5,-0x10(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x9,(%rax)
cmpl   $0x9,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <test_assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <test_assert@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
%5 = alloca i32*
store i32 0, i32* %1
store i32 0, i32* %2
store i32* %3, i32** %5
%6 = load i32*, i32** %5
store i32 1, i32* %6
store i32* %4, i32** %5
%7 = load i32*, i32** %5
store i32 3, i32* %7
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = add nsw i32 %8, %9
store i32 %10, i32* %2
store i32 3, i32* %3
store i32 5, i32* %4
store i32* %2, i32** %5
%11 = load i32*, i32** %5
store i32 9, i32* %11
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 9
%14 = zext i1 %13 to i32
%15 = call i32 @test_assert(i32 %14)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test_assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x78() {
  Assert_real((isgraph(120)),
              "/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_isgraph.c",
              605, ("isgraph should be 1 for x"));
}


x86 assembly (clang, -O0):
<t_isgraph_0x78>:
push   %rbp
mov    %rsp,%rbp
mov    $0x78,%edi
call   1040 <isgraph@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x25d,%edx
lea    0xf65(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0x78>:
push   %rax
mov    $0x78,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x25d,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for x\00"
define void @t_isgraph_0x78() {
%1 = call i32 @isgraph(i32 120)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 605, i8* getelementptr inbounds ([26 x i8], [26 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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for x\00"
define void @t_isgraph_0x78() {
%1 = tail call i32 @isgraph(i32 120)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 605, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void X509_NAME_new(void) {}


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

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

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

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

/* Variables and functions */
int errno;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ parse(int /*<<< orphan*/ *);
int names_init(char *n) {
  FILE *f;
  if (!(f = fopen(n, "r"))) {
    return errno;
  }
  parse(f);
  fclose(f);
  return 0;
}


x86 assembly (clang, -O0):
<names_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    116b <names_init+0x3b>
mov    0x2e7f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1184 <names_init+0x54>
mov    -0x18(%rbp),%rdi
call   1050 <parse@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<names_init>:
push   %rbx
lea    0xec8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1159 <names_init+0x29>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <parse@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
pop    %rbx
ret
mov    0x2e80(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@errno = global i32 0
define i32 @names_init(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %4
%7 = icmp ne i32* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = load i32, i32* @errno
store i32 %9, i32* %2
br label %15
10: ; preds = %1
%11 = load i32*, i32** %4
%12 = call i32 @parse(i32* %11)
%13 = load i32*, i32** %4
%14 = call i32 @fclose(i32* %13)
store i32 0, i32* %2
br label %15
15: ; preds = %10, %8
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@errno = global i32 0
define i32 @names_init(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = load i32, i32* @errno
br label %9
6: ; preds = %1
%7 = tail call i32 @parse(i32* %2)
%8 = tail call i32 @fclose(i32* %2)
br label %9
9: ; preds = %6, %4
%10 = phi i32 [ 0, %6 ], [ %5, %4 ]
ret i32 %10
}
int test_imm_A7int32_mem(int *val) {
  return ((*val) & (0xA7 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_A7int32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 167
%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_A7int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 167
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void grpcsharp_call_recv_message() {
  fprintf(stderr, "Should never reach here");
  abort();
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_call_recv_message() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_call_recv_message() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
short h_dnnt(double *);
short intr_wrap_396(double p1) { return h_dnnt(&p1); }


x86 assembly (clang, -O0):
<intr_wrap_396>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <h_dnnt@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_396>:
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <h_dnnt@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @intr_wrap_396(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call signext i16 @h_dnnt(double* %2)
ret i16 %3
}

LLVM IR (-O2):
define signext i16 @intr_wrap_396(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call signext i16 @h_dnnt(double* %2)
ret i16 %3
}
/* Variables and functions */
int /*<<< orphan*/ gensets(int, int);
void testSetBitVecC(void) { gensets(10, 100); }


x86 assembly (clang, -O0):
<testSetBitVecC>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
mov    $0x64,%esi
call   1030 <gensets@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testSetBitVecC>:
mov    $0xa,%edi
mov    $0x64,%esi
jmp    1030 <gensets@plt>

LLVM IR (-O0):
define void @testSetBitVecC() {
%1 = call i32 @gensets(i32 10, i32 100)
ret void
}

LLVM IR (-O2):
define void @testSetBitVecC() {
%1 = tail call i32 @gensets(i32 10, i32 100)
ret void
}
/* Variables and functions */
int fib(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", fib(5));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @fib(i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ parseinput();
int tty_event();
int userinput(void) {
  int err = tty_event();
  if (err < 0)
    return err;
  if (err == 2) {
    parseinput();
  }
  return err;
}


x86 assembly (clang, -O0):
<userinput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <tty_event@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1147 <userinput+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115e <userinput+0x3e>
cmpl   $0x2,-0x8(%rbp)
jne    1158 <userinput+0x38>
mov    $0x0,%al
call   1030 <parseinput@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<userinput>:
push   %rbx
xor    %eax,%eax
call   1040 <tty_event@plt>
mov    %eax,%ebx
cmp    $0x2,%eax
jne    1136 <userinput+0x16>
xor    %eax,%eax
call   1030 <parseinput@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @userinput() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @tty_event()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = load i32, i32* %2
store i32 %7, i32* %1
br label %15
8: ; preds = %0
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 2
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 (...) @parseinput()
br label %13
13: ; preds = %11, %8
%14 = load i32, i32* %2
store i32 %14, i32* %1
br label %15
15: ; preds = %13, %6
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
define i32 @userinput() {
%1 = tail call i32 (...) @tty_event()
%2 = icmp eq i32 %1, 2
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @parseinput()
br label %5
5: ; preds = %3, %0
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ leave_clearing_selection(int /*<<< orphan*/,
                                            int /*<<< orphan*/);
void reject_and_leave(void) { leave_clearing_selection(0, 0); }


x86 assembly (clang, -O0):
<reject_and_leave>:
push   %rbp
mov    %rsp,%rbp
xor    %esi,%esi
mov    %esi,%edi
call   1030 <leave_clearing_selection@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reject_and_leave>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <leave_clearing_selection@plt>

LLVM IR (-O0):
define void @reject_and_leave() {
%1 = call i32 @leave_clearing_selection(i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @reject_and_leave() {
%1 = tail call i32 @leave_clearing_selection(i32 0, i32 0)
ret void
}
/* Variables and functions */
int Align(int l) {
  if (l & 1)
    return l + 1;
  return l;
}


x86 assembly (clang, -O0):
<Align>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1124 <Align+0x24>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112a <Align+0x2a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Align>:
mov    %edi,%eax
and    $0x1,%eax
add    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @Align(i32 %0) {
%2 = and i32 %0, 1
%3 = add nsw i32 %2, %0
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ byteswap4(int /*<<< orphan*/);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, char const *, int);
uint32_t sas_read4(const char *data, int bswap) {
  uint32_t tmp;
  memcpy(&tmp, data, 4);
  return bswap ? byteswap4(tmp) : tmp;
}


x86 assembly (clang, -O0):
<sas_read4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
mov    $0x4,%edx
call   1040 <memcpy@plt>
cmpl   $0x0,-0xc(%rbp)
je     115b <sas_read4+0x3b>
mov    -0x10(%rbp),%edi
call   1030 <byteswap4@plt>
mov    %eax,-0x14(%rbp)
jmp    1161 <sas_read4+0x41>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sas_read4>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %rdi,%rsi
lea    0xc(%rsp),%rdi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    0xc(%rsp),%eax
test   %ebx,%ebx
je     1148 <sas_read4+0x28>
mov    %eax,%edi
call   1030 <byteswap4@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @sas_read4(i8* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @memcpy(i32* %3, i8* %0, i32 4)
%6 = icmp eq i32 %1, 0
%7 = load i32, i32* %3
br i1 %6, label %10, label %8
8: ; preds = %2
%9 = call i32 @byteswap4(i32 %7)
br label %10
10: ; preds = %2, %8
%11 = phi i32 [ %9, %8 ], [ %7, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, char *);
void imc_fits_mklog(char *line, char *key, int val, char *com) {
  if (val)
    sprintf(line, "%-8.8s= %20.20s / %-47.47s", key, "T", com);
  else
    sprintf(line, "%-8.8s= %20.20s / %-47.47s", key, "F", com);
}


x86 assembly (clang, -O0):
<imc_fits_mklog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1155 <imc_fits_mklog+0x45>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%r8
lea    0xebc(%rip),%rsi
lea    0xed0(%rip),%rcx
call   1030 <sprintf@plt>
jmp    1174 <imc_fits_mklog+0x64>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%r8
lea    0xe98(%rip),%rsi
lea    0xeae(%rip),%rcx
call   1030 <sprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imc_fits_mklog>:
mov    %rcx,%r8
mov    %rsi,%rax
test   %edx,%edx
lea    0xefe(%rip),%rdx
lea    0xef5(%rip),%rcx
cmove  %rdx,%rcx
lea    0xecf(%rip),%rsi
mov    %rax,%rdx
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"%-8.8s= %20.20s / %-47.47s\00"
@.str.1 = [2 x i8] c"T\00"
@.str.2 = [2 x i8] c"F\00"
define void @imc_fits_mklog(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* %7
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %4
%12 = load i8*, i8** %5
%13 = load i8*, i8** %6
%14 = load i8*, i8** %8
%15 = call i32 @sprintf(i8* %12, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* %14)
br label %21
16: ; preds = %4
%17 = load i8*, i8** %5
%18 = load i8*, i8** %6
%19 = load i8*, i8** %8
%20 = call i32 @sprintf(i8* %17, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %18, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* %19)
br label %21
21: ; preds = %16, %11
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"%-8.8s= %20.20s / %-47.47s\00"
@.str.1 = [2 x i8] c"T\00"
@.str.2 = [2 x i8] c"F\00"
define void @imc_fits_mklog(i8* nocapture writeonly %0, i8* %1, i32 %2, i8* %3) {
%5 = icmp eq i32 %2, 0
%6 = select i1 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
%7 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %6, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int dup(int oldfd) {
  assert(0);
  return 0;
}


x86 assembly (clang, -O0):
<dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @dup(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @assert(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @dup(i32 %0) {
%2 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
void sizeof_overload_float(float f) { printf("Got float %f\n", f); }


x86 assembly (clang, -O0):
<sizeof_overload_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [14 x i8] c"Got float %f\0A\00"
define void @sizeof_overload_float(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %3)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Got float %f\0A\00"
define void @sizeof_overload_float(float %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(void) {
  fprintf(stderr, "CheCKpOInT\n");
#pragma acc parallel
  { abort(); }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
lea    0xec1(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"CheCKpOInT\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stderr
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"CheCKpOInT\0A\00"
define i32 @main() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
double get_seconds();
double timer_resolution() {
  double t0, t1;
  t0 = get_seconds();
  while ((t1 = get_seconds()) == t0)
    ;
  assert(t1 > t0);
  return t1 - t0;
}


x86 assembly (clang, -O0):
<timer_resolution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <get_seconds@plt>
movsd  %xmm0,-0x10(%rbp)
ucomisd -0x8(%rbp),%xmm0
jne    1156 <timer_resolution+0x36>
jp     1156 <timer_resolution+0x36>
jmp    1134 <timer_resolution+0x14>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x8(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_resolution>:
sub    $0x18,%rsp
xor    %eax,%eax
call   1030 <get_seconds@plt>
movsd  %xmm0,0x8(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <get_seconds@plt>
ucomisd 0x8(%rsp),%xmm0
jne    1151 <timer_resolution+0x31>
jnp    1140 <timer_resolution+0x20>
seta   %al
movzbl %al,%edi
movsd  %xmm0,0x10(%rsp)
call   1040 <assert@plt>
movsd  0x10(%rsp),%xmm0
subsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @timer_resolution() {
%1 = alloca double
%2 = alloca double
%3 = call double (...) @get_seconds()
store double %3, double* %1
br label %4
4: ; preds = %8, %0
%5 = call double (...) @get_seconds()
store double %5, double* %2
%6 = load double, double* %1
%7 = fcmp oeq double %5, %6
br i1 %7, label %8, label %9
8: ; preds = %4
br label %4
9: ; preds = %4
%10 = load double, double* %2
%11 = load double, double* %1
%12 = fcmp ogt double %10, %11
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load double, double* %2
%16 = load double, double* %1
%17 = fsub double %15, %16
ret double %17
}

LLVM IR (-O2):
define double @timer_resolution() {
%1 = tail call double (...) @get_seconds()
br label %2
2: ; preds = %2, %0
%3 = tail call double (...) @get_seconds()
%4 = fcmp oeq double %3, %1
br i1 %4, label %2, label %5
5: ; preds = %2
%6 = fcmp ogt double %3, %1
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = fsub double %3, %1
ret double %9
}
/* Type definitions */
typedef scalar_t__ uint16_t;

/* Variables and functions */
double Scale(uint16_t raw, double factor) { return (double)raw * factor; }


x86 assembly (clang, -O0):
<Scale>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Scale>:
cvtsi2sd %rdi,%xmm1
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @Scale(i64 %0, double %1) {
%3 = alloca i64
%4 = alloca double
store i64 %0, i64* %3
store double %1, double* %4
%5 = load i64, i64* %3
%6 = sitofp i64 %5 to double
%7 = load double, double* %4
%8 = fmul double %6, %7
ret double %8
}

LLVM IR (-O2):
define double @Scale(i64 %0, double %1) {
%3 = sitofp i64 %0 to double
%4 = fmul double %3, %1
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fio_read_32(int /*<<< orphan*/ *, int);
float fio_read_float32(FILE *f, int is_big_endian) {
  int val;
  void *vp;
  float *p, q;
  val = fio_read_32(f, is_big_endian);
  vp = (void *)(&val);
  p = (float *)(vp);
  q = *p;
  return q;
}


x86 assembly (clang, -O0):
<fio_read_float32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <fio_read_32@plt>
mov    %eax,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fio_read_float32>:
push   %rax
call   1030 <fio_read_32@plt>
movd   %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @fio_read_float32(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca float*
%8 = alloca float
store i32* %0, i32** %3
store i32 %1, i32* %4
%9 = load i32*, i32** %3
%10 = load i32, i32* %4
%11 = call i32 @fio_read_32(i32* %9, i32 %10)
store i32 %11, i32* %5
%12 = bitcast i32* %5 to i8*
store i8* %12, i8** %6
%13 = load i8*, i8** %6
%14 = bitcast i8* %13 to float*
store float* %14, float** %7
%15 = load float*, float** %7
%16 = load float, float* %15
store float %16, float* %8
%17 = load float, float* %8
ret float %17
}

LLVM IR (-O2):
define float @fio_read_float32(i32* %0, i32 %1) {
%3 = tail call i32 @fio_read_32(i32* %0, i32 %1)
%4 = bitcast i32 %3 to float
ret float %4
}
int f() {
  int i;
  int c;
  i = 0;
  c = 0;
  while (i < 100) {
    if (i % 4 == 0)
      ;
    c = c + 1;
    if (i % 4 == 1)
      ;
    c = c + 100;
    if (i % 4 == 2)
      c = c + 10000;
    else
      c = c + 1000000;
    i = i + 1;
  }
  return c;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    119d <f+0x9d>
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1135 <f+0x35>
jmp    1135 <f+0x35>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    1157 <f+0x57>
jmp    1157 <f+0x57>
mov    -0x8(%rbp),%eax
add    $0x64,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x2,%edx
jne    1184 <f+0x84>
mov    -0x8(%rbp),%eax
add    $0x2710,%eax
mov    %eax,-0x8(%rbp)
jmp    118f <f+0x8f>
mov    -0x8(%rbp),%eax
add    $0xf4240,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <f+0x12>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f() {
ret i32 75260100
}
/* Variables and functions */
double sqrt(double);
double sqrtf(double);
double getWindSpeed(double u, double v) {
  return ((sizeof((u * u) + (v * v)) == sizeof(float))
              ? sqrtf((u * u) + (v * v))
              : sqrt((u * u) + (v * v)));
}


x86 assembly (clang, -O0):
<getWindSpeed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%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
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getWindSpeed>:
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112b <getWindSpeed+0x1b>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @getWindSpeed(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %3
%7 = load double, double* %4
%8 = load double, double* %4
%9 = fmul double %7, %8
%10 = call double @llvm.fmuladd.f64(double %5, double %6, double %9)
%11 = call double @sqrt(double %10)
ret double %11
}

LLVM IR (-O2):
define double @getWindSpeed(double %0, double %1) {
%3 = fmul double %1, %1
%4 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %3)
%5 = tail call double @sqrt(double %4)
ret double %5
}
void funcD(int a) {
  int b;
  for (a = 0; a < 10; a++) {
    b++;
  }
}


x86 assembly (clang, -O0):
<funcD>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    112f <funcD+0x2f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <funcD+0xe>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @funcD(i32 %0) {
ret void
}
/* Type definitions */
struct gengetopt_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ my_cmdline_parser_release(struct gengetopt_args_info *);
void my_cmdline_parser_free(struct gengetopt_args_info *args_info) {
  my_cmdline_parser_release(args_info);
}


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

x86 assembly (clang, -O2):
<my_cmdline_parser_free>:
jmp    1030 <my_cmdline_parser_release@plt>

LLVM IR (-O0):
%struct.gengetopt_args_info = type { i32 }
define void @my_cmdline_parser_free(%struct.gengetopt_args_info* %0) {
%2 = alloca %struct.gengetopt_args_info*
store %struct.gengetopt_args_info* %0, %struct.gengetopt_args_info** %2
%3 = load %struct.gengetopt_args_info*, %struct.gengetopt_args_info** %2
%4 = call i32 @my_cmdline_parser_release(%struct.gengetopt_args_info* %3)
ret void
}

LLVM IR (-O2):
%struct.gengetopt_args_info = type { i32 }
define void @my_cmdline_parser_free(%struct.gengetopt_args_info* %0) {
%2 = tail call i32 @my_cmdline_parser_release(%struct.gengetopt_args_info* %0)
ret void
}
/* Variables and functions */
void *memchr(const void *s, int c, size_t n) {
  const unsigned char *p;
  p = s;
  while (n-- > 0) {
    if (*p++ == c)
      return ((void *)(p - 1));
  }
  return (NULL);
}


x86 assembly (clang, -O0):
<memchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x20(%rbp)
cmp    $0x0,%rax
jbe    1161 <memchr+0x61>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movzbl (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    115c <memchr+0x5c>
mov    -0x28(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
jmp    1169 <memchr+0x69>
jmp    1117 <memchr+0x17>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memchr>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
sub    $0x1,%rdx
jb     1123 <memchr+0x23>
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
cmp    %esi,%ecx
jne    1110 <memchr+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @memchr(i8* %0, i32 %1, i64 %2) {
br label %4
4: ; preds = %8, %3
%5 = phi i64 [ %2, %3 ], [ %9, %8 ]
%6 = phi i8* [ %0, %3 ], [ %10, %8 ]
%7 = icmp eq i64 %5, 0
br i1 %7, label %14, label %8
8: ; preds = %4
%9 = add i64 %5, -1
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %6
%12 = zext i8 %11 to i32
%13 = icmp eq i32 %12, %1
br i1 %13, label %14, label %4
14: ; preds = %4, %8
%15 = phi i8* [ %6, %8 ], [ null, %4 ]
ret i8* %15
}
unsigned int constant_time_msb(unsigned int a) {
  return 0 - (a >> (sizeof(a) * 8 - 1));
}


x86 assembly (clang, -O0):
<constant_time_msb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
shr    $0x1f,%ecx
xor    %eax,%eax
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<constant_time_msb>:
mov    %edi,%eax
sar    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @constant_time_msb(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 31
%5 = sub i32 0, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @constant_time_msb(i32 %0) {
%2 = ashr i32 %0, 31
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ bounce(char *);
double divide(double dividend, double divisor) {
  if (divisor == 0.0)
    bounce("division by zero");
  return (dividend / divisor);
}


x86 assembly (clang, -O0):
<divide>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1146 <divide+0x36>
jp     1146 <divide+0x36>
lea    0xebf(%rip),%rdi
call   1030 <bounce@plt>
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<divide>:
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
jne    1148 <divide+0x38>
jp     1148 <divide+0x38>
sub    $0x18,%rsp
lea    0xed9(%rip),%rdi
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1030 <bounce@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
add    $0x18,%rsp
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
@.str = [17 x i8] c"division by zero\00"
define double @divide(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = fcmp oeq double %5, 0.000000e+00
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 @bounce(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
%10 = load double, double* %3
%11 = load double, double* %4
%12 = fdiv double %10, %11
ret double %12
}

LLVM IR (-O2):
@.str = [17 x i8] c"division by zero\00"
define double @divide(double %0, double %1) {
%3 = fcmp oeq double %1, 0.000000e+00
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @bounce(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %2
%7 = fdiv double %0, %1
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, size_t);
char *sizeu5(size_t num) {
  static char sizeu5_buf[28];
  sprintf(sizeu5_buf,
          "%"
          "zu",
          num);
  return sizeu5_buf;
}


x86 assembly (clang, -O0):
<sizeu5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0x2f19(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2f06(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sizeu5>:
push   %rbx
mov    %rdi,%rdx
lea    0x2f25(%rip),%rbx
lea    0xede(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@sizeu5.sizeu5_buf = internal global [28 x i8] zeroinitializer
@.str = [4 x i8] c"%zu\00"
define i8* @sizeu5(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @sprintf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @sizeu5.sizeu5_buf, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %3)
ret i8* getelementptr inbounds ([28 x i8], [28 x i8]* @sizeu5.sizeu5_buf, i64 0, i64 0)
}

LLVM IR (-O2):
@sizeu5.sizeu5_buf = internal global [28 x i8] zeroinitializer
@.str = [4 x i8] c"%zu\00"
define i8* @sizeu5(i64 %0) {
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @sizeu5.sizeu5_buf, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %0)
ret i8* getelementptr inbounds ([28 x i8], [28 x i8]* @sizeu5.sizeu5_buf, i64 0, i64 0)
}