xunge/DecIR huggingface dataset:
/* Variables and functions */
int node_transcode_listen(int);
int /*<<< orphan*/ node_transcode_worker(int);
int node_transcode_server() {
  int sockfd = 0;
  sockfd = node_transcode_listen(sockfd);
  node_transcode_worker(sockfd);
  return 0;
}


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

x86 assembly (clang, -O2):
<node_transcode_server>:
push   %rax
xor    %edi,%edi
call   1040 <node_transcode_listen@plt>
mov    %eax,%edi
call   1030 <node_transcode_worker@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @node_transcode_server() {
%1 = tail call i32 @node_transcode_listen(i32 0)
%2 = tail call i32 @node_transcode_worker(i32 %1)
ret i32 0
}
void cpu_op_nop() {}


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

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

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

LLVM IR (-O2):
define void @cpu_op_nop() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main() { printf("Makefile test!"); }


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"Makefile test!\00"
define void @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ strcpy(char *, char *);
void client_error(int socket, char buffer[]) {
  strcpy(buffer, "EXIT");
  exit(0);
}


x86 assembly (clang, -O0):
<client_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec6(%rip),%rsi
call   1030 <strcpy@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<client_error>:
push   %rax
mov    %rsi,%rdi
lea    0xed5(%rip),%rsi
call   1030 <strcpy@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"EXIT\00"
define void @client_error(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [5 x i8] c"EXIT\00"
define void @client_error(i32 %0, i8* %1) {
%3 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Usage:\n");
  printf("\trg_conf_set <conf_path> <value>\n\n");
  printf("Example:\n");
  printf("\trg_conf_set Gvt/runlevel 4\n");
  printf("\trg_conf_set dev/ath0/wl_ap/wl_ssid \"pwned\"\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
lea    0xef9(%rip),%rdi
call   1030 <puts@plt>
lea    0xef6(%rip),%rdi
call   1030 <puts@plt>
lea    0xf06(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Usage:\0A\00"
@.str.1 = [35 x i8] c"\09rg_conf_set <conf_path> <value>\0A\0A\00"
@.str.2 = [10 x i8] c"Example:\0A\00"
@.str.3 = [29 x i8] c"\09rg_conf_set Gvt/runlevel 4\0A\00"
@.str.4 = [45 x i8] c"\09rg_conf_set dev/ath0/wl_ap/wl_ssid \22pwned\22\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [7 x i8] c"Usage:\00"
@str.5 = [34 x i8] c"\09rg_conf_set <conf_path> <value>\0A\00"
@str.6 = [9 x i8] c"Example:\00"
@str.7 = [28 x i8] c"\09rg_conf_set Gvt/runlevel 4\00"
@str.8 = [44 x i8] c"\09rg_conf_set dev/ath0/wl_ap/wl_ssid \22pwned\22\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.8, i64 0, i64 0))
ret void
}
/* Variables and functions */
int fwrite(void *, int, int, void *);
int _writefile(void *handle, void *src, int size) {
  return fwrite(src, 1, size, handle);
}


x86 assembly (clang, -O0):
<_writefile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_writefile>:
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x1,%esi
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
define i32 @_writefile(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @fwrite(i8* %1, i32 1, i32 %2, i8* %0)
ret i32 %4
}
int execute_setreuid32() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_setreuid32() {
ret i32 0
}
/* Variables and functions */
const char *one_zero(bool b) { return b ? "1" : "0"; }


x86 assembly (clang, -O0):
<one_zero>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xef1(%rip),%rax
lea    0xee8(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<one_zero>:
test   %edi,%edi
lea    0xef9(%rip),%rcx
lea    0xef0(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [2 x i8] c"1\00"
@.str.1 = [2 x i8] c"0\00"
define i8* @one_zero(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
ret i8* %6
}

LLVM IR (-O2):
@.str = [2 x i8] c"1\00"
@.str.1 = [2 x i8] c"0\00"
define i8* @one_zero(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, short, long long);
void STEST902(int v, short s, long long ll) {
  printf("sub  (test15f) C902   input: (%d:3):(%d:5):(%lld:6666666666): Call "
         "by value from variable\n",
         v, s, ll);
  v = 33;
  s = 55;
  ll = 66;
  printf("sub  (test15f) C902 changed: (%d:33):(%d:55):(%lld:66): Call by "
         "value from variable\n",
         v, s, ll);
}


x86 assembly (clang, -O0):
<STEST902>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x6(%rbp),%ax
mov    -0x10(%rbp),%rcx
lea    0xec8(%rip),%rdi
movswl %ax,%edx
call   1030 <printf@plt>
movl   $0x21,-0x4(%rbp)
movw   $0x37,-0x6(%rbp)
movq   $0x42,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x6(%rbp),%ax
mov    -0x10(%rbp),%rcx
lea    0xef4(%rip),%rdi
movswl %ax,%edx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<STEST902>:
push   %rax
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
lea    0xf30(%rip),%rdi
mov    $0x42,%ecx
mov    $0x21,%esi
mov    $0x37,%edx
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [91 x i8] c"sub (test15f) C902 input: (%d:3):(%d:5):(%lld:6666666666): Call by value from variable\0A\00"
@.str.1 = [85 x i8] c"sub (test15f) C902 changed: (%d:33):(%d:55):(%lld:66): Call by value from variable\0A\00"
define void @STEST902(i32 %0, i16 signext %1, i64 %2) {
%4 = alloca i32
%5 = alloca i16
%6 = alloca i64
store i32 %0, i32* %4
store i16 %1, i16* %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load i16, i16* %5
%9 = load i64, i64* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str, i64 0, i64 0), i32 %7, i16 signext %8, i64 %9)
store i32 33, i32* %4
store i16 55, i16* %5
store i64 66, i64* %6
%11 = load i32, i32* %4
%12 = load i16, i16* %5
%13 = load i64, i64* %6
%14 = call i32 @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.1, i64 0, i64 0), i32 %11, i16 signext %12, i64 %13)
ret void
}

LLVM IR (-O2):
@.str = [91 x i8] c"sub (test15f) C902 input: (%d:3):(%d:5):(%lld:6666666666): Call by value from variable\0A\00"
@.str.1 = [85 x i8] c"sub (test15f) C902 changed: (%d:33):(%d:55):(%lld:66): Call by value from variable\0A\00"
define void @STEST902(i32 %0, i16 signext %1, i64 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str, i64 0, i64 0), i32 %0, i16 signext %1, i64 %2)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.1, i64 0, i64 0), i32 33, i16 signext 55, i64 66)
ret void
}
/* Type definitions */
typedef int __le16;

