xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Cmd_Line_Get_Command();
int /*<<< orphan*/ Cmd_Line_Process();
int /*<<< orphan*/ usleep(int);
void Cmd_Line_Service(void *shared_data_address) {
  while (1) {
    usleep(25000);
    Cmd_Line_Get_Command();
    Cmd_Line_Process();
  }
}


x86 assembly (clang, -O0):
<Cmd_Line_Service>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x61a8,%edi
call   1050 <usleep@plt>
mov    $0x0,%al
call   1030 <Cmd_Line_Get_Command@plt>
mov    $0x0,%al
call   1040 <Cmd_Line_Process@plt>
jmp    113c <Cmd_Line_Service+0xc>

x86 assembly (clang, -O2):
<Cmd_Line_Service>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x61a8,%edi
call   1050 <usleep@plt>
xor    %eax,%eax
call   1030 <Cmd_Line_Get_Command@plt>
xor    %eax,%eax
call   1040 <Cmd_Line_Process@plt>
jmp    1140 <Cmd_Line_Service+0x10>

LLVM IR (-O0):
define void @Cmd_Line_Service(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1, %3
%4 = call i32 @usleep(i32 25000)
%5 = call i32 (...) @Cmd_Line_Get_Command()
%6 = call i32 (...) @Cmd_Line_Process()
br label %3
}

