xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ ends_with_cvc(char const *);
int word_size(char const *);
int add_an_e(const char *word) {
  return ((1 == word_size(word)) && ends_with_cvc(word));
}


x86 assembly (clang, -O0):
<add_an_e>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <word_size@plt>
mov    %eax,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %edx,%ecx
mov    %al,-0x9(%rbp)
jne    115c <add_an_e+0x3c>
mov    -0x8(%rbp),%rdi
call   1030 <ends_with_cvc@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_an_e>:
push   %rbx
mov    %rdi,%rbx
call   1040 <word_size@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
jne    1145 <add_an_e+0x25>
mov    %rbx,%rdi
call   1030 <ends_with_cvc@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @add_an_e(i8* %0) {
%2 = tail call i32 @word_size(i8* %0)
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @ends_with_cvc(i8* %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int ilog(int32_t x) {
  if (x <= 0)
    return 0;
  int i;
  for (i = 0; i < 32; i++) {
    if (!x)
      break;
    x >>= 1;
  }
  return i;
}


x86 assembly (clang, -O0):
<ilog>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     111d <ilog+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    115a <ilog+0x5a>
movl   $0x0,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jge    1154 <ilog+0x54>
cmpl   $0x0,-0x8(%rbp)
jne    113d <ilog+0x3d>
jmp    1154 <ilog+0x54>
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1124 <ilog+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ilog>:
xor    %eax,%eax
test   %edi,%edi
jle    1125 <ilog+0x25>
cs nopw 0x0(%rax,%rax,1)
mov    %eax,%ecx
lea    0x1(%rcx),%eax
cmp    $0x1e,%ecx
ja     1125 <ilog+0x25>
mov    %edi,%ecx
sar    %ecx
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <ilog+0x10>
ret

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

LLVM IR (-O2):
define i32 @ilog(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = ashr i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i32 %4, 31
%9 = icmp ugt i32 %5, 1
%10 = select i1 %8, i1 %9, i1 false
br i1 %10, label %3, label %11
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ link_error();
void bar(unsigned int s) {
  if (s + 0x70000000 >= 0xf0000000U) {
    if (s < 0x80000000U || s >= 0x90000000U)
      link_error();
  }
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70000000,%eax
cmp    $0xf0000000,%eax
jb     1154 <bar+0x44>
cmpl   $0x80000000,-0x4(%rbp)
jb     1148 <bar+0x38>
cmpl   $0x90000000,-0x4(%rbp)
jb     114f <bar+0x3f>
mov    $0x0,%al
call   1030 <link_error@plt>
jmp    1154 <bar+0x44>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @bar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 1879048192
%5 = icmp uge i32 %4, -268435456
br i1 %5, label %6, label %15
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp ult i32 %7, -2147483648
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp uge i32 %10, -1879048192
br i1 %11, label %12, label %14
12: ; preds = %9, %6
%13 = call i32 (...) @link_error()
br label %14
14: ; preds = %12, %9
br label %15
15: ; preds = %14, %1
ret void
}

LLVM IR (-O2):
define void @bar(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printDivider() { printf("-------------------------------------\n"); }


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

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

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

LLVM IR (-O2):
@str = [38 x i8] c"-------------------------------------\00"
define void @printDivider() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
ret void
}
_Noreturn void f(void) {
  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
}
/* Type definitions */
typedef enum xprt_stat { ____Placeholder_xprt_stat } xprt_stat;

/* Variables and functions */
int XPRT_IDLE;
enum xprt_stat rendezvous_stat() { return (XPRT_IDLE); }


x86 assembly (clang, -O0):
<rendezvous_stat>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rendezvous_stat>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@XPRT_IDLE = global i32 0
define i32 @rendezvous_stat() {
%1 = load i32, i32* @XPRT_IDLE
ret i32 %1
}

LLVM IR (-O2):
@XPRT_IDLE = global i32 0
define i32 @rendezvous_stat() {
%1 = load i32, i32* @XPRT_IDLE
ret i32 %1
}
/* Type definitions */
struct _critbit_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _critbit_has_tag(uintptr_t const);
int /*<<< orphan*/ assert(int /*<<< orphan*/);
struct _critbit_node *_critbit_remove_tag(const uintptr_t v) {
  assert(_critbit_has_tag(v));
  return (struct _critbit_node *)(v - 1);
}


x86 assembly (clang, -O0):
<_critbit_remove_tag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <_critbit_has_tag@plt>
mov    %eax,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rax
sub    $0x1,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_critbit_remove_tag>:
push   %rbx
mov    %rdi,%rbx
call   1030 <_critbit_has_tag@plt>
mov    %eax,%edi
call   1040 <assert@plt>
add    $0xffffffffffffffff,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct._critbit_node = type { i32 }
define %struct._critbit_node* @_critbit_remove_tag(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @_critbit_has_tag(i64 %3)
%5 = call i32 @assert(i32 %4)
%6 = load i64, i64* %2
%7 = sub i64 %6, 1
%8 = inttoptr i64 %7 to %struct._critbit_node*
ret %struct._critbit_node* %8
}

LLVM IR (-O2):
%struct._critbit_node = type { i32 }
define %struct._critbit_node* @_critbit_remove_tag(i64 %0) {
%2 = tail call i32 @_critbit_has_tag(i64 %0)
%3 = tail call i32 @assert(i32 %2)
%4 = add i64 %0, -1
%5 = inttoptr i64 %4 to %struct._critbit_node*
ret %struct._critbit_node* %5
}
/* Variables and functions */
int /*<<< orphan*/ UARTPuts(char *, int);
int CmdLineCursorMoveTop(void) {
  UARTPuts("\r\n\e[H", -1);
  return 0;
}


x86 assembly (clang, -O0):
<CmdLineCursorMoveTop>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <UARTPuts@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdLineCursorMoveTop>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <UARTPuts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"\0D\0A\1B[H\00"
define i32 @CmdLineCursorMoveTop() {
%1 = call i32 @UARTPuts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -1)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"\0D\0A\1B[H\00"
define i32 @CmdLineCursorMoveTop() {
%1 = tail call i32 @UARTPuts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -1)
ret i32 0
}
void restore_irqs() {}


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

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

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

LLVM IR (-O2):
define void @restore_irqs() {
ret void
}
int fun342() { return 342; }


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

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

LLVM IR (-O0):
define i32 @fun342() {
ret i32 342
}

LLVM IR (-O2):
define i32 @fun342() {
ret i32 342
}
void RTSystemQueryOSInfo(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSystemQueryOSInfo() {
ret void
}
int Min(int a, int b) { return a < b ? a : b; }


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
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(void (*)());
int /*<<< orphan*/ IntEnable(int);
int /*<<< orphan*/ IntRegister(int, void (*)());
void MPUIntRegister(void (*pfnHandler)(void)) {
  DEBUG_ASSERT(pfnHandler);
  IntRegister(4, pfnHandler);
  IntEnable(4);
}


x86 assembly (clang, -O0):
<MPUIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rsi
mov    $0x4,%edi
call   1040 <IntRegister@plt>
mov    $0x4,%edi
call   1030 <IntEnable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MPUIntRegister>:
push   %rbx
mov    %rdi,%rbx
call   1050 <DEBUG_ASSERT@plt>
mov    $0x4,%edi
mov    %rbx,%rsi
call   1040 <IntRegister@plt>
mov    $0x4,%edi
pop    %rbx
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @MPUIntRegister(void ()* %0) {
%2 = alloca void ()*
store void ()* %0, void ()** %2
%3 = load void ()*, void ()** %2
%4 = bitcast void ()* %3 to void (...)*
%5 = call i32 @DEBUG_ASSERT(void (...)* %4)
%6 = load void ()*, void ()** %2
%7 = bitcast void ()* %6 to void (...)*
%8 = call i32 @IntRegister(i32 4, void (...)* %7)
%9 = call i32 @IntEnable(i32 4)
ret void
}

LLVM IR (-O2):
define void @MPUIntRegister(void ()* %0) {
%2 = bitcast void ()* %0 to void (...)*
%3 = tail call i32 @DEBUG_ASSERT(void (...)* %2)
%4 = tail call i32 @IntRegister(i32 4, void (...)* %2)
%5 = tail call i32 @IntEnable(i32 4)
ret void
}
/* Type definitions */
struct Queue {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ free(struct Queue *);
void queue_free(struct Queue *queue) {
  assert(queue != NULL);
  free(queue);
}


x86 assembly (clang, -O0):
<queue_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<queue_free>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.Queue = type { i32 }
define void @queue_free(%struct.Queue* %0) {
%2 = alloca %struct.Queue*
store %struct.Queue* %0, %struct.Queue** %2
%3 = load %struct.Queue*, %struct.Queue** %2
%4 = icmp ne %struct.Queue* %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load %struct.Queue*, %struct.Queue** %2
%8 = call i32 @free(%struct.Queue* %7)
ret void
}

LLVM IR (-O2):
%struct.Queue = type { i32 }
define void @queue_free(%struct.Queue* %0) {
%2 = icmp ne %struct.Queue* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @free(%struct.Queue* %0)
ret void
}
/* Variables and functions */
long f(long);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, long *);
int main(void) {
  long sum, i;
  printf("Please input you x:");
  scanf("%ld", &i);
  sum = f(i);
  printf("%ld", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec0(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <f@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeca(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0x8(%rsp),%rdi
call   1030 <f@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Please input you x:\00"
@.str.1 = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %3)
%6 = load i64, i64* %3
%7 = call i64 @f(i64 %6)
store i64 %7, i64* %2
%8 = load i64, i64* %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Please input you x:\00"
@.str.1 = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %1)
%5 = load i64, i64* %1
%6 = call i64 @f(i64 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64 %6)
ret i32 0
}
/* Variables and functions */
double exp(double);
double sigmoid_func(double x) { return ((double)1.0 / (1.0 + exp(-x))); }


x86 assembly (clang, -O0):
<sigmoid_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
movsd  0xeba(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xeae(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigmoid_func>:
push   %rax
xorpd  0xee7(%rip),%xmm0
call   1030 <exp@plt>
movsd  0xeea(%rip),%xmm1
addsd  %xmm1,%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @sigmoid_func(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fneg double %3
%5 = call double @exp(double %4)
%6 = fadd double 1.000000e+00, %5
%7 = fdiv double 1.000000e+00, %6
ret double %7
}

LLVM IR (-O2):
define double @sigmoid_func(double %0) {
%2 = fneg double %0
%3 = tail call double @exp(double %2)
%4 = fadd double %3, 1.000000e+00
%5 = fdiv double 1.000000e+00, %4
ret double %5
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ source_test(char *, int);
int main(int argc, char *argv[]) {
  int load = 0;
  if (argc > 2) {
    load = atoi(argv[2]);
  }
  source_test(argv[1], load);
  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)
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x8(%rbp)
jle    1157 <main+0x37>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x14(%rbp),%esi
call   1030 <source_test@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
xor    %esi,%esi
cmp    $0x3,%edi
jl     1136 <main+0x16>
mov    0x10(%rbx),%rdi
call   1040 <atoi@plt>
mov    %eax,%esi
mov    0x8(%rbx),%rdi
call   1030 <source_test@plt>
xor    %eax,%eax
pop    %rbx
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 = icmp sgt i32 %7, 2
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 2
%12 = load i8*, i8** %11
%13 = call i32 @atoi(i8* %12)
store i32 %13, i32* %6
br label %14
14: ; preds = %9, %2
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = load i32, i32* %6
%19 = call i32 @source_test(i8* %17, i32 %18)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
br label %8
8: ; preds = %4, %2
%9 = phi i32 [ %7, %4 ], [ 0, %2 ]
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i32 @source_test(i8* %11, i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dump(int);
int /*<<< orphan*/ print(char *, int);
void dump2(int c) {
  print("dump2 %c\n", c);
  dump(c);
}


x86 assembly (clang, -O0):
<dump2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1040 <print@plt>
mov    -0x4(%rbp),%edi
call   1030 <dump@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump2>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1040 <print@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <dump@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"dump2 %c\0A\00"
define void @dump2(i32 %0) {
%2 = tail call i32 @print(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @dump(i32 %0)
ret void
}
void minimo_referencia(int num1, int num2, int *min) {
  if (num1 <= num2) {
    *min = num1;
  } else {
    *min = num2;
  }
}


x86 assembly (clang, -O0):
<minimo_referencia>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1128 <minimo_referencia+0x28>
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    1131 <minimo_referencia+0x31>
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<minimo_referencia>:
cmp    %esi,%edi
cmovg  %esi,%edi
mov    %edi,(%rdx)
ret

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

LLVM IR (-O2):
define void @minimo_referencia(i32 %0, i32 %1, i32* nocapture writeonly %2) {
%4 = icmp sgt i32 %0, %1
%5 = select i1 %4, i32 %1, i32 %0
store i32 %5, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cldd(char *, int **);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char sentence[1000];
  int alphabet[2][26];
  scanf("%[^\n]s", sentence);
  cldd(sentence, alphabet);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4c0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rsi
lea    0xec0(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x3f0(%rbp),%rdi
lea    -0x4c0(%rbp),%rsi
call   1030 <cldd@plt>
xor    %eax,%eax
add    $0x4c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x4c0,%rsp
lea    0xed1(%rip),%rdi
lea    0xd0(%rsp),%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1030 <cldd@plt>
xor    %eax,%eax
add    $0x4c0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%[^\0A]s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x i8]
%3 = alloca [2 x [26 x i32]]
store i32 0, i32* %1
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [2 x [26 x i32]], [2 x [26 x i32]]* %3, i64 0, i64 0
%8 = bitcast [26 x i32]* %7 to i32**
%9 = call i32 @cldd(i8* %6, i32** %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%[^\0A]s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = alloca [2 x [26 x i32]]
%3 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%4 = bitcast [2 x [26 x i32]]* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %3)
%6 = bitcast [2 x [26 x i32]]* %2 to i32**
%7 = call i32 @cldd(i8* %3, i32** %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ initialize_matrix(double *);
double *matrix_alloc();
int /*<<< orphan*/ sum_matrices(double *, double *, double *);
int main() {
  double *matrix1, *matrix2, *result;
  matrix1 = matrix_alloc();
  matrix2 = matrix_alloc();
  result = matrix_alloc();
  initialize_matrix(matrix1);
  initialize_matrix(matrix2);
  sum_matrices(result, matrix1, matrix2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1040 <matrix_alloc@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <matrix_alloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <matrix_alloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <initialize_matrix@plt>
mov    -0x10(%rbp),%rdi
call   1050 <initialize_matrix@plt>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <sum_matrices@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
xor    %eax,%eax
call   1040 <matrix_alloc@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1040 <matrix_alloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <matrix_alloc@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1050 <initialize_matrix@plt>
mov    %rbx,%rdi
call   1050 <initialize_matrix@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <sum_matrices@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca double*
%2 = alloca double*
%3 = alloca double*
%4 = call double* (...) @matrix_alloc()
store double* %4, double** %1
%5 = call double* (...) @matrix_alloc()
store double* %5, double** %2
%6 = call double* (...) @matrix_alloc()
store double* %6, double** %3
%7 = load double*, double** %1
%8 = call i32 @initialize_matrix(double* %7)
%9 = load double*, double** %2
%10 = call i32 @initialize_matrix(double* %9)
%11 = load double*, double** %3
%12 = load double*, double** %1
%13 = load double*, double** %2
%14 = call i32 @sum_matrices(double* %11, double* %12, double* %13)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call double* (...) @matrix_alloc()
%2 = tail call double* (...) @matrix_alloc()
%3 = tail call double* (...) @matrix_alloc()
%4 = tail call i32 @initialize_matrix(double* %1)
%5 = tail call i32 @initialize_matrix(double* %2)
%6 = tail call i32 @sum_matrices(double* %3, double* %1, double* %2)
ret i32 0
}
/* Variables and functions */
double getSection(double);
double __getSection(double x) {
  double y;
  y = getSection(x);
  return y;
}


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

x86 assembly (clang, -O2):
<__getSection>:
jmp    1030 <getSection@plt>

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

LLVM IR (-O2):
define double @__getSection(double %0) {
%2 = tail call double @getSection(double %0)
ret double %2
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *copy_string(char *src) {
  int str_size = strlen(src) + 1;
  char *dest = malloc(str_size);
  strcpy(dest, src);
  return dest;
}


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

x86 assembly (clang, -O2):
<copy_string>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @copy_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 %6, 1
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i8* @malloc(i32 %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = load i8*, i8** %2
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %4
ret i8* %13
}

LLVM IR (-O2):
define i8* @copy_string(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
void drm_mem_uninit(void) {}


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

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

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

LLVM IR (-O2):
define void @drm_mem_uninit() {
ret void
}
int main() {
  unsigned long a = 0;
  unsigned long b = 7;
  return a % b;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x7,-0x18(%rbp)
mov    -0x10(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
mov    %edx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %2
store i64 7, i64* %3
%4 = load i64, i64* %2
%5 = load i64, i64* %3
%6 = urem i64 %4, %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

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


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

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

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

LLVM IR (-O2):
define void @WB_SOC_CPUEnableInterrupt() {
ret void
}
int gcd(int x, int y) {
  while (y > 0) {
    int t = y;
    y = x % y;
    x = t;
  }
  return x;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    112f <gcd+0x2f>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    110a <gcd+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %edi,%eax
test   %esi,%esi
jle    111d <gcd+0x1d>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jg     1110 <gcd+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = srem i32 %5, %6
%8 = icmp sgt i32 %7, 0
br i1 %8, label %4, label %9
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %6, %4 ]
ret i32 %10
}
int comp(const void *d1, const void *d2) {
  double *_d1 = (double *)d1;
  double *_d2 = (double *)d2;
  if (*_d1 < *_d2)
    return (-1);
  else if (*_d1 == *_d2)
    return (0);
  else
    return (1);
}


x86 assembly (clang, -O0):
<comp>:
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
movsd  (%rax),%xmm1
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1142 <comp+0x42>
movl   $0xffffffff,-0x4(%rbp)
jmp    1171 <comp+0x71>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
ucomisd (%rax),%xmm0
jne    116a <comp+0x6a>
jp     116a <comp+0x6a>
movl   $0x0,-0x4(%rbp)
jmp    1171 <comp+0x71>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comp>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
movapd %xmm0,%xmm2
cmpneqsd %xmm1,%xmm2
movq   %xmm2,%rcx
and    $0x1,%ecx
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @comp(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double*
%7 = alloca double*
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
store double* %9, double** %6
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to double*
store double* %11, double** %7
%12 = load double*, double** %6
%13 = load double, double* %12
%14 = load double*, double** %7
%15 = load double, double* %14
%16 = fcmp olt double %13, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %26
18: ; preds = %2
%19 = load double*, double** %6
%20 = load double, double* %19
%21 = load double*, double** %7
%22 = load double, double* %21
%23 = fcmp oeq double %20, %22
br i1 %23, label %24, label %25
24: ; preds = %18
store i32 0, i32* %3
br label %26
25: ; preds = %18
store i32 1, i32* %3
br label %26
26: ; preds = %25, %24, %17
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @comp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = bitcast i8* %1 to double*
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp olt double %5, %6
%8 = fcmp une double %5, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int EXIT_SUCCESS;
int scalanative_libc_exit_success() { return EXIT_SUCCESS; }


x86 assembly (clang, -O0):
<scalanative_libc_exit_success>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @scalanative_libc_exit_success() {
%1 = load i32, i32* @EXIT_SUCCESS
ret i32 %1
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @scalanative_libc_exit_success() {
%1 = load i32, i32* @EXIT_SUCCESS
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void restore_sta() { system("cp /root/wireless.sta.bak /root/wireless.sta"); }


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"cp /root/wireless.sta.bak /root/wireless.sta\00"
define void @restore_sta() {
%1 = call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"cp /root/wireless.sta.bak /root/wireless.sta\00"
define void @restore_sta() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int cb_write(int fildes, const void *buf, size_t nbyte, ssize_t *ret) {
  return 1;
}


x86 assembly (clang, -O0):
<cb_write>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @cb_write(i32 %0, i8* nocapture readnone %1, i64 %2, i32* nocapture readnone %3) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ usleep(long);
void Pa_Sleep(long msec) {
  long usecs = msec * 1000;
  usleep(usecs);
}


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

x86 assembly (clang, -O2):
<Pa_Sleep>:
imul   $0x3e8,%rdi,%rdi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @Pa_Sleep(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = mul nsw i64 %4, 1000
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = call i32 @usleep(i64 %6)
ret void
}

LLVM IR (-O2):
define void @Pa_Sleep(i64 %0) {
%2 = mul nsw i64 %0, 1000
%3 = tail call i32 @usleep(i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
void *mem2agpcpy(void *to, const void *from, size_t len) {
  memcpy(to, from, len);
  return to;
}


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

x86 assembly (clang, -O2):
<mem2agpcpy>:
push   %rbx
mov    %rdi,%rbx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @mem2agpcpy(i8* returned %0, i8* %1, i64 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %2)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ aa_endconv_st_le(float *, void *, int);
float aa_endconv_ld_le_s(void *src) {
  float r;
  aa_endconv_st_le(&r, src, sizeof(float));
  return r;
}


x86 assembly (clang, -O0):
<aa_endconv_ld_le_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
mov    $0x4,%edx
call   1030 <aa_endconv_st_le@plt>
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aa_endconv_ld_le_s>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <aa_endconv_st_le@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @aa_endconv_ld_le_s(i8* %0) {
%2 = alloca i8*
%3 = alloca float
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @aa_endconv_st_le(float* %3, i8* %4, i32 4)
%6 = load float, float* %3
ret float %6
}

LLVM IR (-O2):
define float @aa_endconv_ld_le_s(i8* %0) {
%2 = alloca float
%3 = bitcast float* %2 to i8*
%4 = call i32 @aa_endconv_st_le(float* %2, i8* %0, i32 4)
%5 = load float, float* %2
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ flick_reg(char *, int /*<<< orphan*/, int,
                             int /*<<< orphan*/, int /*<<< orphan*/);
void i_lsx_reg(void) { flick_reg("sh", 0, 1, 0, 0); }


x86 assembly (clang, -O0):
<i_lsx_reg>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
xor    %r8d,%r8d
mov    $0x1,%edx
mov    %r8d,%esi
mov    %r8d,%ecx
call   1030 <flick_reg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_lsx_reg>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <flick_reg@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"sh\00"
define void @i_lsx_reg() {
%1 = call i32 @flick_reg(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0, i32 1, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"sh\00"
define void @i_lsx_reg() {
%1 = tail call i32 @flick_reg(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0, i32 1, i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo3();
void foo2() { foo3(); }


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

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

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

LLVM IR (-O2):
define void @foo2() {
%1 = tail call i32 (...) @foo3()
ret void
}
/* Variables and functions */
int strtoul(char *, char **, int);
int next_int(char **p, int *ip) {
  char *endptr;
  int i = strtoul(*p, &endptr, 10);
  if (*p == endptr)
    return -1;
  *p = endptr + 1;
  *ip = i;
  return 0;
}


x86 assembly (clang, -O0):
<next_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    -0x20(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtoul@plt>
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
cmp    -0x20(%rbp),%rax
jne    1155 <next_int+0x45>
movl   $0xffffffff,-0x4(%rbp)
jmp    1174 <next_int+0x64>
mov    -0x20(%rbp),%rcx
add    $0x1,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x24(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_int>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%rdi
mov    %rsp,%rsi
mov    $0xa,%edx
call   1030 <strtoul@plt>
mov    (%rsp),%rcx
cmp    %rcx,(%rbx)
je     1141 <next_int+0x31>
add    $0x1,%rcx
mov    %rcx,(%rbx)
mov    %eax,(%r14)
xor    %eax,%eax
jmp    1146 <next_int+0x36>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @next_int(i8** nocapture %0, i32* nocapture writeonly %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = load i8*, i8** %0
%6 = call i32 @strtoul(i8* %5, i8** %3, i32 10)
%7 = load i8*, i8** %0
%8 = load i8*, i8** %3
%9 = icmp eq i8* %7, %8
br i1 %9, label %12, label %10
10: ; preds = %2
%11 = getelementptr inbounds i8, i8* %8, i64 1
store i8* %11, i8** %0
store i32 %6, i32* %1
br label %12
12: ; preds = %2, %10
%13 = phi i32 [ 0, %10 ], [ -1, %2 ]
ret i32 %13
}
int hasparen(char *s) {
  for (; *s; ++s)
    if (*s == '(')
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<hasparen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1147 <hasparen+0x47>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x28,%eax
jne    1131 <hasparen+0x31>
movl   $0x1,-0x4(%rbp)
jmp    114e <hasparen+0x4e>
jmp    1136 <hasparen+0x36>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <hasparen+0x8>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hasparen>:
movzbl (%rdi),%eax
test   %al,%al
je     1111 <hasparen+0x11>
cmp    $0x28,%al
je     1114 <hasparen+0x14>
add    $0x1,%rdi
jmp    1100 <hasparen>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @hasparen(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %15, %1
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %18
8: ; preds = %4
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 40
br i1 %12, label %13, label %14
13: ; preds = %8
store i32 1, i32* %2
br label %19
14: ; preds = %8
br label %15
15: ; preds = %14
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %3
br label %4
18: ; preds = %4
store i32 0, i32* %2
br label %19
19: ; preds = %18, %13
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @hasparen(i8* nocapture %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %8
i8 40, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
br label %8
8: ; preds = %2, %7
%9 = phi i32 [ 1, %7 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
void tui_cleanup() { endwin(); }


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

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

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

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

/* Variables and functions */
int map_common_exit(struct benchmark *, struct benchmark_args *);
int /*<<< orphan*/ map_keys_exit(struct benchmark *, struct benchmark_args *);
int map_remove_exit(struct benchmark *bench, struct benchmark_args *args) {
  map_keys_exit(bench, args);
  return map_common_exit(bench, args);
}


x86 assembly (clang, -O0):
<map_remove_exit>:
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   1040 <map_keys_exit@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <map_common_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.benchmark = type { i32 }
%struct.benchmark_args = type { i32 }
define i32 @map_remove_exit(%struct.benchmark* %0, %struct.benchmark_args* %1) {
%3 = alloca %struct.benchmark*
%4 = alloca %struct.benchmark_args*
store %struct.benchmark* %0, %struct.benchmark** %3
store %struct.benchmark_args* %1, %struct.benchmark_args** %4
%5 = load %struct.benchmark*, %struct.benchmark** %3
%6 = load %struct.benchmark_args*, %struct.benchmark_args** %4
%7 = call i32 @map_keys_exit(%struct.benchmark* %5, %struct.benchmark_args* %6)
%8 = load %struct.benchmark*, %struct.benchmark** %3
%9 = load %struct.benchmark_args*, %struct.benchmark_args** %4
%10 = call i32 @map_common_exit(%struct.benchmark* %8, %struct.benchmark_args* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.benchmark = type { i32 }
%struct.benchmark_args = type { i32 }
define i32 @map_remove_exit(%struct.benchmark* %0, %struct.benchmark_args* %1) {
%3 = tail call i32 @map_keys_exit(%struct.benchmark* %0, %struct.benchmark_args* %1)
%4 = tail call i32 @map_common_exit(%struct.benchmark* %0, %struct.benchmark_args* %1)
ret i32 %4
}