xunge/DecIR huggingface dataset:
/* Variables and functions */
int num1bits(long);
long increment(long permutation) {
  int n = num1bits(permutation);
  do {
    permutation++;
  } while (num1bits(permutation) != n);
  return permutation;
}


x86 assembly (clang, -O0):
<increment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <num1bits@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <num1bits@plt>
cmp    -0xc(%rbp),%eax
jne    1128 <increment+0x18>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<increment>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <num1bits@plt>
mov    %eax,%ebp
nopl   (%rax)
add    $0x1,%rbx
mov    %rbx,%rdi
call   1030 <num1bits@plt>
cmp    %ebp,%eax
jne    1120 <increment+0x10>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i64 @increment(i64 %0) {
%2 = tail call i32 @num1bits(i64 %0)
br label %3
3: ; preds = %3, %1
%4 = phi i64 [ %0, %1 ], [ %5, %3 ]
%5 = add nsw i64 %4, 1
%6 = tail call i32 @num1bits(i64 %5)
%7 = icmp eq i32 %6, %2
br i1 %7, label %8, label %3
8: ; preds = %3
ret i64 %5
}
void b43_leds_exit(struct b43_wldev *dev) {}


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

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

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

LLVM IR (-O2):
%struct.b43_wldev = type opaque
define void @b43_leds_exit(%struct.b43_wldev* nocapture %0) {
ret void
}
/* Variables and functions */
char *dirname(char *);
char *fatx_dirname(char *path) { return dirname(path); }


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

x86 assembly (clang, -O2):
<fatx_dirname>:
jmp    1030 <dirname@plt>

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

LLVM IR (-O2):
define i8* @fatx_dirname(i8* %0) {
%2 = tail call i8* @dirname(i8* %0)
ret i8* %2
}
/* Variables and functions */
int rand();
int rand_array(int ary[], int count) {
  int i;
  for (i = 0; i < count; i++) {
    ary[i] = rand();
  }
  return 0;
}


