xunge/DecIR huggingface dataset:
void obstack_1grow(void **ptr, int ch) {}


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

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

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

LLVM IR (-O2):
define void @obstack_1grow(i8** nocapture %0, i32 %1) {
ret void
}
void sort_Init(void) { return; }


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

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

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

LLVM IR (-O2):
define void @sort_Init() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ msg;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
int main(int argc, char **argv) {
  static char msg[] = "Hello, World!\n";
  write(STDOUT_FILENO, msg, sizeof(msg) - 1);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
lea    0x2ef2(%rip),%rsi
mov    $0xe,%edx
call   1030 <write@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed8(%rip),%rax
mov    (%rax),%edi
lea    0x2f07(%rip),%rsi
mov    $0xe,%edx
call   1030 <write@plt>
mov    0x2ea6(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@main.msg = internal global [15 x i8] c"Hello, World!\0A\00"
@STDOUT_FILENO = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @STDOUT_FILENO
%7 = call i32 @write(i32 %6, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @main.msg, i64 0, i64 0), i32 14)
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}

LLVM IR (-O2):
@main.msg = internal global [15 x i8] c"Hello, World!\0A\00"
@STDOUT_FILENO = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @STDOUT_FILENO
%4 = tail call i32 @write(i32 %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @main.msg, i64 0, i64 0), i32 14)
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ rc_unbindall();
int cmd_unbindall() {
  rc_unbindall();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @cmd_unbindall() {
%1 = call i32 (...) @rc_unbindall()
ret i32 0
}

LLVM IR (-O2):
define i32 @cmd_unbindall() {
%1 = tail call i32 (...) @rc_unbindall()
ret i32 0
}
/* Variables and functions */
scalar_t__ portWrite(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
int set_TemmaCometTracking(char *local_buffer) {
  char command[16];
  snprintf(command, 15, "LM%s", local_buffer);
  if (portWrite(command) < 0)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<set_TemmaCometTracking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0xf,%esi
lea    0xec0(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x20(%rbp),%rdi
call   1040 <portWrite@plt>
cmp    $0x0,%rax
jge    1164 <set_TemmaCometTracking+0x44>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <set_TemmaCometTracking+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_TemmaCometTracking>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rcx
lea    0xed1(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xf,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <portWrite@plt>
sar    $0x3f,%rax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"LM%s\00"
define i32 @set_TemmaCometTracking(i8* %0) {
%2 = alloca [16 x i8]
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 15, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i64 @portWrite(i8* %3)
%6 = ashr i64 %5, 63
%7 = trunc i64 %6 to i32
ret i32 %7
}
void RTMemEfTmpAllocNP(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMemEfTmpAllocNP() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GIC_CPUInterfaceInit();
int /*<<< orphan*/ GIC_DistInit();
void GIC_Enable(void) {
  GIC_DistInit();
  GIC_CPUInterfaceInit();
}


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

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

LLVM IR (-O0):
define void @GIC_Enable() {
%1 = call i32 (...) @GIC_DistInit()
%2 = call i32 (...) @GIC_CPUInterfaceInit()
ret void
}

LLVM IR (-O2):
define void @GIC_Enable() {
%1 = tail call i32 (...) @GIC_DistInit()
%2 = tail call i32 (...) @GIC_CPUInterfaceInit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ zero();
void one() { zero(); }


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

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

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

LLVM IR (-O2):
define void @one() {
%1 = tail call i32 (...) @zero()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void tyan_lcdm_hardware_clear(int fd) {
  char lcdcmd[5] = {0xF1, 0x70, 0x00, 0x01, 0xF2};
  write(fd, lcdcmd, 5);
}


x86 assembly (clang, -O0):
<tyan_lcdm_hardware_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0xedf(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xeda(%rip),%al
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x9(%rbp),%rsi
mov    $0x5,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tyan_lcdm_hardware_clear>:
push   %rax
movb   $0xf2,0x4(%rsp)
movl   $0x10070f1,(%rsp)
mov    %rsp,%rsi
mov    $0x5,%edx
call   1030 <write@plt>
pop    %rax
ret

LLVM IR (-O0):
@__const.tyan_lcdm_hardware_clear.lcdcmd = [5 x i8] c"\F1p\00\01\F2"
define void @tyan_lcdm_hardware_clear(i32 %0) {
%2 = alloca i32
%3 = alloca [5 x i8]
store i32 %0, i32* %2
%4 = bitcast [5 x i8]* %3 to i8*
%5 = load i32, i32* %2
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%7 = call i32 @write(i32 %5, i8* %6, i32 5)
ret void
}

LLVM IR (-O2):
@__const.tyan_lcdm_hardware_clear.lcdcmd = [5 x i8] c"\F1p\00\01\F2"
define void @tyan_lcdm_hardware_clear(i32 %0) {
%2 = alloca [5 x i8]
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%4 = call i32 @write(i32 %0, i8* %3, i32 5)
ret void
}
void txt_pitchbend(chan, msb, lsb) {
  prtime();
  printf("Pitchbend, chan=%d msb=%d lsb=%d\n", chan + 1, msb, lsb);
}


x86 assembly (clang, -O0):
<txt_pitchbend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x0,%al
call   1040 <prtime@plt>
mov    -0x4(%rbp),%esi
add    $0x1,%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<txt_pitchbend>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <prtime@plt>
add    $0x1,%ebx
lea    0xec4(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"Pitchbend, chan=%d msb=%d lsb=%d\0A\00"
define void @txt_pitchbend(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 (...) @prtime()
%8 = load i32, i32* %4
%9 = add nsw i32 %8, 1
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"Pitchbend, chan=%d msb=%d lsb=%d\0A\00"
define void @txt_pitchbend(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 (...) @prtime()
%5 = add nsw i32 %0, 1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %1, i32 %2)
ret void
}
int get_valid_base(int base) {
  int base_max;
  if (64 == 64)
    base_max = 2;
  else if (64 == 128)
    base_max = 3;
  else
    base_max = 1;
  if (base < 1 || base > base_max) {
    base = base_max;
  }
  return base;
}


x86 assembly (clang, -O0):
<get_valid_base>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jl     1124 <get_valid_base+0x24>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    112a <get_valid_base+0x2a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_valid_base>:
lea    -0x3(%rdi),%eax
cmp    $0xfffffffe,%eax
mov    $0x2,%eax
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @get_valid_base(i32 %0) {
%2 = add i32 %0, -3
%3 = icmp ult i32 %2, -2
%4 = select i1 %3, i32 2, i32 %0
ret i32 %4
}
double yardsToMillimetres(double yards) { return yards * 914.4; }


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

x86 assembly (clang, -O2):
<yardsToMillimetres>:
mulsd  0xef8(%rip),%xmm0
ret

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

LLVM IR (-O2):
define double @yardsToMillimetres(double %0) {
%2 = fmul double %0, 0x408C933333333333
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void reverse(char *s) {
  if (*s) {
    reverse(s + 1);
    printf("%c", *s);
  }
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1159 <reverse+0x39>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
call   1030 <reverse@plt>
mov    -0x8(%rbp),%rax
lea    0xeaf(%rip),%rdi
movsbl (%rax),%esi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
push   %rbx
cmpb   $0x0,(%rdi)
je     1142 <reverse+0x22>
mov    %rdi,%rbx
add    $0x1,%rdi
call   1030 <reverse@plt>
movsbl (%rbx),%esi
lea    0xec4(%rip),%rdi
pop    %rbx
jmp    1040 <printf@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @reverse(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1, %5
ret void
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %0, i64 1
tail call void @reverse(i8* %6)
%7 = load i8, i8* %0
%8 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %7)
br label %4
}
/* Variables and functions */
int run_tests(int, char **);
int main(int argc, char *argv[]) { return run_tests(argc, argv); }


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

x86 assembly (clang, -O2):
<main>:
jmp    1030 <run_tests@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @run_tests(i32 %0, i8** %1)
ret i32 %3
}
int f() { return (1 + 2) * 3 + ((4 / (2) + 6 % 3) + 7) / 10 + ((8 % 5 - 9)); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f() {
ret i32 3
}

LLVM IR (-O2):
define i32 @f() {
ret i32 3
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRAB_get(void) { return U_WMRCORENONE_get("U_WMRAB"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRAB\00"
define i32 @U_WMRAB_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_WMRAB\00"
define i32 @U_WMRAB_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
}
void foo634() {}


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

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

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

LLVM IR (-O2):
define void @foo634() {
ret void
}
/* Type definitions */
struct i8x_object {
  int dummy;
};
struct i8x_func {
  int dummy;
};

/* Variables and functions */
scalar_t__ i8x_ob_ref(struct i8x_object *);
struct i8x_func *__attribute__((always_)) i8x_func_ref(struct i8x_func *x) {
  return (struct i8x_func *)i8x_ob_ref((struct i8x_object *)x);
}


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

x86 assembly (clang, -O2):
<i8x_func_ref>:
jmp    1030 <i8x_ob_ref@plt>

LLVM IR (-O0):
%struct.i8x_func = type { i32 }
%struct.i8x_object = type { i32 }
define %struct.i8x_func* @i8x_func_ref(%struct.i8x_func* %0) {
%2 = alloca %struct.i8x_func*
store %struct.i8x_func* %0, %struct.i8x_func** %2
%3 = load %struct.i8x_func*, %struct.i8x_func** %2
%4 = bitcast %struct.i8x_func* %3 to %struct.i8x_object*
%5 = call i64 @i8x_ob_ref(%struct.i8x_object* %4)
%6 = inttoptr i64 %5 to %struct.i8x_func*
ret %struct.i8x_func* %6
}

LLVM IR (-O2):
%struct.i8x_func = type { i32 }
%struct.i8x_object = type { i32 }
define %struct.i8x_func* @i8x_func_ref(%struct.i8x_func* %0) {
%2 = bitcast %struct.i8x_func* %0 to %struct.i8x_object*
%3 = tail call i64 @i8x_ob_ref(%struct.i8x_object* %2)
%4 = inttoptr i64 %3 to %struct.i8x_func*
ret %struct.i8x_func* %4
}
/* Type definitions */
struct UPnPService {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, unsigned short);
void RNDResponseSink_RenderingControl_GetBlueVideoBlackLevel(
    struct UPnPService *Service, int ErrorCode, void *User,
    unsigned short CurrentBlueVideoBlackLevel) {
  printf("RND Invoke Response: "
         "RenderingControl/GetBlueVideoBlackLevel[ErrorCode:%d](%u)\r\n",
         ErrorCode, CurrentBlueVideoBlackLevel);
}


x86 assembly (clang, -O0):
<RNDResponseSink_RenderingControl_GetBlueVideoBlackLevel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cx,%ax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ax,-0x1a(%rbp)
mov    -0xc(%rbp),%esi
lea    0xecc(%rip),%rdi
movzwl -0x1a(%rbp),%edx
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RNDResponseSink_RenderingControl_GetBlueVideoBlackLevel>:
lea    0xee9(%rip),%rdi
mov    %ecx,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [81 x i8] c"RND Invoke Response: RenderingControl/GetBlueVideoBlackLevel[ErrorCode:%d](%u)\0D\0A\00"
define void @RNDResponseSink_RenderingControl_GetBlueVideoBlackLevel(%struct.UPnPService* %0, i32 %1, i8* %2, i16 zeroext %3) {
%5 = alloca %struct.UPnPService*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i16
store %struct.UPnPService* %0, %struct.UPnPService** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i16 %3, i16* %8
%9 = load i32, i32* %6
%10 = load i16, i16* %8
%11 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0), i32 %9, i16 zeroext %10)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [81 x i8] c"RND Invoke Response: RenderingControl/GetBlueVideoBlackLevel[ErrorCode:%d](%u)\0D\0A\00"
define void @RNDResponseSink_RenderingControl_GetBlueVideoBlackLevel(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i16 zeroext %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0), i32 %1, i16 zeroext %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ printf(char *, int, int);
int pthread_self();
int /*<<< orphan*/ sleep(int);
void *mytask(void *arg) {
  printf("%#X working on %d\n", pthread_self(), *(int *)arg);
  sleep(1);
  free(arg);
  return NULL;
}


x86 assembly (clang, -O0):
<mytask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%esi
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
lea    0xe9e(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mytask>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <pthread_self@plt>
mov    (%rbx),%edx
lea    0xeac(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"%#X working on %d\0A\00"
define i8* @mytask(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @pthread_self()
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
%7 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %6)
%8 = call i32 @sleep(i32 1)
%9 = load i8*, i8** %2
%10 = call i32 @free(i8* %9)
ret i8* null
}

LLVM IR (-O2):
@.str = [19 x i8] c"%#X working on %d\0A\00"
define noalias i8* @mytask(i8* nocapture %0) {
%2 = tail call i32 (...) @pthread_self()
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4)
%6 = tail call i32 @sleep(i32 1)
%7 = tail call i32 @free(i8* %0)
ret i8* null
}
/* Variables and functions */
int strlen(char *);
char *stpcpy(char *restrict dest, const char *restrict src) {
  return dest + strlen(dest);
}


x86 assembly (clang, -O0):
<stpcpy>:
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    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stpcpy>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @stpcpy(i8* noalias %0, i8* noalias %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** %3
%7 = call i32 @strlen(i8* %6)
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %5, i64 %8
ret i8* %9
}

LLVM IR (-O2):
define i8* @stpcpy(i8* noalias %0, i8* noalias nocapture readnone %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int mlock(void *, unsigned long);
int /*<<< orphan*/ perror(char *);
void lock_mem(void *mmap_pointer, unsigned long size) {
  int lock;
  lock = mlock(mmap_pointer, size);
  if (lock != 0) {
    perror("lock");
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<lock_mem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <mlock@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1170 <lock_mem+0x40>
lea    0xe9f(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lock_mem>:
push   %rax
call   1030 <mlock@plt>
test   %eax,%eax
jne    113c <lock_mem+0xc>
pop    %rax
ret
lea    0xebd(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"lock\00"
define void @lock_mem(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i32 @mlock(i8* %6, i64 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @exit(i32 -1)
unreachable
14: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"lock\00"
define void @lock_mem(i8* %0, i64 %1) {
%3 = tail call i32 @mlock(i8* %0, i64 %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %2
ret void
}
int gen_cmd_simple(struct expr_t *cmd) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.expr_t = type opaque
define i32 @gen_cmd_simple(%struct.expr_t* nocapture readnone %0) {
ret i32 0
}
int reverse(int x, int r) {
  if (x == 0)
    return r;
  return reverse(x / 10, (r * 10) + (x % 10));
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1133 <reverse+0x23>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1159 <reverse+0x49>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
imul   $0xa,-0xc(%rbp),%esi
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    %edx,%esi
call   1030 <reverse@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
mov    %esi,%eax
test   %edi,%edi
je     113f <reverse+0x3f>
cs nopw 0x0(%rax,%rax,1)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
lea    (%rax,%rax,4),%eax
lea    (%rdi,%rdi,1),%edx
lea    (%rdx,%rdx,4),%edx
mov    %ecx,%esi
sub    %edx,%esi
lea    (%rsi,%rax,2),%eax
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <reverse+0x10>
ret

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

LLVM IR (-O2):
define i32 @reverse(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %13, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %10, %4 ], [ %1, %2 ]
%6 = phi i32 [ %7, %4 ], [ %0, %2 ]
%7 = sdiv i32 %6, 10
%8 = mul nsw i32 %5, 10
%9 = srem i32 %6, 10
%10 = add nsw i32 %8, %9
%11 = add i32 %6, 9
%12 = icmp ult i32 %11, 19
br i1 %12, label %13, label %4
13: ; preds = %4, %2
%14 = phi i32 [ %1, %2 ], [ %10, %4 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void visbad(int state) {
  printf("ERROR: test22\n");
  exit(1);
}


x86 assembly (clang, -O0):
<visbad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [15 x i8] c"ERROR: test22\0A\00"
define void @visbad(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [14 x i8] c"ERROR: test22\00"
define void @visbad(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;

/* Variables and functions */
int /*<<< orphan*/ glTexCoord4iv(int /*<<< orphan*/ *);
void TexCoord4iv(GLint v[4]) { glTexCoord4iv(v); }


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

x86 assembly (clang, -O2):
<TexCoord4iv>:
jmp    1030 <glTexCoord4iv@plt>

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

LLVM IR (-O2):
define void @TexCoord4iv(i32* %0) {
%2 = tail call i32 @glTexCoord4iv(i32* %0)
ret void
}
int linear_search(const int array[], int length, int element) {
  for (int i = 0; i < length; ++i) {
    if (array[i] == element) {
      return i;
    }
  }
  return -1;
}


x86 assembly (clang, -O0):
<linear_search>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1153 <linear_search+0x53>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
jne    1140 <linear_search+0x40>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115a <linear_search+0x5a>
jmp    1145 <linear_search+0x45>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1115 <linear_search+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<linear_search>:
mov    $0xffffffff,%eax
test   %esi,%esi
jle    111e <linear_search+0x1e>
mov    %esi,%esi
xor    %ecx,%ecx
nopl   (%rax)
cmp    %edx,(%rdi,%rcx,4)
je     111f <linear_search+0x1f>
add    $0x1,%rcx
cmp    %rcx,%rsi
jne    1110 <linear_search+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @linear_search(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %12
%8 = phi i64 [ 0, %5 ], [ %13, %12 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, %2
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %17, label %7
15: ; preds = %7
%16 = trunc i64 %8 to i32
br label %17
17: ; preds = %12, %15, %3
%18 = phi i32 [ -1, %3 ], [ %16, %15 ], [ -1, %12 ]
ret i32 %18
}
/* Variables and functions */
char getchar();
char get_keyhit() { return getchar(); }


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

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

LLVM IR (-O0):
define signext i8 @get_keyhit() {
%1 = call signext i8 (...) @getchar()
ret i8 %1
}

LLVM IR (-O2):
define signext i8 @get_keyhit() {
%1 = tail call signext i8 (...) @getchar()
ret i8 %1
}
/* Variables and functions */
int try_parse_int_imp(char *, void *, int, int);
bool try_parse_ushort(char *str, unsigned short *value_ptr) {
  return try_parse_int_imp(str, (void *)value_ptr, sizeof(unsigned short),
                           false);
}


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

x86 assembly (clang, -O2):
<try_parse_ushort>:
mov    $0x2,%edx
xor    %ecx,%ecx
jmp    1030 <try_parse_int_imp@plt>

LLVM IR (-O0):
define i32 @try_parse_ushort(i8* %0, i16* %1) {
%3 = alloca i8*
%4 = alloca i16*
store i8* %0, i8** %3
store i16* %1, i16** %4
%5 = load i8*, i8** %3
%6 = load i16*, i16** %4
%7 = bitcast i16* %6 to i8*
%8 = call i32 @try_parse_int_imp(i8* %5, i8* %7, i32 2, i32 0)
ret i32 %8
}

LLVM IR (-O2):
define i32 @try_parse_ushort(i8* %0, i16* %1) {
%3 = bitcast i16* %1 to i8*
%4 = tail call i32 @try_parse_int_imp(i8* %0, i8* %3, i32 2, i32 0)
ret i32 %4
}
float _float32_min(float x, float y) {
  float result = y;
  if (x < y) {
    result = x;
  }
  return result;
}


x86 assembly (clang, -O0):
<_float32_min>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1135 <_float32_min+0x35>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_float32_min>:
minss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @_float32_min(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %4
store float %6, float* %5
%7 = load float, float* %3
%8 = load float, float* %4
%9 = fcmp olt float %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load float, float* %3
store float %11, float* %5
br label %12
12: ; preds = %10, %2
%13 = load float, float* %5
ret float %13
}

LLVM IR (-O2):
define float @_float32_min(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
int test_imm_5Aint64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x5A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_5Aint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x10,%rdx
and    $0x5a,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_5Aint64_midword_mem>:
testb  $0x5a,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_5Aint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 16
%6 = and i64 %5, 90
%7 = icmp ne i64 %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_5Aint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 5898240
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void RTStrAPrintfVTag(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrAPrintfVTag() {
ret void
}
/* Variables and functions */
char *malloc(unsigned int const);
int /*<<< orphan*/ strcpy(char *, char const *);
unsigned int strlen(char const *);
char *create_equal_string(const char *str) {
  const unsigned len = strlen(str);
  char *ptr = malloc(len + 1);
  ptr[len] = 0;
  strcpy(ptr, str);
  return ptr;
}


x86 assembly (clang, -O0):
<create_equal_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_equal_string>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1040 <strlen@plt>
mov    %eax,%r15d
lea    0x1(%r15),%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %r15d,%eax
movb   $0x0,(%rbx,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @create_equal_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = add i32 %7, 1
%9 = call i8* @malloc(i32 %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = load i32, i32* %3
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %10, i64 %12
store i8 0, i8* %13
%14 = load i8*, i8** %4
%15 = load i8*, i8** %2
%16 = call i32 @strcpy(i8* %14, i8* %15)
%17 = load i8*, i8** %4
ret i8* %17
}

LLVM IR (-O2):
define i8* @create_equal_string(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add i32 %2, 1
%4 = tail call i8* @malloc(i32 %3)
%5 = zext i32 %2 to i64
%6 = getelementptr inbounds i8, i8* %4, i64 %5
store i8 0, i8* %6
%7 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Variables and functions */
int snprintf(char *, int const, char *, char *, char *);
int handle_invit(char *channel, char *params, char *mesg, const int mesg_len) {
  return (*params)
             ? snprintf(mesg, mesg_len, "INVITE %s %s\r\n", params + 1, channel)
             : 0;
}


x86 assembly (clang, -O0):
<handle_invit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115e <handle_invit+0x4e>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x10(%rbp),%rcx
add    $0x1,%rcx
mov    -0x8(%rbp),%r8
lea    0xeaf(%rip),%rdx
call   1030 <snprintf@plt>
mov    %eax,-0x20(%rbp)
jmp    1168 <handle_invit+0x58>
xor    %eax,%eax
mov    %eax,-0x20(%rbp)
jmp    1168 <handle_invit+0x58>
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_invit>:
cmpb   $0x0,(%rsi)
je     1136 <handle_invit+0x26>
mov    %rsi,%rax
mov    %rdi,%r8
add    $0x1,%rax
lea    0xeda(%rip),%r9
mov    %rdx,%rdi
mov    %ecx,%esi
mov    %r9,%rdx
mov    %rax,%rcx
jmp    1030 <snprintf@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"INVITE %s %s\0D\0A\00"
define i32 @handle_invit(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = load i8, i8* %1
%6 = icmp eq i8 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = getelementptr inbounds i8, i8* %1, i64 1
%9 = tail call i32 @snprintf(i8* %2, i32 %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %0)
br label %10
10: ; preds = %4, %7
%11 = phi i32 [ %9, %7 ], [ 0, %4 ]
ret i32 %11
}
unsigned kol_process_info(unsigned slot, char buf1k[]) {
  asm("int $0x40" ::"a"(9), "b"(buf1k), "c"(slot));
}


x86 assembly (clang, -O0):
<kol_process_info>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rbx
mov    -0x10(%rbp),%ecx
mov    $0x9,%eax
int    $0x40
mov    -0xc(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<kol_process_info>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%ecx
mov    $0x9,%eax
int    $0x40
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @kol_process_info(i32 %0, i8* %1) {
tail call void asm sideeffect "int $$0x40", "{ax},{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 9, i8* %1, i32 %0)
ret i32 undef
}
signed int fci_bypass_init(void *handle, signed int speed,
                           signed int slaveaddr) {
  return 0;
}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @hres_timers_resume() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ swscanf(int /*<<< orphan*/ *, int /*<<< orphan*/ *, ...);
void uninivar_swscanf(void) {
  wchar_t *s;
  wchar_t *format;
  int i;
  (void)swscanf(s, format);
  (void)swscanf(s, format, &i);
}


x86 assembly (clang, -O0):
<uninivar_swscanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <swscanf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
mov    $0x0,%al
call   1030 <swscanf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninivar_swscanf>:
push   %rax
xor    %eax,%eax
call   1030 <swscanf@plt>
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1030 <swscanf@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @uninivar_swscanf() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = load i32*, i32** %1
%5 = load i32*, i32** %2
%6 = call i32 (i32*, i32*, ...) @swscanf(i32* %4, i32* %5)
%7 = load i32*, i32** %1
%8 = load i32*, i32** %2
%9 = call i32 (i32*, i32*, ...) @swscanf(i32* %7, i32* %8, i32* %3)
ret void
}

LLVM IR (-O2):
define void @uninivar_swscanf() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i32*, i32*, ...) @swscanf(i32* undef, i32* undef)
%4 = call i32 (i32*, i32*, ...) @swscanf(i32* undef, i32* undef, i32* %1)
ret void
}
double Sleef_cosh_u10(double x) { return __builtin_cosh(x); }


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

x86 assembly (clang, -O2):
<Sleef_cosh_u10>:
jmp    1030 <cosh@plt>

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

LLVM IR (-O2):
define double @Sleef_cosh_u10(double %0) {
%2 = tail call double @cosh(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ first_non_repeat();
void main() { first_non_repeat(); }


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

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

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @first_non_repeat()
ret void
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SN_close_env(struct SN_env *);
extern void italian_ISO_8859_1_close_env(struct SN_env *z) { SN_close_env(z); }


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

x86 assembly (clang, -O2):
<italian_ISO_8859_1_close_env>:
jmp    1030 <SN_close_env@plt>

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

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define void @italian_ISO_8859_1_close_env(%struct.SN_env* %0) {
%2 = tail call i32 @SN_close_env(%struct.SN_env* %0)
ret void
}
/* Variables and functions */
int print_bus_read(char *, char const *, char const *, int);
int /*<<< orphan*/ strconcat(char *, char const *, char const *, int);
int print_bus_read_(const char *func, const char *str, const char *address,
                    const char *lval, int size) {
  char prefix[(100)];
  strconcat(prefix, func, str, (100));
  return print_bus_read(prefix, address, lval, size);
}


x86 assembly (clang, -O0):
<print_bus_read_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0x64,%ecx
call   1030 <strconcat@plt>
lea    -0x90(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
call   1040 <print_bus_read@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_bus_read_>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    %r8d,%r14d
mov    %rcx,%rbx
mov    %rdx,%rbp
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %rsp,%r15
mov    %r15,%rdi
mov    $0x64,%ecx
call   1030 <strconcat@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    %r14d,%ecx
call   1040 <print_bus_read@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @print_bus_read_(i8* %0, i8* %1, i8* %2, i8* %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca [100 x i8]
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%13 = load i8*, i8** %6
%14 = load i8*, i8** %7
%15 = call i32 @strconcat(i8* %12, i8* %13, i8* %14, i32 100)
%16 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%17 = load i8*, i8** %8
%18 = load i8*, i8** %9
%19 = load i32, i32* %10
%20 = call i32 @print_bus_read(i8* %16, i8* %17, i8* %18, i32 %19)
ret i32 %20
}

LLVM IR (-O2):
define i32 @print_bus_read_(i8* %0, i8* %1, i8* %2, i8* %3, i32 %4) {
%6 = alloca [100 x i8]
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%8 = call i32 @strconcat(i8* %7, i8* %0, i8* %1, i32 100)
%9 = call i32 @print_bus_read(i8* %7, i8* %2, i8* %3, i32 %4)
ret i32 %9
}
/* Type definitions */
typedef int uint32_t;
typedef int /*<<< orphan*/ size;

/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ write(int /*<<< orphan*/, int *, int);
void do_ptrsize() {
  uint32_t size = sizeof(void *);
  write(STDOUT_FILENO, &size, sizeof(size));
}


x86 assembly (clang, -O0):
<do_ptrsize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x8,-0x4(%rbp)
mov    0x2eca(%rip),%rax
mov    (%rax),%edi
lea    -0x4(%rbp),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_ptrsize>:
push   %rax
movl   $0x8,0x4(%rsp)
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
pop    %rax
ret

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
define void @do_ptrsize() {
%1 = alloca i32
store i32 8, i32* %1
%2 = load i32, i32* @STDOUT_FILENO
%3 = call i32 @write(i32 %2, i32* %1, i32 4)
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
define void @do_ptrsize() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 8, i32* %1
%3 = load i32, i32* @STDOUT_FILENO
%4 = call i32 @write(i32 %3, i32* %1, i32 4)
ret void
}