LLVM IR (-O2):
define void @Cmd_Line_Service(i8* nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i32 @usleep(i32 25000)
%4 = tail call i32 (...) @Cmd_Line_Get_Command()
%5 = tail call i32 (...) @Cmd_Line_Process()
br label %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ swap64(int /*<<< orphan*/ const);
void memcpy_swap64(void *dst, const void *src, size_t n) {
  size_t i;
  for (i = 0; i < n; i++) {
    ((uint64_t *)dst)[i] = swap64(((const uint64_t *)src)[i]);
  }
}


x86 assembly (clang, -O0):
<memcpy_swap64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1168 <memcpy_swap64+0x58>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <swap64@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <memcpy_swap64+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memcpy_swap64>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdx,%rdx
je     1146 <memcpy_swap64+0x36>
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,4),%edi
call   1030 <swap64@plt>
mov    %eax,(%r15,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <memcpy_swap64+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @memcpy_swap64(i8* nocapture writeonly %0, i8* nocapture %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %16, label %5
5: ; preds = %3
%6 = bitcast i8* %1 to i32*
%7 = bitcast i8* %0 to i32*
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ 0, %5 ], [ %14, %8 ]
%10 = getelementptr inbounds i32, i32* %6, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 @swap64(i32 %11)
%13 = getelementptr inbounds i32, i32* %7, i64 %9
store i32 %12, i32* %13
%14 = add nuw i64 %9, 1
%15 = icmp eq i64 %14, %2
br i1 %15, label %16, label %8
16: ; preds = %8, %3
ret void
}
/* Variables and functions */
int fibo(int);
int main(void) {
  int counter = 100352 - 352;
  int counter2 = counter;
  int level = 40;
  int fib;
  while (counter--) {
    fib = fibo(level);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x186a0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x28,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     1157 <main+0x47>
mov    -0x10(%rbp),%edi
call   1030 <fibo@plt>
mov    %eax,-0x14(%rbp)
jmp    1133 <main+0x23>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xfffe7960,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x28,%edi
call   1030 <fibo@plt>
inc    %ebx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 100000, %0 ], [ %3, %1 ]
%3 = add nsw i32 %2, -1
%4 = tail call i32 @fibo(i32 40)
%5 = icmp eq i32 %3, 0
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ myputs(char *);
void key1_handler(void) {
  myputs("key1 down!!!\n");
  (*(volatile unsigned int *)(0xE0200F48)) |= (0x1 << 0);
  (*(volatile unsigned int *)(0xF2000F00)) = 0x0;
}


x86 assembly (clang, -O0):
<key1_handler>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <myputs@plt>
mov    $0xe0200f48,%eax
mov    (%rax),%ecx
or     $0x1,%ecx
mov    $0xe0200f48,%eax
mov    %ecx,(%rax)
mov    $0xf2000f00,%eax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<key1_handler>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <myputs@plt>
mov    $0xe0200f48,%eax
orl    $0x1,(%rax)
movl   $0x0,0x11dfffb8(%rax)
pop    %rax
ret

LLVM IR (-O0):
@.str = [14 x i8] c"key1 down!!!\0A\00"
define void @key1_handler() {
%1 = call i32 @myputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = load volatile i32, i32* inttoptr (i64 3760197448 to i32*)
%3 = or i32 %2, 1
store volatile i32 %3, i32* inttoptr (i64 3760197448 to i32*)
store volatile i32 0, i32* inttoptr (i64 4060090112 to i32*)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"key1 down!!!\0A\00"
define void @key1_handler() {
%1 = tail call i32 @myputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = load volatile i32, i32* inttoptr (i64 3760197448 to i32*)
%3 = or i32 %2, 1
store volatile i32 %3, i32* inttoptr (i64 3760197448 to i32*)
store volatile i32 0, i32* inttoptr (i64 4060090112 to i32*)
ret void
}
int GRCFIL(fd, w_fd)
int *fd;
int w_fd;
{ return close(*fd); }


x86 assembly (clang, -O0):
<GRCFIL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    $0x0,%al
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GRCFIL>:
mov    (%rdi),%edi
xor    %eax,%eax
jmp    1030 <close@plt>

LLVM IR (-O0):
define i32 @GRCFIL(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %5
%7 = call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @GRCFIL(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 %3)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ xcb_get_property_reply_t;
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ xcb_ewmh_get_cardinal_from_reply(int /*<<< orphan*/ *,
                                                    int /*<<< orphan*/ *);
uint8_t xcb_ewmh_get_wm_user_time_from_reply(uint32_t *xtime,
                                             xcb_get_property_reply_t *r) {
  return xcb_ewmh_get_cardinal_from_reply(xtime, r);
}


x86 assembly (clang, -O0):
<xcb_ewmh_get_wm_user_time_from_reply>:
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 <xcb_ewmh_get_cardinal_from_reply@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcb_ewmh_get_wm_user_time_from_reply>:
jmp    1030 <xcb_ewmh_get_cardinal_from_reply@plt>

LLVM IR (-O0):
define i32 @xcb_ewmh_get_wm_user_time_from_reply(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 = call i32 @xcb_ewmh_get_cardinal_from_reply(i32* %5, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @xcb_ewmh_get_wm_user_time_from_reply(i32* %0, i32* %1) {
%3 = tail call i32 @xcb_ewmh_get_cardinal_from_reply(i32* %0, i32* %1)
ret i32 %3
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint8_t qmul8(uint8_t i, uint8_t j) {
  int p = ((uint16_t)i * (uint16_t)(j));
  if (p > 255)
    p = 255;
  return p;
}


x86 assembly (clang, -O0):
<qmul8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0xff,-0xc(%rbp)
jle    1128 <qmul8+0x28>
movl   $0xff,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qmul8>:
imul   %esi,%edi
cmp    $0xff,%edi
mov    $0xff,%eax
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @qmul8(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* %3
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp sgt i32 %9, 255
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 255, i32* %5
br label %12
12: ; preds = %11, %2
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
define i32 @qmul8(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = icmp slt i32 %3, 255
%5 = select i1 %4, i32 %3, i32 255
ret i32 %5
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int ece391_fstat(int, struct stat *);
int fstat(int file, struct stat *st) { return ece391_fstat(file, st); }


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

x86 assembly (clang, -O2):
<fstat>:
jmp    1030 <ece391_fstat@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @fstat(i32 %0, %struct.stat* %1) {
%3 = alloca i32
%4 = alloca %struct.stat*
store i32 %0, i32* %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i32, i32* %3
%6 = load %struct.stat*, %struct.stat** %4
%7 = call i32 @ece391_fstat(i32 %5, %struct.stat* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @fstat(i32 %0, %struct.stat* %1) {
%3 = tail call i32 @ece391_fstat(i32 %0, %struct.stat* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ analogRead(int /*<<< orphan*/);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
void coap_setup(void) { srand(analogRead(0)); }


x86 assembly (clang, -O0):
<coap_setup>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <analogRead@plt>
mov    %eax,%edi
call   1030 <srand@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @coap_setup() {
%1 = call i32 @analogRead(i32 0)
%2 = call i32 @srand(i32 %1)
ret void
}

LLVM IR (-O2):
define void @coap_setup() {
%1 = tail call i32 @analogRead(i32 0)
%2 = tail call i32 @srand(i32 %1)
ret void
}
__attribute__((always_)) int eth_is_on_demand_init(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @eth_is_on_demand_init() {
ret i32 1
}

LLVM IR (-O2):
define i32 @eth_is_on_demand_init() {
ret i32 1
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn31() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn31");
  return result;
}


x86 assembly (clang, -O0):
<fn31>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn31>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn31\00"
define i8* @fn31() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn31\00"
define i8* @fn31() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
/* Variables and functions */
int __isalnum_impl(int);
int isalnum(int c) { return __isalnum_impl(c); }


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

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

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

LLVM IR (-O2):
define i32 @isalnum(i32 %0) {
%2 = tail call i32 @__isalnum_impl(i32 %0)
ret i32 %2
}
char *R2Settings_getHintAboutInitFile() {
  return "Please execute Artoo with the command: artoo filename";
}


x86 assembly (clang, -O0):
<R2Settings_getHintAboutInitFile>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [54 x i8] c"Please execute Artoo with the command: artoo filename\00"
define i8* @R2Settings_getHintAboutInitFile() {
ret i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [54 x i8] c"Please execute Artoo with the command: artoo filename\00"
define i8* @R2Settings_getHintAboutInitFile() {
ret i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *prgname) {
  fprintf(stderr, "usage: %s [-hb] [-v version] <infile> -o <outfile>\n",
          prgname);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [52 x i8] c"usage: %s [-hb] [-v version] <infile> -o <outfile>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [52 x i8] c"usage: %s [-hb] [-v version] <infile> -o <outfile>\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int MPI_Init(int *, char ***);
int /*<<< orphan*/ PyMPI_SCMPI_dlopen_libslurm();
int PyMPI_SCMPI_MPI_Init(int *argc, char ***argv) {
  PyMPI_SCMPI_dlopen_libslurm();
  return MPI_Init(argc, argv);
}


x86 assembly (clang, -O0):
<PyMPI_SCMPI_MPI_Init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <PyMPI_SCMPI_dlopen_libslurm@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <MPI_Init@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PyMPI_SCMPI_MPI_Init>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <PyMPI_SCMPI_dlopen_libslurm@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <MPI_Init@plt>

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

LLVM IR (-O2):
define i32 @PyMPI_SCMPI_MPI_Init(i32* %0, i8*** %1) {
%3 = tail call i32 (...) @PyMPI_SCMPI_dlopen_libslurm()
%4 = tail call i32 @MPI_Init(i32* %0, i8*** %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_memblockq_free() {
  printf("NOT IMPLEMENTED:"
         "pa_memblockq_free"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"NOT IMPLEMENTED:pa_memblockq_free\0A\00"
define i32 @pa_memblockq_free() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [34 x i8] c"NOT IMPLEMENTED:pa_memblockq_free\00"
define i32 @pa_memblockq_free() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int isprint(const int c) { return ((c >= (int)' ' && c <= (int)'~')) ? 1 : 0; }


x86 assembly (clang, -O0):
<isprint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isprint+0x20>
cmpl   $0x7e,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isprint>:
add    $0xffffffe0,%edi
xor    %eax,%eax
cmp    $0x5f,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isprint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 32
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 126
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @isprint(i32 %0) {
%2 = add i32 %0, -32
%3 = icmp ult i32 %2, 95
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct lifo {
  int dummy;
};

/* Variables and functions */
double acos(double);
double pop(struct lifo *);
double opr_acos(struct lifo *stack) {
  double op = pop(stack);
  return acos(op);
}


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

x86 assembly (clang, -O2):
<opr_acos>:
push   %rax
call   1040 <pop@plt>
pop    %rax
jmp    1030 <acos@plt>

LLVM IR (-O0):
%struct.lifo = type { i32 }
define double @opr_acos(%struct.lifo* %0) {
%2 = alloca %struct.lifo*
%3 = alloca double
store %struct.lifo* %0, %struct.lifo** %2
%4 = load %struct.lifo*, %struct.lifo** %2
%5 = call double @pop(%struct.lifo* %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = call double @acos(double %6)
ret double %7
}

LLVM IR (-O2):
%struct.lifo = type { i32 }
define double @opr_acos(%struct.lifo* %0) {
%2 = tail call double @pop(%struct.lifo* %0)
%3 = tail call double @acos(double %2)
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
unsigned long zlibCompileFlags(void) {
  unsigned long flags;
  flags = 0;
  switch ((int)(sizeof(unsigned int))) {
  case 2:
    break;
  case 4:
    flags += 1 << 0;
    break;
  case 8:
    flags += 2 << 0;
    break;
  default:
    flags += 3 << 0;
  }
  switch ((int)(sizeof(unsigned long))) {
  case 2:
    break;
  case 4:
    flags += 1 << 2;
    break;
  case 8:
    flags += 2 << 2;
    break;
  default:
    flags += 3 << 2;
  }
  switch ((int)(sizeof(void *))) {
  case 2:
    break;
  case 4:
    flags += 1 << 4;
    break;
  case 8:
    flags += 2 << 4;
    break;
  default:
    flags += 3 << 4;
  }
  switch ((int)(sizeof(off_t))) {
  case 2:
    break;
  case 4:
    flags += 1 << 6;
    break;
  case 8:
    flags += 2 << 6;
    break;
  default:
    flags += 3 << 6;
  }
  flags += 0L << 24;
  flags += 0L << 25;
  flags += 0L << 26;
  return flags;
}


x86 assembly (clang, -O0):
<zlibCompileFlags>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x0,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x0,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x0,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @zlibCompileFlags() {
%1 = alloca i64
store i64 0, i64* %1
%2 = load i64, i64* %1
%3 = add i64 %2, 1
store i64 %3, i64* %1
%4 = load i64, i64* %1
%5 = add i64 %4, 8
store i64 %5, i64* %1
%6 = load i64, i64* %1
%7 = add i64 %6, 32
store i64 %7, i64* %1
%8 = load i64, i64* %1
%9 = add i64 %8, 64
store i64 %9, i64* %1
%10 = load i64, i64* %1
%11 = add i64 %10, 0
store i64 %11, i64* %1
%12 = load i64, i64* %1
%13 = add i64 %12, 0
store i64 %13, i64* %1
%14 = load i64, i64* %1
%15 = add i64 %14, 0
store i64 %15, i64* %1
%16 = load i64, i64* %1
ret i64 %16
}

LLVM IR (-O2):
define i64 @zlibCompileFlags() {
ret i64 105
}
/* Variables and functions */
int /*<<< orphan*/ C67_asm(char *, int, int /*<<< orphan*/, int /*<<< orphan*/);
void C67_POP_DW(int r) { C67_asm("LDDW.D SP PRE INC", r, 0, 0); }


x86 assembly (clang, -O0):
<C67_POP_DW>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <C67_asm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<C67_POP_DW>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <C67_asm@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"LDDW.D SP PRE INC\00"
define void @C67_POP_DW(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @C67_asm(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %3, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"LDDW.D SP PRE INC\00"
define void @C67_POP_DW(i32 %0) {
%2 = tail call i32 @C67_asm(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %0, i32 0, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m256d;

/* Variables and functions */
int /*<<< orphan*/ _mm256_fmadd_pd(int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/);
int /*<<< orphan*/ _mm256_set1_pd(double);
__m256d _fma_dd_vec_avx2(__m256d *veca, __m256d *vecb, double C) {
  __m256d vecc = _mm256_set1_pd(C);
  return _mm256_fmadd_pd(*veca, *vecb, vecc);
}


x86 assembly (clang, -O0):
<_fma_dd_vec_avx2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <_mm256_set1_pd@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x1c(%rbp),%edx
call   1040 <_mm256_fmadd_pd@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fma_dd_vec_avx2>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <_mm256_set1_pd@plt>
mov    (%rbx),%edi
mov    (%r14),%esi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <_mm256_fmadd_pd@plt>

LLVM IR (-O0):
define i32 @_fma_dd_vec_avx2(i32* %0, i32* %1, double %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca double
%7 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store double %2, double* %6
%8 = load double, double* %6
%9 = call i32 @_mm256_set1_pd(double %8)
store i32 %9, i32* %7
%10 = load i32*, i32** %4
%11 = load i32, i32* %10
%12 = load i32*, i32** %5
%13 = load i32, i32* %12
%14 = load i32, i32* %7
%15 = call i32 @_mm256_fmadd_pd(i32 %11, i32 %13, i32 %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @_fma_dd_vec_avx2(i32* nocapture %0, i32* nocapture %1, double %2) {
%4 = tail call i32 @_mm256_set1_pd(double %2)
%5 = load i32, i32* %0
%6 = load i32, i32* %1
%7 = tail call i32 @_mm256_fmadd_pd(i32 %5, i32 %6, i32 %4)
ret i32 %7
}
int power(int n) {
  int i, p = 1;
  i = 1;
  if (n == 0)
    return i;
  for (i = 0; i < n; i++)
    p = p * 2;
  return p;
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    112a <power+0x2a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115a <power+0x5a>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1154 <power+0x54>
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1131 <power+0x31>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
test   %edi,%edi
jle    1118 <power+0x18>
lea    -0x1(%rdi),%eax
mov    %edi,%ecx
and    $0x7,%ecx
cmp    $0x7,%eax
jae    111e <power+0x1e>
mov    $0x1,%eax
jmp    1138 <power+0x38>
mov    $0x1,%eax
ret
and    $0xfffffff8,%edi
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
shl    $0x8,%eax
add    $0xfffffff8,%edi
jne    1130 <power+0x30>
test   %ecx,%ecx
je     1147 <power+0x47>
nopl   0x0(%rax)
add    %eax,%eax
add    $0xffffffff,%ecx
jne    1140 <power+0x40>
ret

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

LLVM IR (-O2):
define i32 @power(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %25
3: ; preds = %1
%4 = add i32 %0, -1
%5 = and i32 %0, 7
%6 = icmp ult i32 %4, 7
br i1 %6, label %15, label %7
7: ; preds = %3
%8 = and i32 %0, -8
br label %9
9: ; preds = %9, %7
%10 = phi i32 [ 1, %7 ], [ %12, %9 ]
%11 = phi i32 [ 0, %7 ], [ %13, %9 ]
%12 = shl i32 %10, 8
%13 = add i32 %11, 8
%14 = icmp eq i32 %13, %8
br i1 %14, label %15, label %9
15: ; preds = %9, %3
%16 = phi i32 [ undef, %3 ], [ %12, %9 ]
%17 = phi i32 [ 1, %3 ], [ %12, %9 ]
%18 = icmp eq i32 %5, 0
br i1 %18, label %25, label %19
19: ; preds = %15, %19
%20 = phi i32 [ %22, %19 ], [ %17, %15 ]
%21 = phi i32 [ %23, %19 ], [ 0, %15 ]
%22 = shl nsw i32 %20, 1
%23 = add i32 %21, 1
%24 = icmp eq i32 %23, %5
br i1 %24, label %25, label %19
25: ; preds = %15, %19, %1
%26 = phi i32 [ 1, %1 ], [ %16, %15 ], [ %22, %19 ]
ret i32 %26
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, long);
int /*<<< orphan*/ xtoi(char *, long *);
int main(int argc, char *argv[]) {
  long int res;
  xtoi(argv[1], &res);
  printf("%s -> %li\n", argv[1], res);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <xtoi@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    -0x18(%rbp),%rdx
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [11 x i8] c"%s -> %li\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = call i32 @xtoi(i8* %9, i64* %6)
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = load i64, i64* %6
%15 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %13, i64 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"%s -> %li\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = call i32 @xtoi(i8* %6, i64* %3)
%8 = load i8*, i8** %5
%9 = load i64, i64* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %8, i64 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void OTG_HS_EP1_OUT_IRQHandler() { default_handler(); }


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

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

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

LLVM IR (-O2):
define weak void @OTG_HS_EP1_OUT_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
/* Variables and functions */
int eu2ho(double *, double *, int);
int ho2cu(double *, double *, int);
int eu2cu(double *eu, double *cu, int p) {
  double ho[3];
  int trash;
  trash = eu2ho(eu, ho, p);
  trash = ho2cu(ho, cu, p);
  return 1;
}


x86 assembly (clang, -O0):
<eu2cu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <eu2ho@plt>
mov    %eax,-0x34(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <ho2cu@plt>
mov    %eax,-0x34(%rbp)
mov    $0x1,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eu2cu>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rsp,%r15
mov    %r15,%rsi
call   1030 <eu2ho@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
call   1040 <ho2cu@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @eu2cu(double* %0, double* %1, i32 %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca i32
%7 = alloca [3 x double]
%8 = alloca i32
store double* %0, double** %4
store double* %1, double** %5
store i32 %2, i32* %6
%9 = load double*, double** %4
%10 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%11 = load i32, i32* %6
%12 = call i32 @eu2ho(double* %9, double* %10, i32 %11)
store i32 %12, i32* %8
%13 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%14 = load double*, double** %5
%15 = load i32, i32* %6
%16 = call i32 @ho2cu(double* %13, double* %14, i32 %15)
store i32 %16, i32* %8
ret i32 1
}

LLVM IR (-O2):
define i32 @eu2cu(double* %0, double* %1, i32 %2) {
%4 = alloca [3 x double]
%5 = bitcast [3 x double]* %4 to i8*
%6 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%7 = call i32 @eu2ho(double* %0, double* %6, i32 %2)
%8 = call i32 @ho2cu(double* %6, double* %1, i32 %2)
ret i32 1
}
/* Variables and functions */
int get_int(int, char **);
int /*<<< orphan*/ print_month_name(int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  int month = get_int(argc, argv);
  if (month < 0) {
    printf("Invalid month\n");
  } else {
    print_month_name(month);
  }
}


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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <get_int@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1170 <main+0x40>
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
jmp    1178 <main+0x48>
mov    -0x14(%rbp),%edi
call   1040 <print_month_name@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1050 <get_int@plt>
test   %eax,%eax
js     1143 <main+0x13>
mov    %eax,%edi
call   1040 <print_month_name@plt>
jmp    114f <main+0x1f>
lea    0xeb6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Invalid month\0A\00"
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 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = call i32 @get_int(i32 %7, i8** %8)
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %17
14: ; preds = %2
%15 = load i32, i32* %6
%16 = call i32 @print_month_name(i32 %15)
br label %17
17: ; preds = %14, %12
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@str = [14 x i8] c"Invalid month\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @get_int(i32 %0, i8** %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
br label %9
7: ; preds = %2
%8 = tail call i32 @print_month_name(i32 %3)
br label %9
9: ; preds = %7, %5
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *prog) { printf("%s file/dir ...\n", prog); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"%s file/dir ...\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"%s file/dir ...\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ valid_bo(long, int, int);
long extract_boe(unsigned long insn, int dialect, int *invalid) {
  long value;
  value = (insn >> 21) & 0x1f;
  if (!valid_bo(value, dialect, 1))
    *invalid = 1;
  return value & 0x1e;
}


x86 assembly (clang, -O0):
<extract_boe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x15,%rax
and    $0x1f,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x1,%edx
call   1030 <valid_bo@plt>
cmp    $0x0,%eax
jne    1157 <extract_boe+0x47>
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x20(%rbp),%rax
and    $0x1e,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extract_boe>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
shr    $0x15,%rbx
mov    %ebx,%edi
and    $0x1f,%edi
mov    $0x1,%edx
call   1030 <valid_bo@plt>
test   %eax,%eax
jne    1138 <extract_boe+0x28>
movl   $0x1,(%r14)
and    $0x1e,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @extract_boe(i64 %0, i32 %1, i32* %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i64
store i64 %0, i64* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%8 = load i64, i64* %4
%9 = lshr i64 %8, 21
%10 = and i64 %9, 31
store i64 %10, i64* %7
%11 = load i64, i64* %7
%12 = load i32, i32* %5
%13 = call i32 @valid_bo(i64 %11, i32 %12, i32 1)
%14 = icmp ne i32 %13, 0
br i1 %14, label %17, label %15
15: ; preds = %3
%16 = load i32*, i32** %6
store i32 1, i32* %16
br label %17
17: ; preds = %15, %3
%18 = load i64, i64* %7
%19 = and i64 %18, 30
ret i64 %19
}

LLVM IR (-O2):
define i64 @extract_boe(i64 %0, i32 %1, i32* nocapture writeonly %2) {
%4 = lshr i64 %0, 21
%5 = and i64 %4, 31
%6 = tail call i32 @valid_bo(i64 %5, i32 %1, i32 1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %3
store i32 1, i32* %2
br label %9
9: ; preds = %8, %3
%10 = and i64 %4, 30
ret i64 %10
}
int find_first_zero_bit(int nbits, int *addr) {
  int i;
  for (i = 0; i < nbits; i++)
    if (!!(*(addr + (i >> 5)) & (1 << (i & 0x1f))) == 0)
      return i;
  return -11;
}


x86 assembly (clang, -O0):
<find_first_zero_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1175 <find_first_zero_bit+0x75>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sar    $0x5,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x14(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
jne    1162 <find_first_zero_bit+0x62>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117c <find_first_zero_bit+0x7c>
jmp    1167 <find_first_zero_bit+0x67>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1112 <find_first_zero_bit+0x12>
movl   $0xfffffff5,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_first_zero_bit>:
mov    $0xfffffff5,%eax
test   %edi,%edi
jle    1124 <find_first_zero_bit+0x24>
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
mov    %ecx,%edx
shr    $0x5,%edx
mov    (%rsi,%rdx,4),%edx
bt     %ecx,%edx
jae    1125 <find_first_zero_bit+0x25>
add    $0x1,%ecx
cmp    %ecx,%edi
jne    1110 <find_first_zero_bit+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @find_first_zero_bit(i32 %0, i32* nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %17
4: ; preds = %2, %14
%5 = phi i32 [ %15, %14 ], [ 0, %2 ]
%6 = lshr i32 %5, 5
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %1, i64 %7
%9 = load i32, i32* %8
%10 = and i32 %5, 31
%11 = shl nuw i32 1, %10
%12 = and i32 %9, %11
%13 = icmp eq i32 %12, 0
br i1 %13, label %17, label %14
14: ; preds = %4
%15 = add nuw nsw i32 %5, 1
%16 = icmp eq i32 %15, %0
br i1 %16, label %17, label %4
17: ; preds = %4, %14, %2
%18 = phi i32 [ -11, %2 ], [ -11, %14 ], [ %5, %4 ]
ret i32 %18
}
void tokenDestroy(struct token_t *token) {}


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

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

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

LLVM IR (-O2):
%struct.token_t = type opaque
define void @tokenDestroy(%struct.token_t* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sort(int /*<<< orphan*/, int);
int main(void) {
  sort(0, 8 - 1);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
mov    $0x7,%esi
call   1030 <sort@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sort(i32 0, i32 7)
ret i32 0
}
extern unsigned int inw(unsigned long addr) {
  long result =
      *(volatile int *)((addr << 7) + ((0xfffffc0000000000UL) + 0x300000000UL) +
                        0x20);
  result >>= (addr & 3) * 8;
  return 0xffffUL & result;
}


x86 assembly (clang, -O0):
<inw>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x7,%rax
movabs $0xfffffc0300000000,%rcx
fc ff ff
add    %rcx,%rax
mov    0x20(%rax),%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
and    $0x3,%rcx
shl    $0x3,%rcx
mov    -0x10(%rbp),%rax
sar    %cl,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0xffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inw>:
lea    0x0(,%rdi,8),%ecx
shl    $0x7,%rdi
movabs $0xfffffc0300000020,%rax
fc ff ff
movslq (%rdi,%rax,1),%rax
and    $0x18,%cl
sar    %cl,%rax
movzwl %ax,%eax
ret

LLVM IR (-O0):
define i32 @inw(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = shl i64 %4, 7
%6 = add i64 %5, -4385161609216
%7 = add i64 %6, 32
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = sext i32 %9 to i64
store i64 %10, i64* %3
%11 = load i64, i64* %2
%12 = and i64 %11, 3
%13 = mul i64 %12, 8
%14 = load i64, i64* %3
%15 = ashr i64 %14, %13
store i64 %15, i64* %3
%16 = load i64, i64* %3
%17 = and i64 65535, %16
%18 = trunc i64 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @inw(i64 %0) {
%2 = shl i64 %0, 7
%3 = add i64 %2, -4385161609184
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = sext i32 %5 to i64
%7 = shl i64 %0, 3
%8 = and i64 %7, 24
%9 = ashr i64 %6, %8
%10 = trunc i64 %9 to i32
%11 = and i32 %10, 65535
ret i32 %11
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t change_lcd_color_intensity(uint32_t color, uint8_t new_intensity) {
  return (color & 0xFFFFFF00) | new_intensity;
}


x86 assembly (clang, -O0):
<change_lcd_color_intensity>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffffff00,%eax
or     -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<change_lcd_color_intensity>:
mov    %edi,%eax
and    $0xffffff00,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @change_lcd_color_intensity(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 = and i32 %5, -256
%7 = load i32, i32* %4
%8 = or i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @change_lcd_color_intensity(i32 %0, i32 %1) {
%3 = and i32 %0, -256
%4 = or i32 %3, %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: exe2com [/I] infile [outfile]\n");
  exit(1);
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"usage: exe2com [/I] infile [outfile]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}