xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ _UARTBaseValid(int);
void UART9BitDisable(uint32_t ui32Base) {
  ASSERT(_UARTBaseValid(ui32Base));
  (*((volatile uint32_t *)(ui32Base + 0x000000A4))) &= ~0x00008000;
}


x86 assembly (clang, -O0):
<UART9BitDisable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <_UARTBaseValid@plt>
mov    %eax,%edi
call   1040 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0xa4,%eax
cltq
mov    (%rax),%ecx
and    $0xffff7fff,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UART9BitDisable>:
push   %rbx
mov    %edi,%ebx
call   1030 <_UARTBaseValid@plt>
mov    %eax,%edi
call   1040 <ASSERT@plt>
movslq %ebx,%rax
andl   $0xffff7fff,0xa4(%rax)
7f ff ff
pop    %rbx
ret

LLVM IR (-O0):
define void @UART9BitDisable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_UARTBaseValid(i32 %3)
%5 = call i32 @ASSERT(i32 %4)
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 164
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
%11 = and i32 %10, -32769
store volatile i32 %11, i32* %9
ret void
}

LLVM IR (-O2):
define void @UART9BitDisable(i32 %0) {
%2 = tail call i32 @_UARTBaseValid(i32 %0)
%3 = tail call i32 @ASSERT(i32 %2)
%4 = add nsw i32 %0, 164
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, -32769
store volatile i32 %8, i32* %6
ret void
}
/* Type definitions */
struct terminal {
  int dummy;
};
struct parm_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ move_cursor(struct terminal *, int /*<<< orphan*/, int);
int sum(struct parm_t *);
void curs_forward(struct terminal *term, void *arg) {
  int num = sum((struct parm_t *)arg);
  num = (num <= 0) ? 1 : num;
  move_cursor(term, 0, num);
}


x86 assembly (clang, -O0):
<curs_forward>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <sum@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     1153 <curs_forward+0x33>
mov    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1159 <curs_forward+0x39>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
xor    %esi,%esi
call   1040 <move_cursor@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<curs_forward>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <sum@plt>
test   %eax,%eax
mov    $0x1,%edx
cmovg  %eax,%edx
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1040 <move_cursor@plt>