x86 assembly (clang, -O0):
<rand_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1154 <rand_array+0x44>
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <rand_array+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_array>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1144 <rand_array+0x34>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <rand_array+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @rand_array(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = tail call i32 (...) @rand()
%9 = getelementptr inbounds i32, i32* %0, i64 %7
store i32 %8, i32* %9
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a;
  int b;
  scanf("%d %d", &a, &b);
  printf("%d", a + b);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%esi
add    0x4(%rsp),%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, %6
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free_wrapped(void *ptr, void *UNUSED_data __attribute__((unused))) {
  free(ptr);
}


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

x86 assembly (clang, -O2):
<free_wrapped>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_wrapped(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int lengthOfLastWord(char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char const *argv[]) {
  char *s = "    as     ddfdf fss       ";
  printf("%d\n", *s);
  printf("%d\n", lengthOfLastWord(s));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%esi
lea    0xecd(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <lengthOfLastWord@plt>
mov    %eax,%esi
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xef4(%rip),%rbx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1040 <printf@plt>
lea    0xec4(%rip),%rdi
call   1030 <lengthOfLastWord@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c" as ddfdf fss \00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8** %6
%7 = load i8*, i8** %6
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i8*, i8** %6
%12 = call i32 @lengthOfLastWord(i8* %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c" as ddfdf fss \00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 32)
%4 = tail call i32 @lengthOfLastWord(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ *xwcsndup(int /*<<< orphan*/ const *, size_t);
wchar_t *xwcsdup(const wchar_t *s) { return xwcsndup(s, ((size_t)-1)); }


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

x86 assembly (clang, -O2):
<xwcsdup>:
mov    $0xffffffffffffffff,%rsi
jmp    1030 <xwcsndup@plt>

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

LLVM IR (-O2):
define i32* @xwcsdup(i32* %0) {
%2 = tail call i32* @xwcsndup(i32* %0, i64 -1)
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float c;
  printf("Degrees in Celsius: ");
  scanf("%f", &c);
  printf("%f degrees Celsius converts to %f degrees Fahrenheit\n", c,
         (c * 1.8) + 32);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xea0(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe9c(%rip),%xmm2
addsd  %xmm2,%xmm1
lea    0xeb1(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeae(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xeaa(%rip),%xmm1
lea    0xec3(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Degrees in Celsius: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [54 x i8] c"%f degrees Celsius converts to %f degrees Fahrenheit\0A\00"
define i32 @main() {
%1 = alloca float
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 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 = load float, float* %1
%7 = fpext float %6 to double
%8 = call double @llvm.fmuladd.f64(double %7, double 1.800000e+00, double 3.200000e+01)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0), double %5, double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Degrees in Celsius: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [54 x i8] c"%f degrees Celsius converts to %f degrees Fahrenheit\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 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 = call double @llvm.fmuladd.f64(double %6, double 1.800000e+00, double 3.200000e+01)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0), double %6, double %7)
ret i32 0
}
int matches_rdiff_extension(const char *path, char *base) {
  path = path;
  base = base;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @matches_rdiff_extension(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
unsigned hash(char *s) {
  unsigned hashval;
  for (hashval = 0; *s != '\0'; s++)
    hashval = *s + 31 * hashval;
  return hashval % 32767;
}


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

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%al
test   %al,%al
je     114b <hash+0x4b>
add    $0x1,%rdi
xor    %ecx,%ecx
nopl   0x0(%rax)
movsbl %al,%eax
mov    %ecx,%edx
shl    $0x5,%edx
sub    %ecx,%edx
mov    %edx,%ecx
add    %eax,%ecx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <hash+0x10>
mov    %ecx,%eax
imul   $0x20005,%rax,%rdx
shr    $0x20,%rdx
mov    %ecx,%eax
sub    %edx,%eax
shr    %eax
add    %edx,%eax
shr    $0xe,%eax
mov    %eax,%edx
shl    $0xf,%edx
sub    %edx,%eax
add    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = mul i32 %6, 31
%10 = add i32 %9, %8
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = urem i32 %10, 32767
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
int try(char *a, long unsigned int d) { return a + d > a; }


x86 assembly (clang, -O0):
<try>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<try>:
xor    %eax,%eax
test   %rsi,%rsi
setg   %al
ret

LLVM IR (-O0):
define i32 @try(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = getelementptr inbounds i8, i8* %5, i64 %6
%8 = load i8*, i8** %3
%9 = icmp ugt i8* %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @try(i8* nocapture readnone %0, i64 %1) {
%3 = icmp sgt i64 %1, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ wdctl_command(int);
void wdctl_clear_trusted_iplist(void) { wdctl_command(24); }


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

x86 assembly (clang, -O2):
<wdctl_clear_trusted_iplist>:
mov    $0x18,%edi
jmp    1030 <wdctl_command@plt>

LLVM IR (-O0):
define void @wdctl_clear_trusted_iplist() {
%1 = call i32 @wdctl_command(i32 24)
ret void
}

LLVM IR (-O2):
define void @wdctl_clear_trusted_iplist() {
%1 = tail call i32 @wdctl_command(i32 24)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ play(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int main(int argc, char **argv) {
  play(stdin);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
call   1030 <play@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <play@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stdin
%7 = call i32 @play(i32 %6)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdin
%4 = tail call i32 @play(i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ setenv(char *, char *, int);
int /*<<< orphan*/ tzset();
int /*<<< orphan*/ unsetenv(char *);
void mmp_set_tm_zone(char *zone) {
  if (zone != NULL)
    setenv("TZ", zone, 1);
  else
    unsetenv("TZ");
  tzset();
}


x86 assembly (clang, -O0):
<mmp_set_tm_zone>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1161 <mmp_set_tm_zone+0x31>
mov    -0x8(%rbp),%rsi
lea    0xeae(%rip),%rdi
mov    $0x1,%edx
call   1030 <setenv@plt>
jmp    116d <mmp_set_tm_zone+0x3d>
lea    0xe98(%rip),%rdi
call   1050 <unsetenv@plt>
mov    $0x0,%al
call   1040 <tzset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mmp_set_tm_zone>:
push   %rax
test   %rdi,%rdi
je     114c <mmp_set_tm_zone+0x1c>
mov    %rdi,%rsi
lea    0xec0(%rip),%rdi
mov    $0x1,%edx
call   1030 <setenv@plt>
jmp    1158 <mmp_set_tm_zone+0x28>
lea    0xead(%rip),%rdi
call   1050 <unsetenv@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <tzset@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"TZ\00"
define void @mmp_set_tm_zone(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @setenv(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6, i32 1)
br label %10
8: ; preds = %1
%9 = call i32 @unsetenv(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
%11 = call i32 (...) @tzset()
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"TZ\00"
define void @mmp_set_tm_zone(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @setenv(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0, i32 1)
br label %7
5: ; preds = %1
%6 = tail call i32 @unsetenv(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
%8 = tail call i32 (...) @tzset()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printbits(int);
int /*<<< orphan*/ printf(char *, int);
int main10() {
  int a = 0;
  char *x;
  x = (char *)&a;
  x[0] = 15;
  x[1] = 3;
  x[2] = 1;
  x[3] = 0;
  printf("the value : %d \n", a);
  printbits(a);
  return 0;
}


x86 assembly (clang, -O0):
<main10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0xf,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x3,0x1(%rax)
mov    -0x10(%rbp),%rax
movb   $0x1,0x2(%rax)
mov    -0x10(%rbp),%rax
movb   $0x0,0x3(%rax)
mov    -0x4(%rbp),%esi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <printbits@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [17 x i8] c"the value : %d \0A\00"
define i32 @main10() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = bitcast i32* %1 to i8*
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
store i8 15, i8* %5
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 1
store i8 3, i8* %7
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 2
store i8 1, i8* %9
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 3
store i8 0, i8* %11
%12 = load i32, i32* %1
%13 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = load i32, i32* %1
%15 = call i32 @printbits(i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"the value : %d \0A\00"
define i32 @main10() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 66319)
%2 = tail call i32 @printbits(i32 66319)
ret i32 0
}
/* Variables and functions */
int Strend(char *, char *);
int /*<<< orphan*/ getchar();
int main(void) {
  char buffer[256] = {0};
  int ret = 0;
  ret = Strend("abcd", "bc");
  ret = Strend("abcd", "cd");
  ret = Strend("abcd", "abcde");
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x110(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1030 <memset@plt>
movl   $0x0,-0x114(%rbp)
lea    0xe9a(%rip),%rdi
lea    0xe98(%rip),%rsi
call   1050 <Strend@plt>
mov    %eax,-0x114(%rbp)
lea    0xe81(%rip),%rdi
lea    0xe7c(%rip),%rsi
call   1050 <Strend@plt>
mov    %eax,-0x114(%rbp)
lea    0xe68(%rip),%rdi
lea    0xe69(%rip),%rsi
call   1050 <Strend@plt>
mov    %eax,-0x114(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xed6(%rip),%rsi
mov    %rbx,%rdi
call   1040 <Strend@plt>
lea    0xec4(%rip),%rsi
mov    %rbx,%rdi
call   1040 <Strend@plt>
lea    0xebb(%rip),%rsi
mov    %rbx,%rdi
call   1040 <Strend@plt>
xor    %eax,%eax
call   1030 <getchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"abcd\00"
@.str.1 = [3 x i8] c"bc\00"
@.str.2 = [3 x i8] c"cd\00"
@.str.3 = [6 x i8] c"abcde\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [256 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [256 x i8]* %2 to i8*
store i32 0, i32* %3
%5 = call i32 @Strend(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 %5, i32* %3
%6 = call i32 @Strend(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
store i32 %6, i32* %3
%7 = call i32 @Strend(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
store i32 %7, i32* %3
%8 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"abcd\00"
@.str.1 = [3 x i8] c"bc\00"
@.str.2 = [3 x i8] c"cd\00"
@.str.3 = [6 x i8] c"abcde\00"
define i32 @main() {
%1 = tail call i32 @Strend(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @Strend(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @Strend(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%4 = tail call i32 (...) @getchar()
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint16_t rm_get_uint16le(uint8_t *buf) {
  return (uint16_t)((buf[1] << 8) | buf[0]);
}


x86 assembly (clang, -O0):
<rm_get_uint16le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
or     (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rm_get_uint16le>:
mov    0x4(%rdi),%eax
shl    $0x8,%eax
or     (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @rm_get_uint16le(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 1
%5 = load i32, i32* %4
%6 = shl i32 %5, 8
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
%10 = or i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @rm_get_uint16le(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = load i32, i32* %0
%6 = or i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int uckernel(int /*<<< orphan*/);
int unitcmt() { return uckernel(0); }


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

x86 assembly (clang, -O2):
<unitcmt>:
xor    %edi,%edi
jmp    1030 <uckernel@plt>

LLVM IR (-O0):
define i32 @unitcmt() {
%1 = call i32 @uckernel(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @unitcmt() {
%1 = tail call i32 @uckernel(i32 0)
ret i32 %1
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
unsigned long conv_f32(float x) {
  union {
    float f;
    uint32_t i;
  } conv;
  conv.f = x;
  return conv.i;
}


x86 assembly (clang, -O0):
<conv_f32>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<conv_f32>:
movd   %xmm0,%eax
ret

LLVM IR (-O0):
%union.anon = type { i64 }
define i64 @conv_f32(float %0) {
%2 = alloca float
%3 = alloca %union.anon
store float %0, float* %2
%4 = load float, float* %2
%5 = bitcast %union.anon* %3 to float*
store float %4, float* %5
%6 = bitcast %union.anon* %3 to i64*
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @conv_f32(float %0) {
%2 = bitcast float %0 to i32
%3 = zext i32 %2 to i64
ret i64 %3
}
int __double_encoded_array_size(const double *p, int elements) {
  (void)p;
  return sizeof(double) * elements;
}


x86 assembly (clang, -O0):
<__double_encoded_array_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__double_encoded_array_size>:
lea    0x0(,%rsi,8),%eax
ret

LLVM IR (-O0):
define i32 @__double_encoded_array_size(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
%5 = load double*, double** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = mul i64 8, %7
%9 = trunc i64 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @__double_encoded_array_size(double* nocapture readnone %0, i32 %1) {
%3 = shl i32 %1, 3
ret i32 %3
}
/* Variables and functions */
int factorial(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d", factorial(10));
  printf("%d", factorial(-10));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
call   1030 <factorial@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
mov    $0xfffffff6,%edi
call   1030 <factorial@plt>
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @factorial(i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @factorial(i32 -10)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
float fToC(float tempF) { return (tempF - 32) * 5.0 / 9.0; }


x86 assembly (clang, -O0):
<fToC>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xefa(%rip),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee2(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xece(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fToC>:
addss  0xef8(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xef4(%rip),%xmm0
divsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @fToC(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fsub float %3, 3.200000e+01
%5 = fpext float %4 to double
%6 = fmul double %5, 5.000000e+00
%7 = fdiv double %6, 9.000000e+00
%8 = fptrunc double %7 to float
ret float %8
}

LLVM IR (-O2):
define float @fToC(float %0) {
%2 = fadd float %0, -3.200000e+01
%3 = fpext float %2 to double
%4 = fmul double %3, 5.000000e+00
%5 = fdiv double %4, 9.000000e+00
%6 = fptrunc double %5 to float
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int scanf(char *, int *, int *);
int /*<<< orphan*/ stderr;
void checkInput(int *a, int *b) {
  if ((scanf("%d%d", a, b)) != 2) {
    fprintf(stderr, "Wrong input values!");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<checkInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xeb1(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x2,%eax
je     1180 <checkInput+0x50>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
lea    0xe98(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e5f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkInput>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xec2(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    114a <checkInput+0x1a>
pop    %rax
ret
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
lea    0xeab(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%d%d\00"
@stderr = global i32 0
@.str.1 = [20 x i8] c"Wrong input values!\00"
@EXIT_FAILURE = global i32 0
define void @checkInput(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = load i32*, i32** %4
%7 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %5, i32* %6)
%8 = icmp ne i32 %7, 2
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%12 = load i32, i32* @EXIT_FAILURE
%13 = call i32 @exit(i32 %12)
unreachable
14: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@stderr = global i32 0
@.str.1 = [20 x i8] c"Wrong input values!\00"
@EXIT_FAILURE = global i32 0
define void @checkInput(i32* %0, i32* %1) {
%3 = tail call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %0, i32* %1)
%4 = icmp eq i32 %3, 2
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %2
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int stat(char const *, struct stat *);
int Dao_FileStat(const char *path, struct stat *buf) { return stat(path, buf); }


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

x86 assembly (clang, -O2):
<Dao_FileStat>:
jmp    1030 <stat@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @Dao_FileStat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i8*, i8** %3
%6 = load %struct.stat*, %struct.stat** %4
%7 = call i32 @stat(i8* %5, %struct.stat* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @Dao_FileStat(i8* nocapture %0, %struct.stat* nocapture %1) {
%3 = tail call i32 @stat(i8* %0, %struct.stat* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, double, ...);
char *dtostrf(double val, signed char width, unsigned char prec, char *sout) {
  char fmt[20];
  sprintf(fmt, "%%%d.%df", width, prec);
  sprintf(sout, fmt, val);
  return sout;
}


x86 assembly (clang, -O0):
<dtostrf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %sil,%al
mov    %dil,%cl
movsd  %xmm0,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
movsbl -0x9(%rbp),%eax
cvtsi2sd %eax,%xmm0
movzbl -0xa(%rbp),%edx
lea    0xebc(%rip),%rsi
mov    $0x1,%al
call   1030 <sprintf@plt>
mov    -0x18(%rbp),%rdi
lea    -0x30(%rbp),%rsi
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%al
call   1030 <sprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dtostrf>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%rbx
mov    %esi,%edx
movsd  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
lea    0xed0(%rip),%rsi
lea    0x10(%rsp),%r14
mov    %r14,%rdi
mov    $0x1,%al
call   1030 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1030 <sprintf@plt>
mov    %rbx,%rax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%%%d.%df\00"
define i8* @dtostrf(double %0, i8 signext %1, i8 zeroext %2, i8* %3) {
%5 = alloca double
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8*
%9 = alloca [20 x i8]
store double %0, double* %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i8* %3, i8** %8
%10 = getelementptr inbounds [20 x i8], [20 x i8]* %9, i64 0, i64 0
%11 = load i8, i8* %6
%12 = sitofp i8 %11 to double
%13 = load i8, i8* %7
%14 = zext i8 %13 to i32
%15 = call i32 (i8*, i8*, double, ...) @sprintf(i8* %10, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double %12, i32 %14)
%16 = load i8*, i8** %8
%17 = getelementptr inbounds [20 x i8], [20 x i8]* %9, i64 0, i64 0
%18 = load double, double* %5
%19 = call i32 (i8*, i8*, double, ...) @sprintf(i8* %16, i8* %17, double %18)
%20 = load i8*, i8** %8
ret i8* %20
}

LLVM IR (-O2):
@.str = [9 x i8] c"%%%d.%df\00"
define i8* @dtostrf(double %0, i8 signext %1, i8 zeroext %2, i8* returned writeonly %3) {
%5 = alloca [20 x i8]
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%7 = sitofp i8 %1 to double
%8 = zext i8 %2 to i32
%9 = call i32 (i8*, i8*, double, ...) @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double %7, i32 %8)
%10 = call i32 (i8*, i8*, double, ...) @sprintf(i8* dereferenceable(1) %3, i8* %6, double %0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int saisirValeurNumerique() {
  int valeur;
  printf("Entrez une valeur numerique : ");
  scanf("%d", &valeur);
  return valeur;
}


x86 assembly (clang, -O0):
<saisirValeurNumerique>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<saisirValeurNumerique>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Entrez une valeur numerique : \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @saisirValeurNumerique() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 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), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [31 x i8] c"Entrez une valeur numerique : \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @saisirValeurNumerique() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 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), i32* %1)
%5 = load i32, i32* %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ test_tx_s(char *, int);
void preload_ack(void) { test_tx_s("\x00\x02\x00\x02", 4); }


x86 assembly (clang, -O0):
<preload_ack>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x4,%esi
call   1030 <test_tx_s@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<preload_ack>:
lea    0xee9(%rip),%rdi
mov    $0x4,%esi
jmp    1030 <test_tx_s@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\00\02\00\02\00"
define void @preload_ack() {
%1 = call i32 @test_tx_s(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\00\02\00\02\00"
define void @preload_ack() {
%1 = tail call i32 @test_tx_s(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}
/* Variables and functions */
char *format_str(char *, char *const);
int /*<<< orphan*/ free(char *const);
char *shell_like_escape(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ vifm_system(char *const);
void set_pwd_in_screen(const char path[]) {
  char *const escaped_dir = shell_like_escape(path, 0);
  char *const set_pwd = format_str("screen -X setenv PWD %s", escaped_dir);
  (void)vifm_system(set_pwd);
  free(set_pwd);
  free(escaped_dir);
}


x86 assembly (clang, -O0):
<set_pwd_in_screen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1060 <shell_like_escape@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe9a(%rip),%rdi
call   1050 <format_str@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <vifm_system@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_pwd_in_screen>:
push   %r14
push   %rbx
push   %rax
xor    %esi,%esi
call   1060 <shell_like_escape@plt>
mov    %rax,%r14
lea    0xeab(%rip),%rdi
mov    %rax,%rsi
call   1050 <format_str@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <vifm_system@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"screen -X setenv PWD %s\00"
define void @set_pwd_in_screen(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i8* @shell_like_escape(i8* %5, i32 0)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i8* @format_str(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %7)
store i8* %8, i8** %4
%9 = load i8*, i8** %4
%10 = call i32 @vifm_system(i8* %9)
%11 = load i8*, i8** %4
%12 = call i32 @free(i8* %11)
%13 = load i8*, i8** %3
%14 = call i32 @free(i8* %13)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"screen -X setenv PWD %s\00"
define void @set_pwd_in_screen(i8* %0) {
%2 = tail call i8* @shell_like_escape(i8* %0, i32 0)
%3 = tail call i8* @format_str(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @vifm_system(i8* %3)
%5 = tail call i32 @free(i8* %3)
%6 = tail call i32 @free(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cpc_key_press(int);
int /*<<< orphan*/ cpc_key_unpress(int);
void Joy_Omega_Fire2(int value) {
  if (value) {
    cpc_key_press(0x55);
  } else {
    cpc_key_unpress(0x55);
  };
}


x86 assembly (clang, -O0):
<Joy_Omega_Fire2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1144 <Joy_Omega_Fire2+0x24>
mov    $0x55,%edi
call   1030 <cpc_key_press@plt>
jmp    114e <Joy_Omega_Fire2+0x2e>
mov    $0x55,%edi
call   1040 <cpc_key_unpress@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Joy_Omega_Fire2>:
test   %edi,%edi
je     112e <Joy_Omega_Fire2+0xe>
mov    $0x55,%edi
jmp    1030 <cpc_key_press@plt>
mov    $0x55,%edi
jmp    1040 <cpc_key_unpress@plt>

LLVM IR (-O0):
define void @Joy_Omega_Fire2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @cpc_key_press(i32 85)
br label %9
7: ; preds = %1
%8 = call i32 @cpc_key_unpress(i32 85)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @Joy_Omega_Fire2(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @cpc_key_press(i32 85)
br label %7
5: ; preds = %1
%6 = tail call i32 @cpc_key_unpress(i32 85)
br label %7
7: ; preds = %5, %3
ret void
}
void d2i_OCSP_CERTSTATUS(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_OCSP_CERTSTATUS() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ C_STRTOF(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int main() {
  C_STRTOF(NULL, NULL);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @C_STRTOF(i32* null, i32* null)
ret i32 0
}
void glGetBufferParameteriv(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glGetBufferParameteriv() {
ret void
}
void sonix_shutdown(struct usb_spca50x *spca50x) {}


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

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

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

LLVM IR (-O2):
%struct.usb_spca50x = type opaque
define void @sonix_shutdown(%struct.usb_spca50x* nocapture %0) {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ send_event;
};
typedef TYPE_1__ XFocusChangeEvent;

/* Variables and functions */
int get_XFocusChangeEvent_send_event(void *_p) {
  return (int)((XFocusChangeEvent *)_p)->send_event;
}


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

x86 assembly (clang, -O2):
<get_XFocusChangeEvent_send_event>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XFocusChangeEvent_send_event(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XFocusChangeEvent_send_event(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int crypto_generichash_blake2b__pick_best_implementation();
int _crypto_generichash_blake2b_pick_best_implementation(void) {
  return crypto_generichash_blake2b__pick_best_implementation();
}


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

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

LLVM IR (-O0):
define i32 @_crypto_generichash_blake2b_pick_best_implementation() {
%1 = call i32 (...) @crypto_generichash_blake2b__pick_best_implementation()
ret i32 %1
}

LLVM IR (-O2):
define i32 @_crypto_generichash_blake2b_pick_best_implementation() {
%1 = tail call i32 (...) @crypto_generichash_blake2b__pick_best_implementation()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_volume_func_init_mmx() {
  printf("NOT IMPLEMENTED:"
         "pa_volume_func_init_mmx"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [40 x i8] c"NOT IMPLEMENTED:pa_volume_func_init_mmx\00"
define i32 @pa_volume_func_init_mmx() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
ret i32 undef
}