xunge/DecIR huggingface dataset:
const char *machine_format_cpu_pct(struct sysinfo *si) {
  (void)si;
  return "xyz??";
}


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

x86 assembly (clang, -O2):
<machine_format_cpu_pct>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
%struct.sysinfo = type opaque
@.str = [6 x i8] c"xyz??\00"
define i8* @machine_format_cpu_pct(%struct.sysinfo* %0) {
%2 = alloca %struct.sysinfo*
store %struct.sysinfo* %0, %struct.sysinfo** %2
%3 = load %struct.sysinfo*, %struct.sysinfo** %2
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.sysinfo = type opaque
@.str = [6 x i8] c"xyz??\00"
define i8* @machine_format_cpu_pct(%struct.sysinfo* nocapture readnone %0) {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
__attribute__((always_)) long work_on_cpu(unsigned int cpu, long (*fn)(void *),
                                          void *arg) {
  return fn(arg);
}


x86 assembly (clang, -O0):
<work_on_cpu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rdi
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<work_on_cpu>:
mov    %rdx,%rdi
jmp    *%rsi

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

LLVM IR (-O2):
define i64 @work_on_cpu(i32 %0, i64 (i8*)* nocapture %1, i8* %2) {
%4 = tail call i64 %1(i8* %2)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test_func() { printf("OK\n"); }


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

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

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

LLVM IR (-O2):
@str = [3 x i8] c"OK\00"
define void @test_func() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar3(int *, int /*<<< orphan*/);
int /*<<< orphan*/ fillhepta();
int /*<<< orphan*/ fillhexa();
int /*<<< orphan*/ fillocta();
int /*<<< orphan*/ fillpenta();
int /*<<< orphan*/ fillsquare();
int /*<<< orphan*/ filltri();
int main(int argc, char *argv[]) {
  filltri();
  fillsquare();
  fillpenta();
  fillhexa();
  fillhepta();
  fillocta();
  int NUMS[6];
  bar3(NUMS, 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1090 <filltri@plt>
mov    $0x0,%al
call   1050 <fillsquare@plt>
mov    $0x0,%al
call   1030 <fillpenta@plt>
mov    $0x0,%al
call   1060 <fillhexa@plt>
mov    $0x0,%al
call   1080 <fillhepta@plt>
mov    $0x0,%al
call   1040 <fillocta@plt>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
call   1070 <bar3@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
xor    %eax,%eax
call   1090 <filltri@plt>
xor    %eax,%eax
call   1050 <fillsquare@plt>
xor    %eax,%eax
call   1030 <fillpenta@plt>
xor    %eax,%eax
call   1060 <fillhexa@plt>
xor    %eax,%eax
call   1080 <fillhepta@plt>
xor    %eax,%eax
call   1040 <fillocta@plt>
mov    %rsp,%rdi
xor    %esi,%esi
call   1070 <bar3@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [6 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @filltri()
%8 = call i32 (...) @fillsquare()
%9 = call i32 (...) @fillpenta()
%10 = call i32 (...) @fillhexa()
%11 = call i32 (...) @fillhepta()
%12 = call i32 (...) @fillocta()
%13 = getelementptr inbounds [6 x i32], [6 x i32]* %6, i64 0, i64 0
%14 = call i32 @bar3(i32* %13, i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [6 x i32]
%4 = tail call i32 (...) @filltri()
%5 = tail call i32 (...) @fillsquare()
%6 = tail call i32 (...) @fillpenta()
%7 = tail call i32 (...) @fillhexa()
%8 = tail call i32 (...) @fillhepta()
%9 = tail call i32 (...) @fillocta()
%10 = bitcast [6 x i32]* %3 to i8*
%11 = getelementptr inbounds [6 x i32], [6 x i32]* %3, i64 0, i64 0
%12 = call i32 @bar3(i32* %11, i32 0)
ret i32 0
}
void fakeTimer16UserIRQRoutine() {}


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

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

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

LLVM IR (-O2):
define void @fakeTimer16UserIRQRoutine() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hello();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Test\n");
  hello();
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"Test\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @hello()
ret i32 0
}
void verifyInetVariable(int *port, int *listenNum) {
  if (*port <= 0) {
    *port = 9000;
  } else {
  }
  if (*listenNum <= 0) {
    *listenNum = 5;
  } else {
  }
}


x86 assembly (clang, -O0):
<verifyInetVariable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
jg     1128 <verifyInetVariable+0x28>
mov    -0x8(%rbp),%rax
movl   $0x2328,(%rax)
jmp    112d <verifyInetVariable+0x2d>
jmp    112d <verifyInetVariable+0x2d>
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jg     1149 <verifyInetVariable+0x49>
mov    -0x10(%rbp),%rax
movl   $0x5,(%rax)
jmp    114e <verifyInetVariable+0x4e>
jmp    114e <verifyInetVariable+0x4e>
pop    %rbp
ret

x86 assembly (clang, -O2):
<verifyInetVariable>:
cmpl   $0x0,(%rdi)
jle    110b <verifyInetVariable+0xb>
cmpl   $0x0,(%rsi)
jle    1116 <verifyInetVariable+0x16>
ret
movl   $0x2328,(%rdi)
cmpl   $0x0,(%rsi)
jg     110a <verifyInetVariable+0xa>
movl   $0x5,(%rsi)
ret

LLVM IR (-O0):
define void @verifyInetVariable(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* %5
%7 = icmp sle i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32*, i32** %3
store i32 9000, i32* %9
br label %11
10: ; preds = %2
br label %11
11: ; preds = %10, %8
%12 = load i32*, i32** %4
%13 = load i32, i32* %12
%14 = icmp sle i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = load i32*, i32** %4
store i32 5, i32* %16
br label %18
17: ; preds = %11
br label %18
18: ; preds = %17, %15
ret void
}

LLVM IR (-O2):
define void @verifyInetVariable(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = icmp slt i32 %3, 1
br i1 %4, label %5, label %6
5: ; preds = %2
store i32 9000, i32* %0
br label %6
6: ; preds = %2, %5
%7 = load i32, i32* %1
%8 = icmp slt i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 5, i32* %1
br label %10
10: ; preds = %6, %9
ret void
}
/* Type definitions */
typedef int uid_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
uid_t getuid(void) {
  printf("Checking GUID");
  return 1005;
}


x86 assembly (clang, -O0):
<getuid>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x3ed,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [14 x i8] c"Checking GUID\00"
define i32 @getuid() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 1005
}

LLVM IR (-O2):
@.str = [14 x i8] c"Checking GUID\00"
define i32 @getuid() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 1005
}
/* Type definitions */
typedef int volatile uint32_t;

/* Variables and functions */
uint32_t EEPROMBlockLock(uint32_t ui32Block) {
  ;
  (*((volatile uint32_t *)(0x400AF004))) = ui32Block;
  (*((volatile uint32_t *)(0x400AF020))) = 0xFFFFFFFF;
  return ((*((volatile uint32_t *)(0x400AF020))));
}


x86 assembly (clang, -O0):
<EEPROMBlockLock>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x400af004,%eax
mov    %ecx,(%rax)
mov    $0x400af020,%eax
movl   $0xffffffff,(%rax)
mov    $0x400af020,%eax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<EEPROMBlockLock>:
mov    %edi,-0x4(%rsp)
mov    -0x4(%rsp),%eax
mov    %eax,0x400af004
movl   $0xffffffff,0x400af020
ff ff ff ff
mov    0x400af020,%eax
ret

LLVM IR (-O0):
define i32 @EEPROMBlockLock(i32 %0) {
%2 = alloca i32
store volatile i32 %0, i32* %2
%3 = load volatile i32, i32* %2
store volatile i32 %3, i32* inttoptr (i64 1074458628 to i32*)
store volatile i32 -1, i32* inttoptr (i64 1074458656 to i32*)
%4 = load volatile i32, i32* inttoptr (i64 1074458656 to i32*)
ret i32 %4
}

LLVM IR (-O2):
define i32 @EEPROMBlockLock(i32 %0) {
%2 = alloca i32
store volatile i32 %0, i32* %2
%3 = load volatile i32, i32* %2
store volatile i32 %3, i32* inttoptr (i64 1074458628 to i32*)
store volatile i32 -1, i32* inttoptr (i64 1074458656 to i32*)
%4 = load volatile i32, i32* inttoptr (i64 1074458656 to i32*)
ret i32 %4
}
/* Type definitions */
struct mloop_work {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct mloop_work *);
int /*<<< orphan*/ mloop__free_context(struct mloop_work *);
__attribute__((visibility("default"))) void
mloop_work_free(struct mloop_work *self) {
  mloop__free_context(self);
  free(self);
}


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

x86 assembly (clang, -O2):
<mloop_work_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <mloop__free_context@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.mloop_work = type { i32 }
define void @mloop_work_free(%struct.mloop_work* %0) {
%2 = alloca %struct.mloop_work*
store %struct.mloop_work* %0, %struct.mloop_work** %2
%3 = load %struct.mloop_work*, %struct.mloop_work** %2
%4 = call i32 @mloop__free_context(%struct.mloop_work* %3)
%5 = load %struct.mloop_work*, %struct.mloop_work** %2
%6 = call i32 @free(%struct.mloop_work* %5)
ret void
}

LLVM IR (-O2):
%struct.mloop_work = type { i32 }
define void @mloop_work_free(%struct.mloop_work* %0) {
%2 = tail call i32 @mloop__free_context(%struct.mloop_work* %0)
%3 = tail call i32 @free(%struct.mloop_work* %0)
ret void
}
void gtk_file_chooser_button_new_with_dialog() {}


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

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

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

LLVM IR (-O2):
define void @gtk_file_chooser_button_new_with_dialog() {
ret void
}
char *corta_string(char *apuntador) {
  char *error = "Error";
  apuntador = apuntador + 1;
  if (*apuntador != 0)
    return apuntador;
  else
    return error;
}


x86 assembly (clang, -O0):
<corta_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
lea    0xef1(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     113c <corta_string+0x3c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1144 <corta_string+0x44>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<corta_string>:
cmpb   $0x0,0x1(%rdi)
lea    0x1(%rdi),%rcx
lea    0xef1(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"Error\00"
define i8* @corta_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 1
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = load i8*, i8** %3
store i8* %12, i8** %2
br label %15
13: ; preds = %1
%14 = load i8*, i8** %4
store i8* %14, i8** %2
br label %15
15: ; preds = %13, %11
%16 = load i8*, i8** %2
ret i8* %16
}

LLVM IR (-O2):
@.str = [6 x i8] c"Error\00"
define i8* @corta_string(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %2
ret i8* %5
}
double speed_of_sound(double p, double rho, double gamma) {
  return gamma * p / rho;
}


x86 assembly (clang, -O0):
<speed_of_sound>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<speed_of_sound>:
mulsd  %xmm2,%xmm0
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @speed_of_sound(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* %6
%8 = load double, double* %4
%9 = fmul double %7, %8
%10 = load double, double* %5
%11 = fdiv double %9, %10
ret double %11
}

LLVM IR (-O2):
define double @speed_of_sound(double %0, double %1, double %2) {
%4 = fmul double %0, %2
%5 = fdiv double %4, %1
ret double %5
}
unsigned int spdif_swab_u32(unsigned int i) {
  return (i >> 24) | (i >> 8) & 0xff00 | (i << 8) & 0xff0000 | (i << 24);
}


x86 assembly (clang, -O0):
<spdif_swab_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x18,%eax
mov    -0x4(%rbp),%ecx
shr    $0x8,%ecx
and    $0xff00,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
and    $0xff0000,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<spdif_swab_u32>:
mov    %edi,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @spdif_swab_u32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 24
%5 = load i32, i32* %2
%6 = lshr i32 %5, 8
%7 = and i32 %6, 65280
%8 = or i32 %4, %7
%9 = load i32, i32* %2
%10 = shl i32 %9, 8
%11 = and i32 %10, 16711680
%12 = or i32 %8, %11
%13 = load i32, i32* %2
%14 = shl i32 %13, 24
%15 = or i32 %12, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @spdif_swab_u32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cWriteByte(unsigned char, unsigned char);
void SensorSetReg_MC501CB(unsigned short uAddr, unsigned short uVal) {
  VIM_SIF_I2cWriteByte((unsigned char)uAddr, (unsigned char)uVal);
}


x86 assembly (clang, -O0):
<SensorSetReg_MC501CB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x2(%rbp),%ax
mov    %al,%cl
mov    -0x4(%rbp),%ax
movzbl %cl,%edi
movzbl %al,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SensorSetReg_MC501CB>:
movzbl %dil,%edi
movzbl %sil,%esi
jmp    1030 <VIM_SIF_I2cWriteByte@plt>

LLVM IR (-O0):
define void @SensorSetReg_MC501CB(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = trunc i16 %5 to i8
%7 = load i16, i16* %4
%8 = trunc i16 %7 to i8
%9 = call i32 @VIM_SIF_I2cWriteByte(i8 zeroext %6, i8 zeroext %8)
ret void
}

LLVM IR (-O2):
define void @SensorSetReg_MC501CB(i16 zeroext %0, i16 zeroext %1) {
%3 = trunc i16 %0 to i8
%4 = trunc i16 %1 to i8
%5 = tail call i32 @VIM_SIF_I2cWriteByte(i8 zeroext %3, i8 zeroext %4)
ret void
}
/* Variables and functions */
unsigned char gf16_mul_4(unsigned char);
unsigned char gf256_mul_0x4(unsigned char a) {
  unsigned char a0 = a & 0xf;
  unsigned char a1 = (a >> 4);
  unsigned char r0 = gf16_mul_4(a0);
  unsigned char r1 = gf16_mul_4(a1);
  return r0 ^ (r1 << 4);
}


x86 assembly (clang, -O0):
<gf256_mul_0x4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xf,%eax
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x4,%eax
mov    %al,-0x3(%rbp)
movzbl -0x2(%rbp),%edi
call   1030 <gf16_mul_4@plt>
mov    %al,-0x4(%rbp)
movzbl -0x3(%rbp),%edi
call   1030 <gf16_mul_4@plt>
mov    %al,-0x5(%rbp)
movzbl -0x4(%rbp),%eax
movzbl -0x5(%rbp),%ecx
shl    $0x4,%ecx
xor    %ecx,%eax
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gf256_mul_0x4>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
shr    $0x4,%bl
and    $0xf,%edi
call   1030 <gf16_mul_4@plt>
mov    %eax,%ebp
movzbl %bl,%edi
call   1030 <gf16_mul_4@plt>
shl    $0x4,%al
xor    %bpl,%al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define zeroext i8 @gf256_mul_0x4(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i8 %0, i8* %2
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = and i32 %8, 15
%10 = trunc i32 %9 to i8
store i8 %10, i8* %3
%11 = load i8, i8* %2
%12 = zext i8 %11 to i32
%13 = ashr i32 %12, 4
%14 = trunc i32 %13 to i8
store i8 %14, i8* %4
%15 = load i8, i8* %3
%16 = call zeroext i8 @gf16_mul_4(i8 zeroext %15)
store i8 %16, i8* %5
%17 = load i8, i8* %4
%18 = call zeroext i8 @gf16_mul_4(i8 zeroext %17)
store i8 %18, i8* %6
%19 = load i8, i8* %5
%20 = zext i8 %19 to i32
%21 = load i8, i8* %6
%22 = zext i8 %21 to i32
%23 = shl i32 %22, 4
%24 = xor i32 %20, %23
%25 = trunc i32 %24 to i8
ret i8 %25
}

LLVM IR (-O2):
define zeroext i8 @gf256_mul_0x4(i8 zeroext %0) {
%2 = and i8 %0, 15
%3 = lshr i8 %0, 4
%4 = tail call zeroext i8 @gf16_mul_4(i8 zeroext %2)
%5 = tail call zeroext i8 @gf16_mul_4(i8 zeroext %3)
%6 = shl i8 %5, 4
%7 = xor i8 %6, %4
ret i8 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sig_pipe(int signo) { printf("signal handled\n"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"signal handled\0A\00"
define void @sig_pipe(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"signal handled\00"
define void @sig_pipe(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log(long);
long trunc(int /*<<< orphan*/);
long int gaussestimate(long int number) {
  return (long int)(number / trunc(log(number)));
}


x86 assembly (clang, -O0):
<gaussestimate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <log@plt>
mov    %eax,%edi
call   1030 <trunc@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cqto
idiv   %rcx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gaussestimate>:
push   %rbx
mov    %rdi,%rbx
call   1040 <log@plt>
mov    %eax,%edi
call   1030 <trunc@plt>
mov    %rax,%rcx
or     %rbx,%rax
shr    $0x20,%rax
je     1146 <gaussestimate+0x26>
mov    %rbx,%rax
cqto
idiv   %rcx
pop    %rbx
ret
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
pop    %rbx
ret

LLVM IR (-O0):
define i64 @gaussestimate(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* %2
%5 = call i32 @log(i64 %4)
%6 = call i64 @trunc(i32 %5)
%7 = sdiv i64 %3, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @gaussestimate(i64 %0) {
%2 = tail call i32 @log(i64 %0)
%3 = tail call i64 @trunc(i32 %2)
%4 = sdiv i64 %0, %3
ret i64 %4
}
int test_imm_2Euint16_reg(unsigned short val) {
  return ((val) & (-0x2E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_2Euint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffffd2,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_2Euint16_reg>:
test   $0xffd2,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_2Euint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -46
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct semaphore {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sema_init(struct semaphore *, int /*<<< orphan*/);
void init_MUTEX_LOCKED(struct semaphore *sem) { sema_init(sem, 0); }


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

x86 assembly (clang, -O2):
<init_MUTEX_LOCKED>:
xor    %esi,%esi
jmp    1030 <sema_init@plt>

LLVM IR (-O0):
%struct.semaphore = type { i32 }
define void @init_MUTEX_LOCKED(%struct.semaphore* %0) {
%2 = alloca %struct.semaphore*
store %struct.semaphore* %0, %struct.semaphore** %2
%3 = load %struct.semaphore*, %struct.semaphore** %2
%4 = call i32 @sema_init(%struct.semaphore* %3, i32 0)
ret void
}

LLVM IR (-O2):
%struct.semaphore = type { i32 }
define void @init_MUTEX_LOCKED(%struct.semaphore* %0) {
%2 = tail call i32 @sema_init(%struct.semaphore* %0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ show_float(float);
int /*<<< orphan*/ show_int(int);
void float_eg() {
  int x = 3490593;
  float f = (float)x;
  printf("For x = %d\n", x);
  show_int(x);
  show_float(f);
  x = 3510593;
  f = (float)x;
  printf("For x = %d\n", x);
  show_int(x);
  show_float(f);
}


x86 assembly (clang, -O0):
<float_eg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x354321,-0x4(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1050 <show_int@plt>
movss  -0x8(%rbp),%xmm0
call   1040 <show_float@plt>
movl   $0x359141,-0x4(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1050 <show_int@plt>
movss  -0x8(%rbp),%xmm0
call   1040 <show_float@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_eg>:
push   %rbx
lea    0xed0(%rip),%rbx
mov    %rbx,%rdi
mov    $0x354321,%esi
call   1030 <printf@plt>
mov    $0x354321,%edi
call   1050 <show_int@plt>
movss  0xea9(%rip),%xmm0
call   1040 <show_float@plt>
mov    %rbx,%rdi
mov    $0x359141,%esi
call   1030 <printf@plt>
mov    $0x359141,%edi
call   1050 <show_int@plt>
movss  0xe89(%rip),%xmm0
pop    %rbx
jmp    1040 <show_float@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"For x = %d\0A\00"
define void @float_eg() {
%1 = alloca i32
%2 = alloca float
store i32 3490593, i32* %1
%3 = load i32, i32* %1
%4 = sitofp i32 %3 to float
store float %4, float* %2
%5 = load i32, i32* %1
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %1
%8 = call i32 @show_int(i32 %7)
%9 = load float, float* %2
%10 = call i32 @show_float(float %9)
store i32 3510593, i32* %1
%11 = load i32, i32* %1
%12 = sitofp i32 %11 to float
store float %12, float* %2
%13 = load i32, i32* %1
%14 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %1
%16 = call i32 @show_int(i32 %15)
%17 = load float, float* %2
%18 = call i32 @show_float(float %17)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"For x = %d\0A\00"
define void @float_eg() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 3490593)
%2 = tail call i32 @show_int(i32 3490593)
%3 = tail call i32 @show_float(float 0x414AA19080000000)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 3510593)
%5 = tail call i32 @show_int(i32 3510593)
%6 = tail call i32 @show_float(float 0x414AC8A080000000)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_setr_pi16(short, short, short, short);
__m64 test_mm_setr_pi16(short a, short b, short c, short d) {
  return _mm_setr_pi16(a, b, c, d);
}


x86 assembly (clang, -O0):
<test_mm_setr_pi16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %cx,%ax
mov    %dx,%cx
mov    %si,%dx
mov    %di,%si
mov    %si,-0x2(%rbp)
mov    %dx,-0x4(%rbp)
mov    %cx,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    -0x2(%rbp),%dx
mov    -0x4(%rbp),%cx
mov    -0x6(%rbp),%ax
movswl %dx,%edi
movswl %cx,%esi
movswl %ax,%edx
movswl -0x8(%rbp),%ecx
call   1030 <_mm_setr_pi16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_setr_pi16>:
jmp    1030 <_mm_setr_pi16@plt>

LLVM IR (-O0):
define i32 @test_mm_setr_pi16(i16 signext %0, i16 signext %1, i16 signext %2, i16 signext %3) {
%5 = alloca i16
%6 = alloca i16
%7 = alloca i16
%8 = alloca i16
store i16 %0, i16* %5
store i16 %1, i16* %6
store i16 %2, i16* %7
store i16 %3, i16* %8
%9 = load i16, i16* %5
%10 = load i16, i16* %6
%11 = load i16, i16* %7
%12 = load i16, i16* %8
%13 = call i32 @_mm_setr_pi16(i16 signext %9, i16 signext %10, i16 signext %11, i16 signext %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @test_mm_setr_pi16(i16 signext %0, i16 signext %1, i16 signext %2, i16 signext %3) {
%5 = tail call i32 @_mm_setr_pi16(i16 signext %0, i16 signext %1, i16 signext %2, i16 signext %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ WriteCmd(unsigned char);
void OLED_SetPos(unsigned char x, unsigned char y) {
  WriteCmd(0xb0 + y);
  WriteCmd(((x & 0xf0) >> 4) | 0x10);
  WriteCmd((x & 0x0f) | 0x01);
}


x86 assembly (clang, -O0):
<OLED_SetPos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
add    $0xb0,%eax
movzbl %al,%edi
call   1030 <WriteCmd@plt>
movzbl -0x1(%rbp),%eax
and    $0xf0,%eax
sar    $0x4,%eax
or     $0x10,%eax
movzbl %al,%edi
call   1030 <WriteCmd@plt>
movzbl -0x1(%rbp),%eax
and    $0xf,%eax
or     $0x1,%eax
movzbl %al,%edi
call   1030 <WriteCmd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OLED_SetPos>:
push   %rbx
mov    %edi,%ebx
add    $0xb0,%sil
movzbl %sil,%edi
call   1030 <WriteCmd@plt>
mov    %ebx,%eax
shr    $0x4,%al
or     $0x10,%al
movzbl %al,%edi
call   1030 <WriteCmd@plt>
and    $0xe,%bl
or     $0x1,%bl
movzbl %bl,%edi
pop    %rbx
jmp    1030 <WriteCmd@plt>

LLVM IR (-O0):
define void @OLED_SetPos(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = add nsw i32 176, %6
%8 = trunc i32 %7 to i8
%9 = call i32 @WriteCmd(i8 zeroext %8)
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = and i32 %11, 240
%13 = ashr i32 %12, 4
%14 = or i32 %13, 16
%15 = trunc i32 %14 to i8
%16 = call i32 @WriteCmd(i8 zeroext %15)
%17 = load i8, i8* %3
%18 = zext i8 %17 to i32
%19 = and i32 %18, 15
%20 = or i32 %19, 1
%21 = trunc i32 %20 to i8
%22 = call i32 @WriteCmd(i8 zeroext %21)
ret void
}

LLVM IR (-O2):
define void @OLED_SetPos(i8 zeroext %0, i8 zeroext %1) {
%3 = add i8 %1, -80
%4 = tail call i32 @WriteCmd(i8 zeroext %3)
%5 = lshr i8 %0, 4
%6 = or i8 %5, 16
%7 = tail call i32 @WriteCmd(i8 zeroext %6)
%8 = and i8 %0, 14
%9 = or i8 %8, 1
%10 = tail call i32 @WriteCmd(i8 zeroext %9)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void radio_switch_complete_and_phy_end_b2b_tx(uint8_t phy_curr,
                                              uint8_t flags_curr,
                                              uint8_t phy_next,
                                              uint8_t flags_next) {}


x86 assembly (clang, -O0):
<radio_switch_complete_and_phy_end_b2b_tx>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @radio_switch_complete_and_phy_end_b2b_tx(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
ret void
}

LLVM IR (-O2):
define void @radio_switch_complete_and_phy_end_b2b_tx(i32 %0, i32 %1, i32 %2, i32 %3) {
ret void
}
double EDDlog10(double x) { return (-.434294 / x / x); }


x86 assembly (clang, -O0):
<EDDlog10>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
divsd  -0x8(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<EDDlog10>:
movsd  0xef8(%rip),%xmm1
divsd  %xmm0,%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @EDDlog10(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double -4.342940e-01, %3
%5 = load double, double* %2
%6 = fdiv double %4, %5
ret double %6
}

LLVM IR (-O2):
define double @EDDlog10(double %0) {
%2 = fdiv double -4.342940e-01, %0
%3 = fdiv double %2, %0
ret double %3
}
void opcode_e3() {}


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

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

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

LLVM IR (-O2):
define void @opcode_e3() {
ret void
}
void nmk_pinctrl_stn8815_init(const struct nmk_pinctrl_soc_data **soc) {}


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

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

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

LLVM IR (-O2):
%struct.nmk_pinctrl_soc_data = type opaque
define void @nmk_pinctrl_stn8815_init(%struct.nmk_pinctrl_soc_data** nocapture %0) {
ret void
}
void ff_hevc_put_hevc_uni_w_epel_hv32_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_epel_hv32_12_sse4() {
ret void
}
int is_cont_byte(unsigned char data) { return data >> 6 == 0x02; }


x86 assembly (clang, -O0):
<is_cont_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x6,%eax
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_cont_byte>:
and    $0xc0,%dil
xor    %eax,%eax
cmp    $0x80,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_cont_byte(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = ashr i32 %4, 6
%6 = icmp eq i32 %5, 2
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @is_cont_byte(i8 zeroext %0) {
%2 = and i8 %0, -64
%3 = icmp eq i8 %2, -128
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned short lsp_imp_byteswap_ushort(unsigned short x) {
  return (x << 8) | (x >> 8);
}


x86 assembly (clang, -O0):
<lsp_imp_byteswap_ushort>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
shl    $0x8,%eax
movzwl -0x2(%rbp),%ecx
sar    $0x8,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lsp_imp_byteswap_ushort>:
mov    %edi,%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @lsp_imp_byteswap_ushort(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = shl i32 %4, 8
%6 = load i16, i16* %2
%7 = zext i16 %6 to i32
%8 = ashr i32 %7, 8
%9 = or i32 %5, %8
%10 = trunc i32 %9 to i16
ret i16 %10
}

LLVM IR (-O2):
define zeroext i16 @lsp_imp_byteswap_ushort(i16 zeroext %0) {
%2 = tail call i16 @llvm.bswap.i16(i16 %0)
ret i16 %2
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRED_get(void) { return U_WMRCORENONE_get("U_WMRED"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRED\00"
define i32 @U_WMRED_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRED\00"
define i32 @U_WMRED_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ test();
int main() {
  test();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test()
ret i32 0
}
/* Variables and functions */
size_t fmt_float(char *, float, unsigned int);
int /*<<< orphan*/ print(char *, size_t);
void print_float(float f, unsigned precision) {
  char buf[19];
  size_t len = fmt_float(buf, f, precision);
  print(buf, len);
}


x86 assembly (clang, -O0):
<print_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
lea    -0x20(%rbp),%rdi
movss  -0x4(%rbp),%xmm0
mov    -0x8(%rbp),%esi
call   1040 <fmt_float@plt>
mov    %rax,-0x28(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1030 <print@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_float>:
push   %rbx
sub    $0x20,%rsp
mov    %edi,%esi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <fmt_float@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <print@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @print_float(float %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
%5 = alloca [19 x i8]
%6 = alloca i64
store float %0, float* %3
store i32 %1, i32* %4
%7 = getelementptr inbounds [19 x i8], [19 x i8]* %5, i64 0, i64 0
%8 = load float, float* %3
%9 = load i32, i32* %4
%10 = call i64 @fmt_float(i8* %7, float %8, i32 %9)
store i64 %10, i64* %6
%11 = getelementptr inbounds [19 x i8], [19 x i8]* %5, i64 0, i64 0
%12 = load i64, i64* %6
%13 = call i32 @print(i8* %11, i64 %12)
ret void
}

LLVM IR (-O2):
define void @print_float(float %0, i32 %1) {
%3 = alloca [19 x i8]
%4 = getelementptr inbounds [19 x i8], [19 x i8]* %3, i64 0, i64 0
%5 = call i64 @fmt_float(i8* %4, float %0, i32 %1)
%6 = call i32 @print(i8* %4, i64 %5)
ret void
}
main() {
  int *p = (__typeof(*p))0;
  (void)p;
  for (int _Alignas(long) x = 0; x; x++)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     1137 <main+0x37>
jmp    1129 <main+0x29>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    111a <main+0x1a>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int strcmp(void *, void *);
int DWC_STRCMP(void *s1, void *s2) { return strcmp(s1, s2); }


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

x86 assembly (clang, -O2):
<DWC_STRCMP>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @DWC_STRCMP(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 = load i8*, i8** %4
%7 = call i32 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @DWC_STRCMP(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int total_sum = 0;
  total_sum += 9 * (3 + 3 + 5 + 4 + 4 + 3 + 5 + 5 + 4);
  total_sum += (3 + 6 + 6 + 8 + 8 + 7 + 7 + 9 + 8 + 8);
  total_sum += 10 * (6 + 6 + 5 + 5 + 5 + 7 + 6 + 6);
  total_sum *= 10;
  total_sum += 100 * (3 + 3 + 5 + 4 + 4 + 3 + 5 + 5 + 4);
  total_sum += 900 * 7;
  total_sum += 891 * 3;
  total_sum += 11;
  printf("%d\n", total_sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x144,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x46,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1cc,%eax
mov    %eax,-0x8(%rbp)
imul   $0xa,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xe10,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x189c,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xa71,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xb,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe80(%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    $0x5284,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 324
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 70
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 460
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = mul nsw i32 %9, 10
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 3600
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 6300
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 2673
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = add nsw i32 %17, 11
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %19)
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 21124)
ret i32 0
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_add(struct list_head *, struct list_head *);
int /*<<< orphan*/ list_del(struct list_head *);
void list_move(struct list_head *list, struct list_head *head) {
  list_del(list);
  list_add(list, head);
}


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

x86 assembly (clang, -O2):
<list_move>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <list_del@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <list_add@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @list_move(%struct.list_head* %0, %struct.list_head* %1) {
%3 = alloca %struct.list_head*
%4 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %3
store %struct.list_head* %1, %struct.list_head** %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = call i32 @list_del(%struct.list_head* %5)
%7 = load %struct.list_head*, %struct.list_head** %3
%8 = load %struct.list_head*, %struct.list_head** %4
%9 = call i32 @list_add(%struct.list_head* %7, %struct.list_head* %8)
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_move(%struct.list_head* %0, %struct.list_head* %1) {
%3 = tail call i32 @list_del(%struct.list_head* %0)
%4 = tail call i32 @list_add(%struct.list_head* %0, %struct.list_head* %1)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int swap_symbols_for_dobldobl_Laurent_witness_set(int nvr, int dim) {
  int fail;
  double *c;
  fail = _ada_use_c2phc4c(820, &nvr, &dim, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<swap_symbols_for_dobldobl_Laurent_witness_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x18(%rbp),%rcx
mov    $0x334,%edi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @swap_symbols_for_dobldobl_Laurent_witness_set(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @_ada_use_c2phc4c(i32 820, i32* %3, i32* %4, double* undef, i32 0)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "usage: users\n");
  exit(1);
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"usage: users\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
int fibonacciRec(int termoFinal) {
  if (termoFinal <= 1) {
    return termoFinal;
  }
  return (fibonacciRec(termoFinal - 1) + fibonacciRec(termoFinal - 2));
}


x86 assembly (clang, -O0):
<fibonacciRec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     1130 <fibonacciRec+0x20>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <fibonacciRec+0x43>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibonacciRec@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibonacciRec@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibonacciRec>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%edi
jge    1120 <fibonacciRec+0x10>
mov    %ebx,%ecx
jmp    1144 <fibonacciRec+0x34>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0x1(%rbx),%edi
call   1030 <fibonacciRec@plt>
lea    -0x2(%rbx),%ecx
add    %eax,%ebp
cmp    $0x3,%ebx
mov    %ecx,%ebx
ja     1130 <fibonacciRec+0x20>
add    %ecx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fibonacciRec(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fibonacciRec(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %4, 4
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %9, %3 ]
%13 = phi i32 [ %0, %1 ], [ %8, %3 ]
%14 = add nsw i32 %13, %12
ret i32 %14
}
/* Variables and functions */
double pow(double, double);
double convert_it_2(double x) { return pow(x, 11.0 / 3.0); }


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

x86 assembly (clang, -O2):
<convert_it_2>:
movsd  0xee8(%rip),%xmm1
jmp    1030 <pow@plt>

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

LLVM IR (-O2):
define double @convert_it_2(double %0) {
%2 = tail call double @pow(double %0, double 0x400D555555555555)
ret double %2
}