xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ driveMotors(int, int);
int /*<<< orphan*/ motorSet(int, int);
void hangMotors(int speed) {
  motorSet(4, -speed);
  motorSet(7, speed);
  driveMotors(speed, speed);
}


x86 assembly (clang, -O0):
<hangMotors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %esi,%esi
sub    -0x4(%rbp),%esi
mov    $0x4,%edi
call   1030 <motorSet@plt>
mov    -0x4(%rbp),%esi
mov    $0x7,%edi
call   1030 <motorSet@plt>
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1040 <driveMotors@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hangMotors>:
push   %rbx
mov    %edi,%ebx
mov    %edi,%esi
neg    %esi
mov    $0x4,%edi
call   1030 <motorSet@plt>
mov    $0x7,%edi
mov    %ebx,%esi
call   1030 <motorSet@plt>
mov    %ebx,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <driveMotors@plt>

LLVM IR (-O0):
define void @hangMotors(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 0, %3
%5 = call i32 @motorSet(i32 4, i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @motorSet(i32 7, i32 %6)
%8 = load i32, i32* %2
%9 = load i32, i32* %2
%10 = call i32 @driveMotors(i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @hangMotors(i32 %0) {
%2 = sub nsw i32 0, %0
%3 = tail call i32 @motorSet(i32 4, i32 %2)
%4 = tail call i32 @motorSet(i32 7, i32 %0)
%5 = tail call i32 @driveMotors(i32 %0, i32 %0)
ret void
}
/* Variables and functions */
float fabs(float);
float helpFindMaxAbsFloat(float a, float b) {
  float aAbs = fabs(a);
  float bAbs = fabs(b);
  if (aAbs > bAbs) {
    return aAbs;
  } else {
    return bAbs;
  }
}


x86 assembly (clang, -O0):
<helpFindMaxAbsFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <fabs@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
call   1030 <fabs@plt>
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    115e <helpFindMaxAbsFloat+0x4e>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1168 <helpFindMaxAbsFloat+0x58>
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<helpFindMaxAbsFloat>:
movaps 0xef9(%rip),%xmm2
andps  %xmm2,%xmm0
andps  %xmm2,%xmm1
maxss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @helpFindMaxAbsFloat(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
%8 = load float, float* %4
%9 = call float @fabs(float %8)
store float %9, float* %6
%10 = load float, float* %5
%11 = call float @fabs(float %10)
store float %11, float* %7
%12 = load float, float* %6
%13 = load float, float* %7
%14 = fcmp ogt float %12, %13
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = load float, float* %6
store float %16, float* %3
br label %19
17: ; preds = %2
%18 = load float, float* %7
store float %18, float* %3
br label %19
19: ; preds = %17, %15
%20 = load float, float* %3
ret float %20
}

LLVM IR (-O2):
define float @helpFindMaxAbsFloat(float %0, float %1) {
%3 = tail call float @llvm.fabs.f32(float %0)
%4 = tail call float @llvm.fabs.f32(float %1)
%5 = fcmp ogt float %3, %4
%6 = select i1 %5, float %3, float %4
ret float %6
}
int ft_is_whitespace(char c) {
  if (c == ' ' || c == '\n' || c == '\t')
    return (1);
  else if (c == '\v' || c == '\f' || c == '\r')
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_is_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     1131 <ft_is_whitespace+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
je     1131 <ft_is_whitespace+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
jne    113d <ft_is_whitespace+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    117c <ft_is_whitespace+0x7c>
movsbl -0x5(%rbp),%eax
cmp    $0xb,%eax
je     1164 <ft_is_whitespace+0x64>
movsbl -0x5(%rbp),%eax
cmp    $0xc,%eax
je     1164 <ft_is_whitespace+0x64>
movsbl -0x5(%rbp),%eax
cmp    $0xd,%eax
jne    1170 <ft_is_whitespace+0x70>
movl   $0x1,-0x4(%rbp)
jmp    117c <ft_is_whitespace+0x7c>
jmp    1175 <ft_is_whitespace+0x75>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_is_whitespace>:
cmp    $0x20,%dil
ja     1120 <ft_is_whitespace+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100000600,%rdx
bt     %rcx,%rdx
jae    1120 <ft_is_whitespace+0x20>
ret
lea    -0xb(%rdi),%ecx
xor    %eax,%eax
cmp    $0x3,%cl
setb   %al
ret

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

LLVM IR (-O2):
define i32 @ft_is_whitespace(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %6
i8 10, label %6
i8 9, label %6
]
2: ; preds = %1
%3 = add i8 %0, -11
%4 = icmp ult i8 %3, 3
%5 = zext i1 %4 to i32
br label %6
6: ; preds = %2, %1, %1, %1
%7 = phi i32 [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ %5, %2 ]
ret i32 %7
}
/* Variables and functions */
int argTwoNotNull(int *, int *);
int f(int *arr, int *arr2) {
  int x = argTwoNotNull(arr, arr2);
  return x + arr[5];
}


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

x86 assembly (clang, -O2):
<f>:
push   %rbx
mov    %rdi,%rbx
call   1030 <argTwoNotNull@plt>
add    0x14(%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @f(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** %3
%7 = load i32*, i32** %4
%8 = call i32 @argTwoNotNull(i32* %6, i32* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i64 5
%12 = load i32, i32* %11
%13 = add nsw i32 %9, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @f(i32* %0, i32* %1) {
%3 = tail call i32 @argTwoNotNull(i32* %0, i32* %1)
%4 = getelementptr inbounds i32, i32* %0, i64 5
%5 = load i32, i32* %4
%6 = add nsw i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float salario;
  printf("Digite o salario: ");
  scanf("%f", &salario);
  salario *= 0.98;
  printf("\nO salario com desconto: %4.2f", salario);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea9(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeaa(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xeae(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x4(%rsp)
cvtss2sd %xmm0,%xmm0
lea    0xeb7(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Digite o salario: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [31 x i8] c"\0AO salario com desconto: %4.2f\00"
define i32 @main() {
%1 = alloca float
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = fpext float %4 to double
%6 = fmul double %5, 0x3FEF5C28F5C28F5C
%7 = fptrunc double %6 to float
store float %7, float* %1
%8 = load float, float* %1
%9 = fpext float %8 to double
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), double %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Digite o salario: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [31 x i8] c"\0AO salario com desconto: %4.2f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fpext float %5 to double
%7 = fmul double %6, 0x3FEF5C28F5C28F5C
%8 = fptrunc double %7 to float
store float %8, float* %1
%9 = fpext float %8 to double
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), double %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sunxi_gpio_set_cfgpin(unsigned int, unsigned char);
void pinMode(unsigned int pin, unsigned char mode) {
  sunxi_gpio_set_cfgpin(pin, mode);
}


x86 assembly (clang, -O0):
<pinMode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
movzbl -0x5(%rbp),%esi
call   1030 <sunxi_gpio_set_cfgpin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pinMode>:
jmp    1030 <sunxi_gpio_set_cfgpin@plt>

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

LLVM IR (-O2):
define void @pinMode(i32 %0, i8 zeroext %1) {
%3 = tail call i32 @sunxi_gpio_set_cfgpin(i32 %0, i8 zeroext %1)
ret void
}
/* Variables and functions */
unsigned int rgb_to_pixel16(unsigned int, unsigned int, unsigned int);
unsigned int rgb_to_pixel16_dup(unsigned int r, unsigned int g,
                                unsigned int b) {
  unsigned int col;
  col = rgb_to_pixel16(r, g, b);
  col |= col << 16;
  return col;
}


x86 assembly (clang, -O0):
<rgb_to_pixel16_dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <rgb_to_pixel16@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x10,%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgb_to_pixel16_dup>:
push   %rax
call   1030 <rgb_to_pixel16@plt>
mov    %eax,%ecx
shl    $0x10,%ecx
or     %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rgb_to_pixel16_dup(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
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @rgb_to_pixel16(i32 %8, i32 %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = shl i32 %12, 16
%14 = load i32, i32* %7
%15 = or i32 %14, %13
store i32 %15, i32* %7
%16 = load i32, i32* %7
ret i32 %16
}

LLVM IR (-O2):
define i32 @rgb_to_pixel16_dup(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @rgb_to_pixel16(i32 %0, i32 %1, i32 %2)
%5 = shl i32 %4, 16
%6 = or i32 %5, %4
ret i32 %6
}
int get_flash_params_count(void) { return 0x5e; }


x86 assembly (clang, -O0):
<get_flash_params_count>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5e,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @get_flash_params_count() {
ret i32 94
}

LLVM IR (-O2):
define i32 @get_flash_params_count() {
ret i32 94
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello, world.\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"Hello, world.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int readlink(char *, char *, int);
const char *get_program_exe_path(void) {
  static char exe_path[4096] = {
      0,
  };
  if (readlink("/proc/self/exe", exe_path, 4095) == -1)
    return 0;
  else
    return exe_path;
}


x86 assembly (clang, -O0):
<get_program_exe_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
lea    0x2f1a(%rip),%rsi
mov    $0xfff,%edx
call   1030 <readlink@plt>
cmp    $0xffffffff,%eax
jne    1146 <get_program_exe_path+0x36>
movq   $0x0,-0x8(%rbp)
jmp    1151 <get_program_exe_path+0x41>
lea    0x2ef3(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_program_exe_path>:
push   %rbx
lea    0xee8(%rip),%rdi
lea    0x2f21(%rip),%rbx
mov    %rbx,%rsi
mov    $0xfff,%edx
call   1030 <readlink@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
cmovne %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@get_program_exe_path.exe_path = internal global [4096 x i8] zeroinitializer
@.str = [15 x i8] c"/proc/self/exe\00"
define i8* @get_program_exe_path() {
%1 = alloca i8*
%2 = call i32 @readlink(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @get_program_exe_path.exe_path, i64 0, i64 0), i32 4095)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %5
4: ; preds = %0
store i8* null, i8** %1
br label %6
5: ; preds = %0
store i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @get_program_exe_path.exe_path, i64 0, i64 0), i8** %1
br label %6
6: ; preds = %5, %4
%7 = load i8*, i8** %1
ret i8* %7
}

LLVM IR (-O2):
@get_program_exe_path.exe_path = internal global [4096 x i8] zeroinitializer
@.str = [15 x i8] c"/proc/self/exe\00"
define i8* @get_program_exe_path() {
%1 = tail call i32 @readlink(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @get_program_exe_path.exe_path, i64 0, i64 0), i32 4095)
%2 = icmp eq i32 %1, -1
%3 = select i1 %2, i8* null, i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @get_program_exe_path.exe_path, i64 0, i64 0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ plintf(char *);
void show_syms() {
  plintf("(    ,    )    +    -      *    ^    **    / \n");
  plintf("sin  cos  tan  atan  atan2 acos asin\n");
  plintf("exp  ln   log  log10 tanh  cosh sinh \n");
  plintf("max  min  heav flr   mod   sign sqrt \n");
  plintf("t    pi   ran  \n");
}


x86 assembly (clang, -O0):
<show_syms>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <plintf@plt>
lea    0xf08(%rip),%rdi
call   1030 <plintf@plt>
lea    0xf22(%rip),%rdi
call   1030 <plintf@plt>
lea    0xf3d(%rip),%rdi
call   1030 <plintf@plt>
lea    0xf58(%rip),%rdi
call   1030 <plintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_syms>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <plintf@plt>
lea    0xf0b(%rip),%rdi
call   1030 <plintf@plt>
lea    0xf25(%rip),%rdi
call   1030 <plintf@plt>
lea    0xf40(%rip),%rdi
call   1030 <plintf@plt>
lea    0xf5b(%rip),%rdi
pop    %rax
jmp    1030 <plintf@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"( , ) + - * ^ ** / \0A\00"
@.str.1 = [38 x i8] c"sin cos tan atan atan2 acos asin\0A\00"
@.str.2 = [39 x i8] c"exp ln log log10 tanh cosh sinh \0A\00"
@.str.3 = [39 x i8] c"max min heav flr mod sign sqrt \0A\00"
@.str.4 = [17 x i8] c"t pi ran \0A\00"
define void @show_syms() {
%1 = call i32 @plintf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @plintf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @plintf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @plintf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @plintf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"( , ) + - * ^ ** / \0A\00"
@.str.1 = [38 x i8] c"sin cos tan atan atan2 acos asin\0A\00"
@.str.2 = [39 x i8] c"exp ln log log10 tanh cosh sinh \0A\00"
@.str.3 = [39 x i8] c"max min heav flr mod sign sqrt \0A\00"
@.str.4 = [17 x i8] c"t pi ran \0A\00"
define void @show_syms() {
%1 = tail call i32 @plintf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @plintf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @plintf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @plintf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @plintf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
ret void
}
int fun1224() { return 1224; }


x86 assembly (clang, -O0):
<fun1224>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4c8,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fun1224() {
ret i32 1224
}

LLVM IR (-O2):
define i32 @fun1224() {
ret i32 1224
}
void bm_set_bit(unsigned long *bmw, int n) {
  (bmw[n / ((sizeof(unsigned long)) * 8)]) |=
      (1UL << (n % ((sizeof(unsigned long)) * 8)));
}


x86 assembly (clang, -O0):
<bm_set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rcx
and    $0x3f,%rcx
mov    $0x1,%edx
shl    %cl,%rdx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shr    $0x6,%rcx
or     (%rax,%rcx,8),%rdx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bm_set_bit>:
movslq %esi,%rcx
mov    $0x1,%eax
shl    %cl,%rax
shr    $0x6,%rcx
or     %rax,(%rdi,%rcx,8)
ret

LLVM IR (-O0):
define void @bm_set_bit(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sext i32 %5 to i64
%7 = urem i64 %6, 64
%8 = shl i64 1, %7
%9 = load i64*, i64** %3
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = udiv i64 %11, 64
%13 = getelementptr inbounds i64, i64* %9, i64 %12
%14 = load i64, i64* %13
%15 = or i64 %14, %8
store i64 %15, i64* %13
ret void
}

LLVM IR (-O2):
define void @bm_set_bit(i64* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = and i64 %3, 63
%5 = shl nuw i64 1, %4
%6 = lshr i64 %3, 6
%7 = getelementptr inbounds i64, i64* %0, i64 %6
%8 = load i64, i64* %7
%9 = or i64 %8, %5
store i64 %9, i64* %7
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void ComparatorConfigure(uint32_t ui32Base, uint32_t ui32Comp,
                         uint32_t ui32Config) {
  ASSERT(ui32Base == 0x4003C000);
  ASSERT(ui32Comp < 3);
  (*((volatile uint32_t *)(ui32Base + (ui32Comp * 0x20) + 0x00000024))) =
      ui32Config;
}


x86 assembly (clang, -O0):
<ComparatorConfigure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x4003c000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpl   $0x3,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0xc(%rbp),%ecx
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%edx
shl    $0x5,%edx
add    %edx,%eax
add    $0x24,%eax
cltq
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ComparatorConfigure>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x4003c000,%ebp
sete   %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
cmp    $0x3,%ebx
setl   %dil
call   1030 <ASSERT@plt>
shl    $0x5,%ebx
lea    (%rbx,%rbp,1),%eax
add    $0x24,%eax
cltq
mov    %r14d,(%rax)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @ComparatorConfigure(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 1073987584
%9 = zext i1 %8 to i32
%10 = call i32 @ASSERT(i32 %9)
%11 = load i32, i32* %5
%12 = icmp slt i32 %11, 3
%13 = zext i1 %12 to i32
%14 = call i32 @ASSERT(i32 %13)
%15 = load i32, i32* %6
%16 = load i32, i32* %4
%17 = load i32, i32* %5
%18 = mul nsw i32 %17, 32
%19 = add nsw i32 %16, %18
%20 = add nsw i32 %19, 36
%21 = sext i32 %20 to i64
%22 = inttoptr i64 %21 to i32*
store volatile i32 %15, i32* %22
ret void
}

LLVM IR (-O2):
define void @ComparatorConfigure(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 1073987584
%5 = zext i1 %4 to i32
%6 = tail call i32 @ASSERT(i32 %5)
%7 = icmp slt i32 %1, 3
%8 = zext i1 %7 to i32
%9 = tail call i32 @ASSERT(i32 %8)
%10 = shl nsw i32 %1, 5
%11 = add i32 %0, 36
%12 = add i32 %11, %10
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i32*
store volatile i32 %2, i32* %14
ret void
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, int /*<<< orphan*/,
                           int /*<<< orphan*/, int);
char *todo_version_str() {
  char *str = malloc(sizeof(char) * 256);
  sprintf(str, "%d.%d.%d", 0, 0, 1);
  return str;
}


x86 assembly (clang, -O0):
<todo_version_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x100,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xebf(%rip),%rsi
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    %ecx,%edx
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<todo_version_str>:
push   %rbx
mov    $0x100,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
lea    0xecb(%rip),%rsi
mov    %rax,%rdi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1040 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d.%d.%d\00"
define noalias i8* @todo_version_str() {
%1 = tail call dereferenceable_or_null(256) i8* @malloc(i32 256)
%2 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 0, i32 0, i32 1)
ret i8* %1
}
int isupper2(int c) { return c >= 'A' && c <= 'D'; }


x86 assembly (clang, -O0):
<isupper2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isupper2+0x20>
cmpl   $0x44,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isupper2>:
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x4,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isupper2(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 4
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  (void)fprintf(stderr, "usage: uudecode [file ...]\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"usage: uudecode [file ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"usage: uudecode [file ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
void *driller_malloc(size_t);
void *driller_malloc_hook(size_t bytes, const void *caller) {
  return driller_malloc(bytes);
}


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

x86 assembly (clang, -O2):
<driller_malloc_hook>:
jmp    1030 <driller_malloc@plt>

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

LLVM IR (-O2):
define i8* @driller_malloc_hook(i64 %0, i8* nocapture readnone %1) {
%3 = tail call i8* @driller_malloc(i64 %0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ vecNd_copy(double *, double const *, int);
void vec3d_copy(double result[3], const double a[3]) {
  vecNd_copy(result, a, 3);
}


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

x86 assembly (clang, -O2):
<vec3d_copy>:
mov    $0x3,%edx
jmp    1030 <vecNd_copy@plt>

LLVM IR (-O0):
define void @vec3d_copy(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** %4
%7 = call i32 @vecNd_copy(double* %5, double* %6, i32 3)
ret void
}

LLVM IR (-O2):
define void @vec3d_copy(double* %0, double* %1) {
%3 = tail call i32 @vecNd_copy(double* %0, double* %1, i32 3)
ret void
}
const struct list *list_rend(const struct list *head) { return head; }


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

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

LLVM IR (-O0):
%struct.list = type opaque
define %struct.list* @list_rend(%struct.list* %0) {
%2 = alloca %struct.list*
store %struct.list* %0, %struct.list** %2
%3 = load %struct.list*, %struct.list** %2
ret %struct.list* %3
}

LLVM IR (-O2):
%struct.list = type opaque
define %struct.list* @list_rend(%struct.list* readnone returned %0) {
ret %struct.list* %0
}
double gettimeofday_resolution(void) { return 0.1; }


x86 assembly (clang, -O0):
<gettimeofday_resolution>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettimeofday_resolution>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @gettimeofday_resolution() {
ret double 1.000000e-01
}

LLVM IR (-O2):
define double @gettimeofday_resolution() {
ret double 1.000000e-01
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fwrite(char *, int, int, int /*<<< orphan*/ *);
int write_byte(FILE *file, unsigned char b) {
  if (fwrite((char *)&b, 1, 1, file) != 1)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<write_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rcx
lea    -0x11(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fwrite@plt>
cmp    $0x1,%eax
je     114b <write_byte+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    1152 <write_byte+0x42>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_byte>:
push   %rax
mov    %rdi,%rcx
mov    %sil,0x7(%rsp)
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @write_byte(i32* nocapture %0, i8 zeroext %1) {
%3 = alloca i8
store i8 %1, i8* %3
%4 = call i32 @fwrite(i8* %3, i32 1, i32 1, i32* %0)
%5 = icmp eq i32 %4, 1
%6 = zext i1 %5 to i32
ret i32 %6
}
void g_slist_insert_sorted() {}


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

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

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

LLVM IR (-O2):
define void @g_slist_insert_sorted() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void version(const char *progname) {
  printf("%s "
         "1.5.3"
         "\n",
         progname);
}


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

x86 assembly (clang, -O2):
<version>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"%s 1.5.3\0A\00"
define void @version(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void mex_lirc_deinit(void) {}


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

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

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

LLVM IR (-O2):
define void @mex_lirc_deinit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ checkAllocation(void *);
void *realloc(void *, size_t);
void *reallocateMemory(void *pointer, size_t size) {
  void *reallocatedPointer = realloc(pointer, size);
  checkAllocation(reallocatedPointer);
  return reallocatedPointer;
}


x86 assembly (clang, -O0):
<reallocateMemory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <checkAllocation@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reallocateMemory>:
push   %rbx
call   1040 <realloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <checkAllocation@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @reallocateMemory(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = tail call i32 @checkAllocation(i8* %3)
ret i8* %3
}
/* Variables and functions */
float RAND_MAX;
scalar_t__ rand();
float frand() { return (float)rand() / RAND_MAX; }


x86 assembly (clang, -O0):
<frand>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ec1(%rip),%rax
divss  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<frand>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ec4(%rip),%rax
divss  (%rax),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global float 0.000000e+00
define float @frand() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to float
%3 = load float, float* @RAND_MAX
%4 = fdiv float %2, %3
ret float %4
}

LLVM IR (-O2):
@RAND_MAX = global float 0.000000e+00
define float @frand() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to float
%3 = load float, float* @RAND_MAX
%4 = fdiv float %2, %3
ret float %4
}
/* Variables and functions */
scalar_t__ isupper(int);
int tolower(int c) {
  if (isupper(c)) {
    c -= 'A' - 'a';
  }
  return c;
}


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     1136 <tolower+0x26>
mov    -0x4(%rbp),%eax
sub    $0xffffffe0,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <isupper@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @tolower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isupper(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, -32
store i32 %8, i32* %2
br label %9
9: ; preds = %6, %1
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ instance1(int /*<<< orphan*/);
int /*<<< orphan*/ instance2(int /*<<< orphan*/);
int main() {
__CPROVER_ASYNC_0:
  instance1(0);
__CPROVER_ASYNC_1:
  instance2(0);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
%3 = call i32 @instance1(i32 0)
br label %4
4: ; preds = %2
%5 = call i32 @instance2(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @instance1(i32 0)
%2 = tail call i32 @instance2(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: bin2c [-n name] <output_file> [input_file1 ...]\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [56 x i8] c"usage: bin2c [-n name] <output_file> [input_file1 ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [56 x i8] c"usage: bin2c [-n name] <output_file> [input_file1 ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ le16toh(int /*<<< orphan*/);
void disk_identify_fixup_uint16(uint8_t const identify[512],
                                const unsigned int offset_words) {
  uint16_t *p;
  p = (uint16_t *)identify;
  p[offset_words] = le16toh(p[offset_words]);
}


x86 assembly (clang, -O0):
<disk_identify_fixup_uint16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    (%rax,%rcx,4),%edi
call   1030 <le16toh@plt>
mov    %eax,%edx
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disk_identify_fixup_uint16>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %esi,%ebx
mov    (%rdi,%rbx,4),%edi
call   1030 <le16toh@plt>
mov    %eax,(%r14,%rbx,4)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @disk_identify_fixup_uint16(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** %3
store i32* %6, i32** %5
%7 = load i32*, i32** %5
%8 = load i32, i32* %4
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %7, i64 %9
%11 = load i32, i32* %10
%12 = call i32 @le16toh(i32 %11)
%13 = load i32*, i32** %5
%14 = load i32, i32* %4
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
store i32 %12, i32* %16
ret void
}

LLVM IR (-O2):
define void @disk_identify_fixup_uint16(i32* nocapture %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
%6 = tail call i32 @le16toh(i32 %5)
store i32 %6, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
void storeInteger(char *str, int num) { sprintf(str, "%d", num); }


x86 assembly (clang, -O0):
<storeInteger>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<storeInteger>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <sprintf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @storeInteger(i8* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("0.0 == -0.0: %u\n", 0.0 == -0.0);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [17 x i8] c"0.0 == -0.0: %u\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solve_by_multprec_homotopy_continuation(int decimals) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(496, &decimals, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solve_by_multprec_homotopy_continuation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1f0,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve_by_multprec_homotopy_continuation>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1f0,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @solve_by_multprec_homotopy_continuation(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %3
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc4c(i32 496, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @solve_by_multprec_homotopy_continuation(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 496, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ sub_heapify(int *, int /*<<< orphan*/, int);
int /*<<< orphan*/ swap(int *, int /*<<< orphan*/, int, int);
void max_heap(int *ptr, int len) {
  if (len <= 1)
    return;
  swap(ptr, 0, len - 1, 2);
  sub_heapify(ptr, 0, len - 1);
  max_heap(ptr, len - 1);
  return;
}


x86 assembly (clang, -O0):
<max_heap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jg     114e <max_heap+0x1e>
jmp    1184 <max_heap+0x54>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
mov    $0x2,%ecx
call   1050 <swap@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1030 <sub_heapify@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1040 <max_heap@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_heap>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x2,%esi
jl     1168 <max_heap+0x48>
mov    %esi,%ebx
mov    %rdi,%r14
add    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    -0x2(%rbx),%ebp
mov    %r14,%rdi
xor    %esi,%esi
mov    %ebp,%edx
mov    $0x2,%ecx
call   1040 <swap@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1030 <sub_heapify@plt>
add    $0xffffffff,%ebx
cmp    $0x2,%ebx
ja     1140 <max_heap+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @max_heap(i32* %0, i32 %1) {
%3 = icmp slt i32 %1, 2
br i1 %3, label %10, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %1, %2 ]
%6 = add nsw i32 %5, -1
%7 = tail call i32 @swap(i32* %0, i32 0, i32 %6, i32 2)
%8 = tail call i32 @sub_heapify(i32* %0, i32 0, i32 %6)
%9 = icmp ult i32 %5, 3
br i1 %9, label %10, label %4
10: ; preds = %4, %2
ret void
}
/* Variables and functions */
int WriteSocket(int, char *, int);
int WriteSocketText(int user, char *data, int bytes) {
  return WriteSocket(user, data, bytes);
}


x86 assembly (clang, -O0):
<WriteSocketText>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <WriteSocket@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteSocketText>:
jmp    1030 <WriteSocket@plt>

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

LLVM IR (-O2):
define i32 @WriteSocketText(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @WriteSocket(i32 %0, i8* %1, i32 %2)
ret i32 %4
}
void ch_do_not_optimize(void *p) { asm volatile("" : : "g"(p) : "memory"); }


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

x86 assembly (clang, -O2):
<ch_do_not_optimize>:
mov    %rdi,-0x8(%rsp)
ret

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

LLVM IR (-O2):
define void @ch_do_not_optimize(i8* %0) {
tail call void asm sideeffect "", "imr,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) { printf("\nHello World\n"); }


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

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

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

LLVM IR (-O2):
@str = [13 x i8] c"\0AHello World\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void gtk_file_chooser_remove_filter() {}


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

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

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

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