LLVM IR (-O0):
%struct.terminal = type { i32 }
%struct.parm_t = type { i32 }
define void @curs_forward(%struct.terminal* %0, i8* %1) {
%3 = alloca %struct.terminal*
%4 = alloca i8*
%5 = alloca i32
store %struct.terminal* %0, %struct.terminal** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to %struct.parm_t*
%8 = call i32 @sum(%struct.parm_t* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp sle i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
br label %14
12: ; preds = %2
%13 = load i32, i32* %5
br label %14
14: ; preds = %12, %11
%15 = phi i32 [ 1, %11 ], [ %13, %12 ]
store i32 %15, i32* %5
%16 = load %struct.terminal*, %struct.terminal** %3
%17 = load i32, i32* %5
%18 = call i32 @move_cursor(%struct.terminal* %16, i32 0, i32 %17)
ret void
}

LLVM IR (-O2):
%struct.terminal = type { i32 }
%struct.parm_t = type { i32 }
define void @curs_forward(%struct.terminal* %0, i8* %1) {
%3 = bitcast i8* %1 to %struct.parm_t*
%4 = tail call i32 @sum(%struct.parm_t* %3)
%5 = icmp sgt i32 %4, 1
%6 = select i1 %5, i32 %4, i32 1
%7 = tail call i32 @move_cursor(%struct.terminal* %0, i32 0, i32 %6)
ret void
}
int main() {
  int i = 0;
  int a = 0;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void gdk_window_fullscreen() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ get_input();
int /*<<< orphan*/ getegid();
int /*<<< orphan*/ setresgid(int /*<<< orphan*/, int /*<<< orphan*/,
                             int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  gid_t gid = getegid();
  setresgid(gid, gid, gid);
  get_input();
  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    $0x0,%al
call   1040 <getegid@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <setresgid@plt>
mov    $0x0,%al
call   1050 <get_input@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <getegid@plt>
mov    %eax,%edi
mov    %eax,%esi
mov    %eax,%edx
call   1030 <setresgid@plt>
xor    %eax,%eax
call   1050 <get_input@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @getegid()
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = load i32, i32* %6
%10 = load i32, i32* %6
%11 = call i32 @setresgid(i32 %8, i32 %9, i32 %10)
%12 = call i32 (...) @get_input()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @getegid()
%4 = tail call i32 @setresgid(i32 %3, i32 %3, i32 %3)
%5 = tail call i32 (...) @get_input()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int);
void mtmemzero64(void *mem, int count) { memset(mem, 0, count * 8); }


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

x86 assembly (clang, -O2):
<mtmemzero64>:
lea    0x0(,%rsi,8),%edx
xor    %esi,%esi
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @mtmemzero64(i8* %0, i32 %1) {
%3 = shl nsw i32 %1, 3
%4 = tail call i32 @memset(i8* %0, i32 0, i32 %3)
ret void
}
int k_th_bit(int n, int k) {
  int x = (1 << k) & n;
  return (x > 0);
}


x86 assembly (clang, -O0):
<k_th_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
and    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<k_th_bit>:
mov    %esi,%ecx
mov    $0x1,%edx
shl    %cl,%edx
xor    %eax,%eax
test   %edi,%edx
setg   %al
ret

LLVM IR (-O0):
define i32 @k_th_bit(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = shl i32 1, %6
%8 = load i32, i32* %3
%9 = and i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp sgt i32 %10, 0
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @k_th_bit(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = and i32 %3, %0
%5 = icmp sgt i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ make_font_list();
int /*<<< orphan*/ read_def_format();
void set_page_format(void) {
  read_def_format();
  make_font_list();
}


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

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

LLVM IR (-O0):
define void @set_page_format() {
%1 = call i32 (...) @read_def_format()
%2 = call i32 (...) @make_font_list()
ret void
}

LLVM IR (-O2):
define void @set_page_format() {
%1 = tail call i32 (...) @read_def_format()
%2 = tail call i32 (...) @make_font_list()
ret void
}
/* Variables and functions */
double mod2pi_positive(double);
double mod2pi(double vin) {
  return mod2pi_positive(vin + 3.141592653589793238462643383279502884196) -
         3.141592653589793238462643383279502884196;
}


x86 assembly (clang, -O0):
<mod2pi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1030 <mod2pi_positive@plt>
movsd  0xec9(%rip),%xmm1
subsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod2pi>:
push   %rax
addsd  0xee7(%rip),%xmm0
call   1030 <mod2pi_positive@plt>
addsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @mod2pi(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 0x400921FB54442D18
%5 = call double @mod2pi_positive(double %4)
%6 = fsub double %5, 0x400921FB54442D18
ret double %6
}

LLVM IR (-O2):
define double @mod2pi(double %0) {
%2 = fadd double %0, 0x400921FB54442D18
%3 = tail call double @mod2pi_positive(double %2)
%4 = fadd double %3, 0xC00921FB54442D18
ret double %4
}
void XCloseOM() {}


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

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

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

LLVM IR (-O2):
define void @XCloseOM() {
ret void
}
/* Variables and functions */
int fork();
int /*<<< orphan*/ printf(char *, ...);
void *f() {
  int p = fork();
  if (p)
    printf("Parent: ");
  else
    printf("Child: ");
  printf("%d\n", p);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <fork@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     114f <f+0x2f>
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    115d <f+0x3d>
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbx
xor    %eax,%eax
call   1040 <fork@plt>
mov    %eax,%ebx
test   %eax,%eax
lea    0xed6(%rip),%rax
lea    0xec6(%rip),%rdi
cmove  %rax,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"Parent: \00"
@.str.1 = [8 x i8] c"Child: \00"
@.str.2 = [4 x i8] c"%d\0A\00"
define noalias i8* @f() {
%1 = tail call i32 (...) @fork()
%2 = icmp eq i32 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %3)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %1)
ret i8* undef
}
/* Type definitions */
typedef unsigned char wint_t;

/* Variables and functions */
int isalnum(unsigned char);
int __iswalnum_ascii(wint_t c) {
  return (((unsigned char)c == c) ? isalnum(c) : 0);
}


x86 assembly (clang, -O0):
<__iswalnum_ascii>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x1(%rbp),%ecx
cmp    %ecx,%eax
jne    113f <__iswalnum_ascii+0x2f>
movzbl -0x1(%rbp),%edi
call   1030 <isalnum@plt>
mov    %eax,-0x8(%rbp)
jmp    1149 <__iswalnum_ascii+0x39>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1149 <__iswalnum_ascii+0x39>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__iswalnum_ascii>:
jmp    1030 <isalnum@plt>

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

LLVM IR (-O2):
define i32 @__iswalnum_ascii(i8 zeroext %0) {
%2 = tail call i32 @isalnum(i8 zeroext %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ cBreak();
int /*<<< orphan*/ dash();
void sO() {
  dash();
  dash();
  dash();
  cBreak();
}


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

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

LLVM IR (-O0):
define void @sO() {
%1 = call i32 (...) @dash()
%2 = call i32 (...) @dash()
%3 = call i32 (...) @dash()
%4 = call i32 (...) @cBreak()
ret void
}

LLVM IR (-O2):
define void @sO() {
%1 = tail call i32 (...) @dash()
%2 = tail call i32 (...) @dash()
%3 = tail call i32 (...) @dash()
%4 = tail call i32 (...) @cBreak()
ret void
}
/* Variables and functions */
int _ffs(char *);
int main(int argc, char *argv[]) {
  int ret = 0;
  (void)argc;
  ret |= _ffs(argv[0]);
  return (ret == 0) ? 0 : 2;
}


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)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <_ffs@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edx
mov    $0x2,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    (%rsi),%rdi
call   1030 <_ffs@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
add    %ecx,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = call i32 @_ffs(i8* %10)
%12 = load i32, i32* %6
%13 = or i32 %12, %11
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = icmp eq i32 %14, 0
%16 = zext i1 %15 to i64
%17 = select i1 %15, i32 0, i32 2
ret i32 %17
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @_ffs(i8* %3)
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 0, i32 2
ret i32 %6
}
void watchdog_nmi_enable_all(void) {}


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

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

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

LLVM IR (-O2):
define void @watchdog_nmi_enable_all() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ g1(int, float, double);
int /*<<< orphan*/ g2(int, float, double);
int /*<<< orphan*/ g3(int, float, double);
int main(void) {
  int i = 1;
  float f = -2.0;
  double d = 3.0;
  g1(i, f, d);
  g2(i, f, d);
  g3(i, f, d);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movss  0xeaa(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movsd  0xe95(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%edi
movss  -0xc(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1030 <g1@plt>
mov    -0x8(%rbp),%edi
movss  -0xc(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1050 <g2@plt>
mov    -0x8(%rbp),%edi
movss  -0xc(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1040 <g3@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
movss  0xeb7(%rip),%xmm0
movsd  0xeb7(%rip),%xmm1
mov    $0x1,%edi
call   1030 <g1@plt>
mov    $0x1,%edi
movss  0xe98(%rip),%xmm0
movsd  0xe98(%rip),%xmm1
call   1050 <g2@plt>
mov    $0x1,%edi
movss  0xe7e(%rip),%xmm0
movsd  0xe7e(%rip),%xmm1
call   1040 <g3@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca double
store i32 0, i32* %1
store i32 1, i32* %2
store float -2.000000e+00, float* %3
store double 3.000000e+00, double* %4
%5 = load i32, i32* %2
%6 = load float, float* %3
%7 = load double, double* %4
%8 = call i32 @g1(i32 %5, float %6, double %7)
%9 = load i32, i32* %2
%10 = load float, float* %3
%11 = load double, double* %4
%12 = call i32 @g2(i32 %9, float %10, double %11)
%13 = load i32, i32* %2
%14 = load float, float* %3
%15 = load double, double* %4
%16 = call i32 @g3(i32 %13, float %14, double %15)
%17 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @g1(i32 1, float -2.000000e+00, double 3.000000e+00)
%2 = tail call i32 @g2(i32 1, float -2.000000e+00, double 3.000000e+00)
%3 = tail call i32 @g3(i32 1, float -2.000000e+00, double 3.000000e+00)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ rend_service_authorization_free(void *);
void rend_service_authorization_strmap_item_free(void *service_auth) {
  rend_service_authorization_free(service_auth);
}


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

x86 assembly (clang, -O2):
<rend_service_authorization_strmap_item_free>:
jmp    1030 <rend_service_authorization_free@plt>

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

LLVM IR (-O2):
define void @rend_service_authorization_strmap_item_free(i8* %0) {
%2 = tail call i32 @rend_service_authorization_free(i8* %0)
ret void
}
long long _mpylill(int src1, int src2) {
  return ((long long)src2) * ((short)src1);
}


x86 assembly (clang, -O0):
<_mpylill>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movslq -0x8(%rbp),%rax
mov    -0x4(%rbp),%ecx
movswq %cx,%rcx
imul   %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mpylill>:
movslq %esi,%rcx
movswq %di,%rax
imul   %rcx,%rax
ret

LLVM IR (-O0):
define i64 @_mpylill(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sext i32 %5 to i64
%7 = load i32, i32* %3
%8 = trunc i32 %7 to i16
%9 = sext i16 %8 to i64
%10 = mul nsw i64 %6, %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @_mpylill(i32 %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = zext i32 %0 to i64
%5 = shl i64 %4, 48
%6 = ashr exact i64 %5, 48
%7 = mul nsw i64 %6, %3
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void usage() { puts("usage: sel [BINDINGS] COMMAND"); }


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"usage: sel [BINDINGS] COMMAND\00"
define void @usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"usage: sel [BINDINGS] COMMAND\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
bool streq(char *s1, char *s2) { return (strcmp(s1, s2) == 0); }


x86 assembly (clang, -O0):
<streq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @streq(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @streq(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int myctoi(array)
unsigned char array[];
{
  int val = 0;
  (void)sscanf((char *)array, "%d", &val);
  return (val);
}


x86 assembly (clang, -O0):
<myctoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed2(%rip),%rsi
lea    -0xc(%rbp),%rdx
mov    $0x0,%al
call   1030 <sscanf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myctoi>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xee0(%rip),%rsi
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1030 <sscanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @myctoi(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = call i32 (i8*, i8*, ...) @sscanf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @myctoi(i8* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 (i8*, i8*, ...) @sscanf(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void funct(int i) {
  if (0 == i || i == 1) {
    printf("Decision and Condition evaluated to TF.");
  }
}


x86 assembly (clang, -O0):
<funct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmp    -0x4(%rbp),%eax
je     1130 <funct+0x20>
cmpl   $0x1,-0x4(%rbp)
jne    113c <funct+0x2c>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funct>:
cmp    $0x1,%edi
ja     1121 <funct+0x11>
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>
ret

LLVM IR (-O0):
@.str = [40 x i8] c"Decision and Condition evaluated to TF.\00"
define void @funct(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 0, %3
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %5, %1
%9 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"Decision and Condition evaluated to TF.\00"
define void @funct(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %1, %3
ret void
}
/* Variables and functions */
int tracepoint_probe_register(char *, void *);
__attribute__((always_)) int
register_trace_kfree(void (*probe)(unsigned long call_site, const void *ptr)) {
  return tracepoint_probe_register("kfree", (void *)probe);
}


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

x86 assembly (clang, -O2):
<register_trace_kfree>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <tracepoint_probe_register@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"kfree\00"
define i32 @register_trace_kfree(void (i64, i8*)* %0) {
%2 = alloca void (i64, i8*)*
store void (i64, i8*)* %0, void (i64, i8*)** %2
%3 = load void (i64, i8*)*, void (i64, i8*)** %2
%4 = bitcast void (i64, i8*)* %3 to i8*
%5 = call i32 @tracepoint_probe_register(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 %5
}

LLVM IR (-O2):
@.str = [6 x i8] c"kfree\00"
define i32 @register_trace_kfree(void (i64, i8*)* %0) {
%2 = bitcast void (i64, i8*)* %0 to i8*
%3 = tail call i32 @tracepoint_probe_register(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 %3
}
int thread_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @thread_init() {
ret i32 0
}
int bitcount(unsigned int x) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @bitcount(i32 %0) {
ret i32 0
}
/* Variables and functions */
char *index(char *, char);
char *value(register char *p) { return ((p = index(p, '=')) ? ++p : NULL); }


x86 assembly (clang, -O0):
<value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3d,%esi
call   1030 <index@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
je     114d <value+0x3d>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
jmp    1158 <value+0x48>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    1158 <value+0x48>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<value>:
push   %rax
mov    $0x3d,%esi
call   1030 <index@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmovne %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @value(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @index(i8* %3, i8 signext 61)
store i8* %4, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i32 1
store i8* %8, i8** %2
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %6
%11 = phi i8* [ %8, %6 ], [ null, %9 ]
ret i8* %11
}

LLVM IR (-O2):
define i8* @value(i8* %0) {
%2 = tail call i8* @index(i8* %0, i8 signext 61)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* null, i8* %4
ret i8* %5
}
/* Type definitions */
struct b_tonegen {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ rint(int);
int /*<<< orphan*/ setDrawBar(struct b_tonegen *, int, int /*<<< orphan*/);
void setMIDIDrawBar(struct b_tonegen *t, int bus, unsigned char v) {
  int val = 127 - v;
  setDrawBar(t, bus, rint(val * 8.0 / 127.0));
}


x86 assembly (clang, -O0):
<setMIDIDrawBar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
movzbl -0xd(%rbp),%ecx
mov    $0x7f,%eax
sub    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xeab(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe97(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <rint@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    %eax,%edx
call   1040 <setDrawBar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setMIDIDrawBar>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    $0x7f,%eax
sub    %edx,%eax
cvtsi2sd %eax,%xmm0
mulsd  0xec5(%rip),%xmm0
divsd  0xec5(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <rint@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <setDrawBar@plt>

LLVM IR (-O0):
%struct.b_tonegen = type { i32 }
define void @setMIDIDrawBar(%struct.b_tonegen* %0, i32 %1, i8 zeroext %2) {
%4 = alloca %struct.b_tonegen*
%5 = alloca i32
%6 = alloca i8
%7 = alloca i32
store %struct.b_tonegen* %0, %struct.b_tonegen** %4
store i32 %1, i32* %5
store i8 %2, i8* %6
%8 = load i8, i8* %6
%9 = zext i8 %8 to i32
%10 = sub nsw i32 127, %9
store i32 %10, i32* %7
%11 = load %struct.b_tonegen*, %struct.b_tonegen** %4
%12 = load i32, i32* %5
%13 = load i32, i32* %7
%14 = sitofp i32 %13 to double
%15 = fmul double %14, 8.000000e+00
%16 = fdiv double %15, 1.270000e+02
%17 = fptosi double %16 to i32
%18 = call i32 @rint(i32 %17)
%19 = call i32 @setDrawBar(%struct.b_tonegen* %11, i32 %12, i32 %18)
ret void
}

LLVM IR (-O2):
%struct.b_tonegen = type { i32 }
define void @setMIDIDrawBar(%struct.b_tonegen* %0, i32 %1, i8 zeroext %2) {
%4 = zext i8 %2 to i32
%5 = sub nsw i32 127, %4
%6 = sitofp i32 %5 to double
%7 = fmul double %6, 8.000000e+00
%8 = fdiv double %7, 1.270000e+02
%9 = fptosi double %8 to i32
%10 = tail call i32 @rint(i32 %9)
%11 = tail call i32 @setDrawBar(%struct.b_tonegen* %0, i32 %1, i32 %10)
ret void
}
int _is_separator(char c) { return (',' == c) || (';' == c) || (':' == c); }


x86 assembly (clang, -O0):
<_is_separator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
mov    $0x1,%al
mov    $0x2c,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
je     1147 <_is_separator+0x47>
movsbl -0x1(%rbp),%edx
mov    $0x1,%al
mov    $0x3b,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
je     1147 <_is_separator+0x47>
movsbl -0x1(%rbp),%ecx
mov    $0x3a,%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_separator>:
mov    $0x1,%eax
cmp    $0x2c,%dil
je     1111 <_is_separator+0x11>
cmp    $0x3b,%dil
jne    1112 <_is_separator+0x12>
ret
xor    %eax,%eax
cmp    $0x3a,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @_is_separator(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 44, %4
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 59, %8
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 58, %12
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @_is_separator(i8 signext %0) {
switch i8 %0, label %2 [
i8 59, label %5
i8 44, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 58
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ]
ret i32 %6
}
double arccos(x, y)
double x, y;
{
  double result = 0.0;
  if (y > 0.0)
    result = acos(x / y);
  if (y < 0.0)
    result = 3.141592653589793 + acos(x / y);
  return result;
}


x86 assembly (clang, -O0):
<arccos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1150 <arccos+0x40>
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1030 <acos@plt>
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1181 <arccos+0x71>
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1030 <acos@plt>
movaps %xmm0,%xmm1
movsd  0xe88(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arccos>:
sub    $0x18,%rsp
movapd %xmm0,%xmm2
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm1
xorpd  %xmm0,%xmm0
ja     1131 <arccos+0x21>
ucomisd %xmm1,%xmm3
ja     1160 <arccos+0x50>
add    $0x18,%rsp
ret
movapd %xmm2,%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
call   1030 <acos@plt>
xorpd  %xmm3,%xmm3
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
ucomisd %xmm1,%xmm3
jbe    112c <arccos+0x1c>
divsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
call   1030 <acos@plt>
addsd  0xe8b(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @arccos(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
store double 0.000000e+00, double* %5
%6 = load double, double* %4
%7 = fcmp ogt double %6, 0.000000e+00
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load double, double* %3
%10 = load double, double* %4
%11 = fdiv double %9, %10
%12 = call double @acos(double %11)
store double %12, double* %5
br label %13
13: ; preds = %8, %2
%14 = load double, double* %4
%15 = fcmp olt double %14, 0.000000e+00
br i1 %15, label %16, label %22
16: ; preds = %13
%17 = load double, double* %3
%18 = load double, double* %4
%19 = fdiv double %17, %18
%20 = call double @acos(double %19)
%21 = fadd double 0x400921FB54442D18, %20
store double %21, double* %5
br label %22
22: ; preds = %16, %13
%23 = load double, double* %5
ret double %23
}

LLVM IR (-O2):
define double @arccos(double %0, double %1) {
%3 = fcmp ogt double %1, 0.000000e+00
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = fdiv double %0, %1
%6 = tail call double @acos(double %5)
br label %7
7: ; preds = %4, %2
%8 = phi double [ %6, %4 ], [ 0.000000e+00, %2 ]
%9 = fcmp olt double %1, 0.000000e+00
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = fdiv double %0, %1
%12 = tail call double @acos(double %11)
%13 = fadd double %12, 0x400921FB54442D18
br label %14
14: ; preds = %10, %7
%15 = phi double [ %13, %10 ], [ %8, %7 ]
ret double %15
}
/* Variables and functions */
int /*<<< orphan*/ test(char *, char *);
void testTortureExecute(void) {
  char out[4];
  test("aab", out);
  return;
}


x86 assembly (clang, -O0):
<testTortureExecute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rsi
lea    0xedd(%rip),%rdi
call   1030 <test@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testTortureExecute>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <test@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"aab\00"
define void @testTortureExecute() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%3 = call i32 @test(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"aab\00"
define void @testTortureExecute() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%3 = call i32 @test(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
void e100_exit(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @e100_exit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int send(int, char *, int, int /*<<< orphan*/);
void sendCmd(int fd, char *buf, int len) {
  int lenSend;
  lenSend = send(fd, buf, len, 0);
  if (lenSend != len) {
    perror("sending string");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<sendCmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <send@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
je     1178 <sendCmd+0x48>
lea    0xe97(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendCmd>:
push   %rbx
mov    %edx,%ebx
xor    %ecx,%ecx
call   1030 <send@plt>
cmp    %ebx,%eax
jne    1140 <sendCmd+0x10>
pop    %rbx
ret
lea    0xeb9(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c"sending string\00"
define void @sendCmd(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @send(i32 %0, i8* %1, i32 %2, i32 0)
%5 = icmp eq i32 %4, %2
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %3
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int standard_deflate(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(196, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<standard_deflate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xc4,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<standard_deflate>:
mov    $0xc4,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @standard_deflate() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 196, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @standard_deflate() {
%1 = tail call i32 @_ada_use_c2phc(i32 196, i32* undef, i32* undef, double* undef)
ret i32 %1
}
void ADCMoniDisable(unsigned long ulBase, unsigned long ulChanType) {
  ;

  ;
  if (ulChanType == 0x00000001) {
    (*((volatile unsigned long *)(ulBase + 0x00000004))) &= ~0x00000001;
  } else if (ulChanType == 0x00000002) {
    (*((volatile unsigned long *)(ulBase + 0x00000004))) &= ~0x00000002;
  } else {
    (*((volatile unsigned long *)(ulBase + 0x00000004))) &=
        ~(0x00000001 | 0x00000002);
  }
}


x86 assembly (clang, -O0):
<ADCMoniDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x1,-0x10(%rbp)
jne    112c <ADCMoniDisable+0x2c>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%rcx
and    $0xfffffffffffffffe,%rcx
mov    %rcx,0x4(%rax)
jmp    1161 <ADCMoniDisable+0x61>
cmpq   $0x2,-0x10(%rbp)
jne    114c <ADCMoniDisable+0x4c>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%rcx
and    $0xfffffffffffffffd,%rcx
mov    %rcx,0x4(%rax)
jmp    115c <ADCMoniDisable+0x5c>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%rcx
and    $0xfffffffffffffffc,%rcx
mov    %rcx,0x4(%rax)
jmp    1161 <ADCMoniDisable+0x61>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCMoniDisable>:
xor    %eax,%eax
cmp    $0x2,%rsi
sete   %al
or     $0xfffffffffffffffc,%rax
cmp    $0x1,%rsi
mov    $0xfffffffffffffffe,%rcx
cmovne %rax,%rcx
and    %rcx,0x4(%rdi)
ret

LLVM IR (-O0):
define void @ADCMoniDisable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = icmp eq i64 %5, 1
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i64, i64* %3
%9 = add i64 %8, 4
%10 = inttoptr i64 %9 to i64*
%11 = load volatile i64, i64* %10
%12 = and i64 %11, -2
store volatile i64 %12, i64* %10
br label %29
13: ; preds = %2
%14 = load i64, i64* %4
%15 = icmp eq i64 %14, 2
br i1 %15, label %16, label %22
16: ; preds = %13
%17 = load i64, i64* %3
%18 = add i64 %17, 4
%19 = inttoptr i64 %18 to i64*
%20 = load volatile i64, i64* %19
%21 = and i64 %20, -3
store volatile i64 %21, i64* %19
br label %28
22: ; preds = %13
%23 = load i64, i64* %3
%24 = add i64 %23, 4
%25 = inttoptr i64 %24 to i64*
%26 = load volatile i64, i64* %25
%27 = and i64 %26, -4
store volatile i64 %27, i64* %25
br label %28
28: ; preds = %22, %16
br label %29
29: ; preds = %28, %7
ret void
}

LLVM IR (-O2):
define void @ADCMoniDisable(i64 %0, i64 %1) {
%3 = icmp eq i64 %1, 2
%4 = select i1 %3, i64 -3, i64 -4
%5 = icmp eq i64 %1, 1
%6 = select i1 %5, i64 -2, i64 %4
%7 = add i64 %0, 4
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = and i64 %9, %6
store volatile i64 %10, i64* %8
ret void
}
void proc_free_inum(unsigned int inum) {}


x86 assembly (clang, -O0):
<proc_free_inum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @proc_free_inum(i32 %0) {
ret void
}
/* Variables and functions */
long hash_csum(char *);
long hash1_bucket(char *str, long n_buckets) {
  return hash_csum(str) % n_buckets;
}


x86 assembly (clang, -O0):
<hash1_bucket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <hash_csum@plt>
cqto
idivq  -0x10(%rbp)
mov    %rdx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash1_bucket>:
push   %rbx
mov    %rsi,%rbx
call   1030 <hash_csum@plt>
mov    %rax,%rcx
or     %rbx,%rcx
shr    $0x20,%rcx
je     112f <hash1_bucket+0x1f>
cqto
idiv   %rbx
mov    %rdx,%rax
pop    %rbx
ret
xor    %edx,%edx
div    %ebx
mov    %edx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i64 @hash1_bucket(i8* %0, i64 %1) {
%3 = tail call i64 @hash_csum(i8* %0)
%4 = srem i64 %3, %1
ret i64 %4
}
void ulinux_timer(unsigned long data) { return; }


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

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

LLVM IR (-O0):
define void @ulinux_timer(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
ret void
}

LLVM IR (-O2):
define void @ulinux_timer(i64 %0) {
ret void
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ TIOCSPGRP;
int _ioctl(int, int /*<<< orphan*/, int *);
int tcsetpgrp(int fd, pid_t pgrp) {
  int s;
  s = pgrp;
  return (_ioctl(fd, TIOCSPGRP, &s));
}


x86 assembly (clang, -O0):
<tcsetpgrp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb2(%rip),%rax
mov    (%rax),%esi
lea    -0xc(%rbp),%rdx
call   1030 <_ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcsetpgrp>:
push   %rax
mov    %esi,0x4(%rsp)
mov    0x2ec4(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <_ioctl@plt>
pop    %rcx
ret

LLVM IR (-O0):
@TIOCSPGRP = global i32 0
define i32 @tcsetpgrp(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
store i32 %6, i32* %5
%7 = load i32, i32* %3
%8 = load i32, i32* @TIOCSPGRP
%9 = call i32 @_ioctl(i32 %7, i32 %8, i32* %5)
ret i32 %9
}

LLVM IR (-O2):
@TIOCSPGRP = global i32 0
define i32 @tcsetpgrp(i32 %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 %1, i32* %3
%5 = load i32, i32* @TIOCSPGRP
%6 = call i32 @_ioctl(i32 %0, i32 %5, i32* %3)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ handle_52(int /*<<< orphan*/);
int gen_52() { handle_52(0); }


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

x86 assembly (clang, -O2):
<gen_52>:
xor    %edi,%edi
jmp    1030 <handle_52@plt>

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

LLVM IR (-O2):
define i32 @gen_52() {
%1 = tail call i32 @handle_52(i32 0)
ret i32 undef
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void USBDMAChannelDisable(uint32_t ui32Base, uint32_t ui32Channel) {
  ASSERT(ui32Base == 0x40050000);
  ASSERT(ui32Channel < 8);
  (*((volatile uint32_t *)(ui32Base + 0x00000204 + (0x10 * ui32Channel)))) &=
      ~0x00000001;
}


x86 assembly (clang, -O0):
<USBDMAChannelDisable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x40050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpl   $0x8,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x204,%eax
mov    -0x8(%rbp),%ecx
shl    $0x4,%ecx
add    %ecx,%eax
cltq
mov    (%rax),%ecx
and    $0xfffffffe,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBDMAChannelDisable>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x40050000,%ebp
sete   %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
cmp    $0x8,%ebx
setl   %dil
call   1030 <ASSERT@plt>
movslq %ebp,%rax
movslq %ebx,%rcx
shl    $0x4,%rcx
andl   $0xfffffffe,0x204(%rax,%rcx,1)
fe
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @USBDMAChannelDisable(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 = icmp eq i32 %5, 1074069504
%7 = zext i1 %6 to i32
%8 = call i32 @ASSERT(i32 %7)
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 8
%11 = zext i1 %10 to i32
%12 = call i32 @ASSERT(i32 %11)
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 516
%15 = load i32, i32* %4
%16 = mul nsw i32 16, %15
%17 = add nsw i32 %14, %16
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i32*
%20 = load volatile i32, i32* %19
%21 = and i32 %20, -2
store volatile i32 %21, i32* %19
ret void
}

LLVM IR (-O2):
define void @USBDMAChannelDisable(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1074069504
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = icmp slt i32 %1, 8
%7 = zext i1 %6 to i32
%8 = tail call i32 @ASSERT(i32 %7)
%9 = add nsw i32 %0, 516
%10 = shl nsw i32 %1, 4
%11 = add nsw i32 %9, %10
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
%14 = load volatile i32, i32* %13
%15 = and i32 %14, -2
store volatile i32 %15, i32* %13
ret void
}