xunge/DecIR huggingface dataset:
/* Variables and functions */
size_t strzlen(const char *src) {
  const char *p;
  if (!src)
    return 0;
  for (p = src; *p; ++p)
    ;
  return p - src;
}


x86 assembly (clang, -O0):
<strzlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1120 <strzlen+0x20>
movq   $0x0,-0x8(%rbp)
jmp    115a <strzlen+0x5a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     114b <strzlen+0x4b>
jmp    113a <strzlen+0x3a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <strzlen+0x28>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strzlen>:
test   %rdi,%rdi
je     111f <strzlen+0x1f>
mov    $0xffffffffffffffff,%rcx
nopl   0x0(%rax)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <strzlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @strzlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %12, label %3
3: ; preds = %1, %3
%4 = phi i8* [ %7, %3 ], [ %0, %1 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3
%9 = ptrtoint i8* %4 to i64
%10 = ptrtoint i8* %0 to i64
%11 = sub i64 %9, %10
br label %12
12: ; preds = %1, %8
%13 = phi i64 [ %11, %8 ], [ 0, %1 ]
ret i64 %13
}
int x(void) {
  int i = 33;
  switch (i) {
  case 1 ... 40:
    break;
  default:
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<x>:
push   %rbp
mov    %rsp,%rbp
movl   $0x21,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
sub    $0x27,%eax
ja     1124 <x+0x24>
jmp    111f <x+0x1f>
jmp    1129 <x+0x29>
jmp    1129 <x+0x29>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @x() {
%1 = alloca i32
store i32 33, i32* %1
%2 = load i32, i32* %1
switch i32 %2, label %4 [
i32 1, label %3
i32 2, label %3
i32 3, label %3
i32 4, label %3
i32 5, label %3
i32 6, label %3
i32 7, label %3
i32 8, label %3
i32 9, label %3
i32 10, label %3
i32 11, label %3
i32 12, label %3
i32 13, label %3
i32 14, label %3
i32 15, label %3
i32 16, label %3
i32 17, label %3
i32 18, label %3
i32 19, label %3
i32 20, label %3
i32 21, label %3
i32 22, label %3
i32 23, label %3
i32 24, label %3
i32 25, label %3
i32 26, label %3
i32 27, label %3
i32 28, label %3
i32 29, label %3
i32 30, label %3
i32 31, label %3
i32 32, label %3
i32 33, label %3
i32 34, label %3
i32 35, label %3
i32 36, label %3
i32 37, label %3
i32 38, label %3
i32 39, label %3
i32 40, label %3
]
3: ; preds = %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0
br label %5
4: ; preds = %0
br label %5
5: ; preds = %4, %3
ret i32 0
}

LLVM IR (-O2):
define i32 @x() {
ret i32 0
}
int dup2(int fd) {}


x86 assembly (clang, -O0):
<dup2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @dup2(i32 %0) {
ret i32 undef
}
/* Variables and functions */
int _isNumber(int /*<<< orphan*/, char *);
bool isNumber(char *s) { return _isNumber(0, s); }


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

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

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

LLVM IR (-O2):
define i32 @isNumber(i8* %0) {
%2 = tail call i32 @_isNumber(i32 0, i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ in(char **);
int /*<<< orphan*/ out(char **);
void main() {
  char a[5][5];
  in(a);
  out(a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x20(%rbp),%rdi
call   1040 <in@plt>
lea    -0x20(%rbp),%rdi
call   1030 <out@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <in@plt>
mov    %rbx,%rdi
call   1030 <out@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @main() {
%1 = alloca [5 x [5 x i8]]
%2 = getelementptr inbounds [5 x [5 x i8]], [5 x [5 x i8]]* %1, i64 0, i64 0
%3 = bitcast [5 x i8]* %2 to i8**
%4 = call i32 @in(i8** %3)
%5 = getelementptr inbounds [5 x [5 x i8]], [5 x [5 x i8]]* %1, i64 0, i64 0
%6 = bitcast [5 x i8]* %5 to i8**
%7 = call i32 @out(i8** %6)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = alloca [5 x [5 x i8]]
%2 = getelementptr inbounds [5 x [5 x i8]], [5 x [5 x i8]]* %1, i64 0, i64 0, i64 0
%3 = bitcast [5 x [5 x i8]]* %1 to i8**
%4 = call i32 @in(i8** %3)
%5 = call i32 @out(i8** %3)
ret void
}
/* Variables and functions */
int gc_visited(void *block) {
  size_t prev = ((size_t *)block)[-1];
  if ((prev & 1) == 0)
    ((size_t *)block)[-1] = prev | 1;
  return prev & 1;
}


x86 assembly (clang, -O0):
<gc_visited>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
jne    1136 <gc_visited+0x36>
mov    -0x10(%rbp),%rcx
or     $0x1,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,-0x8(%rax)
mov    -0x10(%rbp),%rax
and    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gc_visited>:
mov    -0x8(%rdi),%rcx
mov    %ecx,%eax
and    $0x1,%eax
test   $0x1,%cl
jne    1116 <gc_visited+0x16>
or     $0x1,%rcx
mov    %rcx,-0x8(%rdi)
ret

LLVM IR (-O0):
define i32 @gc_visited(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i64*
%6 = getelementptr inbounds i64, i64* %5, i64 -1
%7 = load i64, i64* %6
store i64 %7, i64* %3
%8 = load i64, i64* %3
%9 = and i64 %8, 1
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %1
%12 = load i64, i64* %3
%13 = or i64 %12, 1
%14 = load i8*, i8** %2
%15 = bitcast i8* %14 to i64*
%16 = getelementptr inbounds i64, i64* %15, i64 -1
store i64 %13, i64* %16
br label %17
17: ; preds = %11, %1
%18 = load i64, i64* %3
%19 = and i64 %18, 1
%20 = trunc i64 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @gc_visited(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 -8
%3 = bitcast i8* %2 to i64*
%4 = load i64, i64* %3
%5 = and i64 %4, 1
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = or i64 %4, 1
store i64 %8, i64* %3
br label %9
9: ; preds = %7, %1
%10 = trunc i64 %5 to i32
ret i32 %10
}
/* Variables and functions */
float random01();
float randgen(float fLlim, float fUlim) {
  float fRandomVal;
  fRandomVal = random01();
  return (fLlim + (float)(fRandomVal * (fUlim - fLlim)));
}


x86 assembly (clang, -O0):
<randgen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    $0x0,%al
call   1030 <random01@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
subss  -0x4(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randgen>:
push   %rax
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <random01@plt>
movss  (%rsp),%xmm1
movss  0x4(%rsp),%xmm2
subss  %xmm1,%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @randgen(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = call float (...) @random01()
store float %6, float* %5
%7 = load float, float* %3
%8 = load float, float* %5
%9 = load float, float* %4
%10 = load float, float* %3
%11 = fsub float %9, %10
%12 = call float @llvm.fmuladd.f32(float %8, float %11, float %7)
ret float %12
}

LLVM IR (-O2):
define float @randgen(float %0, float %1) {
%3 = tail call float (...) @random01()
%4 = fsub float %1, %0
%5 = tail call float @llvm.fmuladd.f32(float %3, float %4, float %0)
ret float %5
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_message_read_array(void *m, char type, const void **ptr, size_t *size) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_message_read_array>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
mov    0x2ec1(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_message_read_array>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_message_read_array(i8* %0, i8 signext %1, i8** %2, i64* %3) {
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i8**
%8 = alloca i64*
store i8* %0, i8** %5
store i8 %1, i8* %6
store i8** %2, i8*** %7
store i64* %3, i64** %8
%9 = load i32, i32* @EINVAL
%10 = sub nsw i32 0, %9
ret i32 %10
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_message_read_array(i8* nocapture readnone %0, i8 signext %1, i8** nocapture readnone %2, i64* nocapture readnone %3) {
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}
/* Variables and functions */
int readline(char *);
int /*<<< orphan*/ system(char *);
int get_cmdline(char buf[]) {
  int size;
  system("stty raw");
  size = readline(buf);
  system("stty cooked");
  return size;
}


x86 assembly (clang, -O0):
<get_cmdline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <system@plt>
mov    -0x8(%rbp),%rdi
call   1040 <readline@plt>
mov    %eax,-0xc(%rbp)
lea    0xebe(%rip),%rdi
call   1030 <system@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_cmdline>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <system@plt>
mov    %rbx,%rdi
call   1040 <readline@plt>
mov    %eax,%ebx
lea    0xec8(%rip),%rdi
call   1030 <system@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"stty raw\00"
@.str.1 = [12 x i8] c"stty cooked\00"
define i32 @get_cmdline(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = call i32 @readline(i8* %5)
store i32 %6, i32* %3
%7 = call i32 @system(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
@.str = [9 x i8] c"stty raw\00"
@.str.1 = [12 x i8] c"stty cooked\00"
define i32 @get_cmdline(i8* %0) {
%2 = tail call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @readline(i8* %0)
%4 = tail call i32 @system(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret i32 %3
}
void GB_DMAEnd(void) {}


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

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

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

LLVM IR (-O2):
define void @GB_DMAEnd() {
ret void
}
/* Variables and functions */
double sqrt(double);
double foo(double x) { return sqrt(x); }


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

x86 assembly (clang, -O2):
<foo>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     111f <foo+0xf>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

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

LLVM IR (-O2):
define double @foo(double %0) {
%2 = tail call double @sqrt(double %0)
ret double %2
}
/* Variables and functions */
int FS460_set_tv_on(unsigned int);
int /*<<< orphan*/ printf(char *, int);
void enable_tvout(unsigned int on) {
  int err;
  err = FS460_set_tv_on(on);
  if (err)
    printf("Failed, error %u.\n", err);
}


x86 assembly (clang, -O0):
<enable_tvout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <FS460_set_tv_on@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     114f <enable_tvout+0x2f>
mov    -0x8(%rbp),%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enable_tvout>:
push   %rax
call   1040 <FS460_set_tv_on@plt>
test   %eax,%eax
je     1139 <enable_tvout+0x19>
lea    0xecf(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Failed, error %u.\0A\00"
define void @enable_tvout(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @FS460_set_tv_on(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"Failed, error %u.\0A\00"
define void @enable_tvout(i32 %0) {
%2 = tail call i32 @FS460_set_tv_on(i32 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_array_ptr();
int /*<<< orphan*/ test_ptr_array();
int main(void) {
  test_array_ptr();
  test_ptr_array();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <test_array_ptr@plt>
mov    $0x0,%al
call   1030 <test_ptr_array@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @test_array_ptr()
%2 = call i32 (...) @test_ptr_array()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_array_ptr()
%2 = tail call i32 (...) @test_ptr_array()
ret i32 0
}
/* Variables and functions */
bool bool_return_false() { return false; }


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

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

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

LLVM IR (-O2):
define i32 @bool_return_false() {
ret i32 0
}
int chown(const char *path, int uid, int gid) { return -1; }


x86 assembly (clang, -O0):
<chown>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @chown(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 -1
}

LLVM IR (-O2):
define i32 @chown(i8* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 -1
}
void ff_hevc_put_hevc_uni_epel_h12_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_h12_10_sse4() {
ret void
}
/* Variables and functions */
double gsl_ran_gaussian_pdf(double, int);
double pdf_Normal(double x) { return gsl_ran_gaussian_pdf(x, 1); }


x86 assembly (clang, -O0):
<pdf_Normal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%edi
call   1030 <gsl_ran_gaussian_pdf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pdf_Normal>:
mov    $0x1,%edi
jmp    1030 <gsl_ran_gaussian_pdf@plt>

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

LLVM IR (-O2):
define double @pdf_Normal(double %0) {
%2 = tail call double @gsl_ran_gaussian_pdf(double %0, i32 1)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *world();
int main(void) {
  printf("hello %s\n", world());
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <world@plt>
lea    0xed1(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"hello %s\0A\00"
define i32 @main() {
%1 = tail call i8* (...) @world()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}
void __DELETE_java_io_File(void *me, void *client_data) {}


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

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

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

LLVM IR (-O2):
define void @__DELETE_java_io_File(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int;
typedef int /*<<< orphan*/ u_char;
typedef int /*<<< orphan*/ bool_t;
typedef int /*<<< orphan*/ XDR;

/* Variables and functions */
int /*<<< orphan*/ FALSE;
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ xdr_u_int(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
bool_t xdr_u_char(XDR *xdrs, u_char *cp) {
  u_int u;
  u = (*cp);
  if (!xdr_u_int(xdrs, &u)) {
    return (FALSE);
  }
  *cp = u;
  return (TRUE);
}


x86 assembly (clang, -O0):
<xdr_u_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   1030 <xdr_u_int@plt>
cmp    $0x0,%eax
jne    1150 <xdr_u_char+0x40>
mov    0x2e92(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1165 <xdr_u_char+0x55>
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    0x2e88(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdr_u_char>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    (%rsi),%eax
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rsi
call   1030 <xdr_u_int@plt>
test   %eax,%eax
je     113b <xdr_u_char+0x2b>
mov    0xc(%rsp),%eax
mov    %eax,(%rbx)
mov    0x2eaf(%rip),%rax
jmp    1142 <xdr_u_char+0x32>
mov    0x2e96(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@FALSE = global i32 0
@TRUE = global i32 0
define i32 @xdr_u_char(i32* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
%7 = load i32*, i32** %5
%8 = load i32, i32* %7
store i32 %8, i32* %6
%9 = load i32*, i32** %4
%10 = call i32 @xdr_u_int(i32* %9, i32* %6)
%11 = icmp ne i32 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %2
%13 = load i32, i32* @FALSE
store i32 %13, i32* %3
br label %18
14: ; preds = %2
%15 = load i32, i32* %6
%16 = load i32*, i32** %5
store i32 %15, i32* %16
%17 = load i32, i32* @TRUE
store i32 %17, i32* %3
br label %18
18: ; preds = %14, %12
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@FALSE = global i32 0
@TRUE = global i32 0
define i32 @xdr_u_char(i32* %0, i32* nocapture %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = load i32, i32* %1
store i32 %5, i32* %3
%6 = call i32 @xdr_u_int(i32* %0, i32* %3)
%7 = icmp eq i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = load i32, i32* %3
store i32 %9, i32* %1
br label %10
10: ; preds = %2, %8
%11 = phi i32* [ @TRUE, %8 ], [ @FALSE, %2 ]
%12 = load i32, i32* %11
ret i32 %12
}
void gdk_draw_polygon() {}


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

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

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

LLVM IR (-O2):
define void @gdk_draw_polygon() {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int alloc1d(float **a, int n) {
  *a = (float *)malloc(n * sizeof(float));
  if (*a == NULL)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<alloc1d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1152 <alloc1d+0x42>
movl   $0xffffffff,-0x4(%rbp)
jmp    1159 <alloc1d+0x49>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc1d>:
push   %rbx
mov    %rdi,%rbx
lea    0x0(,%rsi,4),%edi
call   1030 <malloc@plt>
mov    %rax,(%rbx)
cmp    $0x1,%rax
sbb    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @alloc1d(float** %0, i32 %1) {
%3 = alloca i32
%4 = alloca float**
%5 = alloca i32
store float** %0, float*** %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = sext i32 %6 to i64
%8 = mul i64 %7, 4
%9 = trunc i64 %8 to i32
%10 = call i64 @malloc(i32 %9)
%11 = inttoptr i64 %10 to float*
%12 = load float**, float*** %4
store float* %11, float** %12
%13 = load float**, float*** %4
%14 = load float*, float** %13
%15 = icmp eq float* %14, null
br i1 %15, label %16, label %17
16: ; preds = %2
store i32 -1, i32* %3
br label %18
17: ; preds = %2
store i32 0, i32* %3
br label %18
18: ; preds = %17, %16
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @alloc1d(float** nocapture writeonly %0, i32 %1) {
%3 = shl i32 %1, 2
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to float*
store float* %5, float** %0
%6 = icmp eq i64 %4, 0
%7 = sext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
struct clock_event_device {
  int dummy;
};

/* Variables and functions */
int ENXIO;
int local_timer_setup(struct clock_event_device *evt) { return -ENXIO; }


x86 assembly (clang, -O0):
<local_timer_setup>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ecf(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<local_timer_setup>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
%struct.clock_event_device = type { i32 }
@ENXIO = global i32 0
define i32 @local_timer_setup(%struct.clock_event_device* %0) {
%2 = alloca %struct.clock_event_device*
store %struct.clock_event_device* %0, %struct.clock_event_device** %2
%3 = load i32, i32* @ENXIO
%4 = sub nsw i32 0, %3
ret i32 %4
}

LLVM IR (-O2):
%struct.clock_event_device = type { i32 }
@ENXIO = global i32 0
define i32 @local_timer_setup(%struct.clock_event_device* nocapture readnone %0) {
%2 = load i32, i32* @ENXIO
%3 = sub nsw i32 0, %2
ret i32 %3
}
/* Variables and functions */
int palindrom(char *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char in[1025];
  scanf("%s", in);
  printf("%d\n", palindrom(in));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x410(%rbp),%rsi
lea    0xeb0(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x410(%rbp),%rdi
call   1050 <palindrom@plt>
mov    %eax,%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x410,%rsp
lea    0xec1(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
call   1050 <palindrom@plt>
lea    0xeaa(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x410,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [1025 x i8]
%2 = getelementptr inbounds [1025 x i8], [1025 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @palindrom(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
float sqrt(int);
float etr_high_perimeter(float perimeter) {
  float square_root_3 = sqrt(3);
  float high = perimeter / 2 * square_root_3;
  return high;
}


x86 assembly (clang, -O0):
<etr_high_perimeter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x3,%edi
call   1030 <sqrt@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xec7(%rip),%xmm1
divss  %xmm1,%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<etr_high_perimeter>:
push   %rax
movss  %xmm0,0x4(%rsp)
mov    $0x3,%edi
call   1030 <sqrt@plt>
movss  0x4(%rsp),%xmm1
mulss  0xed1(%rip),%xmm1
mulss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @etr_high_perimeter(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %2
%5 = call float @sqrt(i32 3)
store float %5, float* %3
%6 = load float, float* %2
%7 = fdiv float %6, 2.000000e+00
%8 = load float, float* %3
%9 = fmul float %7, %8
store float %9, float* %4
%10 = load float, float* %4
ret float %10
}

LLVM IR (-O2):
define float @etr_high_perimeter(float %0) {
%2 = tail call float @sqrt(i32 3)
%3 = fmul float %0, 5.000000e-01
%4 = fmul float %3, %2
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xf0() {
  Assert_real((isxdigit(240) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              1205, ("isxdigit should be 0 for 0xf0"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xf0>:
push   %rax
mov    $0xf0,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x4b5,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xf0\00"
define void @t_isxdigit_0xf0() {
%1 = call i64 @isxdigit(i32 240)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1205, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xf0\00"
define void @t_isxdigit_0xf0() {
%1 = tail call i64 @isxdigit(i32 240)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1205, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void freeMemory(int **ptr) {
  for (int i = 0; i < 4; i++) {
    free(ptr[i]);
  }
  free(ptr);
}


x86 assembly (clang, -O0):
<freeMemory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    114c <freeMemory+0x3c>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <freeMemory+0x13>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeMemory>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    0x8(%rbx),%rdi
call   1030 <free@plt>
mov    0x10(%rbx),%rdi
call   1030 <free@plt>
mov    0x18(%rbx),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @freeMemory(i32** %0) {
%2 = alloca i32**
%3 = alloca i32
store i32** %0, i32*** %2
store i32 0, i32* %3
br label %4
4: ; preds = %14, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 4
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load i32**, i32*** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32*, i32** %8, i64 %10
%12 = load i32*, i32** %11
%13 = bitcast i32* %12 to i8*
br label %14
14: ; preds = %7
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %4
17: ; preds = %4
%18 = load i32**, i32*** %2
%19 = bitcast i32** %18 to i8*
ret void
}

LLVM IR (-O2):
define void @freeMemory(i32** nocapture %0) {
%2 = bitcast i32** %0 to i8**
%3 = load i8*, i8** %2
tail call void @free(i8* %3)
%4 = getelementptr inbounds i32*, i32** %0, i64 1
%5 = bitcast i32** %4 to i8**
%6 = load i8*, i8** %5
tail call void @free(i8* %6)
%7 = getelementptr inbounds i32*, i32** %0, i64 2
%8 = bitcast i32** %7 to i8**
%9 = load i8*, i8** %8
tail call void @free(i8* %9)
%10 = getelementptr inbounds i32*, i32** %0, i64 3
%11 = bitcast i32** %10 to i8**
%12 = load i8*, i8** %11
tail call void @free(i8* %12)
%13 = bitcast i32** %0 to i8*
tail call void @free(i8* %13)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int null_status(uint8_t id) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @null_status(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __lib_init();
void __attribute__((constructor)) governorld_init(void) {
  __lib_init();
  return;
}


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

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

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @governorld_init, i8* null }]
define void @governorld_init() {
%1 = call i32 (...) @__lib_init()
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @governorld_init, i8* null }]
define void @governorld_init() {
%1 = tail call i32 (...) @__lib_init()
ret void
}
/* Variables and functions */
int GPIO_bit(unsigned int);
int GPLR(unsigned int);
int pxa_gpio_get(unsigned gpio) { return (GPLR(gpio) & GPIO_bit(gpio)) != 0; }


x86 assembly (clang, -O0):
<pxa_gpio_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <GPLR@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <GPIO_bit@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pxa_gpio_get>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1040 <GPLR@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <GPIO_bit@plt>
xor    %ecx,%ecx
test   %ebp,%eax
setne  %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @pxa_gpio_get(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @GPLR(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @GPIO_bit(i32 %5)
%7 = and i32 %4, %6
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @pxa_gpio_get(i32 %0) {
%2 = tail call i32 @GPLR(i32 %0)
%3 = tail call i32 @GPIO_bit(i32 %0)
%4 = and i32 %3, %2
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
struct t_config_option {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gui_window_ask_refresh(int);
void gui_bar_config_change_conditions(const void *pointer, void *data,
                                      struct t_config_option *option) {
  (void)pointer;
  (void)data;
  (void)option;
  gui_window_ask_refresh(1);
}


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

x86 assembly (clang, -O2):
<gui_bar_config_change_conditions>:
mov    $0x1,%edi
jmp    1030 <gui_window_ask_refresh@plt>

LLVM IR (-O0):
%struct.t_config_option = type { i32 }
define void @gui_bar_config_change_conditions(i8* %0, i8* %1, %struct.t_config_option* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct.t_config_option*
store i8* %0, i8** %4
store i8* %1, i8** %5
store %struct.t_config_option* %2, %struct.t_config_option** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load %struct.t_config_option*, %struct.t_config_option** %6
%10 = call i32 @gui_window_ask_refresh(i32 1)
ret void
}

LLVM IR (-O2):
%struct.t_config_option = type { i32 }
define void @gui_bar_config_change_conditions(i8* nocapture readnone %0, i8* nocapture readnone %1, %struct.t_config_option* nocapture readnone %2) {
%4 = tail call i32 @gui_window_ask_refresh(i32 1)
ret void
}
unsigned xrop3_227_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = D & T;
  stk2 = S | stk3;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_227_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_227_0_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
xor    %ecx,%eax
not    %eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_227_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %5
%24 = load i32, i32* %7
%25 = and i32 %23, %24
store i32 %25, i32* %10
%26 = load i32, i32* %6
%27 = load i32, i32* %10
%28 = or i32 %26, %27
store i32 %28, i32* %9
%29 = load i32, i32* %7
%30 = load i32, i32* %9
%31 = xor i32 %29, %30
store i32 %31, i32* %8
%32 = load i32, i32* %8
%33 = xor i32 %32, -1
store i32 %33, i32* %8
%34 = load i32, i32* %8
ret i32 %34
}

LLVM IR (-O2):
define i32 @xrop3_227_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = shl nuw nsw i32 %5, 8
%7 = xor i32 %4, %6
%8 = xor i32 %7, -1
%9 = or i32 %8, %5
ret i32 %9
}
/* Variables and functions */
int open64(char const *, int, int);
int dkopen(const char *path, int flags, int mode) {
  return (open64(path, flags, mode));
}


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

x86 assembly (clang, -O2):
<dkopen>:
jmp    1030 <open64@plt>

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

LLVM IR (-O2):
define i32 @dkopen(i8* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32 @open64(i8* %0, i32 %1, i32 %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ UP3D_GetParameter(int);
int32_t UP3D_GetSupportState() { return UP3D_GetParameter(0x11); }


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

x86 assembly (clang, -O2):
<UP3D_GetSupportState>:
mov    $0x11,%edi
jmp    1030 <UP3D_GetParameter@plt>

LLVM IR (-O0):
define i32 @UP3D_GetSupportState() {
%1 = call i32 @UP3D_GetParameter(i32 17)
ret i32 %1
}

LLVM IR (-O2):
define i32 @UP3D_GetSupportState() {
%1 = tail call i32 @UP3D_GetParameter(i32 17)
ret i32 %1
}
/* Variables and functions */
int fprintactionname(int /*<<< orphan*/, int);
int /*<<< orphan*/ stdout;
int printactionname(int i) { return fprintactionname(stdout, i); }


x86 assembly (clang, -O0):
<printactionname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
call   1030 <fprintactionname@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printactionname>:
mov    %edi,%esi
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fprintactionname@plt>

LLVM IR (-O0):
@stdout = global i32 0
define i32 @printactionname(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stdout
%4 = load i32, i32* %2
%5 = call i32 @fprintactionname(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @printactionname(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintactionname(i32 %2, i32 %0)
ret i32 %3
}
void cdio_free_device_list(char *device_list[]) {
  if (((void *)0) == device_list)
    return;
  for (; *device_list != ((void *)0); device_list++)
    free(*device_list);
}


x86 assembly (clang, -O0):
<cdio_free_device_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rax
jne    112d <cdio_free_device_list+0x1d>
jmp    115d <cdio_free_device_list+0x4d>
jmp    1132 <cdio_free_device_list+0x22>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     115d <cdio_free_device_list+0x4d>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
jmp    1132 <cdio_free_device_list+0x22>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdio_free_device_list>:
push   %rbx
test   %rdi,%rdi
je     1141 <cdio_free_device_list+0x31>
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <cdio_free_device_list+0x31>
add    $0x8,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <cdio_free_device_list+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @cdio_free_device_list(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %12, label %6
6: ; preds = %3, %6
%7 = phi i8* [ %10, %6 ], [ %4, %3 ]
%8 = phi i8** [ %9, %6 ], [ %0, %3 ]
tail call void @free(i8* %7)
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %6
12: ; preds = %6, %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int main(void) {
  float x;
  for (x = 0.0; x <= 1.0; x += 0.01)
    printf("x =  %f\n", x);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xec8(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1176 <main+0x66>
movss  -0x8(%rbp),%xmm0
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea4(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1127 <main+0x17>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
lea    0xeed(%rip),%rbx
nop
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0x8(%rsp),%xmm0
addsd  0xebd(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  0xeb9(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    1120 <main+0x10>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"x = %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
store float 0.000000e+00, float* %2
br label %3
3: ; preds = %10, %0
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fcmp ole double %5, 1.000000e+00
br i1 %6, label %7, label %15
7: ; preds = %3
%8 = load float, float* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %8)
br label %10
10: ; preds = %7
%11 = load float, float* %2
%12 = fpext float %11 to double
%13 = fadd double %12, 1.000000e-02
%14 = fptrunc double %13 to float
store float %14, float* %2
br label %3
15: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"x = %f\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi float [ 0.000000e+00, %0 ], [ %6, %1 ]
%3 = fpext float %2 to double
%4 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %2)
%5 = fadd double %3, 1.000000e-02
%6 = fptrunc double %5 to float
%7 = fcmp ugt float %6, 1.000000e+00
br i1 %7, label %8, label %1
8: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putchar(unsigned int);
void binary_to_ascii(unsigned int value) {
  unsigned int quotient;
  quotient = value / 10;
  if (quotient != 0)
    binary_to_ascii(quotient);
  putchar(value % 10 + '0');
}


x86 assembly (clang, -O0):
<binary_to_ascii>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     114c <binary_to_ascii+0x2c>
mov    -0x8(%rbp),%edi
call   1040 <binary_to_ascii@plt>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%edi
add    $0x30,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<binary_to_ascii>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %edi,%r14d
cmp    $0xa,%edi
jb     1140 <binary_to_ascii+0x20>
mov    $0xcccccccd,%edi
imul   %r14,%rdi
shr    $0x23,%rdi
call   1040 <binary_to_ascii@plt>
mov    $0xcccccccd,%eax
imul   %r14,%rax
shr    $0x23,%rax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
or     $0x30,%ebx
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @binary_to_ascii(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = udiv i32 %4, 10
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i32, i32* %3
br label %10
10: ; preds = %8, %1
%11 = load i32, i32* %2
%12 = urem i32 %11, 10
%13 = add i32 %12, 48
%14 = call i32 @putchar(i32 %13)
ret void
}

LLVM IR (-O2):
define void @binary_to_ascii(i32 %0) {
%2 = icmp ult i32 %0, 10
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = udiv i32 %0, 10
tail call void @binary_to_ascii(i32 %4)
br label %5
5: ; preds = %3, %1
%6 = urem i32 %0, 10
%7 = or i32 %6, 48
%8 = tail call i32 @putchar(i32 %7)
ret void
}