xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help() {
  printf("redirect option:\n"
         " --redirect-target target   : ACCEPT, DROP, RETURN or CONTINUE\n");
}


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

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

LLVM IR (-O0):
@.str = [81 x i8] c"redirect option:\0A --redirect-target target : ACCEPT, DROP, RETURN or CONTINUE\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [80 x i8] c"redirect option:\0A --redirect-target target : ACCEPT, DROP, RETURN or CONTINUE\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ icon_pixmap;
};
typedef TYPE_1__ XWMHints;

/* Variables and functions */
unsigned long get_XWMHints_icon_pixmap(void *_p) {
  return (unsigned long)((XWMHints *)_p)->icon_pixmap;
}


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

x86 assembly (clang, -O2):
<get_XWMHints_icon_pixmap>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XWMHints_icon_pixmap(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XWMHints_icon_pixmap(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
void simple_loops() {
  int i;
  for (i = 0; i < 100; ++i) {
  }
  while (i > 0)
    i--;
  do {
  } while (i++ < 75);
}


x86 assembly (clang, -O0):
<simple_loops>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    1128 <simple_loops+0x28>
jmp    111a <simple_loops+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <simple_loops+0xb>
jmp    112d <simple_loops+0x2d>
cmpl   $0x0,-0x4(%rbp)
jle    1145 <simple_loops+0x45>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    112d <simple_loops+0x2d>
jmp    114a <simple_loops+0x4a>
jmp    114f <simple_loops+0x4f>
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x4b,%eax
jl     114a <simple_loops+0x4a>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @simple_loops() {
%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, 100
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
br label %10
10: ; preds = %13, %9
%11 = load i32, i32* %1
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %1
%15 = add nsw i32 %14, -1
store i32 %15, i32* %1
br label %10
16: ; preds = %10
br label %17
17: ; preds = %18, %16
br label %18
18: ; preds = %17
%19 = load i32, i32* %1
%20 = add nsw i32 %19, 1
store i32 %20, i32* %1
%21 = icmp slt i32 %19, 75
br i1 %21, label %17, label %22
22: ; preds = %18
ret void
}

LLVM IR (-O2):
define void @simple_loops() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void wait_for_gdb_to_attach() {
  int is_waiting = 1;
  while (is_waiting) {
    sleep(1);
  }
}


x86 assembly (clang, -O0):
<wait_for_gdb_to_attach>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1138 <wait_for_gdb_to_attach+0x28>
mov    $0x1,%edi
call   1030 <sleep@plt>
jmp    111f <wait_for_gdb_to_attach+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_for_gdb_to_attach>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1030 <sleep@plt>
jmp    1120 <wait_for_gdb_to_attach+0x10>

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

LLVM IR (-O2):
define void @wait_for_gdb_to_attach() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @sleep(i32 1)
br label %1
}
unsigned xrop3_212_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk2 = S ^ T;
  stk3 = T ^ D;
  stk2 = stk2 & stk3;
  stk1 = S ^ stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_212_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_212_0_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
mov    %eax,%edx
xor    %ecx,%edx
xor    $0xff,%eax
and    %edx,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_212_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = xor i32 %23, %24
store i32 %25, i32* %9
%26 = load i32, i32* %7
%27 = load i32, i32* %5
%28 = xor i32 %26, %27
store i32 %28, i32* %10
%29 = load i32, i32* %9
%30 = load i32, i32* %10
%31 = and i32 %29, %30
store i32 %31, i32* %9
%32 = load i32, i32* %6
%33 = load i32, i32* %9
%34 = xor i32 %32, %33
store i32 %34, i32* %8
%35 = load i32, i32* %8
ret i32 %35
}

LLVM IR (-O2):
define i32 @xrop3_212_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, %4
%8 = xor i32 %6, 255
%9 = and i32 %7, %8
%10 = xor i32 %9, %4
ret i32 %10
}
void sync_change_bit(int nr, volatile unsigned long *addr) {
  __asm__ __volatile__("lock; btcl %1,%0"
                       : "+m"((*(volatile long *)addr))
                       : "Ir"(nr)
                       : "memory");
}


x86 assembly (clang, -O0):
<sync_change_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
lock btc %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sync_change_bit>:
lock btc %edi,(%rsi)
ret

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