/* Variables and functions */
int __cpu_to_le16(int);
int ieee80211_has_tods(__le16 fc) { return (fc & __cpu_to_le16(0x0100)) != 0; }


x86 assembly (clang, -O0):
<ieee80211_has_tods>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x100,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee80211_has_tods>:
push   %rbx
mov    %edi,%ebx
mov    $0x100,%edi
call   1030 <__cpu_to_le16@plt>
xor    %ecx,%ecx
test   %ebx,%eax
setne  %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ieee80211_has_tods(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @__cpu_to_le16(i32 256)
%5 = and i32 %3, %4
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @ieee80211_has_tods(i32 %0) {
%2 = tail call i32 @__cpu_to_le16(i32 256)
%3 = and i32 %2, %0
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int romanToInt(char *);
int main(int argc, char **argv) {
  printf("%d\n", romanToInt(argv[1]));
  return (0);
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @romanToInt(i8* %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ socklen_t;
typedef int /*<<< orphan*/ __SOCKADDR_ARG;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __getsockname(int fd, __SOCKADDR_ARG addr, socklen_t *len) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__getsockname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__getsockname>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @__getsockname(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i32, i32* @ENOSYS
%8 = call i32 @__set_errno(i32 %7)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__getsockname(i32 %0, i32 %1, i32* nocapture readnone %2) {
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
ret i32 -1
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ tst_timeval_diff(struct timeval, struct timeval);
long long tst_timeval_to_ms(int /*<<< orphan*/);
long long tst_timeval_diff_ms(struct timeval t1, struct timeval t2) {
  return tst_timeval_to_ms(tst_timeval_diff(t1, t2));
}


x86 assembly (clang, -O0):
<tst_timeval_diff_ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <tst_timeval_diff@plt>
mov    %eax,%edi
call   1040 <tst_timeval_to_ms@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i64 @tst_timeval_diff_ms(i32 %0, i32 %1) {
%3 = alloca %struct.timeval
%4 = alloca %struct.timeval
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
store i32 %0, i32* %5
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 0
store i32 %1, i32* %6
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
%8 = load i32, i32* %7
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 0
%10 = load i32, i32* %9
%11 = call i32 @tst_timeval_diff(i32 %8, i32 %10)
%12 = call i64 @tst_timeval_to_ms(i32 %11)
ret i64 %12
}

LLVM IR (-O2):
define i64 @tst_timeval_diff_ms(i32 %0, i32 %1) {
%3 = tail call i32 @tst_timeval_diff(i32 %0, i32 %1)
%4 = tail call i64 @tst_timeval_to_ms(i32 %3)
ret i64 %4
}
extern foo(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @foo() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ specify_any_Gx(int /*<<< orphan*/);
int specify_G0(const char *the_title) {
  specify_any_Gx(0);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @specify_G0(i8* nocapture readnone %0) {
%2 = tail call i32 @specify_any_Gx(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ f(double);
int main() {
  f(7.44);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xee7(%rip),%xmm0
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f(double 7.440000e+00)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(double 7.440000e+00)
ret i32 0
}
void destroyBiTree() {}


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

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

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

LLVM IR (-O2):
define void @destroyBiTree() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;
struct ts_nit {
  int dummy;
};

/* Variables and functions */
int ts_nit_add_frequency_list_descriptor(struct ts_nit *, int /*<<< orphan*/,
                                         int /*<<< orphan*/, int,
                                         int /*<<< orphan*/ *,
                                         int /*<<< orphan*/);
int ts_nit_add_frequency_list_descriptor_cable(struct ts_nit *nit,
                                               uint16_t ts_id,
                                               uint16_t org_net_id,
                                               uint32_t *freqs,
                                               uint8_t num_freqs) {
  return ts_nit_add_frequency_list_descriptor(nit, ts_id, org_net_id, 2, freqs,
                                              num_freqs);
}


x86 assembly (clang, -O0):
<ts_nit_add_frequency_list_descriptor_cable>:
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    %r8d,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
mov    $0x2,%ecx
call   1030 <ts_nit_add_frequency_list_descriptor@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ts_nit_add_frequency_list_descriptor_cable>:
mov    %r8d,%r9d
mov    %rcx,%r8
mov    $0x2,%ecx
jmp    1030 <ts_nit_add_frequency_list_descriptor@plt>

LLVM IR (-O0):
%struct.ts_nit = type { i32 }
define i32 @ts_nit_add_frequency_list_descriptor_cable(%struct.ts_nit* %0, i32 %1, i32 %2, i32* %3, i32 %4) {
%6 = alloca %struct.ts_nit*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32
store %struct.ts_nit* %0, %struct.ts_nit** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32* %3, i32** %9
store i32 %4, i32* %10
%11 = load %struct.ts_nit*, %struct.ts_nit** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32*, i32** %9
%15 = load i32, i32* %10
%16 = call i32 @ts_nit_add_frequency_list_descriptor(%struct.ts_nit* %11, i32 %12, i32 %13, i32 2, i32* %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
%struct.ts_nit = type { i32 }
define i32 @ts_nit_add_frequency_list_descriptor_cable(%struct.ts_nit* %0, i32 %1, i32 %2, i32* %3, i32 %4) {
%6 = tail call i32 @ts_nit_add_frequency_list_descriptor(%struct.ts_nit* %0, i32 %1, i32 %2, i32 2, i32* %3, i32 %4)
ret i32 %6
}
struct bwb_line *bwb_MERGE(struct bwb_line *l) {
  bwx_DEBUG(__FUNCTION__);
  bwb_xload(l);
  return bwb_zline(l);
}


x86 assembly (clang, -O0):
<bwb_MERGE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1040 <bwx_DEBUG@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <bwb_xload@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1050 <bwb_zline@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bwb_MERGE>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1040 <bwx_DEBUG@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <bwb_xload@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <bwb_zline@plt>
cltq
pop    %rbx
ret

LLVM IR (-O0):
%struct.bwb_line = type opaque
@__FUNCTION__.bwb_MERGE = [10 x i8] c"bwb_MERGE\00"
define %struct.bwb_line* @bwb_MERGE(%struct.bwb_line* %0) {
%2 = alloca %struct.bwb_line*
store %struct.bwb_line* %0, %struct.bwb_line** %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.bwb_MERGE, i64 0, i64 0))
%4 = load %struct.bwb_line*, %struct.bwb_line** %2
%5 = call i32 (%struct.bwb_line*, ...) bitcast (i32 (...)* @bwb_xload to i32 (%struct.bwb_line*, ...)*)(%struct.bwb_line* %4)
%6 = load %struct.bwb_line*, %struct.bwb_line** %2
%7 = call i32 (%struct.bwb_line*, ...) bitcast (i32 (...)* @bwb_zline to i32 (%struct.bwb_line*, ...)*)(%struct.bwb_line* %6)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to %struct.bwb_line*
ret %struct.bwb_line* %9
}

LLVM IR (-O2):
%struct.bwb_line = type opaque
@__FUNCTION__.bwb_MERGE = [10 x i8] c"bwb_MERGE\00"
define %struct.bwb_line* @bwb_MERGE(%struct.bwb_line* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.bwb_MERGE, i64 0, i64 0))
%3 = tail call i32 (%struct.bwb_line*, ...) bitcast (i32 (...)* @bwb_xload to i32 (%struct.bwb_line*, ...)*)(%struct.bwb_line* %0)
%4 = tail call i32 (%struct.bwb_line*, ...) bitcast (i32 (...)* @bwb_zline to i32 (%struct.bwb_line*, ...)*)(%struct.bwb_line* %0)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to %struct.bwb_line*
ret %struct.bwb_line* %6
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void destroy_passwd(char **passwds) {
  int i = 0;
  for (; i < 100;)
    free(passwds[++i]);
}


x86 assembly (clang, -O0):
<destroy_passwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    114b <destroy_passwd+0x3b>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0xc(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
jmp    1123 <destroy_passwd+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroy_passwd>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x1,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    $0x65,%rbx
jne    1120 <destroy_passwd+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @destroy_passwd(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
store i32 0, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 100
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i8**, i8*** %2
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
store i32 %10, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8*, i8** %8, i64 %11
%13 = load i8*, i8** %12
%14 = call i32 @free(i8* %13)
br label %4
15: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @destroy_passwd(i8** nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %4, %2 ]
%4 = add nuw nsw i64 %3, 1
%5 = getelementptr inbounds i8*, i8** %0, i64 %4
%6 = load i8*, i8** %5
%7 = tail call i32 @free(i8* %6)
%8 = icmp eq i64 %4, 100
br i1 %8, label %9, label %2
9: ; preds = %2
ret void
}
/* Variables and functions */
long labs(long j) { return (j < 0 ? -j : j); }


x86 assembly (clang, -O0):
<labs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1122 <labs+0x22>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112a <labs+0x2a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @labs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ open_log();
int /*<<< orphan*/ prepare_listen();
int main(int argc, const char *argv[]) {
  open_log();
  prepare_listen();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @open_log()
%4 = tail call i32 (...) @prepare_listen()
ret i32 0
}
signed int rt_numnodes(void) {
  signed int a = 1;
  return a;
}


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

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

LLVM IR (-O0):
define i32 @rt_numnodes() {
%1 = alloca i32
store i32 1, i32* %1
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @rt_numnodes() {
ret i32 1
}
void timer() {}


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

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

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

LLVM IR (-O2):
define void @timer() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int x;
  int y;
  if (!(x == 4 * y && x >= 0))
    return 0;
  while (x > 0) {
    x -= 4;
    y--;
  }
  assert(y >= 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x2,%ecx
cmp    %ecx,%eax
jne    113a <main+0x2a>
cmpl   $0x0,-0x8(%rbp)
jge    1146 <main+0x36>
movl   $0x0,-0x4(%rbp)
jmp    1184 <main+0x74>
jmp    114b <main+0x3b>
cmpl   $0x0,-0x8(%rbp)
jle    116c <main+0x5c>
mov    -0x8(%rbp),%eax
sub    $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    114b <main+0x3b>
cmpl   $0x0,-0xc(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ MYSQL;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
MYSQL *mysql_init(MYSQL *handle) {
  printf("mysql_init(%s)\n", (handle ? "MYSQL" : "NULL"));
  return ((MYSQL *)0);
}


x86 assembly (clang, -O0):
<mysql_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    0xeef(%rip),%rsi
lea    0xee2(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rsi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mysql_init>:
push   %rax
test   %rdi,%rdi
lea    0xefb(%rip),%rax
lea    0xeee(%rip),%rsi
cmove  %rax,%rsi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"mysql_init(%s)\0A\00"
@.str.1 = [6 x i8] c"MYSQL\00"
@.str.2 = [5 x i8] c"NULL\00"
define i32* @mysql_init(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp ne i32* %3, null
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0)
%7 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32* null
}

LLVM IR (-O2):
@.str = [16 x i8] c"mysql_init(%s)\0A\00"
@.str.1 = [6 x i8] c"MYSQL\00"
@.str.2 = [5 x i8] c"NULL\00"
define noalias i32* @mysql_init(i32* readnone %0) {
%2 = icmp eq i32* %0, null
%3 = select i1 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32* null
}
long long fun_call_ret_5() {
  long long ret = 0xffffffff;
  ret += 0xffffffff;
  return ret;
}


x86 assembly (clang, -O0):
<fun_call_ret_5>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffff,%eax
mov    %rax,-0x8(%rbp)
movabs $0xffffffff,%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_call_ret_5>:
movabs $0x1fffffffe,%rax
ret

LLVM IR (-O0):
define i64 @fun_call_ret_5() {
%1 = alloca i64
store i64 4294967295, i64* %1
%2 = load i64, i64* %1
%3 = add nsw i64 %2, 4294967295
store i64 %3, i64* %1
%4 = load i64, i64* %1
ret i64 %4
}

LLVM IR (-O2):
define i64 @fun_call_ret_5() {
ret i64 8589934590
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rot32r5(uint32_t x) { return (x >> 5) | (x << 27); }


x86 assembly (clang, -O0):
<rot32r5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x5,%eax
mov    -0x4(%rbp),%ecx
shl    $0x1b,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot32r5>:
mov    %edi,%eax
sar    $0x5,%eax
shl    $0x1b,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rot32r5(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 5
%5 = load i32, i32* %2
%6 = shl i32 %5, 27
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @rot32r5(i32 %0) {
%2 = ashr i32 %0, 5
%3 = shl i32 %0, 27
%4 = or i32 %2, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int test = 2;
  int i = 10;
  printf("HELO: %d: %d", test, i);
  printf("JELO\n");
  i = 20;
  test = 4;
  printf("GELO: %d: %d", test, i);
  printf("LELO\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x14,-0xc(%rbp)
movl   $0x4,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x2,%esi
mov    $0xa,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
lea    0xec1(%rip),%rdi
mov    $0x4,%esi
mov    $0x14,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebb(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"HELO: %d: %d\00"
@.str.1 = [6 x i8] c"JELO\0A\00"
@.str.2 = [13 x i8] c"GELO: %d: %d\00"
@.str.3 = [6 x i8] c"LELO\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
store i32 10, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
store i32 20, i32* %3
store i32 4, i32* %2
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %8, i32 %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"HELO: %d: %d\00"
@.str.2 = [13 x i8] c"GELO: %d: %d\00"
@str = [5 x i8] c"JELO\00"
@str.4 = [5 x i8] c"LELO\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 2, i32 10)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 4, i32 20)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.4, i64 0, i64 0))
ret i32 0
}
int IncludedIn(int *pa, int *pb) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @IncludedIn(i32* nocapture readnone %0, i32* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ CG_DrawFlashZoomTransition();
void CG_DrawFlashBlendBehindHUD(void) { CG_DrawFlashZoomTransition(); }


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

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

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

LLVM IR (-O2):
define void @CG_DrawFlashBlendBehindHUD() {
%1 = tail call i32 (...) @CG_DrawFlashZoomTransition()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __u8;
typedef int /*<<< orphan*/ __u16;

/* Variables and functions */
int /*<<< orphan*/ __get_unaligned_le16(int /*<<< orphan*/ const *);
__u16 get_unaligned_le16(const void *p) {
  return __get_unaligned_le16((const __u8 *)p);
}


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

x86 assembly (clang, -O2):
<get_unaligned_le16>:
jmp    1030 <__get_unaligned_le16@plt>

LLVM IR (-O0):
define i32 @get_unaligned_le16(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = call i32 @__get_unaligned_le16(i32* %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @get_unaligned_le16(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @__get_unaligned_le16(i32* %2)
ret i32 %3
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef scalar_t__ uint16_t;

/* Variables and functions */
scalar_t__ UINT8_MAX;
uint8_t __hsail_sat_add_u8(uint8_t a, uint8_t b) {
  uint16_t c = (uint16_t)a + (uint16_t)b;
  if (c > UINT8_MAX)
    return UINT8_MAX;
  else
    return c;
}


x86 assembly (clang, -O0):
<__hsail_sat_add_u8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    0x2ebd(%rip),%rcx
cmp    (%rcx),%rax
jle    113f <__hsail_sat_add_u8+0x3f>
mov    0x2ead(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1147 <__hsail_sat_add_u8+0x47>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__hsail_sat_add_u8>:
lea    (%rdi,%rsi,1),%rax
mov    0x2ed5(%rip),%rcx
mov    (%rcx),%rcx
cmp    %rcx,%rax
cmovg  %rcx,%rax
ret

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

LLVM IR (-O2):
@UINT8_MAX = global i64 0
define i64 @__hsail_sat_add_u8(i64 %0, i64 %1) {
%3 = add nsw i64 %1, %0
%4 = load i64, i64* @UINT8_MAX
%5 = icmp sgt i64 %3, %4
%6 = select i1 %5, i64 %4, i64 %3
ret i64 %6
}
void *pval_(long int *pointer) { return ((void *)*pointer); }


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

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

LLVM IR (-O0):
define i8* @pval_(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @pval_(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
int get_next_rec_buffer(int);
int /*<<< orphan*/ is_space(int);
int /*<<< orphan*/ logprintf(int, char *);
int get_next_space(int maxusec) {
  int data;
  data = get_next_rec_buffer(maxusec);
  if (data == 0)
    return (0);
  if (!is_space(data)) {
    logprintf(2, "space expected");
    return (0);
  }
  return (data);
}


x86 assembly (clang, -O0):
<get_next_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <get_next_rec_buffer@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    115c <get_next_space+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    1190 <get_next_space+0x60>
mov    -0xc(%rbp),%edi
call   1030 <is_space@plt>
cmp    $0x0,%eax
jne    118a <get_next_space+0x5a>
mov    $0x2,%edi
lea    0xe87(%rip),%rsi
call   1050 <logprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1190 <get_next_space+0x60>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_next_space>:
push   %rbx
call   1040 <get_next_rec_buffer@plt>
mov    %eax,%ebx
xor    %eax,%eax
test   %ebx,%ebx
je     114d <get_next_space+0x1d>
mov    %ebx,%edi
call   1030 <is_space@plt>
mov    %eax,%ecx
mov    %ebx,%eax
test   %ecx,%ecx
je     114f <get_next_space+0x1f>
pop    %rbx
ret
lea    0xeaa(%rip),%rsi
mov    $0x2,%edi
call   1050 <logprintf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"space expected\00"
define i32 @get_next_space(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @get_next_rec_buffer(i32 %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 0, i32* %2
br label %18
10: ; preds = %1
%11 = load i32, i32* %4
%12 = call i32 @is_space(i32 %11)
%13 = icmp ne i32 %12, 0
br i1 %13, label %16, label %14
14: ; preds = %10
%15 = call i32 @logprintf(i32 2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %18
16: ; preds = %10
%17 = load i32, i32* %4
store i32 %17, i32* %2
br label %18
18: ; preds = %16, %14, %9
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@.str = [15 x i8] c"space expected\00"
define i32 @get_next_space(i32 %0) {
%2 = tail call i32 @get_next_rec_buffer(i32 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = tail call i32 @is_space(i32 %2)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @logprintf(i32 2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %4, %1, %7
%10 = phi i32 [ 0, %7 ], [ 0, %1 ], [ %2, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ test8_0();
int /*<<< orphan*/ test8_1();
int /*<<< orphan*/ test8_2();
int /*<<< orphan*/ write(int, char *, int);
void test8() {
  write(1, "\nTEST 8: fork / pthread_atfork:\n\n",
        sizeof("\nTEST 8: fork / pthread_atfork:\n\n") - 1);
  test8_0();
  test8_1();
  test8_2();
}


x86 assembly (clang, -O0):
<test8>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xeb0(%rip),%rsi
mov    $0x21,%edx
call   1030 <write@plt>
mov    $0x0,%al
call   1050 <test8_0@plt>
mov    $0x0,%al
call   1060 <test8_1@plt>
mov    $0x0,%al
call   1040 <test8_2@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test8>:
push   %rax
lea    0xeb8(%rip),%rsi
mov    $0x1,%edi
mov    $0x21,%edx
call   1030 <write@plt>
xor    %eax,%eax
call   1050 <test8_0@plt>
xor    %eax,%eax
call   1060 <test8_1@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <test8_2@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"\0ATEST 8: fork / pthread_atfork:\0A\0A\00"
define void @test8() {
%1 = call i32 @write(i32 1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 33)
%2 = call i32 (...) @test8_0()
%3 = call i32 (...) @test8_1()
%4 = call i32 (...) @test8_2()
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"\0ATEST 8: fork / pthread_atfork:\0A\0A\00"
define void @test8() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 33)
%2 = tail call i32 (...) @test8_0()
%3 = tail call i32 (...) @test8_1()
%4 = tail call i32 (...) @test8_2()
ret void
}
void fme_hssi_eth_uinit(struct ifpga_feature *feature) { (void)(feature); }


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

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

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

LLVM IR (-O2):
%struct.ifpga_feature = type opaque
define void @fme_hssi_eth_uinit(%struct.ifpga_feature* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
size_t strxfrm(char *, char const *, size_t);
size_t strxfrm_l(char *restrict dest, const char *restrict src, size_t n,
                 locale_t l) {
  return strxfrm(dest, src, n);
}


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

x86 assembly (clang, -O2):
<strxfrm_l>:
jmp    1030 <strxfrm@plt>

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

LLVM IR (-O2):
define i64 @strxfrm_l(i8* noalias nocapture %0, i8* noalias nocapture %1, i64 %2, i32 %3) {
%5 = tail call i64 @strxfrm(i8* %0, i8* %1, i64 %2)
ret i64 %5
}