xunge/DecIR huggingface dataset:
/* Variables and functions */
long syscall(int, int, int, int, char const *, char const *);
long dcac_acl_ops(int optype, int afd, int ffd, const char *acl1,
                  const char *acl2_or_file) {
  return syscall(321, optype, afd, ffd, acl1, acl2_or_file);
}


x86 assembly (clang, -O0):
<dcac_acl_ops>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    $0x141,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcac_acl_ops>:
mov    %r8,%r9
mov    %rcx,%r8
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    $0x141,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i64 @dcac_acl_ops(i32 %0, i32 %1, i32 %2, i8* %3, i8* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i8*, i8** %9
%15 = load i8*, i8** %10
%16 = call i64 @syscall(i32 321, i32 %11, i32 %12, i32 %13, i8* %14, i8* %15)
ret i64 %16
}

LLVM IR (-O2):
define i64 @dcac_acl_ops(i32 %0, i32 %1, i32 %2, i8* %3, i8* %4) {
%6 = tail call i64 @syscall(i32 321, i32 %0, i32 %1, i32 %2, i8* %3, i8* %4)
ret i64 %6
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
int file_path_exits(const char *path) {
  struct stat stat_buffer;
  return (stat(path, &stat_buffer) == 0);
}


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

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

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @file_path_exits(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @file_path_exits(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ print_results();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_edge_cases();
int /*<<< orphan*/ test_init();
int /*<<< orphan*/ test_special_cases();
int /*<<< orphan*/ test_typical_cases();
int main() {
  test_init();
  test_typical_cases();
  test_edge_cases();
  test_special_cases();
  print_results();
  printf("\nEnd of Processing.\n");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_init@plt>
mov    $0x0,%al
call   1080 <test_typical_cases@plt>
mov    $0x0,%al
call   1070 <test_edge_cases@plt>
mov    $0x0,%al
call   1060 <test_special_cases@plt>
mov    $0x0,%al
call   1050 <print_results@plt>
lea    0xe67(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e3b(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_init@plt>
xor    %eax,%eax
call   1080 <test_typical_cases@plt>
xor    %eax,%eax
call   1070 <test_edge_cases@plt>
xor    %eax,%eax
call   1060 <test_special_cases@plt>
xor    %eax,%eax
call   1050 <print_results@plt>
lea    0xe75(%rip),%rdi
call   1040 <puts@plt>
mov    0x2e49(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"\0AEnd of Processing.\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_init()
%3 = call i32 (...) @test_typical_cases()
%4 = call i32 (...) @test_edge_cases()
%5 = call i32 (...) @test_special_cases()
%6 = call i32 (...) @print_results()
%7 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [20 x i8] c"\0AEnd of Processing.\00"
define i32 @main() {
%1 = tail call i32 (...) @test_init()
%2 = tail call i32 (...) @test_typical_cases()
%3 = tail call i32 (...) @test_edge_cases()
%4 = tail call i32 (...) @test_special_cases()
%5 = tail call i32 (...) @print_results()
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}
int ch2int(char ch) {
  int val;
  if (ch == 'I' || ch == 'l')
    val = 1;
  if (ch == 'o' || ch == 'O')
    val = 0;
  else
    val = ch - '0';
  if (val > 9 || val < 0)
    return 0;
  return val;
}


x86 assembly (clang, -O0):
<ch2int>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x49,%eax
je     1124 <ch2int+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x6c,%eax
jne    112b <ch2int+0x2b>
movl   $0x1,-0xc(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x6f,%eax
je     1145 <ch2int+0x45>
movsbl -0x5(%rbp),%eax
cmp    $0x4f,%eax
jne    1151 <ch2int+0x51>
movl   $0x0,-0xc(%rbp)
jmp    115b <ch2int+0x5b>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x9,-0xc(%rbp)
jg     116f <ch2int+0x6f>
cmpl   $0x0,-0xc(%rbp)
jge    117b <ch2int+0x7b>
movl   $0x0,-0x4(%rbp)
jmp    1181 <ch2int+0x81>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ch2int>:
lea    -0x30(%rdi),%eax
mov    %edi,%ecx
and    $0xdf,%cl
xor    %edx,%edx
cmp    $0x4f,%cl
cmove  %edx,%eax
cmp    $0xa,%eax
cmovae %edx,%eax
ret

LLVM IR (-O0):
define i32 @ch2int(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 73
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 108
br i1 %11, label %12, label %13
12: ; preds = %8, %1
store i32 1, i32* %4
br label %13
13: ; preds = %12, %8
%14 = load i8, i8* %3
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 111
br i1 %16, label %21, label %17
17: ; preds = %13
%18 = load i8, i8* %3
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 79
br i1 %20, label %21, label %22
21: ; preds = %17, %13
store i32 0, i32* %4
br label %26
22: ; preds = %17
%23 = load i8, i8* %3
%24 = sext i8 %23 to i32
%25 = sub nsw i32 %24, 48
store i32 %25, i32* %4
br label %26
26: ; preds = %22, %21
%27 = load i32, i32* %4
%28 = icmp sgt i32 %27, 9
br i1 %28, label %32, label %29
29: ; preds = %26
%30 = load i32, i32* %4
%31 = icmp slt i32 %30, 0
br i1 %31, label %32, label %33
32: ; preds = %29, %26
store i32 0, i32* %2
br label %35
33: ; preds = %29
%34 = load i32, i32* %4
store i32 %34, i32* %2
br label %35
35: ; preds = %33, %32
%36 = load i32, i32* %2
ret i32 %36
}

LLVM IR (-O2):
define i32 @ch2int(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = and i8 %0, -33
%4 = icmp eq i8 %3, 79
%5 = add nsw i32 %2, -48
%6 = select i1 %4, i32 0, i32 %5
%7 = icmp ugt i32 %6, 9
%8 = select i1 %7, i32 0, i32 %6
ret i32 %8
}
void av_frame_side_data_name() {}


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

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

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

LLVM IR (-O2):
define void @av_frame_side_data_name() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ private_core_pm_process_init();
int /*<<< orphan*/ private_core_pm_start_thread_cleaner();
int /*<<< orphan*/ private_core_pm_thread_init();
void core_pm_init() {
  private_core_pm_thread_init();
  private_core_pm_process_init();
  private_core_pm_start_thread_cleaner();
  return;
}


x86 assembly (clang, -O0):
<core_pm_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <private_core_pm_thread_init@plt>
mov    $0x0,%al
call   1050 <private_core_pm_process_init@plt>
mov    $0x0,%al
call   1040 <private_core_pm_start_thread_cleaner@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<core_pm_init>:
push   %rax
xor    %eax,%eax
call   1030 <private_core_pm_thread_init@plt>
xor    %eax,%eax
call   1050 <private_core_pm_process_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <private_core_pm_start_thread_cleaner@plt>

LLVM IR (-O0):
define void @core_pm_init() {
%1 = call i32 (...) @private_core_pm_thread_init()
%2 = call i32 (...) @private_core_pm_process_init()
%3 = call i32 (...) @private_core_pm_start_thread_cleaner()
ret void
}

LLVM IR (-O2):
define void @core_pm_init() {
%1 = tail call i32 (...) @private_core_pm_thread_init()
%2 = tail call i32 (...) @private_core_pm_process_init()
%3 = tail call i32 (...) @private_core_pm_start_thread_cleaner()
ret void
}
void ctrl_event_handler() {}


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

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

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

LLVM IR (-O2):
define void @ctrl_event_handler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putc(int, int /*<<< orphan*/);
int /*<<< orphan*/ setbuf(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ stdout;
void charactatime(char *buf) {
  char *ptr;
  int ch;
  setbuf(stdout, NULL);
  for (ptr = buf; ch = *buf++;) {
    putc(ch, stdout);
  }
}


x86 assembly (clang, -O0):
<charactatime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <setbuf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     117a <charactatime+0x5a>
mov    -0x14(%rbp),%edi
mov    0x2e72(%rip),%rax
mov    (%rax),%esi
call   1040 <putc@plt>
jmp    1146 <charactatime+0x26>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<charactatime>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%edi
xor    %esi,%esi
call   1030 <setbuf@plt>
mov    (%rbx),%al
test   %al,%al
je     1166 <charactatime+0x46>
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%edi
mov    (%r14),%esi
call   1040 <putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1150 <charactatime+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdout = global i32 0
define void @charactatime(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i32, i32* @stdout
%6 = call i32 @setbuf(i32 %5, i32* null)
%7 = load i8*, i8** %2
store i8* %7, i8** %3
br label %8
8: ; preds = %14, %1
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
%11 = load i8, i8* %9
%12 = sext i8 %11 to i32
store i32 %12, i32* %4
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %8
%15 = load i32, i32* %4
%16 = load i32, i32* @stdout
%17 = call i32 @putc(i32 %15, i32 %16)
br label %8
18: ; preds = %8
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @charactatime(i8* nocapture %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @setbuf(i32 %2, i32* null)
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %1, %6
%7 = phi i8 [ %13, %6 ], [ %4, %1 ]
%8 = phi i8* [ %10, %6 ], [ %0, %1 ]
%9 = sext i8 %7 to i32
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = load i32, i32* @stdout
%12 = tail call i32 @putc(i32 %9, i32 %11)
%13 = load i8, i8* %10
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %6
15: ; preds = %6, %1
ret void
}
void irc_notice_event(char *sender, char *argument, char *content) {}


x86 assembly (clang, -O0):
<irc_notice_event>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @irc_notice_event(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
ret void
}

LLVM IR (-O2):
define void @irc_notice_event(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memmove(char *, char *, int);
void f3(int size) {
  char src[12] = "helloworld";
  char dest[12];
  if (size < 0)
    memmove(dest, src, size);
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xedc(%rip),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1149 <f3+0x39>
lea    -0x1c(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    -0x4(%rbp),%edx
call   1030 <memmove@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
sub    $0x18,%rsp
movabs $0x726f776f6c6c6568,%rax
77 6f 72
mov    %rax,(%rsp)
movl   $0x646c,0x8(%rsp)
test   %edi,%edi
js     1133 <f3+0x23>
add    $0x18,%rsp
ret
mov    %edi,%edx
lea    0xc(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <memmove@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.f3.src = [12 x i8] c"helloworld\00\00"
define void @f3(i32 %0) {
%2 = alloca i32
%3 = alloca [12 x i8]
%4 = alloca [12 x i8]
store i32 %0, i32* %2
%5 = bitcast [12 x i8]* %3 to i8*
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = getelementptr inbounds [12 x i8], [12 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%11 = load i32, i32* %2
%12 = call i32 @memmove(i8* %9, i8* %10, i32 %11)
br label %13
13: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@__const.f3.src = [12 x i8] c"helloworld\00\00"
define void @f3(i32 %0) {
%2 = alloca [12 x i8]
%3 = alloca [12 x i8]
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%6 = icmp slt i32 %0, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @memmove(i8* %5, i8* %4, i32 %0)
br label %9
9: ; preds = %7, %1
ret void
}
/* Type definitions */
struct netdev_queue {
  int dummy;
};
struct net_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ netif_stop_queue(struct net_device *);
void netif_tx_stop_queue(struct netdev_queue *txq) {
  netif_stop_queue((struct net_device *)txq);
}


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

x86 assembly (clang, -O2):
<netif_tx_stop_queue>:
jmp    1030 <netif_stop_queue@plt>

LLVM IR (-O0):
%struct.netdev_queue = type { i32 }
%struct.net_device = type { i32 }
define void @netif_tx_stop_queue(%struct.netdev_queue* %0) {
%2 = alloca %struct.netdev_queue*
store %struct.netdev_queue* %0, %struct.netdev_queue** %2
%3 = load %struct.netdev_queue*, %struct.netdev_queue** %2
%4 = bitcast %struct.netdev_queue* %3 to %struct.net_device*
%5 = call i32 @netif_stop_queue(%struct.net_device* %4)
ret void
}

LLVM IR (-O2):
%struct.netdev_queue = type { i32 }
%struct.net_device = type { i32 }
define void @netif_tx_stop_queue(%struct.netdev_queue* %0) {
%2 = bitcast %struct.netdev_queue* %0 to %struct.net_device*
%3 = tail call i32 @netif_stop_queue(%struct.net_device* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ itoa(long, char *, int);
int /*<<< orphan*/ printf(char *, long, char *);
int main(void) {
  long number = 12345;
  char string[25];
  itoa(number, string, 2);
  printf("integer = %d string = %s\n", number, string);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x3039,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x2,%edx
call   1040 <itoa@plt>
mov    -0x10(%rbp),%rsi
lea    -0x30(%rbp),%rdx
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    %rsp,%rbx
mov    $0x3039,%edi
mov    %rbx,%rsi
mov    $0x2,%edx
call   1040 <itoa@plt>
lea    0xebf(%rip),%rdi
mov    $0x3039,%esi
mov    %rbx,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"integer = %d string = %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca [25 x i8]
store i32 0, i32* %1
store i64 12345, i64* %2
%4 = load i64, i64* %2
%5 = getelementptr inbounds [25 x i8], [25 x i8]* %3, i64 0, i64 0
%6 = call i32 @itoa(i64 %4, i8* %5, i32 2)
%7 = load i64, i64* %2
%8 = getelementptr inbounds [25 x i8], [25 x i8]* %3, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 %7, i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"integer = %d string = %s\0A\00"
define i32 @main() {
%1 = alloca [25 x i8]
%2 = getelementptr inbounds [25 x i8], [25 x i8]* %1, i64 0, i64 0
%3 = call i32 @itoa(i64 12345, i8* %2, i32 2)
%4 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 12345, i8* %2)
ret i32 0
}
int pmembench_dummy_op() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pmembench_dummy_op() {
ret i32 0
}
void owal(int szerokosc, int wysokosc) {}


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

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

LLVM IR (-O0):
define void @owal(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 @owal(i32 %0, i32 %1) {
ret void
}
int sched_get_priority_max(int policy) {
  (void)policy;
  return 255;
}


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

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

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

LLVM IR (-O2):
define i32 @sched_get_priority_max(i32 %0) {
ret i32 255
}
/* Variables and functions */
int read(int, void *, int);
int read_bytes(int f, void *b, int n) { return read(f, b, n); }


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

x86 assembly (clang, -O2):
<read_bytes>:
jmp    1030 <read@plt>

LLVM IR (-O0):
define i32 @read_bytes(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 @read(i32 %7, i8* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @read_bytes(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @read(i32 %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ trainer_mul_2(int /*<<< orphan*/);
void trainer_mul_2_launcher(void) { trainer_mul_2(0); }


x86 assembly (clang, -O0):
<trainer_mul_2_launcher>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <trainer_mul_2@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @trainer_mul_2_launcher() {
%1 = call i32 @trainer_mul_2(i32 0)
ret void
}

LLVM IR (-O2):
define void @trainer_mul_2_launcher() {
%1 = tail call i32 @trainer_mul_2(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nrf_802154_clock_hfclk_stop();
void nrf_802154_priority_drop_hfclk_stop(void) {
  nrf_802154_clock_hfclk_stop();
}


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

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

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

LLVM IR (-O2):
define void @nrf_802154_priority_drop_hfclk_stop() {
%1 = tail call i32 (...) @nrf_802154_clock_hfclk_stop()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DestroyMatrix(int /*<<< orphan*/);
int /*<<< orphan*/ create_D_data();
int /*<<< orphan*/ set_default_globals();
int main(int argc, char *argv[]) {
  int i = 0;
  set_default_globals();
  DestroyMatrix(create_D_data());
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1050 <set_default_globals@plt>
mov    $0x0,%al
call   1040 <create_D_data@plt>
mov    %eax,%edi
call   1030 <DestroyMatrix@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <set_default_globals@plt>
xor    %eax,%eax
call   1040 <create_D_data@plt>
mov    %eax,%edi
call   1030 <DestroyMatrix@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @set_default_globals()
%4 = tail call i32 (...) @create_D_data()
%5 = tail call i32 @DestroyMatrix(i32 %4)
ret i32 0
}
float FastAbs(float x) { return x >= 0.f ? x : -x; }


x86 assembly (clang, -O0):
<FastAbs>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1129 <FastAbs+0x29>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1140 <FastAbs+0x40>
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<FastAbs>:
movaps 0xef9(%rip),%xmm1
xorps  %xmm0,%xmm1
xorps  %xmm2,%xmm2
cmpless %xmm0,%xmm2
andps  %xmm2,%xmm0
andnps %xmm1,%xmm2
orps   %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @FastAbs(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp oge float %3, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load float, float* %2
br label %10
7: ; preds = %1
%8 = load float, float* %2
%9 = fneg float %8
br label %10
10: ; preds = %7, %5
%11 = phi float [ %6, %5 ], [ %9, %7 ]
ret float %11
}

LLVM IR (-O2):
define float @FastAbs(float %0) {
%2 = fcmp oge float %0, 0.000000e+00
%3 = fneg float %0
%4 = select i1 %2, float %0, float %3
ret float %4
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int fram_read16(scalar_t__);
uint16_t read_list_address(uint16_t leaf_id) {
  return fram_read16(0 + sizeof(uint16_t) * leaf_id);
}


x86 assembly (clang, -O0):
<read_list_address>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rdi
shl    $0x2,%rdi
add    $0x0,%rdi
call   1030 <fram_read16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_list_address>:
movslq %edi,%rdi
shl    $0x2,%rdi
jmp    1030 <fram_read16@plt>

LLVM IR (-O0):
define i32 @read_list_address(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = mul i64 4, %4
%6 = add i64 0, %5
%7 = call i32 @fram_read16(i64 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @read_list_address(i32 %0) {
%2 = sext i32 %0 to i64
%3 = shl nsw i64 %2, 2
%4 = tail call i32 @fram_read16(i64 %3)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ rgph_u32_murmur32s_data64(double const *, size_t, uintptr_t);
uint32_t rgph_u32_murmur32s_f64a(const double *key, size_t len,
                                 uintptr_t seed) {
  return rgph_u32_murmur32s_data64(key, len, seed);
}


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

x86 assembly (clang, -O2):
<rgph_u32_murmur32s_f64a>:
jmp    1030 <rgph_u32_murmur32s_data64@plt>

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

LLVM IR (-O2):
define i32 @rgph_u32_murmur32s_f64a(double* %0, i64 %1, i64 %2) {
%4 = tail call i32 @rgph_u32_murmur32s_data64(double* %0, i64 %1, i64 %2)
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
__attribute__((always_)) uint32_t load32(const void *src) {
  const uint8_t *p = (const uint8_t *)src;
  return ((uint32_t)(p[0]) << 0) | ((uint32_t)(p[1]) << 8) |
         ((uint32_t)(p[2]) << 16) | ((uint32_t)(p[3]) << 24);
}


x86 assembly (clang, -O0):
<load32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
shl    $0x0,%eax
mov    -0x10(%rbp),%rcx
mov    0x8(%rcx),%rcx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
mov    0x10(%rcx),%rcx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
mov    0x18(%rcx),%rcx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<load32>:
mov    0x8(%rdi),%ecx
mov    0x10(%rdi),%edx
shl    $0x8,%ecx
or     (%rdi),%ecx
shl    $0x10,%edx
mov    0x18(%rdi),%eax
shl    $0x18,%eax
or     %edx,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @load32(i8* %0) {
%2 = alloca i8*
%3 = alloca i64*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i64*
store i64* %5, i64** %3
%6 = load i64*, i64** %3
%7 = getelementptr inbounds i64, i64* %6, i64 0
%8 = load i64, i64* %7
%9 = trunc i64 %8 to i32
%10 = shl i32 %9, 0
%11 = load i64*, i64** %3
%12 = getelementptr inbounds i64, i64* %11, i64 1
%13 = load i64, i64* %12
%14 = trunc i64 %13 to i32
%15 = shl i32 %14, 8
%16 = or i32 %10, %15
%17 = load i64*, i64** %3
%18 = getelementptr inbounds i64, i64* %17, i64 2
%19 = load i64, i64* %18
%20 = trunc i64 %19 to i32
%21 = shl i32 %20, 16
%22 = or i32 %16, %21
%23 = load i64*, i64** %3
%24 = getelementptr inbounds i64, i64* %23, i64 3
%25 = load i64, i64* %24
%26 = trunc i64 %25 to i32
%27 = shl i32 %26, 24
%28 = or i32 %22, %27
ret i32 %28
}

LLVM IR (-O2):
define i32 @load32(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 8
%6 = bitcast i8* %5 to i64*
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = shl i32 %8, 8
%10 = or i32 %9, %4
%11 = getelementptr inbounds i8, i8* %0, i64 16
%12 = bitcast i8* %11 to i64*
%13 = load i64, i64* %12
%14 = trunc i64 %13 to i32
%15 = shl i32 %14, 16
%16 = or i32 %10, %15
%17 = getelementptr inbounds i8, i8* %0, i64 24
%18 = bitcast i8* %17 to i64*
%19 = load i64, i64* %18
%20 = trunc i64 %19 to i32
%21 = shl i32 %20, 24
%22 = or i32 %16, %21
ret i32 %22
}
int max(int one, int second) { return one >= second ? one : second; }


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     1121 <max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
long construct_I(int opcode, int rd, int rs1, int imm) {
  return ((opcode << 24) | (rd << 20) | (rs1 << 16) |
          ((imm & ((1 << 16) - 1)) << 0));
}


x86 assembly (clang, -O0):
<construct_I>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%ecx
shl    $0x14,%ecx
or     %ecx,%eax
mov    -0xc(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
and    $0xffff,%ecx
shl    $0x0,%ecx
or     %ecx,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<construct_I>:
shl    $0x18,%edi
shl    $0x14,%esi
or     %edi,%esi
shl    $0x10,%edx
or     %esi,%edx
movzwl %cx,%eax
or     %edx,%eax
cltq
ret

LLVM IR (-O0):
define i64 @construct_I(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = shl i32 %9, 24
%11 = load i32, i32* %6
%12 = shl i32 %11, 20
%13 = or i32 %10, %12
%14 = load i32, i32* %7
%15 = shl i32 %14, 16
%16 = or i32 %13, %15
%17 = load i32, i32* %8
%18 = and i32 %17, 65535
%19 = shl i32 %18, 0
%20 = or i32 %16, %19
%21 = sext i32 %20 to i64
ret i64 %21
}

LLVM IR (-O2):
define i64 @construct_I(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = shl i32 %0, 24
%6 = shl i32 %1, 20
%7 = or i32 %6, %5
%8 = shl i32 %2, 16
%9 = or i32 %7, %8
%10 = and i32 %3, 65535
%11 = or i32 %9, %10
%12 = sext i32 %11 to i64
ret i64 %12
}
/* Variables and functions */
scalar_t__ is_perfect_f(int);
int /*<<< orphan*/ printf(char *, int, char *);
void is_perfect_p(int a) {
  printf("%d is %s a perfect number\n", a, (is_perfect_f(a)) ? "\b" : "not");
}


x86 assembly (clang, -O0):
<is_perfect_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <is_perfect_f@plt>
mov    -0x8(%rbp),%esi
mov    %rax,%rcx
lea    0xed7(%rip),%rdx
lea    0xece(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rdx
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_perfect_p>:
push   %rbx
mov    %edi,%ebx
call   1040 <is_perfect_f@plt>
test   %rax,%rax
lea    0xeeb(%rip),%rax
lea    0xee2(%rip),%rdx
cmove  %rax,%rdx
lea    0xebc(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"%d is %s a perfect number\0A\00"
@.str.1 = [2 x i8] c"\08\00"
@.str.2 = [4 x i8] c"not\00"
define void @is_perfect_p(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @is_perfect_f(i32 %4)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%9 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %3, i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"%d is %s a perfect number\0A\00"
@.str.1 = [2 x i8] c"\08\00"
@.str.2 = [4 x i8] c"not\00"
define void @is_perfect_p(i32 %0) {
%2 = tail call i64 @is_perfect_f(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ callrts(char *);
com() { callrts("cccom"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"cccom\00"
define i32 @com() {
%1 = alloca i32
%2 = call i32 @callrts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [6 x i8] c"cccom\00"
define i32 @com() {
%1 = tail call i32 @callrts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
StartNum(c) {
  switch (c) {
  case '0':
  case '1':
  case '2':
  case '3':
  case '4':
  case '5':
  case '6':
  case '7':
  case '8':
  case '9':
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<StartNum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffd0,%eax
sub    $0x9,%eax
ja     1127 <StartNum+0x27>
jmp    111b <StartNum+0x1b>
movl   $0x1,-0x4(%rbp)
jmp    112e <StartNum+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<StartNum>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @StartNum(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 48, label %5
i32 49, label %5
i32 50, label %5
i32 51, label %5
i32 52, label %5
i32 53, label %5
i32 54, label %5
i32 55, label %5
i32 56, label %5
i32 57, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @StartNum(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
int test_imm_3Euint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x3E << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_3Euint64_midword_mem>:
testb  $0x3e,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_3Euint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 16
%6 = and i64 %5, 62
%7 = icmp ne i64 %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_3Euint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 4063232
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(int);
int /*<<< orphan*/ stdout;
void *checked_malloc(int len) {
  void *p = malloc(len);
  if (!p) {
    fprintf(stdout, "\nRan out of memory!\n");
    exit(1);
  }
  return p;
}


x86 assembly (clang, -O0):
<checked_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1171 <checked_malloc+0x41>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    0xe9e(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checked_malloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <checked_malloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [21 x i8] c"\0ARan out of memory!\0A\00"
define i8* @checked_malloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i32, i32* @stdout
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [21 x i8] c"\0ARan out of memory!\0A\00"
define noalias i8* @checked_malloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stdout
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ warning(int /*<<< orphan*/ *, char const *);
void error(const char *msg) {
  warning(NULL, msg);
  exit(1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
call   1030 <warning@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %rdi,%rsi
xor    %edi,%edi
call   1030 <warning@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @warning(i32* null, i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @error(i8* %0) {
%2 = tail call i32 @warning(i32* null, i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
int weekDisplay(int dayCount) {
  dayCount--;
  return dayCount;
}


x86 assembly (clang, -O0):
<weekDisplay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @weekDisplay(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, -1
store i32 %4, i32* %2
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
define i32 @weekDisplay(i32 %0) {
%2 = add nsw i32 %0, -1
ret i32 %2
}
void ceph_queue_revalidate(struct inode *inode) {}


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

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

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

LLVM IR (-O2):
%struct.inode = type opaque
define void @ceph_queue_revalidate(%struct.inode* nocapture %0) {
ret void
}
void handler(int sig) {}


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

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

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

LLVM IR (-O2):
define void @handler(i32 %0) {
ret void
}
/* Variables and functions */
int STDIN_FILENO;
int __crow_stdin() { return STDIN_FILENO; }


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

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

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

LLVM IR (-O2):
@STDIN_FILENO = global i32 0
define i32 @__crow_stdin() {
%1 = load i32, i32* @STDIN_FILENO
ret i32 %1
}
int get_cycle_count_arm64(unsigned short int opcode) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @get_cycle_count_arm64(i16 zeroext %0) {
ret i32 -1
}
/* Variables and functions */
float sqrtf(float);
float matfCalcLen(float *v) {
  float r;
  r = v[0] * v[0] + v[1] * v[1] + v[2] * v[2];
  return sqrtf(r);
}


x86 assembly (clang, -O0):
<matfCalcLen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulss  0x4(%rax),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
call   1030 <sqrtf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matfCalcLen>:
movss  (%rdi),%xmm1
movss  0x4(%rdi),%xmm0
mulss  %xmm0,%xmm0
mulss  %xmm1,%xmm1
addss  %xmm0,%xmm1
movss  0x8(%rdi),%xmm0
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     113f <matfCalcLen+0x2f>
sqrtss %xmm0,%xmm0
ret
jmp    1030 <sqrtf@plt>

LLVM IR (-O0):
define float @matfCalcLen(float* %0) {
%2 = alloca float*
%3 = alloca float
store float* %0, float** %2
%4 = load float*, float** %2
%5 = getelementptr inbounds float, float* %4, i64 0
%6 = load float, float* %5
%7 = load float*, float** %2
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float*, float** %2
%11 = getelementptr inbounds float, float* %10, i64 1
%12 = load float, float* %11
%13 = load float*, float** %2
%14 = getelementptr inbounds float, float* %13, i64 1
%15 = load float, float* %14
%16 = fmul float %12, %15
%17 = call float @llvm.fmuladd.f32(float %6, float %9, float %16)
%18 = load float*, float** %2
%19 = getelementptr inbounds float, float* %18, i64 2
%20 = load float, float* %19
%21 = load float*, float** %2
%22 = getelementptr inbounds float, float* %21, i64 2
%23 = load float, float* %22
%24 = call float @llvm.fmuladd.f32(float %20, float %23, float %17)
store float %24, float* %3
%25 = load float, float* %3
%26 = call float @sqrtf(float %25)
ret float %26
}

LLVM IR (-O2):
define float @matfCalcLen(float* nocapture %0) {
%2 = load float, float* %0
%3 = getelementptr inbounds float, float* %0, i64 1
%4 = load float, float* %3
%5 = fmul float %4, %4
%6 = tail call float @llvm.fmuladd.f32(float %2, float %2, float %5)
%7 = getelementptr inbounds float, float* %0, i64 2
%8 = load float, float* %7
%9 = tail call float @llvm.fmuladd.f32(float %8, float %8, float %6)
%10 = tail call float @sqrtf(float %9)
ret float %10
}
/* Type definitions */
typedef int /*<<< orphan*/ posix_spawn_file_actions_t;

/* Variables and functions */
int posix_spawn_file_actions_destroy(int /*<<< orphan*/ *);
int swift_posix_spawn_file_actions_destroy(
    posix_spawn_file_actions_t *file_actions) {
  return posix_spawn_file_actions_destroy(file_actions);
}


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

x86 assembly (clang, -O2):
<swift_posix_spawn_file_actions_destroy>:
jmp    1030 <posix_spawn_file_actions_destroy@plt>

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

LLVM IR (-O2):
define i32 @swift_posix_spawn_file_actions_destroy(i32* %0) {
%2 = tail call i32 @posix_spawn_file_actions_destroy(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ EC_KEY;
typedef int /*<<< orphan*/ ECDSA_SIG;

/* Variables and functions */
int /*<<< orphan*/ *ECDSA_do_sign_ex(unsigned char const *, int,
                                     int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                     int /*<<< orphan*/ *);
ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dlen, EC_KEY *eckey) {
  return ECDSA_do_sign_ex(dgst, dlen, NULL, NULL, eckey);
}


x86 assembly (clang, -O0):
<ECDSA_do_sign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%r8
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rdx
call   1030 <ECDSA_do_sign_ex@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ECDSA_do_sign>:
mov    %rdx,%r8
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <ECDSA_do_sign_ex@plt>

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

LLVM IR (-O2):
define i32* @ECDSA_do_sign(i8* %0, i32 %1, i32* %2) {
%4 = tail call i32* @ECDSA_do_sign_ex(i8* %0, i32 %1, i32* null, i32* null, i32* %2)
ret i32* %4
}
void report_Socket_Connect(void) {}


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

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

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

LLVM IR (-O2):
define void @report_Socket_Connect() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ command(char *);
cdup() { (void)command("CDUP"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"CDUP\00"
define i32 @cdup() {
%1 = alloca i32
%2 = call i32 @command(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [5 x i8] c"CDUP\00"
define i32 @cdup() {
%1 = tail call i32 @command(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
long long log10(long long);
long long internal_log10_l(long long value) { return log10(value); }


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

x86 assembly (clang, -O2):
<internal_log10_l>:
jmp    1030 <log10@plt>

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

LLVM IR (-O2):
define i64 @internal_log10_l(i64 %0) {
%2 = tail call i64 @log10(i64 %0)
ret i64 %2
}
int do_025() { return 25; }


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

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

LLVM IR (-O0):
define i32 @do_025() {
ret i32 25
}

LLVM IR (-O2):
define i32 @do_025() {
ret i32 25
}