xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ destroy_hashtable();
int /*<<< orphan*/ destroy_threads();
void destroy_all() {
  destroy_hashtable();
  destroy_threads();
}


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

x86 assembly (clang, -O2):
<destroy_all>:
push   %rax
xor    %eax,%eax
call   1030 <destroy_hashtable@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <destroy_threads@plt>

LLVM IR (-O0):
define void @destroy_all() {
%1 = call i32 (...) @destroy_hashtable()
%2 = call i32 (...) @destroy_threads()
ret void
}

LLVM IR (-O2):
define void @destroy_all() {
%1 = tail call i32 (...) @destroy_hashtable()
%2 = tail call i32 (...) @destroy_threads()
ret void
}
void mock_unbind_ggtt(struct i915_vma *vma) {}


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

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

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

LLVM IR (-O2):
%struct.i915_vma = type opaque
define void @mock_unbind_ggtt(%struct.i915_vma* nocapture %0) {
ret void
}
int test_imm_EFint8_mem(signed char *val) {
  return ((*val) & (-0xEF << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_EFint8_mem>:
movsbl (%rdi),%eax
test   $0xffffff11,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_EFint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, -239
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_EFint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -239
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
/* Type definitions */
typedef int GLint;
typedef int GLenum;

/* Variables and functions */
#define GL_MINMAX_FORMAT 129
#define GL_MINMAX_SINK 128
GLint __glGetMinmaxParameterfv_size(GLenum pname) {
  switch (pname) {
  case GL_MINMAX_FORMAT:
  case GL_MINMAX_SINK:
    return 1;
  default:
    return -1;
  }
}


x86 assembly (clang, -O0):
<__glGetMinmaxParameterfv_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffff80,%eax
sub    $0x1,%eax
ja     1127 <__glGetMinmaxParameterfv_size+0x27>
jmp    111b <__glGetMinmaxParameterfv_size+0x1b>
movl   $0x1,-0x4(%rbp)
jmp    112e <__glGetMinmaxParameterfv_size+0x2e>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__glGetMinmaxParameterfv_size>:
and    $0xfffffffe,%edi
xor    %eax,%eax
cmp    $0x80,%edi
sete   %al
add    %eax,%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @__glGetMinmaxParameterfv_size(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 129, label %5
i32 128, label %5
]
5: ; preds = %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 -1, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @__glGetMinmaxParameterfv_size(i32 %0) {
%2 = and i32 %0, -2
%3 = icmp eq i32 %2, 128
%4 = select i1 %3, i32 1, i32 -1
ret i32 %4
}
int kfd_iommu_device_init(struct kfd_dev *kfd) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.kfd_dev = type opaque
define i32 @kfd_iommu_device_init(%struct.kfd_dev* nocapture readnone %0) {
ret i32 0
}
void CNIOLinux_i_do_nothing_just_working_around_a_darwin_toolchain_bug2(void) {}


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

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

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

LLVM IR (-O2):
define void @CNIOLinux_i_do_nothing_just_working_around_a_darwin_toolchain_bug2() {
ret void
}
void SemPost(int sid) { asm("movl %0, %%eax; int $53" : : "g"(sid) : "eax"); }


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

x86 assembly (clang, -O2):
<SemPost>:
mov    %edi,-0x4(%rsp)
mov    -0x4(%rsp),%eax
int    $0x35
ret

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

LLVM IR (-O2):
define void @SemPost(i32 %0) {
tail call void asm sideeffect "movl $0, %eax; int $$53", "imr,~{eax},~{dirflag},~{fpsr},~{flags}"(i32 %0)
ret void
}
float obdConvert_10(unsigned int A, unsigned int B, unsigned int C,
                    unsigned int D) {
  return (((float)A * 256.0f) + (float)B) / 100;
}


x86 assembly (clang, -O0):
<obdConvert_10>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2ss %rax,%xmm0
mov    -0x8(%rbp),%eax
cvtsi2ss %rax,%xmm1
movss  0xedc(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xec8(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<obdConvert_10>:
mov    %edi,%eax
cvtsi2ss %rax,%xmm0
mov    %esi,%eax
cvtsi2ss %rax,%xmm1
mulss  0xeea(%rip),%xmm0
addss  %xmm1,%xmm0
divss  0xee2(%rip),%xmm0
ret

LLVM IR (-O0):
define float @obdConvert_10(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = uitofp i32 %9 to float
%11 = load i32, i32* %6
%12 = uitofp i32 %11 to float
%13 = call float @llvm.fmuladd.f32(float %10, float 2.560000e+02, float %12)
%14 = fdiv float %13, 1.000000e+02
ret float %14
}

LLVM IR (-O2):
define float @obdConvert_10(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = uitofp i32 %0 to float
%6 = uitofp i32 %1 to float
%7 = tail call float @llvm.fmuladd.f32(float %5, float 2.560000e+02, float %6)
%8 = fdiv float %7, 1.000000e+02
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ PrintNetworkInterfaceInfos();
int main(void) {
  PrintNetworkInterfaceInfos();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @PrintNetworkInterfaceInfos()
ret i32 0
}
void baznone() {}


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

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

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

LLVM IR (-O2):
define void @baznone() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ test_vector_addpop();
int /*<<< orphan*/ test_vector_initfree();
int /*<<< orphan*/ test_vector_sort();
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  srand(time(NULL));
  test_vector_initfree();
  test_vector_addpop();
  test_vector_sort();
  printf("All tests passed. Vector.(c|h) is ready for use.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    $0x0,%al
call   1070 <test_vector_initfree@plt>
mov    $0x0,%al
call   1050 <test_vector_addpop@plt>
mov    $0x0,%al
call   1030 <test_vector_sort@plt>
lea    0xe65(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
xor    %eax,%eax
call   1070 <test_vector_initfree@plt>
xor    %eax,%eax
call   1050 <test_vector_addpop@plt>
xor    %eax,%eax
call   1040 <test_vector_sort@plt>
lea    0xe75(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"All tests passed. Vector.(c|h) is ready for use.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @time(i32* null)
%3 = call i32 @srand(i32 %2)
%4 = call i32 (...) @test_vector_initfree()
%5 = call i32 (...) @test_vector_addpop()
%6 = call i32 (...) @test_vector_sort()
%7 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [49 x i8] c"All tests passed. Vector.(c|h) is ready for use.\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @test_vector_initfree()
%4 = tail call i32 (...) @test_vector_addpop()
%5 = tail call i32 (...) @test_vector_sort()
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ videoram_putc(char const);
void videoram_put(const char *s) {
  for (; *s; ++s) {
    videoram_putc(*s);
  }
}


x86 assembly (clang, -O0):
<videoram_put>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <videoram_put+0x36>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <videoram_putc@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <videoram_put+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<videoram_put>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <videoram_put+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <videoram_putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <videoram_put+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @videoram_put(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @videoram_putc(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int stat(char const *, struct stat *);
int chkFileExist(const char *filename) {
  struct stat st;
  int result = stat(filename, &st);
  return (result == 0);
}


x86 assembly (clang, -O0):
<chkFileExist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chkFileExist>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @chkFileExist(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @stat(i8* %5, %struct.stat* %3)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @chkFileExist(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void help() {
  printf("ceeqlib.c\nVersion %f\nCopyright Rob Edwards\n\n", 0.1);
  printf("Usage: fastq2fasta_sorted [fastq file]\n\n");
  printf("    Convert to fasta and print the sequences in sorted "
         "(alphanumeric) order\n");
  exit(0);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xedd(%rip),%rdi
movsd  0xecd(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xed0(%rip),%rdi
movsd  0xec0(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xee7(%rip),%rdi
call   1030 <puts@plt>
lea    0xf03(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"ceeqlib.c\0AVersion %f\0ACopyright Rob Edwards\0A\0A\00"
@.str.1 = [41 x i8] c"Usage: fastq2fasta_sorted [fastq file]\0A\0A\00"
@.str.2 = [77 x i8] c" Convert to fasta and print the sequences in sorted (alphanumeric) order\0A\00"
define void @help() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), double 1.000000e-01)
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [45 x i8] c"ceeqlib.c\0AVersion %f\0ACopyright Rob Edwards\0A\0A\00"
@str = [40 x i8] c"Usage: fastq2fasta_sorted [fastq file]\0A\00"
@str.3 = [76 x i8] c" Convert to fasta and print the sequences in sorted (alphanumeric) order\00"
define void @help() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), double 1.000000e-01)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.3, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ WaitLine(int);
void WaitVBlank(void) { WaitLine(303); }


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

x86 assembly (clang, -O2):
<WaitVBlank>:
mov    $0x12f,%edi
jmp    1030 <WaitLine@plt>

LLVM IR (-O0):
define void @WaitVBlank() {
%1 = call i32 @WaitLine(i32 303)
ret void
}

LLVM IR (-O2):
define void @WaitVBlank() {
%1 = tail call i32 @WaitLine(i32 303)
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int compare_names(const void *a, const void *b) {
  char **sa = (char **)a;
  char **sb = (char **)b;
  return strcmp(*sa, *sb);
}


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

x86 assembly (clang, -O2):
<compare_names>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @compare_names(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %6)
ret i32 %7
}
void iostrm_dtor(struct io_stream *stream) { (void)stream; }


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

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

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

LLVM IR (-O2):
%struct.io_stream = type opaque
define void @iostrm_dtor(%struct.io_stream* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo();
void call(void) { foo(); }


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

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

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

LLVM IR (-O2):
define void @call() {
%1 = tail call i32 (...) @foo()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pthread_yield();
void *yield(void *arg) {
  int i, *count;
  count = (int *)arg;
  for (i = 0; i < *count; i++) {
    pthread_yield();
  }
  return (NULL);
}


x86 assembly (clang, -O0):
<yield>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    114f <yield+0x3f>
mov    $0x0,%al
call   1030 <pthread_yield@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112b <yield+0x1b>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yield>:
push   %rbp
push   %rbx
push   %rax
cmpl   $0x0,(%rdi)
jle    112e <yield+0x1e>
mov    %rdi,%rbx
xor    %ebp,%ebp
nopl   (%rax)
xor    %eax,%eax
call   1030 <pthread_yield@plt>
add    $0x1,%ebp
cmp    (%rbx),%ebp
jl     1120 <yield+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @yield(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to i32*
store i32* %6, i32** %4
store i32 0, i32* %3
br label %7
7: ; preds = %14, %1
%8 = load i32, i32* %3
%9 = load i32*, i32** %4
%10 = load i32, i32* %9
%11 = icmp slt i32 %8, %10
br i1 %11, label %12, label %17
12: ; preds = %7
%13 = call i32 (...) @pthread_yield()
br label %14
14: ; preds = %12
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %7
17: ; preds = %7
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @yield(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %1, %5
%6 = phi i32 [ %8, %5 ], [ 0, %1 ]
%7 = tail call i32 (...) @pthread_yield()
%8 = add nuw nsw i32 %6, 1
%9 = load i32, i32* %2
%10 = icmp slt i32 %8, %9
br i1 %10, label %5, label %11
11: ; preds = %5, %1
ret i8* null
}
void dfn_rv() { return; }


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

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

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

LLVM IR (-O2):
define void @dfn_rv() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __gmpf_dump(int /*<<< orphan*/);
int /*<<< orphan*/ __gmpz_dump(int /*<<< orphan*/);
void debug_foo() {
  if (0) {
    __gmpz_dump(0);
    __gmpf_dump(0);
  }
}


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

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

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

LLVM IR (-O2):
define void @debug_foo() {
ret void
}
char semver_num_cmp(int self, int other) {
  if (self > other) {
    return 1;
  }
  if (self < other) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<semver_num_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    111f <semver_num_cmp+0x1f>
movb   $0x1,-0x1(%rbp)
jmp    1138 <semver_num_cmp+0x38>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1134 <semver_num_cmp+0x34>
movb   $0xff,-0x1(%rbp)
jmp    1138 <semver_num_cmp+0x38>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<semver_num_cmp>:
cmp    %esi,%edi
setl   %al
neg    %al
cmp    %esi,%edi
movzbl %al,%ecx
mov    $0x1,%eax
cmovle %ecx,%eax
ret

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

LLVM IR (-O2):
define signext i8 @semver_num_cmp(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = icmp slt i32 %0, %1
%5 = sext i1 %4 to i8
%6 = select i1 %3, i8 1, i8 %5
ret i8 %6
}
int Compare(const void *A, const void *B) {
  int a = *(int *)A;
  int b = *(int *)B;
  return (a >= b) - (a <= b);
}


x86 assembly (clang, -O0):
<Compare>:
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),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
setge  %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x14(%rbp),%ecx
cmp    -0x18(%rbp),%ecx
setle  %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Compare>:
mov    (%rdi),%ecx
xor    %eax,%eax
xor    %edx,%edx
cmp    (%rsi),%ecx
setge  %al
setle  %dl
sub    %edx,%eax
ret

LLVM IR (-O0):
define i32 @Compare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
%9 = load i32, i32* %8
store i32 %9, i32* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i32*
%12 = load i32, i32* %11
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = icmp sge i32 %13, %14
%16 = zext i1 %15 to i32
%17 = load i32, i32* %5
%18 = load i32, i32* %6
%19 = icmp sle i32 %17, %18
%20 = zext i1 %19 to i32
%21 = sub nsw i32 %16, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @Compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp sge i32 %4, %6
%8 = zext i1 %7 to i32
%9 = icmp sle i32 %4, %6
%10 = sext i1 %9 to i32
%11 = add nsw i32 %10, %8
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int, char *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void report_error(int fd, char *func) {
  fprintf(stderr, "%s. fd %d (%s)\r\n", strerror(errno), fd, func);
}


x86 assembly (clang, -O0):
<report_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x14(%rbp),%edi
mov    %rax,%rdx
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%r8
lea    0xea3(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<report_error>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %edi,%ebp
mov    0x2eb0(%rip),%rax
mov    (%rax),%ebx
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
lea    0xeb9(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
mov    %ebp,%ecx
mov    %r14,%r8
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"%s. fd %d (%s)\0D\0A\00"
@errno = global i32 0
define void @report_error(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i32, i32* @errno
%7 = call i8* @strerror(i32 %6)
%8 = load i32, i32* %3
%9 = load i8*, i8** %4
%10 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8, i8* %9)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"%s. fd %d (%s)\0D\0A\00"
@errno = global i32 0
define void @report_error(i32 %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = load i32, i32* @errno
%5 = tail call i8* @strerror(i32 %4)
%6 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %0, i8* %1)
ret void
}
/* Variables and functions */
double __builtin_copysign(double, double);
double bar(double, double);
double f13(double x) {
  double tmp1 = 7.5;
  double tmp2 = __builtin_copysign(2.0, x);
  return bar(tmp1 * tmp2, tmp2);
}


x86 assembly (clang, -O0):
<f13>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xefb(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movaps 0xeca(%rip),%xmm1
pand   %xmm1,%xmm0
movaps 0xecf(%rip),%xmm1
por    %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1030 <bar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f13>:
andpd  0xee8(%rip),%xmm0
orpd   0xef0(%rip),%xmm0
movapd %xmm0,%xmm2
mulsd  0xef4(%rip),%xmm2
movapd %xmm0,%xmm1
movapd %xmm2,%xmm0
jmp    1030 <bar@plt>

LLVM IR (-O0):
define double @f13(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
store double 7.500000e+00, double* %3
%5 = load double, double* %2
%6 = call double @llvm.copysign.f64(double 2.000000e+00, double %5)
store double %6, double* %4
%7 = load double, double* %3
%8 = load double, double* %4
%9 = fmul double %7, %8
%10 = load double, double* %4
%11 = call double @bar(double %9, double %10)
ret double %11
}

LLVM IR (-O2):
define double @f13(double %0) {
%2 = tail call double @llvm.copysign.f64(double 2.000000e+00, double %0)
%3 = fmul double %2, 7.500000e+00
%4 = tail call double @bar(double %3, double %2)
ret double %4
}
float gg_normalize_float(float x, float a) { return a * ((int)(0.5 + x / a)); }


x86 assembly (clang, -O0):
<gg_normalize_float>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
divss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xed7(%rip),%xmm1
addsd  %xmm2,%xmm1
cvttsd2si %xmm1,%eax
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<gg_normalize_float>:
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0xef0(%rip),%xmm0
cvttpd2dq %xmm0,%xmm0
cvtdq2ps %xmm0,%xmm0
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @gg_normalize_float(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %4
%6 = load float, float* %3
%7 = load float, float* %4
%8 = fdiv float %6, %7
%9 = fpext float %8 to double
%10 = fadd double 5.000000e-01, %9
%11 = fptosi double %10 to i32
%12 = sitofp i32 %11 to float
%13 = fmul float %5, %12
ret float %13
}

LLVM IR (-O2):
define float @gg_normalize_float(float %0, float %1) {
%3 = fdiv float %0, %1
%4 = fpext float %3 to double
%5 = fadd double %4, 5.000000e-01
%6 = fptosi double %5 to i32
%7 = sitofp i32 %6 to float
%8 = fmul float %7, %1
ret float %8
}
/* Variables and functions */
unsigned int _bzhi_u32(unsigned int, int);
unsigned int f6(unsigned int x) { return _bzhi_u32(x, 31); }


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

x86 assembly (clang, -O2):
<f6>:
mov    $0x1f,%esi
jmp    1030 <_bzhi_u32@plt>

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

LLVM IR (-O2):
define i32 @f6(i32 %0) {
%2 = tail call i32 @_bzhi_u32(i32 %0, i32 31)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ gmvwrite_node_data_lstruct(char *, char *, char *, char *,
                                              char *, char *);
void fgmvwrite_node_data_lstruct_(char *nxv, char *nyv, char *nzv, char *x,
                                  char *y, char *z) {
  gmvwrite_node_data_lstruct(nxv, nyv, nzv, x, y, z);
}


x86 assembly (clang, -O0):
<fgmvwrite_node_data_lstruct_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1030 <gmvwrite_node_data_lstruct@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgmvwrite_node_data_lstruct_>:
jmp    1030 <gmvwrite_node_data_lstruct@plt>

LLVM IR (-O0):
define void @fgmvwrite_node_data_lstruct_(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
store i8* %0, i8** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i8* %5, i8** %12
%13 = load i8*, i8** %7
%14 = load i8*, i8** %8
%15 = load i8*, i8** %9
%16 = load i8*, i8** %10
%17 = load i8*, i8** %11
%18 = load i8*, i8** %12
%19 = call i32 @gmvwrite_node_data_lstruct(i8* %13, i8* %14, i8* %15, i8* %16, i8* %17, i8* %18)
ret void
}

LLVM IR (-O2):
define void @fgmvwrite_node_data_lstruct_(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5) {
%7 = tail call i32 @gmvwrite_node_data_lstruct(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5)
ret void
}
/* Variables and functions */
int gcd(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", gcd(16, 24));
  printf("%d\n", gcd(17, 31));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10,%edi
mov    $0x18,%esi
call   1040 <gcd@plt>
mov    %eax,%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    $0x11,%edi
mov    $0x1f,%esi
call   1040 <gcd@plt>
mov    %eax,%esi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x10,%edi
mov    $0x18,%esi
call   1040 <gcd@plt>
lea    0xec9(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x11,%edi
mov    $0x1f,%esi
call   1040 <gcd@plt>
mov    %rbx,%rdi
mov    %eax,%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 = call i32 @gcd(i32 16, i32 24)
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 @gcd(i32 17, i32 31)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @gcd(i32 16, i32 24)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @gcd(i32 17, i32 31)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
float exp(double);
float powf(float, float);
float f(float x, float y) {
  float e, f;
  e = exp(1.0);
  f = powf(e, x) / (x * x + y * y - 1);
  return f;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movsd  0xece(%rip),%xmm0
call   1040 <exp@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
call   1030 <powf@plt>
movss  -0x4(%rbp),%xmm1
movss  -0x4(%rbp),%xmm3
movss  -0x8(%rbp),%xmm2
mulss  -0x8(%rbp),%xmm2
mulss  %xmm3,%xmm1
addss  %xmm2,%xmm1
movss  0xe89(%rip),%xmm2
subss  %xmm2,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
movsd  0xecc(%rip),%xmm0
call   1040 <exp@plt>
movss  (%rsp),%xmm1
call   1030 <powf@plt>
movss  0x4(%rsp),%xmm2
mulss  %xmm2,%xmm2
movss  (%rsp),%xmm1
mulss  %xmm1,%xmm1
addss  %xmm2,%xmm1
addss  0xea6(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @f(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %3
store float %1, float* %4
%7 = call float @exp(double 1.000000e+00)
store float %7, float* %5
%8 = load float, float* %5
%9 = load float, float* %3
%10 = call float @powf(float %8, float %9)
%11 = load float, float* %3
%12 = load float, float* %3
%13 = load float, float* %4
%14 = load float, float* %4
%15 = fmul float %13, %14
%16 = call float @llvm.fmuladd.f32(float %11, float %12, float %15)
%17 = fsub float %16, 1.000000e+00
%18 = fdiv float %10, %17
store float %18, float* %6
%19 = load float, float* %6
ret float %19
}

LLVM IR (-O2):
define float @f(float %0, float %1) {
%3 = tail call float @exp(double 1.000000e+00)
%4 = tail call float @powf(float %3, float %0)
%5 = fmul float %1, %1
%6 = tail call float @llvm.fmuladd.f32(float %0, float %0, float %5)
%7 = fadd float %6, -1.000000e+00
%8 = fdiv float %4, %7
ret float %8
}
reg0imm1(r0, r1, x0, x1, p0, p1) unsigned char r0, r1;
unsigned char *p0, *p1;
{
  if (r0 <= 33)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<reg0imm1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x21,%eax
jg     1137 <reg0imm1+0x37>
movl   $0x1,-0x4(%rbp)
jmp    113e <reg0imm1+0x3e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg0imm1>:
and    $0xfe,%edi
xor    %eax,%eax
cmp    $0x22,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @reg0imm1(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i8* %5) {
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8*
%14 = trunc i32 %0 to i8
%15 = trunc i32 %1 to i8
store i8 %14, i8* %8
store i8 %15, i8* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i8* %5, i8** %13
%16 = load i8, i8* %8
%17 = zext i8 %16 to i32
%18 = icmp sle i32 %17, 33
br i1 %18, label %19, label %20
19: ; preds = %6
store i32 1, i32* %7
br label %21
20: ; preds = %6
store i32 0, i32* %7
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %7
ret i32 %22
}

LLVM IR (-O2):
define i32 @reg0imm1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture readnone %5) {
%7 = and i32 %0, 254
%8 = icmp ult i32 %7, 34
%9 = zext i1 %8 to i32
ret i32 %9
}
signed long decode_zig_zag32(unsigned long n) { return (n >> 1) ^ -(n & 1); }


x86 assembly (clang, -O0):
<decode_zig_zag32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
mov    -0x8(%rbp),%rdx
and    $0x1,%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
xor    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_zig_zag32>:
mov    %rdi,%rax
shr    %rax
and    $0x1,%edi
neg    %rdi
xor    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @decode_zig_zag32(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 1
%5 = load i64, i64* %2
%6 = and i64 %5, 1
%7 = sub i64 0, %6
%8 = xor i64 %4, %7
ret i64 %8
}

LLVM IR (-O2):
define i64 @decode_zig_zag32(i64 %0) {
%2 = lshr i64 %0, 1
%3 = and i64 %0, 1
%4 = sub nsw i64 0, %3
%5 = xor i64 %2, %4
ret i64 %5
}
void STAMR3Snapshot(void) {}


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

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

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

LLVM IR (-O2):
define void @STAMR3Snapshot() {
ret void
}
adr0imm1_set(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{ (*((int *)10000000)) = 33; }


x86 assembly (clang, -O0):
<adr0imm1_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    $0x989680,%eax
movl   $0x21,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adr0imm1_set>:
movl   $0x21,0x989680
ret

LLVM IR (-O0):
define i32 @adr0imm1_set(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
store i32 33, i32* inttoptr (i64 10000000 to i32*)
%14 = load i32, i32* %7
ret i32 %14
}

LLVM IR (-O2):
define i32 @adr0imm1_set(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture readnone %5) {
store i32 33, i32* inttoptr (i64 10000000 to i32*)
ret i32 undef
}
/* Variables and functions */
int f(int, int);
main() { return f(1, 2); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%edi
mov    $0x2,%esi
jmp    1030 <f@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 1, i32 2)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void function(void) {
  static int x = 1, y = -1;
  int z = 11;
  ++x, --y;
  printf("x"
         " = %d\n",
         (x));
  printf("y"
         " = %d\n",
         (y));
  printf("z"
         " = %d\n",
         (z));
}


x86 assembly (clang, -O0):
<function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xb,-0x4(%rbp)
mov    0x2f03(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2efa(%rip)
mov    0x2ef8(%rip),%eax
add    $0xffffffff,%eax
mov    %eax,0x2eef(%rip)
mov    0x2ee5(%rip),%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ed7(%rip),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<function>:
push   %rax
mov    0x2f11(%rip),%esi
add    $0x1,%esi
mov    %esi,0x2f08(%rip)
addl   $0xffffffff,0x2f05(%rip)
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ef3(%rip),%esi
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
lea    0xec4(%rip),%rdi
mov    $0xb,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@function.x = internal global i32 1
@function.y = internal global i32 -1
@.str = [8 x i8] c"x = %d\0A\00"
@.str.1 = [8 x i8] c"y = %d\0A\00"
@.str.2 = [8 x i8] c"z = %d\0A\00"
define void @function() {
%1 = alloca i32
store i32 11, i32* %1
%2 = load i32, i32* @function.x
%3 = add nsw i32 %2, 1
store i32 %3, i32* @function.x
%4 = load i32, i32* @function.y
%5 = add nsw i32 %4, -1
store i32 %5, i32* @function.y
%6 = load i32, i32* @function.x
%7 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @function.y
%9 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %1
%11 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret void
}

LLVM IR (-O2):
@function.x = internal unnamed_addr global i32 1
@function.y = internal unnamed_addr global i32 -1
@.str = [8 x i8] c"x = %d\0A\00"
@.str.1 = [8 x i8] c"y = %d\0A\00"
@.str.2 = [8 x i8] c"z = %d\0A\00"
define void @function() {
%1 = load i32, i32* @function.x
%2 = add nsw i32 %1, 1
store i32 %2, i32* @function.x
%3 = load i32, i32* @function.y
%4 = add nsw i32 %3, -1
store i32 %4, i32* @function.y
%5 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %2)
%6 = load i32, i32* @function.y
%7 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 11)
ret void
}
void gtk_ruler_get_range() {}


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

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

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

LLVM IR (-O2):
define void @gtk_ruler_get_range() {
ret void
}
/* Variables and functions */
int partition(int *, int, int);
void quick_sort(int *A, int p, int r) {
  if (p < r) {
    int q = partition(A, p, r);
    quick_sort(A, p, q - 1);
    quick_sort(A, q + 1, r);
  }
}


x86 assembly (clang, -O0):
<quick_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1174 <quick_sort+0x54>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <partition@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1040 <quick_sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <quick_sort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quick_sort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1166 <quick_sort+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <partition@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1040 <quick_sort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <quick_sort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @quick_sort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @partition(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @quick_sort(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void main() {
  int i = 1;
  do {
    printf("%d \n", i);
    i++;
  } while (i <= 50);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x32,-0x4(%rbp)
jle    111f <main+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x33,%ebx
jne    1120 <main+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d \0A\00"
define void @main() {
%1 = alloca i32
store i32 1, i32* %1
br label %2
2: ; preds = %7, %0
%3 = load i32, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %1
%6 = add nsw i32 %5, 1
store i32 %6, i32* %1
br label %7
7: ; preds = %2
%8 = load i32, i32* %1
%9 = icmp sle i32 %8, 50
br i1 %9, label %2, label %10
10: ; preds = %7
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d \0A\00"
define void @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 1, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 51
br i1 %5, label %6, label %1
6: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ intif_guild_castle_dataload(int, int);
void guild_castledataload(int castle_id, int idx) {
  intif_guild_castle_dataload(castle_id, idx);
  return;
}


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

x86 assembly (clang, -O2):
<guild_castledataload>:
jmp    1030 <intif_guild_castle_dataload@plt>

LLVM IR (-O0):
define void @guild_castledataload(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 @intif_guild_castle_dataload(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @guild_castledataload(i32 %0, i32 %1) {
%3 = tail call i32 @intif_guild_castle_dataload(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void endElementHandler_APD(void *userData, const char *name) {
  strcpy((char *)userData, "");
}


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

x86 assembly (clang, -O2):
<endElementHandler_APD>:
lea    0xee9(%rip),%rsi
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @endElementHandler_APD(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 @strcpy(i8* %5, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @endElementHandler_APD(i8* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}