xunge/DecIR huggingface dataset:
/* Variables and functions */
int rawmidi_hw_print_info(char *);
int main() { return rawmidi_hw_print_info("/dev/midi2"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <rawmidi_hw_print_info@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [11 x i8] c"/dev/midi2\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @rawmidi_hw_print_info(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}

LLVM IR (-O2):
@.str = [11 x i8] c"/dev/midi2\00"
define i32 @main() {
%1 = tail call i32 @rawmidi_hw_print_info(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
void foo279() {}


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

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

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

LLVM IR (-O2):
define void @foo279() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ lseek(int, int /*<<< orphan*/, int /*<<< orphan*/);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ write(int, char *, int);
int main() {
  int fd = open("tmp.foo", O_RDWR);
  write(fd, "tmp.foooooooooooooo", 18);
  lseek(fd, 0, SEEK_SET);
  write(fd, "hello\n", 6);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%esi
lea    0xeb1(%rip),%rdi
call   1050 <open@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    0xea7(%rip),%rsi
mov    $0x12,%edx
call   1030 <write@plt>
mov    -0x8(%rbp),%edi
mov    0x2e63(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <lseek@plt>
mov    -0x8(%rbp),%edi
lea    0xe94(%rip),%rsi
mov    $0x6,%edx
call   1030 <write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xebf(%rip),%rdi
call   1050 <open@plt>
mov    %eax,%ebx
lea    0xeb9(%rip),%rsi
mov    %eax,%edi
mov    $0x12,%edx
call   1030 <write@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%edx
mov    %ebx,%edi
xor    %esi,%esi
call   1040 <lseek@plt>
lea    0xea8(%rip),%rsi
mov    %ebx,%edi
mov    $0x6,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"tmp.foo\00"
@O_RDWR = global i32 0
@.str.1 = [20 x i8] c"tmp.foooooooooooooo\00"
@SEEK_SET = global i32 0
@.str.2 = [7 x i8] c"hello\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @O_RDWR
%4 = call i32 @open(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @write(i32 %5, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 18)
%7 = load i32, i32* %2
%8 = load i32, i32* @SEEK_SET
%9 = call i32 @lseek(i32 %7, i32 0, i32 %8)
%10 = load i32, i32* %2
%11 = call i32 @write(i32 %10, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 6)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"tmp.foo\00"
@O_RDWR = global i32 0
@.str.1 = [20 x i8] c"tmp.foooooooooooooo\00"
@SEEK_SET = global i32 0
@.str.2 = [7 x i8] c"hello\0A\00"
define i32 @main() {
%1 = load i32, i32* @O_RDWR
%2 = tail call i32 @open(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @write(i32 %2, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 18)
%4 = load i32, i32* @SEEK_SET
%5 = tail call i32 @lseek(i32 %2, i32 0, i32 %4)
%6 = tail call i32 @write(i32 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 6)
ret i32 0
}
void RTDbgModRelease(void) {}


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

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

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

LLVM IR (-O2):
define void @RTDbgModRelease() {
ret void
}
void HandleMotion(int x, int y, int mask) {}


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

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

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

LLVM IR (-O2):
define void @HandleMotion(i32 %0, i32 %1, i32 %2) {
ret void
}
long avl_tree_ptr_compare(const void *key, void *value) {
  unsigned long a = (unsigned long)key;
  unsigned long b = (unsigned long)value;
  if (a < b)
    return -1;
  else if (a == b)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<avl_tree_ptr_compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jae    1137 <avl_tree_ptr_compare+0x37>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    115a <avl_tree_ptr_compare+0x5a>
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jne    1152 <avl_tree_ptr_compare+0x52>
movq   $0x0,-0x8(%rbp)
jmp    115a <avl_tree_ptr_compare+0x5a>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<avl_tree_ptr_compare>:
xor    %ecx,%ecx
cmp    %rsi,%rdi
setne  %cl
mov    $0xffffffffffffffff,%rax
cmovae %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @avl_tree_ptr_compare(i8* readnone %0, i8* readnone %1) {
%3 = icmp ult i8* %0, %1
%4 = icmp ne i8* %0, %1
%5 = zext i1 %4 to i64
%6 = select i1 %3, i64 -1, i64 %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ SystemStatsHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void SystemStatsRequestUpdate() { UAVObjRequestUpdate(SystemStatsHandle()); }


x86 assembly (clang, -O0):
<SystemStatsRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <SystemStatsHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SystemStatsRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1040 <SystemStatsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @SystemStatsRequestUpdate() {
%1 = call i32 (...) @SystemStatsHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @SystemStatsRequestUpdate() {
%1 = tail call i32 (...) @SystemStatsHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  char test = argv[1][0];
  if ('A' < test && test < 'Z')
    printf("done!");
  else
    printf("nope!");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%ecx
mov    $0x41,%eax
cmp    %ecx,%eax
jge    1162 <main+0x52>
movsbl -0x11(%rbp),%eax
cmp    $0x5a,%eax
jge    1162 <main+0x52>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
jmp    116e <main+0x5e>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rax
mov    (%rax),%al
add    $0xbe,%al
cmp    $0x18,%al
lea    0xede(%rip),%rax
lea    0xedd(%rip),%rdi
cmovb  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"done!\00"
@.str.1 = [6 x i8] c"nope!\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = add i8 %5, -66
%7 = icmp ult i8 %6, 24
%8 = select i1 %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)
%9 = tail call i32 @printf(i8* dereferenceable(1) %8)
ret i32 0
}
unsigned cpu_uint8_read(const void *ptr) { return *(const unsigned char *)ptr; }


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

x86 assembly (clang, -O2):
<cpu_uint8_read>:
movzbl (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @cpu_uint8_read(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @cpu_uint8_read(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
void SDL_ExitProcess(int exitcode) { _exit(exitcode); }


x86 assembly (clang, -O0):
<SDL_ExitProcess>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<SDL_ExitProcess>:
push   %rax
call   1030 <_exit@plt>

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

LLVM IR (-O2):
define void @SDL_ExitProcess(i32 %0) {
%2 = tail call i32 @_exit(i32 %0)
unreachable
}
/* Variables and functions */
scalar_t__ f1();
scalar_t__ f2();
int main() { return f1() == f2(); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <f1@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <f2@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <f1@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <f2@plt>
xor    %ecx,%ecx
cmp    %rax,%rbx
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @f1()
%3 = call i64 (...) @f2()
%4 = icmp eq i64 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @f1()
%2 = tail call i64 (...) @f2()
%3 = icmp eq i64 %1, %2
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
double gsw_ct_freezing(double, double, double);
double gsw_t_from_ct(double, double, double);
double gsw_t_freezing(double sa, double p, double saturation_fraction) {
  double ct_freezing;
  double t_freezing;
  ct_freezing = gsw_ct_freezing(sa, p, saturation_fraction);
  t_freezing = gsw_t_from_ct(sa, ct_freezing, p);
  if (ct_freezing > 9e10)
    t_freezing = 9e15;
  return (t_freezing);
}


x86 assembly (clang, -O0):
<gsw_t_freezing>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1030 <gsw_ct_freezing@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
call   1040 <gsw_t_from_ct@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xe8a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    118d <gsw_t_freezing+0x6d>
movsd  0xe80(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gsw_t_freezing>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,(%rsp)
call   1030 <gsw_ct_freezing@plt>
movaps %xmm0,%xmm1
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
movsd  0x10(%rsp),%xmm2
call   1040 <gsw_t_from_ct@plt>
movsd  0xeab(%rip),%xmm2
cmpltsd 0x8(%rsp),%xmm2
movsd  0xea4(%rip),%xmm1
andpd  %xmm2,%xmm1
andnpd %xmm0,%xmm2
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @gsw_t_freezing(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%9 = load double, double* %4
%10 = load double, double* %5
%11 = load double, double* %6
%12 = call double @gsw_ct_freezing(double %9, double %10, double %11)
store double %12, double* %7
%13 = load double, double* %4
%14 = load double, double* %7
%15 = load double, double* %5
%16 = call double @gsw_t_from_ct(double %13, double %14, double %15)
store double %16, double* %8
%17 = load double, double* %7
%18 = fcmp ogt double %17, 9.000000e+10
br i1 %18, label %19, label %20
19: ; preds = %3
store double 9.000000e+15, double* %8
br label %20
20: ; preds = %19, %3
%21 = load double, double* %8
ret double %21
}

LLVM IR (-O2):
define double @gsw_t_freezing(double %0, double %1, double %2) {
%4 = tail call double @gsw_ct_freezing(double %0, double %1, double %2)
%5 = tail call double @gsw_t_from_ct(double %0, double %4, double %1)
%6 = fcmp ogt double %4, 9.000000e+10
%7 = select i1 %6, double 9.000000e+15, double %5
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int x = 0x64;
  printf("hexadecimal constant: %d\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%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    $0x64,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [26 x i8] c"hexadecimal constant: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 100)
ret i32 0
}
/* Type definitions */
typedef int uint64_t;
typedef scalar_t__ rax;

/* Variables and functions */
int /*<<< orphan*/ cpuid(int, int *, int *, int *, int *);
bool cpuid_therm_stat_powerlimit() {
  uint64_t rax, rbx, rcx, rdx;
  int leaf = 6;
  cpuid(leaf, &rax, &rbx, &rcx, &rdx);
  if ((((uint64_t)(rax) &
        ((((uint64_t)1 << (((4)) - ((4)) + 1)) - 1) << ((4)))) >>
       (4)) == 1) {
    return true;
  } else {
    return false;
  }
}


x86 assembly (clang, -O0):
<cpuid_therm_stat_powerlimit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x6,-0x18(%rbp)
mov    -0x18(%rbp),%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1030 <cpuid@plt>
mov    -0x8(%rbp),%eax
and    $0x10,%eax
sar    $0x4,%eax
cmp    $0x1,%eax
jne    1155 <cpuid_therm_stat_powerlimit+0x45>
movl   $0x1,-0x4(%rbp)
jmp    115c <cpuid_therm_stat_powerlimit+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid_therm_stat_powerlimit>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rsi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
mov    $0x6,%edi
call   1030 <cpuid@plt>
mov    0x8(%rsp),%eax
shr    $0x4,%eax
and    $0x1,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @cpuid_therm_stat_powerlimit() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @cpuid(i32 6, i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %1
%11 = lshr i32 %10, 4
%12 = and i32 %11, 1
ret i32 %12
}
void f(void) {
#pragma hlt block
  while (1)
    ;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <f+0x9>
jmp    1109 <f+0x9>

x86 assembly (clang, -O2):
<f>:
jmp    1100 <f>

LLVM IR (-O0):
define void @f() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @f() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void printFileError(char *s) {
  printf("File %s is not correct.\n", s);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<printFileError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [25 x i8] c"File %s is not correct.\0A\00"
@EXIT_FAILURE = global i32 0
define void @printFileError(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [25 x i8] c"File %s is not correct.\0A\00"
@EXIT_FAILURE = global i32 0
define void @printFileError(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int sigaddset(sigset_t *set, int signo) {
  ;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @sigaddset(i32* nocapture readnone %0, i32 %1) {
ret i32 0
}
int getReverseHeading(int ofHeading) {
  int retValue_acc;
  {
    if (ofHeading == 0) {
      retValue_acc = 1;
      return (retValue_acc);
    } else {
      retValue_acc = 0;
      return (retValue_acc);
    }
    return (retValue_acc);
  }
}


x86 assembly (clang, -O0):
<getReverseHeading>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1123 <getReverseHeading+0x23>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1130 <getReverseHeading+0x30>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getReverseHeading>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @getReverseHeading(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int(Memento_checkAllMemory)(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @Memento_checkAllMemory() {
ret i32 0
}
/* Type definitions */
struct sockaddr_un {
  int dummy;
};
struct sockaddr {
  int dummy;
};
typedef int socklen_t;
typedef int /*<<< orphan*/ sa;

/* Variables and functions */
int rr_net_generic_accpet(char *, int, struct sockaddr *, int *);
int rr_unix_accept(char *err, int socket) {
  int fd;
  struct sockaddr_un sa;
  socklen_t salen = sizeof(sa);
  if ((fd = rr_net_generic_accpet(err, socket, (struct sockaddr *)&sa,
                                  &salen)) == -1)
    return -1;
  return fd;
}


x86 assembly (clang, -O0):
<rr_unix_accept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x4,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    -0x20(%rbp),%rdx
lea    -0x24(%rbp),%rcx
call   1030 <rr_net_generic_accpet@plt>
mov    %eax,-0x18(%rbp)
cmp    $0xffffffff,%eax
jne    1152 <rr_unix_accept+0x42>
movl   $0xffffffff,-0x4(%rbp)
jmp    1158 <rr_unix_accept+0x48>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rr_unix_accept>:
sub    $0x18,%rsp
movl   $0x4,0xc(%rsp)
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1030 <rr_net_generic_accpet@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sockaddr_un = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @rr_unix_accept(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.sockaddr_un
%8 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 4, i32* %8
%9 = load i8*, i8** %4
%10 = load i32, i32* %5
%11 = bitcast %struct.sockaddr_un* %7 to %struct.sockaddr*
%12 = call i32 @rr_net_generic_accpet(i8* %9, i32 %10, %struct.sockaddr* %11, i32* %8)
store i32 %12, i32* %6
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %15
14: ; preds = %2
store i32 -1, i32* %3
br label %17
15: ; preds = %2
%16 = load i32, i32* %6
store i32 %16, i32* %3
br label %17
17: ; preds = %15, %14
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
%struct.sockaddr_un = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @rr_unix_accept(i8* %0, i32 %1) {
%3 = alloca %struct.sockaddr_un
%4 = alloca i32
%5 = bitcast %struct.sockaddr_un* %3 to i8*
%6 = bitcast i32* %4 to i8*
store i32 4, i32* %4
%7 = bitcast %struct.sockaddr_un* %3 to %struct.sockaddr*
%8 = call i32 @rr_net_generic_accpet(i8* %0, i32 %1, %struct.sockaddr* %7, i32* %4)
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ Window;
typedef int /*<<< orphan*/ Atom;

/* Variables and functions */
int /*<<< orphan*/ XA_WINDOW;
int x_get_property_nr(int /*<<< orphan*/, int /*<<< orphan*/,
                      int /*<<< orphan*/, int, int /*<<< orphan*/ *, int);
int x_get_window_property_nr(Window window, Atom property, Window *prop_ret,
                             int nr) {
  return x_get_property_nr(window, XA_WINDOW, property, sizeof(Window),
                           prop_ret, nr);
}


x86 assembly (clang, -O0):
<x_get_window_property_nr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%r8
mov    -0x14(%rbp),%r9d
mov    $0x4,%ecx
call   1030 <x_get_property_nr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x_get_window_property_nr>:
mov    %ecx,%r9d
mov    %rdx,%r8
mov    %esi,%edx
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
mov    $0x4,%ecx
jmp    1030 <x_get_property_nr@plt>

LLVM IR (-O0):
@XA_WINDOW = global i32 0
define i32 @x_get_window_property_nr(i32 %0, i32 %1, i32* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* @XA_WINDOW
%11 = load i32, i32* %6
%12 = load i32*, i32** %7
%13 = load i32, i32* %8
%14 = call i32 @x_get_property_nr(i32 %9, i32 %10, i32 %11, i32 4, i32* %12, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
@XA_WINDOW = global i32 0
define i32 @x_get_window_property_nr(i32 %0, i32 %1, i32* %2, i32 %3) {
%5 = load i32, i32* @XA_WINDOW
%6 = tail call i32 @x_get_property_nr(i32 %0, i32 %5, i32 %1, i32 4, i32* %2, i32 %3)
ret i32 %6
}
int allow(char *host, char *port) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @allow(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
struct timeval {
  double tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
double rr_now(void) {
  struct timeval t;
  gettimeofday(&t, 0);
  return t.tv_sec + ((double)t.tv_usec) / 1000000.0;
}


x86 assembly (clang, -O0):
<rr_now>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm0
cvtsi2sdq -0x8(%rbp),%xmm1
movsd  0xeca(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rr_now>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm0
divsd  0xed1(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i64 }
define double @rr_now() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load i64, i64* %5
%7 = sitofp i64 %6 to double
%8 = fdiv double %7, 1.000000e+06
%9 = fadd double %4, %8
ret double %9
}

LLVM IR (-O2):
%struct.timeval = type { double, i64 }
define double @rr_now() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = fdiv double %8, 1.000000e+06
%10 = fadd double %5, %9
ret double %10
}
double tanh(x)
double x;
{ return sinh(x) / cosh(x); }


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

x86 assembly (clang, -O2):
<tanh>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
call   1030 <sinh@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <cosh@plt>
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @tanh(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @sinh(double %3)
%5 = load double, double* %2
%6 = call double @cosh(double %5)
%7 = fdiv double %4, %6
ret double %7
}

LLVM IR (-O2):
define double @tanh(double %0) {
%2 = tail call double @sinh(double %0)
%3 = tail call double @cosh(double %0)
%4 = fdiv double %2, %3
ret double %4
}
unsigned int ht_hash_str(const char *skey) {
  const signed char *p = (const signed char *)skey;
  unsigned int h = *p;
  if (h) {
    for (p += 1; *p != '\0'; ++p)
      h = (h << 5) - h + *p;
  }
  return h;
}


x86 assembly (clang, -O0):
<ht_hash_str>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     116b <ht_hash_str+0x6b>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1166 <ht_hash_str+0x66>
mov    -0x14(%rbp),%eax
shl    $0x5,%eax
sub    -0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1130 <ht_hash_str+0x30>
jmp    116b <ht_hash_str+0x6b>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ht_hash_str>:
movsbl (%rdi),%ecx
test   %ecx,%ecx
je     1138 <ht_hash_str+0x38>
mov    0x1(%rdi),%dl
test   %dl,%dl
je     113b <ht_hash_str+0x3b>
add    $0x2,%rdi
mov    %ecx,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %dl,%edx
shl    $0x5,%eax
sub    %ecx,%eax
add    %edx,%eax
movzbl (%rdi),%edx
add    $0x1,%rdi
mov    %eax,%ecx
test   %dl,%dl
jne    1120 <ht_hash_str+0x20>
ret
xor    %eax,%eax
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ht_hash_str(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %19, label %4
4: ; preds = %1
%5 = sext i8 %2 to i32
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %19, label %9
9: ; preds = %4, %9
%10 = phi i8 [ %17, %9 ], [ %7, %4 ]
%11 = phi i8* [ %16, %9 ], [ %6, %4 ]
%12 = phi i32 [ %15, %9 ], [ %5, %4 ]
%13 = sext i8 %10 to i32
%14 = mul i32 %12, 31
%15 = add i32 %14, %13
%16 = getelementptr inbounds i8, i8* %11, i64 1
%17 = load i8, i8* %16
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %9
19: ; preds = %9, %4, %1
%20 = phi i32 [ 0, %1 ], [ %5, %4 ], [ %15, %9 ]
ret i32 %20
}
/* Variables and functions */
int /*<<< orphan*/ LCD_DriverIRQHandler();
__attribute__((weak)) void LCD_IRQHandler(void) { LCD_DriverIRQHandler(); }


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

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

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

LLVM IR (-O2):
define weak void @LCD_IRQHandler() {
%1 = tail call i32 (...) @LCD_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
char *strdup(char const *);
char *xstrdup(const char *str) {
  char *v;
  v = strdup(str);
  if (!v) {
    perror("strdup");
    exit(1);
  }
  return v;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116a <xstrdup+0x3a>
lea    0xea5(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rax
call   1050 <strdup@plt>
test   %rax,%rax
je     113d <xstrdup+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"strdup\00"
define noalias i8* @xstrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void usermode_list_streamcipher(int argc, char **argv) {
  printf("%s \n", "CRYPTO USERMODE LIST STREAM CIPHERS");
  exit(0);
}


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

x86 assembly (clang, -O2):
<usermode_list_streamcipher>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed6(%rip),%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%s \0A\00"
@.str.1 = [36 x i8] c"CRYPTO USERMODE LIST STREAM CIPHERS\00"
define void @usermode_list_streamcipher(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s \0A\00"
@.str.1 = [36 x i8] c"CRYPTO USERMODE LIST STREAM CIPHERS\00"
define void @usermode_list_streamcipher(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int /*<<< orphan*/ S_IFCHR;
int _stat(char *file, struct stat *st) {
  (void)(file);
  st->st_mode = S_IFCHR;
  return 0;
}


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

x86 assembly (clang, -O2):
<_stat>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rsi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
@S_IFCHR = global i32 0
define i32 @_stat(i8* nocapture readnone %0, %struct.stat* nocapture writeonly %1) {
%3 = load i32, i32* @S_IFCHR
%4 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 0
store i32 %3, i32* %4
ret i32 0
}
long long bit33() { return 0x0000000200000000LL; }


x86 assembly (clang, -O0):
<bit33>:
push   %rbp
mov    %rsp,%rbp
movabs $0x200000000,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit33>:
movabs $0x200000000,%rax
ret

LLVM IR (-O0):
define i64 @bit33() {
ret i64 8589934592
}

LLVM IR (-O2):
define i64 @bit33() {
ret i64 8589934592
}
void H422ToARGB() {}


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

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

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

LLVM IR (-O2):
define void @H422ToARGB() {
ret void
}
int min(int i, int j) { return (i < j) ? i : j; }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <min+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <min+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int ORSolitaire(int *, int, int);
int /*<<< orphan*/ printf(char *, int);
void main() {
  int a[] = {5, 2, 4, 52, 62, 9, 8, 3, 1, 11, 6};
  int desired_no = 11;
  int len = sizeof(a) / sizeof(a[0]);
  int res = ORSolitaire(a, len, desired_no);
  printf("Min numbers to be removed is %d", res);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x30(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x2c,%edx
call   1050 <memcpy@plt>
movl   $0xb,-0x34(%rbp)
movl   $0xb,-0x38(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%esi
mov    -0x34(%rbp),%edx
call   1030 <ORSolitaire@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%esi
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
movups 0xef1(%rip),%xmm0
movups %xmm0,0x1c(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xb,%esi
mov    $0xb,%edx
call   1030 <ORSolitaire@plt>
lea    0xecc(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [11 x i32] [i32 5, i32 2, i32 4, i32 52, i32 62, i32 9, i32 8, i32 3, i32 1, i32 11, i32 6]
@.str = [32 x i8] c"Min numbers to be removed is %d\00"
define void @main() {
%1 = alloca [11 x i32]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast [11 x i32]* %1 to i8*
store i32 11, i32* %2
store i32 11, i32* %3
%6 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 0
%7 = load i32, i32* %3
%8 = load i32, i32* %2
%9 = call i32 @ORSolitaire(i32* %6, i32 %7, i32 %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %10)
ret void
}

LLVM IR (-O2):
@__const.main.a = [11 x i32] [i32 5, i32 2, i32 4, i32 52, i32 62, i32 9, i32 8, i32 3, i32 1, i32 11, i32 6]
@.str = [32 x i8] c"Min numbers to be removed is %d\00"
define void @main() {
%1 = alloca [11 x i32]
%2 = bitcast [11 x i32]* %1 to i8*
%3 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 0
%4 = call i32 @ORSolitaire(i32* %3, i32 11, i32 11)
%5 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ m4f_fill_roty_m4fo(float, float *);
int /*<<< orphan*/ m4f_mul_m4fo(float *, float const *, float *);
void rotatey_v4fo(float ry, const float *v, float *result) {
  float rm[16];
  m4f_fill_roty_m4fo(ry, rm);
  m4f_mul_m4fo(rm, v, result);
}


x86 assembly (clang, -O0):
<rotatey_v4fo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
lea    -0x60(%rbp),%rdi
call   1030 <m4f_fill_roty_m4fo@plt>
lea    -0x60(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <m4f_mul_m4fo@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotatey_v4fo>:
push   %r15
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%r15
mov    %r15,%rdi
call   1030 <m4f_fill_roty_m4fo@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1040 <m4f_mul_m4fo@plt>
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @rotatey_v4fo(float %0, float* %1, float* %2) {
%4 = alloca float
%5 = alloca float*
%6 = alloca float*
%7 = alloca [16 x float]
store float %0, float* %4
store float* %1, float** %5
store float* %2, float** %6
%8 = load float, float* %4
%9 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 0
%10 = call i32 @m4f_fill_roty_m4fo(float %8, float* %9)
%11 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 0
%12 = load float*, float** %5
%13 = load float*, float** %6
%14 = call i32 @m4f_mul_m4fo(float* %11, float* %12, float* %13)
ret void
}

LLVM IR (-O2):
define void @rotatey_v4fo(float %0, float* %1, float* %2) {
%4 = alloca [16 x float]
%5 = bitcast [16 x float]* %4 to i8*
%6 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 0
%7 = call i32 @m4f_fill_roty_m4fo(float %0, float* %6)
%8 = call i32 @m4f_mul_m4fo(float* %6, float* %1, float* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VIM_HIF_SetReg8(int, unsigned char);
void VIM_MARB_SetThumbbufUpThreshold(unsigned long Length) {
  VIM_HIF_SetReg8((0x2400 + 0x031), (unsigned char)Length);
  VIM_HIF_SetReg8((0x2400 + 0x030), (unsigned char)(Length >> 8));
  VIM_HIF_SetReg8((0x2400 + 0x02F), (unsigned char)(Length >> 16));
}


x86 assembly (clang, -O0):
<VIM_MARB_SetThumbbufUpThreshold>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x2431,%edi
movzbl %al,%esi
call   1030 <VIM_HIF_SetReg8@plt>
mov    -0x8(%rbp),%rax
shr    $0x8,%rax
mov    $0x2430,%edi
movzbl %al,%esi
call   1030 <VIM_HIF_SetReg8@plt>
mov    -0x8(%rbp),%rax
shr    $0x10,%rax
mov    $0x242f,%edi
movzbl %al,%esi
call   1030 <VIM_HIF_SetReg8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIM_MARB_SetThumbbufUpThreshold>:
push   %rbx
mov    %rdi,%rbx
movzbl %bl,%esi
mov    $0x2431,%edi
call   1030 <VIM_HIF_SetReg8@plt>
movzbl %bh,%esi
mov    $0x2430,%edi
call   1030 <VIM_HIF_SetReg8@plt>
shr    $0x10,%ebx
movzbl %bl,%esi
mov    $0x242f,%edi
pop    %rbx
jmp    1030 <VIM_HIF_SetReg8@plt>

LLVM IR (-O0):
define void @VIM_MARB_SetThumbbufUpThreshold(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i8
%5 = call i32 @VIM_HIF_SetReg8(i32 9265, i8 zeroext %4)
%6 = load i64, i64* %2
%7 = lshr i64 %6, 8
%8 = trunc i64 %7 to i8
%9 = call i32 @VIM_HIF_SetReg8(i32 9264, i8 zeroext %8)
%10 = load i64, i64* %2
%11 = lshr i64 %10, 16
%12 = trunc i64 %11 to i8
%13 = call i32 @VIM_HIF_SetReg8(i32 9263, i8 zeroext %12)
ret void
}

LLVM IR (-O2):
define void @VIM_MARB_SetThumbbufUpThreshold(i64 %0) {
%2 = trunc i64 %0 to i8
%3 = tail call i32 @VIM_HIF_SetReg8(i32 9265, i8 zeroext %2)
%4 = lshr i64 %0, 8
%5 = trunc i64 %4 to i8
%6 = tail call i32 @VIM_HIF_SetReg8(i32 9264, i8 zeroext %5)
%7 = lshr i64 %0, 16
%8 = trunc i64 %7 to i8
%9 = tail call i32 @VIM_HIF_SetReg8(i32 9263, i8 zeroext %8)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ gauss_sample(int);
void gauss_vector(int32_t v[], int set, size_t n) {
  size_t i;
  for (i = 0; i < n; i++)
    v[i] = gauss_sample(set);
}


x86 assembly (clang, -O0):
<gauss_vector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    115f <gauss_vector+0x4f>
mov    -0xc(%rbp),%edi
call   1030 <gauss_sample@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112b <gauss_vector+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gauss_vector>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %rdx,%rdx
je     1145 <gauss_vector+0x35>
mov    %rdx,%rbx
mov    %esi,%r14d
mov    %rdi,%r15
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    %r14d,%edi
call   1030 <gauss_sample@plt>
mov    %eax,(%r15,%rbp,4)
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1130 <gauss_vector+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @gauss_vector(i32* %0, i32 %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i64
%7 = alloca i64
store i32* %0, i32** %4
store i32 %1, i32* %5
store i64 %2, i64* %6
store i64 0, i64* %7
br label %8
8: ; preds = %18, %3
%9 = load i64, i64* %7
%10 = load i64, i64* %6
%11 = icmp ult i64 %9, %10
br i1 %11, label %12, label %21
12: ; preds = %8
%13 = load i32, i32* %5
%14 = call i32 @gauss_sample(i32 %13)
%15 = load i32*, i32** %4
%16 = load i64, i64* %7
%17 = getelementptr inbounds i32, i32* %15, i64 %16
store i32 %14, i32* %17
br label %18
18: ; preds = %12
%19 = load i64, i64* %7
%20 = add i64 %19, 1
store i64 %20, i64* %7
br label %8
21: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @gauss_vector(i32* nocapture writeonly %0, i32 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %11, label %5
5: ; preds = %3, %5
%6 = phi i64 [ %9, %5 ], [ 0, %3 ]
%7 = tail call i32 @gauss_sample(i32 %1)
%8 = getelementptr inbounds i32, i32* %0, i64 %6
store i32 %7, i32* %8
%9 = add nuw i64 %6, 1
%10 = icmp eq i64 %9, %2
br i1 %10, label %11, label %5
11: ; preds = %5, %3
ret void
}