xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
extern void console_error(const char *msg) { printf("ERROR: %s\n", msg); }


x86 assembly (clang, -O0):
<console_error>:
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):
<console_error>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @console_error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ parallel_clr_nrfd(int);
int /*<<< orphan*/ parallel_set_nrfd(int);
void parallel_emu_set_nrfd(unsigned char val) {
  if (val) {
    parallel_set_nrfd(0x01);
  } else {
    parallel_clr_nrfd(~0x01);
  }
}


x86 assembly (clang, -O0):
<parallel_emu_set_nrfd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
cmpb   $0x0,-0x1(%rbp)
je     1147 <parallel_emu_set_nrfd+0x27>
mov    $0x1,%edi
call   1040 <parallel_set_nrfd@plt>
jmp    1151 <parallel_emu_set_nrfd+0x31>
mov    $0xfffffffe,%edi
call   1030 <parallel_clr_nrfd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parallel_emu_set_nrfd>:
test   %edi,%edi
je     112e <parallel_emu_set_nrfd+0xe>
mov    $0x1,%edi
jmp    1040 <parallel_set_nrfd@plt>
mov    $0xfffffffe,%edi
jmp    1030 <parallel_clr_nrfd@plt>

LLVM IR (-O0):
define void @parallel_emu_set_nrfd(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = icmp ne i8 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @parallel_set_nrfd(i32 1)
br label %9
7: ; preds = %1
%8 = call i32 @parallel_clr_nrfd(i32 -2)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @parallel_emu_set_nrfd(i8 zeroext %0) {
%2 = icmp eq i8 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @parallel_set_nrfd(i32 1)
br label %7
5: ; preds = %1
%6 = tail call i32 @parallel_clr_nrfd(i32 -2)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int mmbuf__setup(char *);
int setup(char *file_path) { return mmbuf__setup(file_path); }


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

x86 assembly (clang, -O2):
<setup>:
jmp    1030 <mmbuf__setup@plt>

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

LLVM IR (-O2):
define i32 @setup(i8* %0) {
%2 = tail call i32 @mmbuf__setup(i8* %0)
ret i32 %2
}
int kstrncpy(buf, pos, n)
char *buf;
long pos;
int n;
{
  char *ptr;
  ptr = (char *)pos;
  while ((n > 0) && (*buf++ = *ptr++))
    ;
  return 0;
}


x86 assembly (clang, -O0):
<kstrncpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x14(%rbp)
mov    %al,-0x21(%rbp)
jle    1154 <kstrncpy+0x54>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
test   $0x1,%al
jne    1164 <kstrncpy+0x64>
jmp    1169 <kstrncpy+0x69>
jmp    1117 <kstrncpy+0x17>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kstrncpy>:
test   %edx,%edx
jle    111f <kstrncpy+0x1f>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <kstrncpy+0x10>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @kstrncpy(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%8 = load i64, i64* %5
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %7
br label %10
10: ; preds = %23, %3
%11 = load i32, i32* %6
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %21
13: ; preds = %10
%14 = load i8*, i8** %7
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %7
%16 = load i8, i8* %14
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %4
store i8 %16, i8* %17
%19 = sext i8 %16 to i32
%20 = icmp ne i32 %19, 0
br label %21
21: ; preds = %13, %10
%22 = phi i1 [ false, %10 ], [ %20, %13 ]
br i1 %22, label %23, label %24
23: ; preds = %21
br label %10
24: ; preds = %21
ret i32 0
}

LLVM IR (-O2):
define i32 @kstrncpy(i8* nocapture writeonly %0, i64 %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = inttoptr i64 %1 to i8*
br label %7
7: ; preds = %5, %7
%8 = phi i8* [ %12, %7 ], [ %0, %5 ]
%9 = phi i8* [ %10, %7 ], [ %6, %5 ]
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %9
%12 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %11, i8* %8
%13 = icmp eq i8 %11, 0
br i1 %13, label %14, label %7
14: ; preds = %7, %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _SC_PAGESIZE;
int /*<<< orphan*/ printf(char *, long);
long sysconf(int /*<<< orphan*/);
int main() {
  long sz = sysconf(_SC_PAGESIZE);
  printf("pagesize = %ld", sz);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xeca(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@_SC_PAGESIZE = global i32 0
@.str = [15 x i8] c"pagesize = %ld\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
%3 = load i32, i32* @_SC_PAGESIZE
%4 = call i64 @sysconf(i32 %3)
store i64 %4, i64* %2
%5 = load i64, i64* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64 %5)
ret i32 0
}

LLVM IR (-O2):
@_SC_PAGESIZE = global i32 0
@.str = [15 x i8] c"pagesize = %ld\00"
define i32 @main() {
%1 = load i32, i32* @_SC_PAGESIZE
%2 = tail call i64 @sysconf(i32 %1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ TIOCMGET;
int TIOCM_RI;
int modem_ioctl(int /*<<< orphan*/, int /*<<< orphan*/);
int tty_ri(void) { return !!(modem_ioctl(TIOCMGET, 0) & TIOCM_RI); }


x86 assembly (clang, -O0):
<tty_ri>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <modem_ioctl@plt>
mov    0x2ebd(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tty_ri>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <modem_ioctl@plt>
mov    0x2ec0(%rip),%rdx
xor    %ecx,%ecx
test   %eax,(%rdx)
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@TIOCMGET = global i32 0
@TIOCM_RI = global i32 0
define i32 @tty_ri() {
%1 = load i32, i32* @TIOCMGET
%2 = call i32 @modem_ioctl(i32 %1, i32 0)
%3 = load i32, i32* @TIOCM_RI
%4 = and i32 %2, %3
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
@TIOCMGET = global i32 0
@TIOCM_RI = global i32 0
define i32 @tty_ri() {
%1 = load i32, i32* @TIOCMGET
%2 = tail call i32 @modem_ioctl(i32 %1, i32 0)
%3 = load i32, i32* @TIOCM_RI
%4 = and i32 %3, %2
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
void ff_hevc_put_hevc_bi_pel_pixels4_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_pel_pixels4_10_sse4() {
ret void
}
void I420AlphaToABGR() {}


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

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

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

LLVM IR (-O2):
define void @I420AlphaToABGR() {
ret void
}
int do_op(char op, int a, int b) {
  int result = 0;
  switch (op) {
  case '+':
    result = a + b;
    break;
  case '-':
    result = a - b;
    break;
  case '*':
    result = a * b;
    break;
  }
  return result;
}


x86 assembly (clang, -O0):
<do_op>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x14(%rbp)
sub    $0x2a,%eax
je     116a <do_op+0x6a>
jmp    112c <do_op+0x2c>
mov    -0x14(%rbp),%eax
sub    $0x2b,%eax
je     114e <do_op+0x4e>
jmp    113d <do_op+0x3d>
mov    -0x14(%rbp),%eax
sub    $0x2d,%eax
je     115c <do_op+0x5c>
jmp    1174 <do_op+0x74>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1174 <do_op+0x74>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1174 <do_op+0x74>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_op>:
cmp    $0x2a,%edi
je     1115 <do_op+0x15>
cmp    $0x2d,%edi
je     111b <do_op+0x1b>
xor    %eax,%eax
cmp    $0x2b,%edi
jne    111a <do_op+0x1a>
add    %esi,%edx
jmp    1118 <do_op+0x18>
imul   %esi,%edx
mov    %edx,%eax
ret
sub    %edx,%esi
mov    %esi,%eax
ret

LLVM IR (-O0):
define i32 @do_op(i8 signext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load i8, i8* %4
%9 = sext i8 %8 to i32
switch i32 %9, label %22 [
i32 43, label %10
i32 45, label %14
i32 42, label %18
]
10: ; preds = %3
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = add nsw i32 %11, %12
store i32 %13, i32* %7
br label %22
14: ; preds = %3
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = sub nsw i32 %15, %16
store i32 %17, i32* %7
br label %22
18: ; preds = %3
%19 = load i32, i32* %5
%20 = load i32, i32* %6
%21 = mul nsw i32 %19, %20
store i32 %21, i32* %7
br label %22
22: ; preds = %3, %18, %14, %10
%23 = load i32, i32* %7
ret i32 %23
}

LLVM IR (-O2):
define i32 @do_op(i8 signext %0, i32 %1, i32 %2) {
%4 = sext i8 %0 to i32
switch i32 %4, label %11 [
i32 43, label %5
i32 45, label %7
i32 42, label %9
]
5: ; preds = %3
%6 = add nsw i32 %2, %1
br label %11
7: ; preds = %3
%8 = sub nsw i32 %1, %2
br label %11
9: ; preds = %3
%10 = mul nsw i32 %2, %1
br label %11
11: ; preds = %3, %9, %7, %5
%12 = phi i32 [ 0, %3 ], [ %10, %9 ], [ %8, %7 ], [ %6, %5 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p521_from_bytes(uintptr_t, uintptr_t);
void fiat_p521_from_bytes(uint64_t out1[9], const uint8_t arg1[66]) {
  internal_fiat_p521_from_bytes((uintptr_t)out1, (uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_p521_from_bytes>:
jmp    1030 <internal_fiat_p521_from_bytes@plt>

LLVM IR (-O0):
define void @fiat_p521_from_bytes(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_p521_from_bytes(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_p521_from_bytes(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_p521_from_bytes(i64 %3, i64 %4)
ret void
}
void loop(void) {
  int i;
  for (i = 0; i < 10000; i++)
    asm volatile("" ::: "memory");
}


x86 assembly (clang, -O0):
<loop>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x2710,-0x4(%rbp)
jge    1126 <loop+0x26>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <loop+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<loop>:
mov    $0x2710,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0xffffffff,%eax
jne    1110 <loop+0x10>
ret

LLVM IR (-O0):
define void @loop() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 10000
br i1 %4, label %5, label %9
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
br label %2
9: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @loop() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %3, %1 ]
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
%3 = add nuw nsw i32 %2, 1
%4 = icmp eq i32 %3, 10000
br i1 %4, label %5, label %1
5: ; preds = %1
ret void
}
void rdar10686586() {
  int array1[] = {1, 2, 3, 0};
  int array2[] = {1, 2, 3, 0};
  int *array[] = {array1, array2};
  int sum = 0;
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j < 4; j++) {
      sum += array[i][j];
    }
  }
}


x86 assembly (clang, -O0):
<rdar10686586>:
push   %rbp
mov    %rsp,%rbp
mov    0xef5(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xef2(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xedf(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xedc(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
cmpl   $0x2,-0x38(%rbp)
jge    11a0 <rdar10686586+0xa0>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x4,-0x3c(%rbp)
jge    118d <rdar10686586+0x8d>
movslq -0x38(%rbp),%rax
mov    -0x30(%rbp,%rax,8),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    115f <rdar10686586+0x5f>
jmp    1192 <rdar10686586+0x92>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    114e <rdar10686586+0x4e>
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.rdar10686586.array1 = [4 x i32] [i32 1, i32 2, i32 3, i32 0]
@__const.rdar10686586.array2 = [4 x i32] [i32 1, i32 2, i32 3, i32 0]
define void @rdar10686586() {
%1 = alloca [4 x i32]
%2 = alloca [4 x i32]
%3 = alloca [2 x i32*]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = bitcast [4 x i32]* %1 to i8*
%8 = bitcast [4 x i32]* %2 to i8*
%9 = getelementptr inbounds [2 x i32*], [2 x i32*]* %3, i64 0, i64 0
%10 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
store i32* %10, i32** %9
%11 = getelementptr inbounds i32*, i32** %9, i64 1
%12 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
store i32* %12, i32** %11
store i32 0, i32* %4
store i32 0, i32* %5
br label %13
13: ; preds = %35, %0
%14 = load i32, i32* %5
%15 = icmp slt i32 %14, 2
br i1 %15, label %16, label %38
16: ; preds = %13
store i32 0, i32* %6
br label %17
17: ; preds = %31, %16
%18 = load i32, i32* %6
%19 = icmp slt i32 %18, 4
br i1 %19, label %20, label %34
20: ; preds = %17
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [2 x i32*], [2 x i32*]* %3, i64 0, i64 %22
%24 = load i32*, i32** %23
%25 = load i32, i32* %6
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i32, i32* %24, i64 %26
%28 = load i32, i32* %27
%29 = load i32, i32* %4
%30 = add nsw i32 %29, %28
store i32 %30, i32* %4
br label %31
31: ; preds = %20
%32 = load i32, i32* %6
%33 = add nsw i32 %32, 1
store i32 %33, i32* %6
br label %17
34: ; preds = %17
br label %35
35: ; preds = %34
%36 = load i32, i32* %5
%37 = add nsw i32 %36, 1
store i32 %37, i32* %5
br label %13
38: ; preds = %13
ret void
}

LLVM IR (-O2):
define void @rdar10686586() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gms_styled_string(int, char const *);
void gms_standout_string(const char *message) {
  gms_styled_string((1), message);
}


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

x86 assembly (clang, -O2):
<gms_standout_string>:
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <gms_styled_string@plt>

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

LLVM IR (-O2):
define void @gms_standout_string(i8* %0) {
%2 = tail call i32 @gms_styled_string(i32 1, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void write_flashram_commandh() { printf("write_flashram_commandh\n"); }


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

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

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

LLVM IR (-O2):
@str = [24 x i8] c"write_flashram_commandh\00"
define void @write_flashram_commandh() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ back_key_down(char);
void front_key_down(char k) { back_key_down(k); }


x86 assembly (clang, -O0):
<front_key_down>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <back_key_down@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<front_key_down>:
jmp    1030 <back_key_down@plt>

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

LLVM IR (-O2):
define void @front_key_down(i8 signext %0) {
%2 = tail call i32 @back_key_down(i8 signext %0)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t smpte_hbrmt_get_video_source_id(const uint8_t *p_hbrmt) {
  return p_hbrmt[0] & 0x7;
}


x86 assembly (clang, -O0):
<smpte_hbrmt_get_video_source_id>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x7,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<smpte_hbrmt_get_video_source_id>:
mov    (%rdi),%eax
and    $0x7,%eax
ret

LLVM IR (-O0):
define i32 @smpte_hbrmt_get_video_source_id(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = and i32 %5, 7
ret i32 %6
}

LLVM IR (-O2):
define i32 @smpte_hbrmt_get_video_source_id(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 7
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "usage: write user [tty]\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 = [25 x i8] c"usage: write user [tty]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"usage: write user [tty]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ MD5(unsigned char *, size_t, unsigned char *);
void gf_rsync_strong_checksum(unsigned char *data, size_t len,
                              unsigned char *md5) {
  MD5(data, len, md5);
}


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

x86 assembly (clang, -O2):
<gf_rsync_strong_checksum>:
jmp    1030 <MD5@plt>

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

LLVM IR (-O2):
define void @gf_rsync_strong_checksum(i8* %0, i64 %1, i8* %2) {
%4 = tail call i32 @MD5(i8* %0, i64 %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void hdl_sys1(int n) { printf("hdl_sys1: Signal recu: %d\n", n); }


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

x86 assembly (clang, -O2):
<hdl_sys1>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"hdl_sys1: Signal recu: %d\0A\00"
define void @hdl_sys1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"hdl_sys1: Signal recu: %d\0A\00"
define void @hdl_sys1(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void XImageByteOrder() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fread(int *, int, int, int /*<<< orphan*/ *);
int lire_int_binaire(FILE *fichier) {
  int entier;
  fread(&entier, 4, 1, fichier);
  return (entier);
}


x86 assembly (clang, -O0):
<lire_int_binaire>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0xc(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lire_int_binaire>:
push   %rax
mov    %rdi,%rcx
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @lire_int_binaire(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @fread(i32* %3, i32 4, i32 1, i32* %4)
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @lire_int_binaire(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @fread(i32* %2, i32 4, i32 1, i32* %0)
%5 = load i32, i32* %2
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ writeidew(int, int /*<<< orphan*/);
void ide_write_qua_w(uint16_t addr, uint16_t val, void *priv) {
  writeidew(3, val);
}


x86 assembly (clang, -O0):
<ide_write_qua_w>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    $0x3,%edi
call   1030 <writeidew@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ide_write_qua_w>:
mov    $0x3,%edi
jmp    1030 <writeidew@plt>

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

LLVM IR (-O2):
define void @ide_write_qua_w(i32 %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @writeidew(i32 3, i32 %1)
ret void
}
/* Type definitions */
struct TreeNode {
  int dummy;
};

/* Variables and functions */
int depth(struct TreeNode *);
int minDepth(struct TreeNode *root) {
  if (!root)
    return (0);
  return (depth(root));
}


x86 assembly (clang, -O0):
<minDepth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <minDepth+0x23>
movl   $0x0,-0x4(%rbp)
jmp    113f <minDepth+0x2f>
mov    -0x10(%rbp),%rdi
call   1030 <depth@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<minDepth>:
test   %rdi,%rdi
je     111a <minDepth+0xa>
jmp    1030 <depth@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.TreeNode = type { i32 }
define i32 @minDepth(%struct.TreeNode* %0) {
%2 = alloca i32
%3 = alloca %struct.TreeNode*
store %struct.TreeNode* %0, %struct.TreeNode** %3
%4 = load %struct.TreeNode*, %struct.TreeNode** %3
%5 = icmp ne %struct.TreeNode* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
store i32 0, i32* %2
br label %10
7: ; preds = %1
%8 = load %struct.TreeNode*, %struct.TreeNode** %3
%9 = call i32 @depth(%struct.TreeNode* %8)
store i32 %9, i32* %2
br label %10
10: ; preds = %7, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define i32 @minDepth(%struct.TreeNode* %0) {
%2 = icmp eq %struct.TreeNode* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @depth(%struct.TreeNode* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ 0, %1 ]
ret i32 %6
}
void del_accept(int idx, int *sidx) {}


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

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

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

LLVM IR (-O2):
define void @del_accept(i32 %0, i32* nocapture %1) {
ret void
}
int test_imm_41uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x41 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_41uint64_lowword_reg>:
test   $0x41,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_41uint64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 65
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_41uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 65
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int xwFromWxDxwBorder(int wx) { return (wx - (2 * 100)); }


x86 assembly (clang, -O0):
<xwFromWxDxwBorder>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0xc8,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xwFromWxDxwBorder>:
lea    -0xc8(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @xwFromWxDxwBorder(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 200
ret i32 %4
}

LLVM IR (-O2):
define i32 @xwFromWxDxwBorder(i32 %0) {
%2 = add nsw i32 %0, -200
ret i32 %2
}
void XSubtractRegion() {}


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

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

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

LLVM IR (-O2):
define void @XSubtractRegion() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ puts(char *);
void main() {
  char str[30];
  void order(char str[]);
  int i;
  gets(str);
  order(str);
  puts(str);
  printf("%s", str);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x20(%rbp),%rdi
call   1060 <gets@plt>
lea    -0x20(%rbp),%rdi
call   1050 <order@plt>
lea    -0x20(%rbp),%rdi
call   1030 <puts@plt>
lea    -0x20(%rbp),%rsi
lea    0xe92(%rip),%rdi
call   1040 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1060 <gets@plt>
mov    %rbx,%rdi
call   1050 <order@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xe99(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @main() {
%1 = alloca [30 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%4 = call i32 @gets(i8* %3)
%5 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%7 = call i32 @puts(i8* %6)
%8 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @main() {
%1 = alloca [30 x i8]
%2 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%3 = call i32 @gets(i8* %2)
%4 = call i32 @puts(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
/* Variables and functions */
int abs(int);
scalar_t__ time(long *);
int randommove() {
  int i;
  i = abs((int)time((long *)0));
  return (i % 9);
}


x86 assembly (clang, -O0):
<randommove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <abs@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randommove>:
push   %rax
xor    %edi,%edi
call   1030 <time@plt>
mov    %eax,%ecx
neg    %ecx
cmovns %ecx,%eax
imul   $0x38e38e39,%rax,%rcx
shr    $0x21,%rcx
lea    (%rcx,%rcx,8),%ecx
sub    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @randommove() {
%1 = alloca i32
%2 = call i64 @time(i64* null)
%3 = trunc i64 %2 to i32
%4 = call i32 @abs(i32 %3)
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = srem i32 %5, 9
ret i32 %6
}

LLVM IR (-O2):
define i32 @randommove() {
%1 = tail call i64 @time(i64* null)
%2 = trunc i64 %1 to i32
%3 = tail call i32 @llvm.abs.i32(i32 %2, i1 true)
%4 = urem i32 %3, 9
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
double dsquare(double X) {
  printf("Squareing\n");
  return X * X;
}


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

x86 assembly (clang, -O2):
<dsquare>:
push   %rax
movsd  %xmm0,(%rsp)
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
movsd  (%rsp),%xmm0
mulsd  %xmm0,%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
@str = [10 x i8] c"Squareing\00"
define double @dsquare(double %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%3 = fmul double %0, %0
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int /*<<< orphan*/ free(char *);
int mkdir(char *, int /*<<< orphan*/);
char *path_parts(char const **);
int mkdir_parts(const char **parts, mode_t m) {
  char *path;
  int ret;
  if ((path = path_parts(parts)) == NULL) {
    return -1;
  }
  ret = mkdir(path, m);
  free(path);
  return ret;
}


x86 assembly (clang, -O0):
<mkdir_parts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <path_parts@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1162 <mkdir_parts+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    1180 <mkdir_parts+0x50>
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <mkdir@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkdir_parts>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
call   1050 <path_parts@plt>
test   %rax,%rax
je     115a <mkdir_parts+0x2a>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %ebp,%esi
call   1040 <mkdir@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
jmp    115f <mkdir_parts+0x2f>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @mkdir_parts(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 = call i8* @path_parts(i8** %8)
store i8* %9, i8** %6
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 -1, i32* %3
br label %19
12: ; preds = %2
%13 = load i8*, i8** %6
%14 = load i32, i32* %5
%15 = call i32 @mkdir(i8* %13, i32 %14)
store i32 %15, i32* %7
%16 = load i8*, i8** %6
%17 = call i32 @free(i8* %16)
%18 = load i32, i32* %7
store i32 %18, i32* %3
br label %19
19: ; preds = %12, %11
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @mkdir_parts(i8** %0, i32 %1) {
%3 = tail call i8* @path_parts(i8** %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @mkdir(i8* %3, i32 %1)
%7 = tail call i32 @free(i8* %3)
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ %6, %5 ], [ -1, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ daemonize();
int /*<<< orphan*/ tcpserver(int);
int /*<<< orphan*/ terminate();
int main(int argc, char *argv[]) {
  daemonize();
  tcpserver(6123);
  terminate();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <daemonize@plt>
mov    $0x17eb,%edi
call   1040 <tcpserver@plt>
mov    $0x0,%al
call   1050 <terminate@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <daemonize@plt>
mov    $0x17eb,%edi
call   1040 <tcpserver@plt>
xor    %eax,%eax
call   1050 <terminate@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @daemonize()
%4 = tail call i32 @tcpserver(i32 6123)
%5 = tail call i32 (...) @terminate()
ret i32 0
}
void m3_mdm_pm_dpm_log(void) { return; }


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

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

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

LLVM IR (-O2):
define void @m3_mdm_pm_dpm_log() {
ret void
}
/* Variables and functions */
size_t rgb565_sz(unsigned width, unsigned height) { return width * height * 2; }


x86 assembly (clang, -O0):
<rgb565_sz>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgb565_sz>:
imul   %esi,%edi
lea    (%rdi,%rdi,1),%eax
ret

LLVM IR (-O0):
define i64 @rgb565_sz(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 = mul i32 %5, %6
%8 = mul i32 %7, 2
%9 = zext i32 %8 to i64
ret i64 %9
}

LLVM IR (-O2):
define i64 @rgb565_sz(i32 %0, i32 %1) {
%3 = shl i32 %0, 1
%4 = mul i32 %3, %1
%5 = zext i32 %4 to i64
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ closelog();
int eu_log_exit(void) {
  closelog();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @eu_log_exit() {
%1 = tail call i32 (...) @closelog()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ enumSample();
int main() {
  enumSample();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @enumSample()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main_preinit3(void) {
  printf("main_preinit3"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"main_preinit3\00"
define void @main_preinit3() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
int intcompar(const void *ap, const void *bp) {
  return *(int *)ap - *(int *)bp;
}


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

x86 assembly (clang, -O2):
<intcompar>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @intcompar(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @intcompar(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int bit_AES;
int /*<<< orphan*/ cpuid(int, int *);
bool has_aes_ni() {
  int cpu_info[4] = {0};
  cpuid((1), cpu_info);
  return cpu_info[(2)] & bit_AES;
}


x86 assembly (clang, -O0):
<has_aes_ni>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1030 <memset@plt>
lea    -0x10(%rbp),%rsi
mov    $0x1,%edi
call   1040 <cpuid@plt>
mov    -0x8(%rbp),%eax
mov    0x2e98(%rip),%rcx
and    (%rcx),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<has_aes_ni>:
sub    $0x18,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x1,%edi
call   1030 <cpuid@plt>
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
and    0x8(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@bit_AES = global i32 0
define i32 @has_aes_ni() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%4 = call i32 @cpuid(i32 1, i32* %3)
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 2
%6 = load i32, i32* %5
%7 = load i32, i32* @bit_AES
%8 = and i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
@bit_AES = global i32 0
define i32 @has_aes_ni() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%4 = call i32 @cpuid(i32 1, i32* %3)
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 2
%6 = load i32, i32* %5
%7 = load i32, i32* @bit_AES
%8 = and i32 %7, %6
ret i32 %8
}
/* Variables and functions */
size_t __strxfrm_l(char *, char const *, size_t, int /*<<< orphan*/);
size_t strxfrm(char *restrict dest, const char *restrict src, size_t n) {
  return __strxfrm_l(dest, src, n, 0);
}


x86 assembly (clang, -O0):
<strxfrm>:
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
xor    %ecx,%ecx
call   1030 <__strxfrm_l@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strxfrm>:
xor    %ecx,%ecx
jmp    1030 <__strxfrm_l@plt>

LLVM IR (-O0):
define i64 @strxfrm(i8* noalias %0, i8* noalias %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 i64 @__strxfrm_l(i8* %7, i8* %8, i64 %9, i32 0)
ret i64 %10
}

LLVM IR (-O2):
define i64 @strxfrm(i8* noalias %0, i8* noalias %1, i64 %2) {
%4 = tail call i64 @__strxfrm_l(i8* %0, i8* %1, i64 %2, i32 0)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ env_get_var(char **, char const *);
char *ft_strdup(int /*<<< orphan*/);
char *env_dup_var(char **env, const char *var_asked) {
  return (ft_strdup(env_get_var(env, var_asked)));
}


x86 assembly (clang, -O0):
<env_dup_var>:
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 <env_get_var@plt>
mov    %eax,%edi
call   1040 <ft_strdup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<env_dup_var>:
push   %rax
call   1030 <env_get_var@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <ft_strdup@plt>

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

LLVM IR (-O2):
define i8* @env_dup_var(i8** %0, i8* %1) {
%3 = tail call i32 @env_get_var(i8** %0, i8* %1)
%4 = tail call i8* @ft_strdup(i32 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ rdwr(int);
read() { rdwr(01); }


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

x86 assembly (clang, -O2):
<read>:
mov    $0x1,%edi
jmp    1030 <rdwr@plt>

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

LLVM IR (-O2):
define i32 @read() {
%1 = tail call i32 @rdwr(i32 1)
ret i32 undef
}
void serv_power_init() {}


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

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

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

LLVM IR (-O2):
define void @serv_power_init() {
ret void
}
void I420ToI400() {}


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

x86 assembly (clang, -O2):
ret

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

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

/* Variables and functions */
int /*<<< orphan*/ mpz_clear(int /*<<< orphan*/);
int /*<<< orphan*/ mpz_init(int /*<<< orphan*/);
int main(int argc, char **argv) {
  mpz_t integ;
  mpz_init(integ);
  mpz_clear(integ);
  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    -0x14(%rbp),%edi
call   1030 <mpz_init@plt>
mov    -0x14(%rbp),%edi
call   1040 <mpz_clear@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <mpz_init@plt>
call   1040 <mpz_clear@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @mpz_init(i32 undef)
%4 = tail call i32 @mpz_clear(i32 undef)
ret i32 0
}
double ATan2(double y, double x) {
  double PI = 3.14;
  return 0.0;
}


x86 assembly (clang, -O0):
<ATan2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xeea(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ATan2>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @ATan2(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
store double 3.140000e+00, double* %5
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @ATan2(double %0, double %1) {
ret double 0.000000e+00
}
double decimalPortion(double d) {
  int i = (int)d;
  double res = d - (double)i;
  return res;
}


x86 assembly (clang, -O0):
<decimalPortion>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<decimalPortion>:
cvttpd2dq %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm1
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @decimalPortion(double %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = fptosi double %5 to i32
store i32 %6, i32* %3
%7 = load double, double* %2
%8 = load i32, i32* %3
%9 = sitofp i32 %8 to double
%10 = fsub double %7, %9
store double %10, double* %4
%11 = load double, double* %4
ret double %11
}

LLVM IR (-O2):
define double @decimalPortion(double %0) {
%2 = fptosi double %0 to i32
%3 = sitofp i32 %2 to double
%4 = fsub double %0, %3
ret double %4
}