xunge/DecIR huggingface dataset:
double dgt(double x, double y) { return ((double)(x > y)); }


x86 assembly (clang, -O0):
<dgt>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dgt>:
cmpltsd %xmm0,%xmm1
movsd  0xef3(%rip),%xmm0
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dgt(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ogt double %5, %6
%8 = zext i1 %7 to i32
%9 = sitofp i32 %8 to double
ret double %9
}

LLVM IR (-O2):
define double @dgt(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = uitofp i1 %3 to double
ret double %4
}
/* Type definitions */
struct yaffs_dev {
  int dummy;
};

/* Variables and functions */
int yaffs_mount_common(struct yaffs_dev *, int /*<<< orphan*/, int,
                       int /*<<< orphan*/);
int yaffs_mount2_reldev(struct yaffs_dev *dev, int readonly) {
  return yaffs_mount_common(dev, (0), readonly, 0);
}


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

x86 assembly (clang, -O2):
<yaffs_mount2_reldev>:
mov    %esi,%edx
xor    %esi,%esi
xor    %ecx,%ecx
jmp    1030 <yaffs_mount_common@plt>

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

LLVM IR (-O2):
%struct.yaffs_dev = type { i32 }
define i32 @yaffs_mount2_reldev(%struct.yaffs_dev* %0, i32 %1) {
%3 = tail call i32 @yaffs_mount_common(%struct.yaffs_dev* %0, i32 0, i32 %1, i32 0)
ret i32 %3
}
/* Variables and functions */
int __ctype_isalpha(int);
int isalpha(int c) { return __ctype_isalpha(c); }


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

x86 assembly (clang, -O2):
<isalpha>:
jmp    1030 <__ctype_isalpha@plt>

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

LLVM IR (-O2):
define i32 @isalpha(i32 %0) {
%2 = tail call i32 @__ctype_isalpha(i32 %0)
ret i32 %2
}
/* Variables and functions */
int change_memory_attr(unsigned long, int, int);
int set_memory_x(unsigned long addr, int numpages) {
  return change_memory_attr(addr, numpages, 3);
}


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

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

LLVM IR (-O0):
define i32 @set_memory_x(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = call i32 @change_memory_attr(i64 %5, i32 %6, i32 3)
ret i32 %7
}

LLVM IR (-O2):
define i32 @set_memory_x(i64 %0, i32 %1) {
%3 = tail call i32 @change_memory_attr(i64 %0, i32 %1, i32 3)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *, float *);
int main() {
  float altura, massa, imc;
  scanf("%f%f", &altura, &massa);
  imc = massa / (altura * altura);
  printf("%f\n", imc);
  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>
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
lea    0xe9e(%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>
movss  (%rsp),%xmm0
movss  0x4(%rsp),%xmm1
mulss  %xmm1,%xmm1
divss  %xmm1,%xmm0
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%f%f\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float* %2, float* %3)
%6 = load float, float* %3
%7 = load float, float* %2
%8 = load float, float* %2
%9 = fmul float %7, %8
%10 = fdiv float %6, %9
store float %10, float* %4
%11 = load float, float* %4
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%f%f\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float* %1, float* %2)
%6 = load float, float* %2
%7 = load float, float* %1
%8 = fmul float %7, %7
%9 = fdiv float %6, %8
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float %9)
ret i32 0
}
/* Variables and functions */
char *mk_string_without_character(char *, char);
char *mk_quoteless_string(char *s) {
  return mk_string_without_character(s, '\"');
}


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

x86 assembly (clang, -O2):
<mk_quoteless_string>:
mov    $0x22,%esi
jmp    1030 <mk_string_without_character@plt>

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

LLVM IR (-O2):
define i8* @mk_quoteless_string(i8* %0) {
%2 = tail call i8* @mk_string_without_character(i8* %0, i8 signext 34)
ret i8* %2
}
/* Variables and functions */
void active_vector_dummy_free(void *data, size_t len) {}


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

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

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