LLVM IR (-O2):
define void @sync_change_bit(i32 %0, i64* %1) {
tail call void asm sideeffect "lock; btcl $1,$0", "=*m,Ir,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %1, i32 %0, i64* elementtype(i64) %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LOG_DAEMON;
int /*<<< orphan*/ LOG_PID;
int /*<<< orphan*/ openlog(char *, int /*<<< orphan*/, int /*<<< orphan*/);
void init_log(void) { openlog("tomatosaverd", LOG_PID, LOG_DAEMON); }


x86 assembly (clang, -O0):
<init_log>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edx
lea    0xed3(%rip),%rdi
call   1030 <openlog@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_log>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
mov    0x2ec8(%rip),%rax
mov    (%rax),%edx
lea    0xed7(%rip),%rdi
jmp    1030 <openlog@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"tomatosaverd\00"
@LOG_PID = global i32 0
@LOG_DAEMON = global i32 0
define void @init_log() {
%1 = load i32, i32* @LOG_PID
%2 = load i32, i32* @LOG_DAEMON
%3 = call i32 @openlog(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"tomatosaverd\00"
@LOG_PID = global i32 0
@LOG_DAEMON = global i32 0
define void @init_log() {
%1 = load i32, i32* @LOG_PID
%2 = load i32, i32* @LOG_DAEMON
%3 = tail call i32 @openlog(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close_serving_thread(int);
int sread(int, void *, unsigned int);
void sread_C(int threadfd, void *buf, unsigned int len) {
  if (sread(threadfd, buf, len) == -1)
    close_serving_thread(threadfd);
}


x86 assembly (clang, -O0):
<sread_C>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <sread@plt>
cmp    $0xffffffff,%eax
jne    1152 <sread_C+0x32>
mov    -0x4(%rbp),%edi
call   1030 <close_serving_thread@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sread_C>:
push   %rbx
mov    %edi,%ebx
call   1040 <sread@plt>
cmp    $0xffffffff,%eax
je     112f <sread_C+0xf>
pop    %rbx
ret
mov    %ebx,%edi
pop    %rbx
jmp    1030 <close_serving_thread@plt>

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

LLVM IR (-O2):
define void @sread_C(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @sread(i32 %0, i8* %1, i32 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @close_serving_thread(i32 %0)
br label %8
8: ; preds = %6, %3
ret void
}
int AMCTimingEvent_TriggerTimeout(struct AMCTimingEvent *timeEvent) {
  return -1;
}


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

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

LLVM IR (-O0):
%struct.AMCTimingEvent = type opaque
define i32 @AMCTimingEvent_TriggerTimeout(%struct.AMCTimingEvent* %0) {
%2 = alloca %struct.AMCTimingEvent*
store %struct.AMCTimingEvent* %0, %struct.AMCTimingEvent** %2
ret i32 -1
}

LLVM IR (-O2):
%struct.AMCTimingEvent = type opaque
define i32 @AMCTimingEvent_TriggerTimeout(%struct.AMCTimingEvent* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void wypisz(int tab[], int n) {
  int i;
  for (i = 0; i < n; i++) {
    printf("%d ", tab[i++]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<wypisz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1163 <wypisz+0x53>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <wypisz+0x16>
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wypisz>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    1156 <wypisz+0x36>
mov    %esi,%ebp
mov    %rdi,%r14
lea    0xec9(%rip),%r15
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,4),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x2,%rbx
cmp    %ebp,%ebx
jl     1140 <wypisz+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @wypisz(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2, %4
%5 = phi i64 [ %9, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = add nuw i64 %5, 2
%10 = trunc i64 %9 to i32
%11 = icmp slt i32 %10, %1
br i1 %11, label %4, label %12
12: ; preds = %4, %2
%13 = tail call i32 @putchar(i32 10)
ret void
}
void nseel_asm_repeatwhile_end(void) {}


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

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

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

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

/* Variables and functions */
int getpgrp();
int getpid();
int getsid(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, int, int);
void print() {
  pid_t pid = getpid();
  pid_t grp = getpgrp();
  pid_t sid = getsid(0);
  printf("parent %u: %u, %u\n", sid, pid, grp);
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1060 <getpgrp@plt>
mov    %eax,-0x8(%rbp)
xor    %edi,%edi
call   1050 <getsid@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xe8a(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1060 <getpgrp@plt>
mov    %eax,%ebp
xor    %edi,%edi
call   1050 <getsid@plt>
lea    0xe9d(%rip),%rdi
mov    %eax,%esi
mov    %ebx,%edx
mov    %ebp,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"parent %u: %u, %u\0A\00"
define void @print() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (...) @getpid()
store i32 %4, i32* %1
%5 = call i32 (...) @getpgrp()
store i32 %5, i32* %2
%6 = call i32 @getsid(i32 0)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"parent %u: %u, %u\0A\00"
define void @print() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 (...) @getpgrp()
%3 = tail call i32 @getsid(i32 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cReadByte(int, unsigned char *);
unsigned char CheckId_BF3403(void) {
  unsigned char temp1;
  unsigned char temp2;
  VIM_SIF_I2cReadByte(0xfc, &temp1);
  VIM_SIF_I2cReadByte(0xfd, &temp2);
  if ((temp1 == 0x34) && (temp2 == 0x03))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<CheckId_BF3403>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xfc,%edi
lea    -0x2(%rbp),%rsi
call   1030 <VIM_SIF_I2cReadByte@plt>
mov    $0xfd,%edi
lea    -0x3(%rbp),%rsi
call   1030 <VIM_SIF_I2cReadByte@plt>
movzbl -0x2(%rbp),%eax
cmp    $0x34,%eax
jne    1157 <CheckId_BF3403+0x47>
movzbl -0x3(%rbp),%eax
cmp    $0x3,%eax
jne    1157 <CheckId_BF3403+0x47>
movb   $0x1,-0x1(%rbp)
jmp    115b <CheckId_BF3403+0x4b>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckId_BF3403>:
push   %rax
lea    0x7(%rsp),%rsi
mov    $0xfc,%edi
call   1030 <VIM_SIF_I2cReadByte@plt>
lea    0x6(%rsp),%rsi
mov    $0xfd,%edi
call   1030 <VIM_SIF_I2cReadByte@plt>
mov    0x7(%rsp),%al
xor    $0x34,%al
mov    0x6(%rsp),%cl
xor    $0x3,%cl
or     %al,%cl
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @CheckId_BF3403() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = call i32 @VIM_SIF_I2cReadByte(i32 252, i8* %2)
%5 = call i32 @VIM_SIF_I2cReadByte(i32 253, i8* %3)
%6 = load i8, i8* %2
%7 = zext i8 %6 to i32
%8 = icmp eq i32 %7, 52
br i1 %8, label %9, label %14
9: ; preds = %0
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = icmp eq i32 %11, 3
br i1 %12, label %13, label %14
13: ; preds = %9
store i8 1, i8* %1
br label %15
14: ; preds = %9, %0
store i8 0, i8* %1
br label %15
15: ; preds = %14, %13
%16 = load i8, i8* %1
ret i8 %16
}

LLVM IR (-O2):
define zeroext i8 @CheckId_BF3403() {
%1 = alloca i8
%2 = alloca i8
%3 = call i32 @VIM_SIF_I2cReadByte(i32 252, i8* %1)
%4 = call i32 @VIM_SIF_I2cReadByte(i32 253, i8* %2)
%5 = load i8, i8* %1
%6 = icmp eq i8 %5, 52
%7 = load i8, i8* %2
%8 = icmp eq i8 %7, 3
%9 = select i1 %6, i1 %8, i1 false
%10 = zext i1 %9 to i8
ret i8 %10
}
/* Variables and functions */
char **malloc(int);
int str_strarr_init(char ***arr) {
  *arr = malloc(sizeof(char **));
  if (NULL == *arr) {
    return -1;
  }
  **arr = NULL;
  return 0;
}


x86 assembly (clang, -O0):
<str_strarr_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
cmp    (%rcx),%rax
jne    114b <str_strarr_init+0x3b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1160 <str_strarr_init+0x50>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movq   $0x0,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_strarr_init>:
push   %rbx
mov    %rdi,%rbx
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,(%rbx)
test   %rax,%rax
je     1131 <str_strarr_init+0x21>
movq   $0x0,(%rax)
xor    %eax,%eax
pop    %rbx
ret
mov    $0xffffffff,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @str_strarr_init(i8*** nocapture writeonly %0) {
%2 = tail call i8** @malloc(i32 8)
store i8** %2, i8*** %0
%3 = icmp eq i8** %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
store i8* null, i8** %2
br label %5
5: ; preds = %1, %4
%6 = phi i32 [ 0, %4 ], [ -1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ CALC_appendString(char *);
void CALC_addCos() {
  CALC_appendString("cos");
  CALC_appendString("(");
}


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

x86 assembly (clang, -O2):
<CALC_addCos>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <CALC_appendString@plt>
lea    0xee0(%rip),%rdi
pop    %rax
jmp    1030 <CALC_appendString@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"cos\00"
@.str.1 = [2 x i8] c"(\00"
define void @CALC_addCos() {
%1 = tail call i32 @CALC_appendString(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @CALC_appendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned int htonl(unsigned int);
int /*<<< orphan*/ memcpy(char *, unsigned int *, int);
int encode_mime_type(char *hdrstart, int hdrlen, unsigned int bodi,
                     char *where) {
  unsigned int type;
  type = htonl(bodi);
  memcpy(where, &type, sizeof(unsigned int));
  return sizeof(int);
}


x86 assembly (clang, -O0):
<encode_mime_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <htonl@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    $0x4,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode_mime_type>:
push   %rbx
sub    $0x10,%rsp
mov    %rcx,%rbx
mov    %edx,%edi
call   1030 <htonl@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    $0x4,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @encode_mime_type(i8* nocapture readnone %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i32
%6 = bitcast i32* %5 to i8*
%7 = tail call i32 @htonl(i32 %2)
store i32 %7, i32* %5
%8 = call i32 @memcpy(i8* %3, i32* %5, i32 4)
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void rt_error(char *mesg) {
  fprintf(stderr, "%s\n", mesg);
  exit(1);
}


x86 assembly (clang, -O0):
<rt_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<rt_error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @rt_error(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 ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @rt_error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
int test_imm_BAint16_mem(short *val) {
  return ((*val) & (-0xBA << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_BAint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xffffff46,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_BAint16_mem>:
movzwl (%rdi),%eax
test   $0xff46,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_BAint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -186
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void __attribute__((section(".bar"))) t22(void) {}


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

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

LLVM IR (-O0):
define void @t22() section ".bar" {
ret void
}

LLVM IR (-O2):
define void @t22() section ".bar" {
ret void
}
int do_404() { return 404; }


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

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

LLVM IR (-O0):
define i32 @do_404() {
ret i32 404
}

LLVM IR (-O2):
define i32 @do_404() {
ret i32 404
}
void emithl(void (*emit)(void *ctx, long int output), void *emitctx,
            unsigned long s0, long int hw) {
  int h = (hw >> 8) & 0xFF, l = hw & 0xFF;
  if (s0 & 0x20000) {
    emit(emitctx, h);
    emit(emitctx, l);
  } else {
    emit(emitctx, l);
    emit(emitctx, h);
  }
}


x86 assembly (clang, -O0):
<emithl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
sar    $0x8,%rax
and    $0xff,%rax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
and    $0xff,%rax
mov    %eax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
and    $0x20000,%rax
cmp    $0x0,%rax
je     116b <emithl+0x6b>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
movslq -0x24(%rbp),%rsi
call   *%rax
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
movslq -0x28(%rbp),%rsi
call   *%rax
jmp    1187 <emithl+0x87>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
movslq -0x28(%rbp),%rsi
call   *%rax
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
movslq -0x24(%rbp),%rsi
call   *%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emithl>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
movzbl %ch,%eax
movzbl %cl,%ebx
test   $0x20000,%edx
mov    %eax,%esi
cmove  %ebx,%esi
cmove  %eax,%ebx
mov    %r14,%rdi
call   *%r15
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
jmp    *%rax

LLVM IR (-O0):
define void @emithl(void (i8*, i64)* %0, i8* %1, i64 %2, i64 %3) {
%5 = alloca void (i8*, i64)*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i32
%10 = alloca i32
store void (i8*, i64)* %0, void (i8*, i64)** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%11 = load i64, i64* %8
%12 = ashr i64 %11, 8
%13 = and i64 %12, 255
%14 = trunc i64 %13 to i32
store i32 %14, i32* %9
%15 = load i64, i64* %8
%16 = and i64 %15, 255
%17 = trunc i64 %16 to i32
store i32 %17, i32* %10
%18 = load i64, i64* %7
%19 = and i64 %18, 131072
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %30
21: ; preds = %4
%22 = load void (i8*, i64)*, void (i8*, i64)** %5
%23 = load i8*, i8** %6
%24 = load i32, i32* %9
%25 = sext i32 %24 to i64
%26 = load void (i8*, i64)*, void (i8*, i64)** %5
%27 = load i8*, i8** %6
%28 = load i32, i32* %10
%29 = sext i32 %28 to i64
br label %39
30: ; preds = %4
%31 = load void (i8*, i64)*, void (i8*, i64)** %5
%32 = load i8*, i8** %6
%33 = load i32, i32* %10
%34 = sext i32 %33 to i64
%35 = load void (i8*, i64)*, void (i8*, i64)** %5
%36 = load i8*, i8** %6
%37 = load i32, i32* %9
%38 = sext i32 %37 to i64
br label %39
39: ; preds = %30, %21
ret void
}

LLVM IR (-O2):
define void @emithl(void (i8*, i64)* nocapture %0, i8* %1, i64 %2, i64 %3) {
%5 = trunc i64 %3 to i32
%6 = lshr i32 %5, 8
%7 = and i32 %6, 255
%8 = and i32 %5, 255
%9 = and i64 %2, 131072
%10 = icmp eq i64 %9, 0
%11 = select i1 %10, i32 %8, i32 %7
%12 = select i1 %10, i32 %7, i32 %8
%13 = zext i32 %11 to i64
tail call void %0(i8* %1, i64 %13)
%14 = zext i32 %12 to i64
tail call void %0(i8* %1, i64 %14)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ numericTypeCheck(int);
void anyIntTypeCheck(int ExprTypeSynPtr) { numericTypeCheck(ExprTypeSynPtr); }


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

x86 assembly (clang, -O2):
<anyIntTypeCheck>:
jmp    1030 <numericTypeCheck@plt>

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

LLVM IR (-O2):
define void @anyIntTypeCheck(i32 %0) {
%2 = tail call i32 @numericTypeCheck(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ mymsgctl(int, int, int /*<<< orphan*/);
int mymsgget(int, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void RemoveMessageQueue() {
  int msgid, len;
  int count, key;
  key = 2555;
  if ((msgid = mymsgget(key, 0)) < 0) {
    perror("msgget");
    exit(1);
  }
  mymsgctl(msgid, (1), 0);
}


x86 assembly (clang, -O0):
<RemoveMessageQueue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x9fb,-0x10(%rbp)
mov    -0x10(%rbp),%edi
xor    %esi,%esi
call   1040 <mymsgget@plt>
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
jge    117b <RemoveMessageQueue+0x3b>
lea    0xe94(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1030 <mymsgctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RemoveMessageQueue>:
push   %rax
mov    $0x9fb,%edi
xor    %esi,%esi
call   1040 <mymsgget@plt>
test   %eax,%eax
js     1160 <RemoveMessageQueue+0x20>
mov    %eax,%edi
mov    $0x1,%esi
xor    %edx,%edx
pop    %rax
jmp    1030 <mymsgctl@plt>
lea    0xe99(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"msgget\00"
define void @RemoveMessageQueue() {
%1 = tail call i32 @mymsgget(i32 2555, i32 0)
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %0
%7 = tail call i32 @mymsgctl(i32 %1, i32 1, i32 0)
ret void
}
void av_write_uncoded_frame_query() {}


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

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

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

LLVM IR (-O2):
define void @av_write_uncoded_frame_query() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syspool_standard_write_system(int k) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(303, &k, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syspool_standard_write_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x12f,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syspool_standard_write_system>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x12f,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @syspool_standard_write_system(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %3
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc4c(i32 303, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @syspool_standard_write_system(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 303, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
void mdp4_dsi_video_free_base_pipe(struct msm_fb_data_type *mfd) {}


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

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

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

LLVM IR (-O2):
%struct.msm_fb_data_type = type opaque
define void @mdp4_dsi_video_free_base_pipe(%struct.msm_fb_data_type* nocapture %0) {
ret void
}
/* Type definitions */
struct Edge {
  int dummy;
};

/* Variables and functions */
struct Edge *edge_invRot(struct Edge *);
struct Edge *edge_oNext(struct Edge *);
struct Edge *edge_dPrev(struct Edge *edge) {
  return edge_invRot(edge_oNext(edge_invRot(edge)));
}


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

x86 assembly (clang, -O2):
<edge_dPrev>:
push   %rax
call   1030 <edge_invRot@plt>
mov    %rax,%rdi
call   1040 <edge_oNext@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <edge_invRot@plt>

LLVM IR (-O0):
%struct.Edge = type { i32 }
define %struct.Edge* @edge_dPrev(%struct.Edge* %0) {
%2 = alloca %struct.Edge*
store %struct.Edge* %0, %struct.Edge** %2
%3 = load %struct.Edge*, %struct.Edge** %2
%4 = call %struct.Edge* @edge_invRot(%struct.Edge* %3)
%5 = call %struct.Edge* @edge_oNext(%struct.Edge* %4)
%6 = call %struct.Edge* @edge_invRot(%struct.Edge* %5)
ret %struct.Edge* %6
}

LLVM IR (-O2):
%struct.Edge = type { i32 }
define %struct.Edge* @edge_dPrev(%struct.Edge* %0) {
%2 = tail call %struct.Edge* @edge_invRot(%struct.Edge* %0)
%3 = tail call %struct.Edge* @edge_oNext(%struct.Edge* %2)
%4 = tail call %struct.Edge* @edge_invRot(%struct.Edge* %3)
ret %struct.Edge* %4
}
int countcards(const int *hand) {
  int i, count;
  for (count = i = 0; i < 13; i++)
    count += *hand++;
  return (count);
}


x86 assembly (clang, -O0):
<countcards>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0xd,-0xc(%rbp)
jge    1145 <countcards+0x45>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <countcards+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<countcards>:
movdqu 0x4(%rdi),%xmm0
movdqu 0x14(%rdi),%xmm1
movdqu 0x24(%rdi),%xmm2
paddd  %xmm1,%xmm2
pshufd $0xee,%xmm2,%xmm1
paddd  %xmm2,%xmm1
pshufd $0x55,%xmm1,%xmm2
paddd  %xmm1,%xmm2
movd   %xmm2,%ecx
pshufd $0xee,%xmm0,%xmm1
paddd  %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
paddd  %xmm1,%xmm0
movd   %xmm0,%eax
add    %ecx,%eax
add    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @countcards(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %0
%4 = bitcast i32* %2 to <4 x i32>*
%5 = load <4 x i32>, <4 x i32>* %4
%6 = getelementptr inbounds i32, i32* %0, i64 5
%7 = bitcast i32* %6 to <8 x i32>*
%8 = load <8 x i32>, <8 x i32>* %7
%9 = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> %8)
%10 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %5)
%11 = add nsw i32 %9, %10
%12 = add nsw i32 %11, %3
ret i32 %12
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_session_get_state(const char *session, char **state) {
  return -EINVAL;
}


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

x86 assembly (clang, -O2):
<sd_session_get_state>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_session_get_state(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_session_get_state(i8* nocapture readnone %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
double modf(long double, double *);
long double modfl(long double x, long double *iptr) {
  double y, result;
  result = modf(x, &y);
  *iptr = (long double)y;
  return (long double)result;
}


x86 assembly (clang, -O0):
<modfl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %rdi,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    -0x20(%rbp),%rdi
call   1030 <modf@plt>
movsd  %xmm0,-0x28(%rbp)
fldl   -0x20(%rbp)
mov    -0x18(%rbp),%rax
fstpt  (%rax)
fldl   -0x28(%rbp)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<modfl>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
fldt   0x30(%rsp)
fstpt  (%rsp)
lea    0x18(%rsp),%rdi
call   1030 <modf@plt>
fldl   0x18(%rsp)
fstpt  (%rbx)
movsd  %xmm0,0x10(%rsp)
fldl   0x10(%rsp)
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define x86_fp80 @modfl(x86_fp80 %0, x86_fp80* %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80*
%5 = alloca double
%6 = alloca double
store x86_fp80 %0, x86_fp80* %3
store x86_fp80* %1, x86_fp80** %4
%7 = load x86_fp80, x86_fp80* %3
%8 = call double @modf(x86_fp80 %7, double* %5)
store double %8, double* %6
%9 = load double, double* %5
%10 = fpext double %9 to x86_fp80
%11 = load x86_fp80*, x86_fp80** %4
store x86_fp80 %10, x86_fp80* %11
%12 = load double, double* %6
%13 = fpext double %12 to x86_fp80
ret x86_fp80 %13
}

LLVM IR (-O2):
define x86_fp80 @modfl(x86_fp80 %0, x86_fp80* nocapture writeonly %1) {
%3 = alloca double
%4 = bitcast double* %3 to i8*
%5 = call double @modf(x86_fp80 %0, double* %3)
%6 = load double, double* %3
%7 = fpext double %6 to x86_fp80
store x86_fp80 %7, x86_fp80* %1
%8 = fpext double %5 to x86_fp80
ret x86_fp80 %8
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void raw_stdin(void) { system("/bin/stty raw -echo"); }


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"/bin/stty raw -echo\00"
define void @raw_stdin() {
%1 = call i32 @system(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"/bin/stty raw -echo\00"
define void @raw_stdin() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned long EEPROMSizeGet(void) {
  return ((((((*((volatile unsigned long *)(0x400AF000)))) & 0x0000FFFF) >> 0) *
           4));
}


x86 assembly (clang, -O0):
<EEPROMSizeGet>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400af000,%eax
mov    (%rax),%rax
and    $0xffff,%rax
shr    $0x0,%rax
shl    $0x2,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<EEPROMSizeGet>:
mov    0x400af000,%rax
40
movzwl %ax,%eax
shl    $0x2,%rax
ret

LLVM IR (-O0):
define i64 @EEPROMSizeGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074458624 to i64*)
%2 = and i64 %1, 65535
%3 = lshr i64 %2, 0
%4 = mul i64 %3, 4
ret i64 %4
}

LLVM IR (-O2):
define i64 @EEPROMSizeGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074458624 to i64*)
%2 = shl i64 %1, 2
%3 = and i64 %2, 262140
ret i64 %3
}
/* Variables and functions */
int strcmp(void const *, void const *);
int c(const void *a, const void *b) { return strcmp(a, b); }


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

x86 assembly (clang, -O2):
<c>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @c(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 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @c(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
void ff_hevc_put_hevc_epel_h48_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_h48_10_avx2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dd_copy(double const *, double *);
int /*<<< orphan*/ dd_minus(double *);
int /*<<< orphan*/ qd_add_dd(double const *, double *, double *);
void qd_sub_qd_dd(const double *a, const double *b, double *c) {
  double mb[2];
  dd_copy(b, mb);
  dd_minus(mb);
  qd_add_dd(a, mb, c);
}


x86 assembly (clang, -O0):
<qd_sub_qd_dd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1040 <dd_copy@plt>
lea    -0x30(%rbp),%rdi
call   1050 <dd_minus@plt>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <qd_add_dd@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qd_sub_qd_dd>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%r14
mov    %rdi,%r15
mov    %rsp,%rbx
mov    %rsi,%rdi
mov    %rbx,%rsi
call   1040 <dd_copy@plt>
mov    %rbx,%rdi
call   1050 <dd_minus@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <qd_add_dd@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @qd_sub_qd_dd(double* %0, double* %1, double* %2) {
%4 = alloca [2 x double]
%5 = bitcast [2 x double]* %4 to i8*
%6 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 0
%7 = call i32 @dd_copy(double* %1, double* %6)
%8 = call i32 @dd_minus(double* %6)
%9 = call i32 @qd_add_dd(double* %0, double* %6, double* %2)
ret void
}
int do_712() { return 712; }


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

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

LLVM IR (-O0):
define i32 @do_712() {
ret i32 712
}

LLVM IR (-O2):
define i32 @do_712() {
ret i32 712
}
/* Variables and functions */
int /*<<< orphan*/ wiring_init();
void init(void) { wiring_init(); }


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

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

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

LLVM IR (-O2):
define void @init() {
%1 = tail call i32 (...) @wiring_init()
ret void
}
int __ocl_convert_int_short_sat(short src) { return src; }


x86 assembly (clang, -O0):
<__ocl_convert_int_short_sat>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_convert_int_short_sat>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @__ocl_convert_int_short_sat(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @__ocl_convert_int_short_sat(i16 signext %0) {
%2 = sext i16 %0 to i32
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t op_or(uint32_t a, uint32_t b) { return a | b; }


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

x86 assembly (clang, -O2):
<op_or>:
mov    %edi,%eax
or     %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @op_or(i32 %0, i32 %1) {
%3 = or i32 %1, %0
ret i32 %3
}