xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ print_fmt(char *);
void shutdown() {
  print_fmt("You can now safely power off your computer.\n");
  while (1)
    ;
}


x86 assembly (clang, -O0):
<shutdown>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <print_fmt@plt>
jmp    1120 <shutdown+0x10>

x86 assembly (clang, -O2):
<shutdown>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <print_fmt@plt>
nopl   (%rax)
jmp    1120 <shutdown+0x10>

LLVM IR (-O0):
@.str = [45 x i8] c"You can now safely power off your computer.\0A\00"
define void @shutdown() {
%1 = call i32 @print_fmt(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
@.str = [45 x i8] c"You can now safely power off your computer.\0A\00"
define void @shutdown() {
%1 = tail call i32 @print_fmt(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}
void gtk_cell_layout_add_attribute() {}


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

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

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

LLVM IR (-O2):
define void @gtk_cell_layout_add_attribute() {
ret void
}
int imax(int x, int y) { return (x > y) ? (int)x : (int)y; }


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

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

LLVM IR (-O0):
define i32 @imax(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 sgt 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 @imax(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
int die(const char *msg) {
  printf("Fatal error: %s\n", msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [17 x i8] c"Fatal error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [17 x i8] c"Fatal error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @die(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int shm_unlink(char const *);
__attribute__((weak)) int __real_shm_unlink(const char *name) {
  return shm_unlink(name);
}


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

x86 assembly (clang, -O2):
<__real_shm_unlink>:
jmp    1030 <shm_unlink@plt>

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

LLVM IR (-O2):
define weak i32 @__real_shm_unlink(i8* %0) {
%2 = tail call i32 @shm_unlink(i8* %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ browser_load(char const *);
int browser_chdir(const char *dir) {
  if (browser_load(dir)) {
  }
  return 0;
}


x86 assembly (clang, -O0):
<browser_chdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <browser_load@plt>
cmp    $0x0,%rax
je     1134 <browser_chdir+0x24>
jmp    1134 <browser_chdir+0x24>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @browser_chdir(i8* %0) {
%2 = tail call i64 @browser_load(i8* %0)
ret i32 0
}
/* Variables and functions */
int strlen(char *);
int charAt(char vetor[], int pos) {
  if (pos < strlen(vetor))
    return (int)vetor[pos];
  return -1;
}


x86 assembly (clang, -O0):
<charAt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
cmp    %ecx,%eax
jge    114f <charAt+0x3f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0x4(%rbp)
jmp    1156 <charAt+0x46>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<charAt>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ebp,%ecx
jle    112f <charAt+0x1f>
movslq %ebp,%rax
movsbl (%rbx,%rax,1),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @charAt(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = icmp sgt i32 %3, %1
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
br label %10
10: ; preds = %2, %5
%11 = phi i32 [ %9, %5 ], [ -1, %2 ]
ret i32 %11
}
/* Variables and functions */
size_t ptr__iy(void const *const ptr) {
  return (size_t)(((uintptr_t)ptr) &
                  ((uintptr_t)(~((uintptr_t)((
                      uintptr_t)(((uintptr_t)((0xFULL
                                               << ((sizeof(uintptr_t) * 8ULL) -
                                                   4ULL)) |
                                              ((0x1ULL
                                                << ((sizeof(uintptr_t) * 8ULL) -
                                                    1ULL)) -
                                               1ULL)))
                                 << ((sizeof(uintptr_t) * 8ULL) / 2)))))));
}


x86 assembly (clang, -O0):
<ptr__iy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movabs $0xffffffff,%rcx
and    %rcx,%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @ptr__iy(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = and i64 %2, 4294967295
ret i64 %3
}
/* Variables and functions */
int bs_conv_8_14le(unsigned char *, int, unsigned char *);
int bs_conv_swab16(unsigned char const *, int, unsigned char *);
int bs_conv_16le_14le(const unsigned char *in_buf, int size,
                      unsigned char *out_buf) {
  size = bs_conv_swab16(in_buf, size, out_buf);
  size = bs_conv_8_14le(out_buf, size, out_buf);
  return size;
}


x86 assembly (clang, -O0):
<bs_conv_16le_14le>:
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),%rdx
call   1030 <bs_conv_swab16@plt>
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1040 <bs_conv_8_14le@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bs_conv_16le_14le>:
push   %rbx
mov    %rdx,%rbx
call   1030 <bs_conv_swab16@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %rbx,%rdx
pop    %rbx
jmp    1040 <bs_conv_8_14le@plt>

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

LLVM IR (-O2):
define i32 @bs_conv_16le_14le(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @bs_conv_swab16(i8* %0, i32 %1, i8* %2)
%5 = tail call i32 @bs_conv_8_14le(i8* %2, i32 %4, i8* %2)
ret i32 %5
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *, char *, int);
char *strerror(int);
void status(const char *message) {
  printf("%s:  %s (%d)\n", message, strerror(errno), errno);
  if (errno)
    exit(1);
}


x86 assembly (clang, -O0):
<status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x10(%rbp),%rsi
mov    %rax,%rdx
mov    0x2e80(%rip),%rax
mov    (%rax),%ecx
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e6b(%rip),%rax
cmpl   $0x0,(%rax)
je     1188 <status+0x58>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<status>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ea2(%rip),%r14
mov    (%r14),%edi
call   1050 <strerror@plt>
mov    (%r14),%ecx
lea    0xeb0(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1030 <printf@plt>
cmpl   $0x0,(%r14)
jne    1169 <status+0x39>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"%s: %s (%d)\0A\00"
@errno = global i32 0
define void @status(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @errno
%5 = call i8* @strerror(i32 %4)
%6 = load i32, i32* @errno
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %5, i32 %6)
%8 = load i32, i32* @errno
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%s: %s (%d)\0A\00"
@errno = global i32 0
define void @status(i8* %0) {
%2 = load i32, i32* @errno
%3 = tail call i8* @strerror(i32 %2)
%4 = load i32, i32* @errno
%5 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %3, i32 %4)
%6 = load i32, i32* @errno
%7 = icmp eq i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %1
ret void
}
int isxdigit(int a) {
  unsigned int ua = (unsigned int)a;
  return (int)(((ua - (unsigned)'0') < 10U) ||
               ((ua | 32U) - (unsigned)'a' < 6U));
}


x86 assembly (clang, -O0):
<isxdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
sub    $0x30,%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x9(%rbp)
jb     1133 <isxdigit+0x33>
mov    -0x8(%rbp),%eax
or     $0x20,%eax
sub    $0x61,%eax
cmp    $0x6,%eax
setb   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isxdigit>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
setb   %al
or     $0x20,%edi
add    $0xffffff9f,%edi
cmp    $0x6,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isxdigit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = sub i32 %5, 48
%7 = icmp ult i32 %6, 10
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = load i32, i32* %3
%10 = or i32 %9, 32
%11 = sub i32 %10, 97
%12 = icmp ult i32 %11, 6
br label %13
13: ; preds = %8, %1
%14 = phi i1 [ true, %1 ], [ %12, %8 ]
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @isxdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = or i32 %0, 32
%5 = add i32 %4, -97
%6 = icmp ult i32 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int min(int, int);
int max_dp_len(int i, int dir, int len) {
  return dir == 1 ? min(25, len - i) : min(25, i + 1);
}


x86 assembly (clang, -O0):
<max_dp_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1143 <max_dp_len+0x33>
mov    -0xc(%rbp),%esi
sub    -0x4(%rbp),%esi
mov    $0x19,%edi
call   1030 <min@plt>
mov    %eax,-0x10(%rbp)
jmp    1156 <max_dp_len+0x46>
mov    -0x4(%rbp),%esi
add    $0x1,%esi
mov    $0x19,%edi
call   1030 <min@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_dp_len>:
sub    %edi,%edx
lea    0x1(%rdi),%eax
cmp    $0x1,%esi
cmove  %edx,%eax
mov    $0x19,%edi
mov    %eax,%esi
jmp    1030 <min@plt>

LLVM IR (-O0):
define i32 @max_dp_len(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* %5
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %14
9: ; preds = %3
%10 = load i32, i32* %6
%11 = load i32, i32* %4
%12 = sub nsw i32 %10, %11
%13 = call i32 @min(i32 25, i32 %12)
br label %18
14: ; preds = %3
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
%17 = call i32 @min(i32 25, i32 %16)
br label %18
18: ; preds = %14, %9
%19 = phi i32 [ %13, %9 ], [ %17, %14 ]
ret i32 %19
}

LLVM IR (-O2):
define i32 @max_dp_len(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, 1
%5 = add nsw i32 %0, 1
%6 = sub nsw i32 %2, %0
%7 = select i1 %4, i32 %6, i32 %5
%8 = tail call i32 @min(i32 25, i32 %7)
ret i32 %8
}
/* Variables and functions */
double P3y_z(double, double, double, double);
double P3z_y(double sign, double xi, double et, double qq) {
  return P3y_z(sign, xi, et, qq);
}


x86 assembly (clang, -O0):
<P3z_y>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1030 <P3y_z@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<P3z_y>:
jmp    1030 <P3y_z@plt>

LLVM IR (-O0):
define double @P3z_y(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %6
%11 = load double, double* %7
%12 = load double, double* %8
%13 = call double @P3y_z(double %9, double %10, double %11, double %12)
ret double %13
}

LLVM IR (-O2):
define double @P3z_y(double %0, double %1, double %2, double %3) {
%5 = tail call double @P3y_z(double %0, double %1, double %2, double %3)
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(long *, long *, int);
void matrixCopyL(long *source, int numRows, int numCols, long *destination) {
  memcpy(destination, source, numRows * numCols * sizeof(long));
}


x86 assembly (clang, -O0):
<matrixCopyL>:
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    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%eax
imul   -0x10(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matrixCopyL>:
mov    %rdi,%rax
imul   %esi,%edx
shl    $0x3,%edx
mov    %rcx,%rdi
mov    %rax,%rsi
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @matrixCopyL(i64* %0, i32 %1, i32 %2, i64* %3) {
%5 = alloca i64*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i64*
store i64* %0, i64** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i64* %3, i64** %8
%9 = load i64*, i64** %8
%10 = load i64*, i64** %5
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = mul nsw i32 %11, %12
%14 = sext i32 %13 to i64
%15 = mul i64 %14, 8
%16 = trunc i64 %15 to i32
%17 = call i32 @memcpy(i64* %9, i64* %10, i32 %16)
ret void
}

LLVM IR (-O2):
define void @matrixCopyL(i64* %0, i32 %1, i32 %2, i64* %3) {
%5 = shl i32 %1, 3
%6 = mul i32 %5, %2
%7 = tail call i32 @memcpy(i64* %3, i64* %0, i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print(int *a, size_t n) {
  size_t i;
  for (i = 0; i < n; i++)
    printf("%d ", a[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1160 <print+0x50>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <print+0x18>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rsi,%rsi
je     1157 <print+0x37>
mov    %rsi,%r12
mov    %rdi,%r14
lea    0xec6(%rip),%r15
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,4),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print(i32* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %11, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %9, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = add nuw i64 %5, 1
%10 = icmp eq i64 %9, %1
br i1 %10, label %11, label %4
11: ; preds = %4, %2
%12 = tail call i32 @putchar(i32 10)
ret void
}
void rop3_95_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  stk1 = *D & T;
  stk1 = ~stk1;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_95_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xa(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_95_1_0>:
mov    (%rdi),%al
and    %al,%dl
or     %sil,%dl
not    %dl
and    %sil,%al
or     %dl,%al
mov    %al,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_95_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %2
%6 = or i8 %5, %1
%7 = xor i8 %6, -1
%8 = and i8 %4, %1
%9 = or i8 %8, %7
store i8 %9, i8* %0
ret void
}
int my_funct() { return 10; }


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

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

LLVM IR (-O0):
define i32 @my_funct() {
ret i32 10
}

LLVM IR (-O2):
define i32 @my_funct() {
ret i32 10
}
/* Variables and functions */
int /*<<< orphan*/ grantpt(int);
int my_grantpt(int fd) {
  grantpt(fd);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @my_grantpt(i32 %0) {
%2 = tail call i32 @grantpt(i32 %0)
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  short width;
};
struct TYPE_4__ {
  TYPE_1__ min_bounds;
};
typedef TYPE_2__ XFontStruct;

/* Variables and functions */
void set_XFontStruct_min_bounds_width(void *_p, short _v) {
  ((XFontStruct *)_p)->min_bounds.width = (short)_v;
}


x86 assembly (clang, -O0):
<set_XFontStruct_min_bounds_width>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XFontStruct_min_bounds_width>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i16 }
define void @set_XFontStruct_min_bounds_width(i8* %0, i16 signext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i16 %5, i16* %9
ret void
}

LLVM IR (-O2):
define void @set_XFontStruct_min_bounds_width(i8* nocapture writeonly %0, i16 signext %1) {
%3 = bitcast i8* %0 to i16*
store i16 %1, i16* %3
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int check_number(char const *, char const *);
scalar_t__ errno;
scalar_t__ strtoul(char const *, char **, int);
bool parse_uint32(const char **string, uint32_t *result) {
  errno = 0;
  const char *start = *string;
  char *end;
  *result = (uint32_t)strtoul(start, &end, 10);
  *string = end;
  return check_number(start, *string);
}


x86 assembly (clang, -O0):
<parse_uint32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0xa,%edx
call   1040 <strtoul@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
call   1030 <check_number@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_uint32>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
mov    0x2eaa(%rip),%rax
movq   $0x0,(%rax)
mov    (%rdi),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    $0xa,%edx
call   1040 <strtoul@plt>
mov    %rax,(%r14)
mov    0x8(%rsp),%rsi
mov    %rsi,(%r15)
mov    %rbx,%rdi
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <check_number@plt>

LLVM IR (-O0):
@errno = global i64 0
define i32 @parse_uint32(i8** %0, i64* %1) {
%3 = alloca i8**
%4 = alloca i64*
%5 = alloca i8*
%6 = alloca i8*
store i8** %0, i8*** %3
store i64* %1, i64** %4
store i64 0, i64* @errno
%7 = load i8**, i8*** %3
%8 = load i8*, i8** %7
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = call i64 @strtoul(i8* %9, i8** %6, i32 10)
%11 = load i64*, i64** %4
store i64 %10, i64* %11
%12 = load i8*, i8** %6
%13 = load i8**, i8*** %3
store i8* %12, i8** %13
%14 = load i8*, i8** %5
%15 = load i8**, i8*** %3
%16 = load i8*, i8** %15
%17 = call i32 @check_number(i8* %14, i8* %16)
ret i32 %17
}

LLVM IR (-O2):
@errno = global i64 0
define i32 @parse_uint32(i8** nocapture %0, i64* nocapture writeonly %1) {
%3 = alloca i8*
store i64 0, i64* @errno
%4 = load i8*, i8** %0
%5 = bitcast i8** %3 to i8*
%6 = call i64 @strtoul(i8* %4, i8** %3, i32 10)
store i64 %6, i64* %1
%7 = load i8*, i8** %3
store i8* %7, i8** %0
%8 = tail call i32 @check_number(i8* %4, i8* %7)
ret i32 %8
}
void gtk_text_view_add_child_in_window() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_view_add_child_in_window() {
ret void
}
/* Variables and functions */
size_t strlen(char const *s) {
  size_t i;
  i = 0;
  while (s[i]) {
    i += 1;
  }
  return i;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1133 <strlen+0x33>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

LLVM IR (-O0):
define i64 @strlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
store i64 0, i64* %3
br label %4
4: ; preds = %10, %1
%5 = load i8*, i8** %2
%6 = load i64, i64* %3
%7 = getelementptr inbounds i8, i8* %5, i64 %6
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %4
%11 = load i64, i64* %3
%12 = add i64 %11, 1
store i64 %12, i64* %3
br label %4
13: ; preds = %4
%14 = load i64, i64* %3
ret i64 %14
}

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i64 %3
}
/* Type definitions */
typedef unsigned int uint8_t;

/* Variables and functions */
void bf_toggle(uint8_t field[], size_t idx) {
  field[idx / 8] ^= (1u << (7 - (idx % 8)));
}


x86 assembly (clang, -O0):
<bf_toggle>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
and    $0x7,%rcx
mov    $0x7,%eax
sub    %rcx,%rax
mov    %eax,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shr    $0x3,%rcx
xor    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bf_toggle>:
mov    %esi,%ecx
not    %cl
and    $0x7,%cl
mov    $0x1,%eax
shl    %cl,%eax
shr    $0x3,%rsi
xor    %eax,(%rdi,%rsi,4)
ret

LLVM IR (-O0):
define void @bf_toggle(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = urem i64 %5, 8
%7 = sub i64 7, %6
%8 = trunc i64 %7 to i32
%9 = shl i32 1, %8
%10 = load i32*, i32** %3
%11 = load i64, i64* %4
%12 = udiv i64 %11, 8
%13 = getelementptr inbounds i32, i32* %10, i64 %12
%14 = load i32, i32* %13
%15 = xor i32 %14, %9
store i32 %15, i32* %13
ret void
}

LLVM IR (-O2):
define void @bf_toggle(i32* nocapture %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = and i32 %3, 7
%5 = xor i32 %4, 7
%6 = shl nuw i32 1, %5
%7 = lshr i64 %1, 3
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = xor i32 %9, %6
store i32 %10, i32* %8
ret void
}
int execute_personality() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_personality() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void usage(char *progname) {
  printf("%s: simpleVPN client application\n\n", progname);
  printf("\t-u\t\tOptional. Use UDP instead of TCP. Not implemented\n");
  printf("\t-p <port>\tOptional. Set the local port to listen on.\n");
  printf("\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeda(%rip),%rdi
call   1040 <puts@plt>
lea    0xf05(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"%s: simpleVPN client application\0A\0A\00"
@.str.1 = [56 x i8] c"\09-u\09\09Optional. Use UDP instead of TCP. Not implemented\0A\00"
@.str.2 = [55 x i8] c"\09-p <port>\09Optional. Set the local port to listen on.\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"%s: simpleVPN client application\0A\0A\00"
@str = [55 x i8] c"\09-u\09\09Optional. Use UDP instead of TCP. Not implemented\00"
@str.4 = [54 x i8] c"\09-p <port>\09Optional. Set the local port to listen on.\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.4, i64 0, i64 0))
%5 = tail call i32 @putchar(i32 10)
ret void
}
void *xrealloc(pointer, bytes) void *pointer;
int bytes;
{
  void *temp;
  if (!pointer)
    temp = malloc(bytes);
  else
    temp = realloc(pointer, bytes);
  if (!temp)
    memory_error_and_abort("xrealloc");
  return (temp);
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    115c <xrealloc+0x2c>
movslq -0xc(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
jmp    116d <xrealloc+0x3d>
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rsi
call   1050 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1186 <xrealloc+0x56>
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1030 <memory_error_and_abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rbx
movslq %esi,%rsi
test   %rdi,%rdi
je     1140 <xrealloc+0x10>
call   1050 <realloc@plt>
jmp    1148 <xrealloc+0x18>
mov    %rsi,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    115e <xrealloc+0x2e>
lea    0xea9(%rip),%rdi
xor    %eax,%eax
call   1030 <memory_error_and_abort@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"xrealloc\00"
define i8* @xrealloc(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
%4 = sext i32 %1 to i64
br i1 %3, label %5, label %7
5: ; preds = %2
%6 = tail call i8* @malloc(i64 %4)
br label %9
7: ; preds = %2
%8 = tail call i8* @realloc(i8* %0, i64 %4)
br label %9
9: ; preds = %7, %5
%10 = phi i8* [ %8, %7 ], [ %6, %5 ]
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = tail call i32 (i8*, ...) bitcast (i32 (...)* @memory_error_and_abort to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %12, %9
ret i8* %10
}
void set_bit(int nr, unsigned long *addr) { *addr |= (1 << (nr)); }


x86 assembly (clang, -O0):
<set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
mov    -0x10(%rbp),%rax
or     (%rax),%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
or     %rax,(%rsi)
ret

LLVM IR (-O0):
define void @set_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
%5 = load i32, i32* %3
%6 = shl i32 1, %5
%7 = sext i32 %6 to i64
%8 = load i64*, i64** %4
%9 = load i64, i64* %8
%10 = or i64 %9, %7
store i64 %10, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_bit(i32 %0, i64* nocapture %1) {
%3 = shl nuw i32 1, %0
%4 = sext i32 %3 to i64
%5 = load i64, i64* %1
%6 = or i64 %5, %4
store i64 %6, i64* %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
void case9(FILE *client_sock, const char *Sip) {
  fprintf(client_sock, "%s", Sip);
}


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

x86 assembly (clang, -O2):
<case9>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <fputs@plt>

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

LLVM IR (-O2):
define void @case9(i32* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @fputs(i8* %1, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assem_debug(char *);
int /*<<< orphan*/ output_byte(int);
void emit_fabs() {
  assem_debug("fabs\n");
  output_byte(0xd9);
  output_byte(0xe1);
}


x86 assembly (clang, -O0):
<emit_fabs>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <assem_debug@plt>
mov    $0xd9,%edi
call   1040 <output_byte@plt>
mov    $0xe1,%edi
call   1040 <output_byte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_fabs>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <assem_debug@plt>
mov    $0xd9,%edi
call   1040 <output_byte@plt>
mov    $0xe1,%edi
pop    %rax
jmp    1040 <output_byte@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"fabs\0A\00"
define void @emit_fabs() {
%1 = call i32 @assem_debug(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @output_byte(i32 217)
%3 = call i32 @output_byte(i32 225)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"fabs\0A\00"
define void @emit_fabs() {
%1 = tail call i32 @assem_debug(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @output_byte(i32 217)
%3 = tail call i32 @output_byte(i32 225)
ret void
}
int bar(int i, float f) { return i; }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @bar(i32 returned %0, float %1) {
ret i32 %0
}
/* Variables and functions */
long rint(double);
__attribute__((always_)) __attribute__((const)) long int lrint(double x) {
  return rint(x);
}


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

x86 assembly (clang, -O2):
<lrint>:
jmp    1030 <rint@plt>

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

LLVM IR (-O2):
define i64 @lrint(double %0) {
%2 = tail call i64 @rint(double %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i = 10;
  while (--i) {
    printf("%d\n", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     114c <main+0x3c>
mov    -0x8(%rbp),%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 9)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 8)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 7)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 6)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 5)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_solution(double, double, double);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *, double *, double *);
int main(void) {
  double a, b, c;
  printf("\nEnter the values a, b and c: ");
  scanf("%lf %lf %lf", &a, &b, &c);
  print_solution(a, b, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1050 <print_solution@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
movsd  (%rsp),%xmm2
call   1050 <print_solution@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [31 x i8] c"\0AEnter the values a, b and c: \00"
@.str.1 = [12 x i8] c"%lf %lf %lf\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), double* %2, double* %3, double* %4)
%7 = load double, double* %2
%8 = load double, double* %3
%9 = load double, double* %4
%10 = call i32 @print_solution(double %7, double %8, double %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"\0AEnter the values a, b and c: \00"
@.str.1 = [12 x i8] c"%lf %lf %lf\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), double* %1, double* %2, double* %3)
%9 = load double, double* %1
%10 = load double, double* %2
%11 = load double, double* %3
%12 = call i32 @print_solution(double %9, double %10, double %11)
ret i32 0
}
/* Variables and functions */
int tuner_set_freq(void *, unsigned int);
int bbm_com_tuner_set_freq(void *handle, unsigned int freq) {
  int res;
  res = tuner_set_freq(handle, freq);
  return res;
}


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

x86 assembly (clang, -O2):
<bbm_com_tuner_set_freq>:
jmp    1030 <tuner_set_freq@plt>

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

LLVM IR (-O2):
define i32 @bbm_com_tuner_set_freq(i8* %0, i32 %1) {
%3 = tail call i32 @tuner_set_freq(i8* %0, i32 %1)
ret i32 %3
}
int test_imm_7Cuint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x7C << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_7Cuint64_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, 124
%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_7Cuint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 8126464
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}