LLVM IR (-O2):
define void @active_vector_dummy_free(i8* nocapture %0, i64 %1) {
ret void
}
void releaseAllTemps() {}


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

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

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

LLVM IR (-O2):
define void @releaseAllTemps() {
ret void
}
unsigned long mksym_u64() { return 0; }


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

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

LLVM IR (-O0):
define i64 @mksym_u64() {
ret i64 0
}

LLVM IR (-O2):
define i64 @mksym_u64() {
ret i64 0
}
/* Type definitions */
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ BIO_set_init(int /*<<< orphan*/ *, int /*<<< orphan*/);
int watchccs_free(BIO *bio) {
  BIO_set_init(bio, 0);
  return 1;
}


x86 assembly (clang, -O0):
<watchccs_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <BIO_set_init@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<watchccs_free>:
push   %rax
xor    %esi,%esi
call   1030 <BIO_set_init@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @watchccs_free(i32* %0) {
%2 = tail call i32 @BIO_set_init(i32* %0, i32 0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void print_version(void) {
  puts("Blockmatic"
       " "
       "0.5"
       " by "
       "Bresson Matthieu");
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [35 x i8] c"Blockmatic 0.5 by Bresson Matthieu\00"
define void @print_version() {
%1 = call i32 @puts(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"Blockmatic 0.5 by Bresson Matthieu\00"
define void @print_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ usleep(int);
void ifconfUpdown(char *wl) {
  char tmp[25];
  sprintf(tmp, "ifconfig %s up", wl);
  system(tmp);
  usleep(500);
  sprintf(tmp, "ifconfig %s down", wl);
  system(tmp);
}


x86 assembly (clang, -O0):
<ifconfUpdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xeb5(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x30(%rbp),%rdi
call   1030 <system@plt>
mov    $0x1f4,%edi
call   1050 <usleep@plt>
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe9d(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x30(%rbp),%rdi
call   1030 <system@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ifconfUpdown>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rdi,%rbx
lea    0xebf(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rbx,%rdx
call   1040 <sprintf@plt>
mov    %r14,%rdi
call   1030 <system@plt>
mov    $0x1f4,%edi
call   1050 <usleep@plt>
lea    0xea7(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
call   1040 <sprintf@plt>
mov    %r14,%rdi
call   1030 <system@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [15 x i8] c"ifconfig %s up\00"
@.str.1 = [17 x i8] c"ifconfig %s down\00"
define void @ifconfUpdown(i8* %0) {
%2 = alloca i8*
%3 = alloca [25 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [25 x i8], [25 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [25 x i8], [25 x i8]* %3, i64 0, i64 0
%8 = call i32 @system(i8* %7)
%9 = call i32 @usleep(i32 500)
%10 = getelementptr inbounds [25 x i8], [25 x i8]* %3, i64 0, i64 0
%11 = load i8*, i8** %2
%12 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = getelementptr inbounds [25 x i8], [25 x i8]* %3, i64 0, i64 0
%14 = call i32 @system(i8* %13)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"ifconfig %s up\00"
@.str.1 = [17 x i8] c"ifconfig %s down\00"
define void @ifconfUpdown(i8* %0) {
%2 = alloca [25 x i8]
%3 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @system(i8* %3)
%6 = tail call i32 @usleep(i32 500)
%7 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%8 = call i32 @system(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ func5();
void func4(void) { func5(); }


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

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

LLVM IR (-O0):
define void @func4() {
%1 = call i32 (...) @func5()
ret void
}

LLVM IR (-O2):
define void @func4() {
%1 = tail call i32 (...) @func5()
ret void
}
/* Variables and functions */
char inputChar();
char *malloc(int);
char *inputString() {
  char *temp_string = malloc((5 + 1) * sizeof(char));
  for (int i = 0; i < 5; i++) {
    temp_string[i] = inputChar();
  }
  temp_string[5] = '\0';
  return temp_string;
}


x86 assembly (clang, -O0):
<inputString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x6,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    1169 <inputString+0x49>
mov    $0x0,%al
call   1040 <inputChar@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113d <inputString+0x1d>
mov    -0x8(%rbp),%rax
movb   $0x0,0x5(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inputString>:
push   %rbx
mov    $0x6,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <inputChar@plt>
mov    %al,(%rbx)
xor    %eax,%eax
call   1040 <inputChar@plt>
mov    %al,0x1(%rbx)
xor    %eax,%eax
call   1040 <inputChar@plt>
mov    %al,0x2(%rbx)
xor    %eax,%eax
call   1040 <inputChar@plt>
mov    %al,0x3(%rbx)
xor    %eax,%eax
call   1040 <inputChar@plt>
mov    %al,0x4(%rbx)
movb   $0x0,0x5(%rbx)
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @inputString() {
%1 = tail call dereferenceable_or_null(6) i8* @malloc(i32 6)
%2 = tail call signext i8 (...) @inputChar()
store i8 %2, i8* %1
%3 = tail call signext i8 (...) @inputChar()
%4 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %3, i8* %4
%5 = tail call signext i8 (...) @inputChar()
%6 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %5, i8* %6
%7 = tail call signext i8 (...) @inputChar()
%8 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %7, i8* %8
%9 = tail call signext i8 (...) @inputChar()
%10 = getelementptr inbounds i8, i8* %1, i64 4
store i8 %9, i8* %10
%11 = getelementptr inbounds i8, i8* %1, i64 5
store i8 0, i8* %11
ret i8* %1
}
void delay() {
  volatile int i = 0x1000000;
  while (i--)
    ;
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1000000,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     1124 <delay+0x24>
jmp    110b <delay+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
movl   $0x1000000,-0x4(%rsp)
01
nopl   0x0(%rax,%rax,1)
subl   $0x1,-0x4(%rsp)
jae    1110 <delay+0x10>
ret

LLVM IR (-O0):
define void @delay() {
%1 = alloca i32
store volatile i32 16777216, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load volatile i32, i32* %1
%4 = add nsw i32 %3, -1
store volatile i32 %4, i32* %1
%5 = icmp ne i32 %3, 0
br i1 %5, label %6, label %7
6: ; preds = %2
br label %2
7: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @delay() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store volatile i32 16777216, i32* %1
br label %3
3: ; preds = %3, %0
%4 = load volatile i32, i32* %1
%5 = add nsw i32 %4, -1
store volatile i32 %5, i32* %1
%6 = icmp eq i32 %4, 0
br i1 %6, label %7, label %3
7: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void lib_free(const void *constptr) {
  void *ptr = (void *)constptr;
  free(ptr);
}


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

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

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

LLVM IR (-O2):
define void @lib_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void gtk_item_toggle() {}


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

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

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

LLVM IR (-O2):
define void @gtk_item_toggle() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(void *);
void *thread(void *vargp) { pthread_exit((void *)42); }


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

x86 assembly (clang, -O2):
<thread>:
mov    $0x2a,%edi
jmp    1030 <pthread_exit@plt>

LLVM IR (-O0):
define i8* @thread(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 @pthread_exit(i8* inttoptr (i64 42 to i8*))
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define noalias i8* @thread(i8* nocapture readnone %0) {
%2 = tail call i32 @pthread_exit(i8* inttoptr (i64 42 to i8*))
ret i8* undef
}
unsigned long string_hash(int size, const char *string) {
  return 0;
  unsigned long hash = 5381;
  int i;
  for (i = 0; i < size; ++i) {
    hash = ((hash << 5) + hash) ^ string[i];
  }
  return hash;
}


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

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

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

LLVM IR (-O2):
define i64 @string_hash(i32 %0, i8* nocapture readnone %1) {
ret i64 0
}
float similarity_coord(int _over_lap, int _max_over_lap) {
  return _over_lap / (float)_max_over_lap;
}


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

x86 assembly (clang, -O2):
<similarity_coord>:
cvtsi2ss %edi,%xmm0
cvtsi2ss %esi,%xmm1
divss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @similarity_coord(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 = sitofp i32 %5 to float
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to float
%9 = fdiv float %6, %8
ret float %9
}

LLVM IR (-O2):
define float @similarity_coord(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to float
%4 = sitofp i32 %1 to float
%5 = fdiv float %3, %4
ret float %5
}
/* Variables and functions */
int *malloc(int);
int /*<<< orphan*/ print(int *, int, int);
int main() {
  int *a = malloc(9 * sizeof(int));
  print(a, 3, 3);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x24,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3,%edx
mov    %edx,%esi
call   1030 <print@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x24,%edi
call   1040 <malloc@plt>
mov    %rax,%rdi
mov    $0x3,%esi
mov    $0x3,%edx
call   1030 <print@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32*
%2 = call i32* @malloc(i32 36)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32 @print(i32* %3, i32 3, i32 3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @malloc(i32 36)
%2 = tail call i32 @print(i32* %1, i32 3, i32 3)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;
typedef int uint16_t;

/* Variables and functions */
uint32_t dmc_unrar_unicode_combine_surrogates(uint16_t lead, uint16_t trail) {
  return (lead << 10) + trail + (0x10000 - (0xD800 << 10) - 0xDC00);
}


x86 assembly (clang, -O0):
<dmc_unrar_unicode_combine_surrogates>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xa,%eax
add    -0x8(%rbp),%eax
add    $0xfca02400,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dmc_unrar_unicode_combine_surrogates>:
shl    $0xa,%edi
lea    (%rsi,%rdi,1),%eax
add    $0xfca02400,%eax
ret

LLVM IR (-O0):
define i32 @dmc_unrar_unicode_combine_surrogates(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 = shl i32 %5, 10
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
%9 = add nsw i32 %8, -56613888
ret i32 %9
}

LLVM IR (-O2):
define i32 @dmc_unrar_unicode_combine_surrogates(i32 %0, i32 %1) {
%3 = shl i32 %0, 10
%4 = add i32 %1, -56613888
%5 = add i32 %4, %3
ret i32 %5
}
/* Variables and functions */
long long sqlLongLong(char *);
char *strchr(char *, char);
long long sqlLongLongComma(char **pS) {
  char *s = *pS;
  char *e = strchr(s, ',');
  long long ret;
  *e++ = 0;
  *pS = e;
  ret = sqlLongLong(s);
  return ret;
}


x86 assembly (clang, -O0):
<sqlLongLongComma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2c,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rdi
call   1040 <sqlLongLong@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqlLongLongComma>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%r14
mov    %r14,%rdi
mov    $0x2c,%esi
call   1030 <strchr@plt>
movb   $0x0,(%rax)
add    $0x1,%rax
mov    %rax,(%rbx)
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <sqlLongLong@plt>

LLVM IR (-O0):
define i64 @sqlLongLongComma(i8** %0) {
%2 = alloca i8**
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8** %0, i8*** %2
%6 = load i8**, i8*** %2
%7 = load i8*, i8** %6
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = call i8* @strchr(i8* %8, i8 signext 44)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %4
store i8 0, i8* %10
%12 = load i8*, i8** %4
%13 = load i8**, i8*** %2
store i8* %12, i8** %13
%14 = load i8*, i8** %3
%15 = call i64 @sqlLongLong(i8* %14)
store i64 %15, i64* %5
%16 = load i64, i64* %5
ret i64 %16
}

LLVM IR (-O2):
define i64 @sqlLongLongComma(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i8* @strchr(i8* dereferenceable(1) %2, i8 signext 44)
%4 = getelementptr inbounds i8, i8* %3, i64 1
store i8 0, i8* %3
store i8* %4, i8** %0
%5 = tail call i64 @sqlLongLong(i8* %2)
ret i64 %5
}
/* Variables and functions */
int ceil(int /*<<< orphan*/);
int /*<<< orphan*/ log2(int);
void readFile(int *m, int *rounds, int nthreads) {
  (*m) = 1;
  (*rounds) = ceil(log2(nthreads));
}


x86 assembly (clang, -O0):
<readFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x14(%rbp),%edi
call   1030 <log2@plt>
mov    %eax,%edi
call   1040 <ceil@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readFile>:
push   %rbx
mov    %rsi,%rbx
movl   $0x1,(%rdi)
mov    %edx,%edi
call   1030 <log2@plt>
mov    %eax,%edi
call   1040 <ceil@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @readFile(i32* nocapture writeonly %0, i32* nocapture writeonly %1, i32 %2) {
store i32 1, i32* %0
%4 = tail call i32 @log2(i32 %2)
%5 = tail call i32 @ceil(i32 %4)
store i32 %5, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Usage: ./a.out\n");
  exit(errno);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Usage: ./a.out\0A\00"
@errno = global i32 0
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @errno
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@errno = global i32 0
@str = [15 x i8] c"Usage: ./a.out\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @errno
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int k = 3, sum = 0;
  switch (k--) {
  default:
    break;
  case 1:
    sum = sum + k;
    break;
  case 2:
  case 3:
    sum = sum + k;
    break;
  }
  printf("%d", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
sub    $0x1,%eax
je     1162 <main+0x52>
jmp    1149 <main+0x39>
mov    -0x10(%rbp),%eax
add    $0xfffffffe,%eax
sub    $0x2,%eax
jb     1170 <main+0x60>
jmp    115d <main+0x4d>
jmp    1179 <main+0x69>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1179 <main+0x69>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 3, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = add nsw i32 %4, -1
store i32 %5, i32* %2
switch i32 %4, label %6 [
i32 1, label %7
i32 2, label %11
i32 3, label %11
]
6: ; preds = %0
br label %15
7: ; preds = %0
%8 = load i32, i32* %3
%9 = load i32, i32* %2
%10 = add nsw i32 %8, %9
store i32 %10, i32* %3
br label %15
11: ; preds = %0, %0
%12 = load i32, i32* %3
%13 = load i32, i32* %2
%14 = add nsw i32 %12, %13
store i32 %14, i32* %3
br label %15
15: ; preds = %11, %7, %6
%16 = load i32, i32* %3
%17 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}
int sumByReference(int *a, int *b) {
  int aux = *a;
  *a = *b;
  *b = aux;
  return (*a + *b);
}


x86 assembly (clang, -O0):
<sumByReference>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
add    (%rcx),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @sumByReference(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
%5 = load i32, i32* %0
%6 = add nsw i32 %5, %3
ret i32 %6
}
ecmp(a, b, count) char *a, *b;
{
  register cc = count;
  while (cc--)
    if (*a++ != *b++)
      return (0);
  return (1);
}


x86 assembly (clang, -O0):
<ecmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x20(%rbp)
cmp    $0x0,%eax
je     1166 <ecmp+0x66>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1161 <ecmp+0x61>
movl   $0x0,-0x4(%rbp)
jmp    116d <ecmp+0x6d>
jmp    1115 <ecmp+0x15>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ecmp>:
mov    %edx,%r8d
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
cmp    %ecx,%r8d
je     1128 <ecmp+0x28>
movzbl (%rdi,%rcx,1),%edx
lea    0x1(%rcx),%rax
cmp    (%rsi,%rcx,1),%dl
mov    %rax,%rcx
je     1110 <ecmp+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @ecmp(i8* nocapture %0, i8* nocapture %1, i32 %2) {
br label %4
4: ; preds = %9, %3
%5 = phi i8* [ %0, %3 ], [ %11, %9 ]
%6 = phi i8* [ %1, %3 ], [ %13, %9 ]
%7 = phi i32 [ %2, %3 ], [ %10, %9 ]
%8 = icmp eq i32 %7, 0
br i1 %8, label %16, label %9
9: ; preds = %4
%10 = add nsw i32 %7, -1
%11 = getelementptr inbounds i8, i8* %5, i64 1
%12 = load i8, i8* %5
%13 = getelementptr inbounds i8, i8* %6, i64 1
%14 = load i8, i8* %6
%15 = icmp eq i8 %12, %14
br i1 %15, label %4, label %16
16: ; preds = %4, %9
%17 = phi i32 [ 0, %9 ], [ 1, %4 ]
ret i32 %17
}
void ff_hevc_put_hevc_bi_qpel_h16_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_h16_10_sse4() {
ret void
}
int set_length_encode_integer(char *buf, int num, int *length) { return 0; }


x86 assembly (clang, -O0):
<set_length_encode_integer>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @set_length_encode_integer(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 0
}

LLVM IR (-O2):
define i32 @set_length_encode_integer(i8* nocapture readnone %0, i32 %1, i32* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pid_set_kd(double);
int /*<<< orphan*/ pid_set_ki(double);
int /*<<< orphan*/ pid_set_kp(double);
void pid_set(double kp, double ki, double kd) {
  pid_set_kp(kp);
  pid_set_ki(ki);
  pid_set_kd(kd);
}


x86 assembly (clang, -O0):
<pid_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <pid_set_kp@plt>
movsd  -0x10(%rbp),%xmm0
call   1050 <pid_set_ki@plt>
movsd  -0x18(%rbp),%xmm0
call   1030 <pid_set_kd@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pid_set>:
sub    $0x18,%rsp
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
call   1040 <pid_set_kp@plt>
movsd  0x8(%rsp),%xmm0
call   1050 <pid_set_ki@plt>
movsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
jmp    1030 <pid_set_kd@plt>

LLVM IR (-O0):
define void @pid_set(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = call i32 @pid_set_kp(double %7)
%9 = load double, double* %5
%10 = call i32 @pid_set_ki(double %9)
%11 = load double, double* %6
%12 = call i32 @pid_set_kd(double %11)
ret void
}

LLVM IR (-O2):
define void @pid_set(double %0, double %1, double %2) {
%4 = tail call i32 @pid_set_kp(double %0)
%5 = tail call i32 @pid_set_ki(double %1)
%6 = tail call i32 @pid_set_kd(double %2)
ret void
}
int lm_rem_resource_sanlock(struct lockspace *ls, struct resource *r) {
  return -1;
}


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

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

LLVM IR (-O0):
%struct.lockspace = type opaque
%struct.resource = type opaque
define i32 @lm_rem_resource_sanlock(%struct.lockspace* %0, %struct.resource* %1) {
%3 = alloca %struct.lockspace*
%4 = alloca %struct.resource*
store %struct.lockspace* %0, %struct.lockspace** %3
store %struct.resource* %1, %struct.resource** %4
ret i32 -1
}

LLVM IR (-O2):
%struct.lockspace = type opaque
%struct.resource = type opaque
define i32 @lm_rem_resource_sanlock(%struct.lockspace* nocapture readnone %0, %struct.resource* nocapture readnone %1) {
ret i32 -1
}
void XIntersectRegion() {}


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

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

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

LLVM IR (-O2):
define void @XIntersectRegion() {
ret void
}
/* Variables and functions */
int __infer_nondet_int();
int isupper(int x) { return __infer_nondet_int(); }


x86 assembly (clang, -O0):
<isupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @isupper(i32 %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ local_bh_disable();
__attribute__((always_)) void __rcu_read_lock_bh(void) { local_bh_disable(); }


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

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

LLVM IR (-O0):
define void @__rcu_read_lock_bh() {
%1 = call i32 (...) @local_bh_disable()
ret void
}

LLVM IR (-O2):
define void @__rcu_read_lock_bh() {
%1 = tail call i32 (...) @local_bh_disable()
ret void
}
char *last_comp(s)
char *s;
{
  int n;
  n = strlen(s);
  while (n--)
    if (*(s + n) == '/')
      return (s + n + 1);
  return (s);
}


x86 assembly (clang, -O0):
<last_comp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
je     116e <last_comp+0x5e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
jne    1169 <last_comp+0x59>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1176 <last_comp+0x66>
jmp    1128 <last_comp+0x18>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<last_comp>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
movslq %eax,%rcx
mov    %rcx,%rax
nop
sub    $0x1,%rax
jb     1137 <last_comp+0x27>
cmpb   $0x2f,-0x1(%rbx,%rcx,1)
mov    %rax,%rcx
jne    1120 <last_comp+0x10>
add    %rax,%rbx
add    $0x1,%rbx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @last_comp(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = shl i64 %2, 32
%4 = ashr exact i64 %3, 32
br label %5
5: ; preds = %9, %1
%6 = phi i64 [ %7, %9 ], [ %4, %1 ]
%7 = add nsw i64 %6, -1
%8 = icmp eq i64 %6, 0
br i1 %8, label %15, label %9
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %0, i64 %7
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 47
br i1 %12, label %13, label %5
13: ; preds = %9
%14 = getelementptr inbounds i8, i8* %0, i64 %6
br label %15
15: ; preds = %5, %13
%16 = phi i8* [ %14, %13 ], [ %0, %5 ]
ret i8* %16
}
int HelpItem152(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem152() {
ret i32 0
}
/* Variables and functions */
unsigned int *vrna_refBPcnt_matrix(short const *, unsigned int);
unsigned int *make_referenceBP_array(short *reference_pt, unsigned int turn) {
  return vrna_refBPcnt_matrix((const short *)reference_pt, turn);
}


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

x86 assembly (clang, -O2):
<make_referenceBP_array>:
jmp    1030 <vrna_refBPcnt_matrix@plt>

LLVM IR (-O0):
define i32* @make_referenceBP_array(i16* %0, i32 %1) {
%3 = alloca i16*
%4 = alloca i32
store i16* %0, i16** %3
store i32 %1, i32* %4
%5 = load i16*, i16** %3
%6 = load i32, i32* %4
%7 = call i32* @vrna_refBPcnt_matrix(i16* %5, i32 %6)
ret i32* %7
}

LLVM IR (-O2):
define i32* @make_referenceBP_array(i16* %0, i32 %1) {
%3 = tail call i32* @vrna_refBPcnt_matrix(i16* %0, i32 %1)
ret i32* %3
}
void femac_uncache(struct appnic_device *pdata) {}


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

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

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

LLVM IR (-O2):
%struct.appnic_device = type opaque
define void @femac_uncache(%struct.appnic_device* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 3;
  int b = 0;
  b = a > 0 ?: 9;
  printf("%d\n", b);
  b = a < 0 ?: 2;
  printf("%d\n", b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
setg   %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x10(%rbp)
test   $0x1,%al
jne    114c <main+0x3c>
jmp    1157 <main+0x47>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1164 <main+0x54>
mov    $0x9,%eax
mov    %eax,-0x14(%rbp)
jmp    1164 <main+0x54>
mov    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
setl   %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x18(%rbp)
test   $0x1,%al
jne    1198 <main+0x88>
jmp    11a3 <main+0x93>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    11b0 <main+0xa0>
mov    $0x2,%eax
mov    %eax,-0x1c(%rbp)
jmp    11b0 <main+0xa0>
mov    -0x1c(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe40(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 3, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 0
%6 = zext i1 %5 to i32
br i1 %5, label %7, label %8
7: ; preds = %0
br label %9
8: ; preds = %0
br label %9
9: ; preds = %8, %7
%10 = phi i32 [ %6, %7 ], [ 9, %8 ]
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %2
%14 = icmp slt i32 %13, 0
%15 = zext i1 %14 to i32
br i1 %14, label %16, label %17
16: ; preds = %9
br label %18
17: ; preds = %9
br label %18
18: ; preds = %17, %16
%19 = phi i32 [ %15, %16 ], [ 2, %17 ]
store i32 %19, i32* %3
%20 = load i32, i32* %3
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}
/* Variables and functions */
int Faref(int, int);
int /*<<< orphan*/ Faset(int, int, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
main() {
  int table, c, elt;
  int tem = Faref(table, elt);
  Faset(table, elt, c);
  Faset(table, c, tem);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <Faref@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <Faset@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1040 <Faset@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
call   1030 <Faref@plt>
mov    %eax,%ebx
call   1040 <Faset@plt>
mov    %ebx,%edx
call   1040 <Faset@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = load i32, i32* %2
%7 = load i32, i32* %4
%8 = call i32 @Faref(i32 %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %2
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = call i32 @Faset(i32 %9, i32 %10, i32 %11)
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = load i32, i32* %5
%16 = call i32 @Faset(i32 %13, i32 %14, i32 %15)
%17 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @Faref(i32 undef, i32 undef)
%2 = tail call i32 @Faset(i32 undef, i32 undef, i32 undef)
%3 = tail call i32 @Faset(i32 undef, i32 undef, i32 %1)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ GPIOPinWrite(int, int, int);
void startB() {
  GPIOPinWrite(0x40007000, 0x00000020, 0xff);
  GPIOPinWrite(0x40007000, 0x00000010, 0xff);
  GPIOPinWrite(0x40007000, 0x00000020, 0x00);
  GPIOPinWrite(0x40007000, 0x00000010, 0x00);
}


x86 assembly (clang, -O0):
<startB>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40007000,%edi
mov    $0x20,%esi
mov    $0xff,%edx
call   1030 <GPIOPinWrite@plt>
mov    $0x40007000,%edi
mov    $0x10,%esi
mov    $0xff,%edx
call   1030 <GPIOPinWrite@plt>
mov    $0x40007000,%edi
mov    $0x20,%esi
xor    %edx,%edx
call   1030 <GPIOPinWrite@plt>
mov    $0x40007000,%edi
mov    $0x10,%esi
xor    %edx,%edx
call   1030 <GPIOPinWrite@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<startB>:
push   %rax
mov    $0x40007000,%edi
mov    $0x20,%esi
mov    $0xff,%edx
call   1030 <GPIOPinWrite@plt>
mov    $0x40007000,%edi
mov    $0x10,%esi
mov    $0xff,%edx
call   1030 <GPIOPinWrite@plt>
mov    $0x40007000,%edi
mov    $0x20,%esi
xor    %edx,%edx
call   1030 <GPIOPinWrite@plt>
mov    $0x40007000,%edi
mov    $0x10,%esi
xor    %edx,%edx
pop    %rax
jmp    1030 <GPIOPinWrite@plt>

LLVM IR (-O0):
define void @startB() {
%1 = call i32 @GPIOPinWrite(i32 1073770496, i32 32, i32 255)
%2 = call i32 @GPIOPinWrite(i32 1073770496, i32 16, i32 255)
%3 = call i32 @GPIOPinWrite(i32 1073770496, i32 32, i32 0)
%4 = call i32 @GPIOPinWrite(i32 1073770496, i32 16, i32 0)
ret void
}

LLVM IR (-O2):
define void @startB() {
%1 = tail call i32 @GPIOPinWrite(i32 1073770496, i32 32, i32 255)
%2 = tail call i32 @GPIOPinWrite(i32 1073770496, i32 16, i32 255)
%3 = tail call i32 @GPIOPinWrite(i32 1073770496, i32 32, i32 0)
%4 = tail call i32 @GPIOPinWrite(i32 1073770496, i32 16, i32 0)
ret void
}
char charFunc(void) { return 'A'; }


x86 assembly (clang, -O0):
<charFunc>:
push   %rbp
mov    %rsp,%rbp
mov    $0x41,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<charFunc>:
mov    $0x41,%al
ret

LLVM IR (-O0):
define signext i8 @charFunc() {
ret i8 65
}

LLVM IR (-O2):
define signext i8 @charFunc() {
ret i8 65
}