xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ F_OK;
scalar_t__ access(char *, int /*<<< orphan*/);
const char *usb_dir_find(void) {
  static char udev_usb_path[] = "/dev/bus/usb";
  if (access(udev_usb_path, F_OK) == 0) {
    return udev_usb_path;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<usb_dir_find>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
lea    0x2f00(%rip),%rdi
call   1030 <access@plt>
cmp    $0x0,%rax
jne    1147 <usb_dir_find+0x37>
lea    0x2eea(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    114f <usb_dir_find+0x3f>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usb_dir_find>:
push   %rbx
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
lea    0x2f07(%rip),%rbx
mov    %rbx,%rdi
call   1030 <access@plt>
xor    %ecx,%ecx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@usb_dir_find.udev_usb_path = internal global [13 x i8] c"/dev/bus/usb\00"
@F_OK = global i32 0
define i8* @usb_dir_find() {
%1 = alloca i8*
%2 = load i32, i32* @F_OK
%3 = call i64 @access(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @usb_dir_find.udev_usb_path, i64 0, i64 0), i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @usb_dir_find.udev_usb_path, i64 0, i64 0), i8** %1
br label %7
6: ; preds = %0
store i8* null, i8** %1
br label %7
7: ; preds = %6, %5
%8 = load i8*, i8** %1
ret i8* %8
}

LLVM IR (-O2):
@usb_dir_find.udev_usb_path = internal global [13 x i8] c"/dev/bus/usb\00"
@F_OK = global i32 0
define i8* @usb_dir_find() {
%1 = load i32, i32* @F_OK
%2 = tail call i64 @access(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @usb_dir_find.udev_usb_path, i64 0, i64 0), i32 %1)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @usb_dir_find.udev_usb_path, i64 0, i64 0), i8* null
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ mk_file_transient(char const *);
int f_transient(int mode, unsigned char **sec, float *data, unsigned int ndata,
                char *inv_out, void **local, const char *arg1) {
  if (mode == -1) {
    mk_file_transient(arg1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<f_transient>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    1145 <f_transient+0x35>
mov    0x10(%rbp),%rdi
call   1030 <mk_file_transient@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_transient>:
cmp    $0xffffffff,%edi
je     1118 <f_transient+0x8>
xor    %eax,%eax
ret
push   %rax
mov    0x10(%rsp),%rdi
call   1030 <mk_file_transient@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @f_transient(i32 %0, i8** %1, float* %2, i32 %3, i8* %4, i8** %5, i8* %6) {
%8 = alloca i32
%9 = alloca i8**
%10 = alloca float*
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8**
%14 = alloca i8*
store i32 %0, i32* %8
store i8** %1, i8*** %9
store float* %2, float** %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i8** %5, i8*** %13
store i8* %6, i8** %14
%15 = load i32, i32* %8
%16 = icmp eq i32 %15, -1
br i1 %16, label %17, label %20
17: ; preds = %7
%18 = load i8*, i8** %14
%19 = call i32 @mk_file_transient(i8* %18)
br label %20
20: ; preds = %17, %7
ret i32 0
}

LLVM IR (-O2):
define i32 @f_transient(i32 %0, i8** nocapture readnone %1, float* nocapture readnone %2, i32 %3, i8* nocapture readnone %4, i8** nocapture readnone %5, i8* %6) {
%8 = icmp eq i32 %0, -1
br i1 %8, label %9, label %11
9: ; preds = %7
%10 = tail call i32 @mk_file_transient(i8* %6)
br label %11
11: ; preds = %9, %7
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dpeek();
int /*<<< orphan*/ drepl(int /*<<< orphan*/);
int /*<<< orphan*/ fixnum_to_bignum(int /*<<< orphan*/);
int /*<<< orphan*/ tag_bignum(int /*<<< orphan*/);
int /*<<< orphan*/ untag_fixnum_fast(int /*<<< orphan*/);
void primitive_fixnum_to_bignum(void) {
  drepl(tag_bignum(fixnum_to_bignum(untag_fixnum_fast(dpeek()))));
}


x86 assembly (clang, -O0):
<primitive_fixnum_to_bignum>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <dpeek@plt>
mov    %eax,%edi
call   1040 <untag_fixnum_fast@plt>
mov    %eax,%edi
call   1060 <fixnum_to_bignum@plt>
mov    %eax,%edi
call   1070 <tag_bignum@plt>
mov    %eax,%edi
call   1050 <drepl@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_fixnum_to_bignum>:
push   %rax
xor    %eax,%eax
call   1030 <dpeek@plt>
mov    %eax,%edi
call   1040 <untag_fixnum_fast@plt>
mov    %eax,%edi
call   1060 <fixnum_to_bignum@plt>
mov    %eax,%edi
call   1070 <tag_bignum@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <drepl@plt>

LLVM IR (-O0):
define void @primitive_fixnum_to_bignum() {
%1 = call i32 (...) @dpeek()
%2 = call i32 @untag_fixnum_fast(i32 %1)
%3 = call i32 @fixnum_to_bignum(i32 %2)
%4 = call i32 @tag_bignum(i32 %3)
%5 = call i32 @drepl(i32 %4)
ret void
}

LLVM IR (-O2):
define void @primitive_fixnum_to_bignum() {
%1 = tail call i32 (...) @dpeek()
%2 = tail call i32 @untag_fixnum_fast(i32 %1)
%3 = tail call i32 @fixnum_to_bignum(i32 %2)
%4 = tail call i32 @tag_bignum(i32 %3)
%5 = tail call i32 @drepl(i32 %4)
ret void
}
int param_set_short(const char *val, struct kernel_param *kp) { return 0; }


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

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

LLVM IR (-O0):
%struct.kernel_param = type opaque
define i32 @param_set_short(i8* %0, %struct.kernel_param* %1) {
%3 = alloca i8*
%4 = alloca %struct.kernel_param*
store i8* %0, i8** %3
store %struct.kernel_param* %1, %struct.kernel_param** %4
ret i32 0
}

LLVM IR (-O2):
%struct.kernel_param = type opaque
define i32 @param_set_short(i8* nocapture readnone %0, %struct.kernel_param* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef int time_t;

/* Variables and functions */
char *ctime(int *);
int /*<<< orphan*/ printf(char *, int, char *);
int /*<<< orphan*/ time(int *);
int main() {
  time_t t;
  time(&t);
  printf("%d\t%s\n", t, ctime(&t));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1050 <time@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <ctime@plt>
mov    -0x8(%rbp),%esi
mov    %rax,%rdx
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0x4(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <time@plt>
mov    0x4(%rsp),%ebp
mov    %rbx,%rdi
call   1030 <ctime@plt>
lea    0xead(%rip),%rdi
mov    %ebp,%esi
mov    %rax,%rdx
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d\09%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 @time(i32* %1)
%3 = load i32, i32* %1
%4 = call i8* @ctime(i32* %1)
%5 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3, i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d\09%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = load i32, i32* %1
%5 = call i8* @ctime(i32* %1)
%6 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %4, i8* %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ switcheroo_write(char *);
void switcheroo_off(void) { switcheroo_write("OFF\n"); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"OFF\0A\00"
define void @switcheroo_off() {
%1 = tail call i32 @switcheroo_write(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t lfs_fromle32(uint32_t a) {
  return (((uint8_t *)&a)[0] << 0) | (((uint8_t *)&a)[1] << 8) |
         (((uint8_t *)&a)[2] << 16) | (((uint8_t *)&a)[3] << 24);
}


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

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

LLVM IR (-O0):
define i32 @lfs_fromle32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = getelementptr inbounds i32, i32* %2, i64 0
%4 = load i32, i32* %3
%5 = shl i32 %4, 0
%6 = getelementptr inbounds i32, i32* %2, i64 1
%7 = load i32, i32* %6
%8 = shl i32 %7, 8
%9 = or i32 %5, %8
%10 = getelementptr inbounds i32, i32* %2, i64 2
%11 = load i32, i32* %10
%12 = shl i32 %11, 16
%13 = or i32 %9, %12
%14 = getelementptr inbounds i32, i32* %2, i64 3
%15 = load i32, i32* %14
%16 = shl i32 %15, 24
%17 = or i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @lfs_fromle32(i32 %0) {
ret i32 poison
}
void dummyvideo_ProcessDList(void) {}


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

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

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

LLVM IR (-O2):
define void @dummyvideo_ProcessDList() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ report(int /*<<< orphan*/, char *, char const *,
                          int /*<<< orphan*/);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
void log_kevent_watchtab(const char *path) {
  report(LOG_ERR, "Unable to queue filter for watchtab \"%s\": %s", path,
         strerror(errno));
}


x86 assembly (clang, -O0):
<log_kevent_watchtab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    %eax,%ecx
lea    0xea2(%rip),%rsi
call   1030 <report@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_kevent_watchtab>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ea3(%rip),%rax
mov    (%rax),%ebp
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
lea    0xebc(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %eax,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <report@plt>

LLVM IR (-O0):
@LOG_ERR = global i32 0
@.str = [45 x i8] c"Unable to queue filter for watchtab \22%s\22: %s\00"
@errno = global i32 0
define void @log_kevent_watchtab(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @LOG_ERR
%4 = load i8*, i8** %2
%5 = load i32, i32* @errno
%6 = call i32 @strerror(i32 %5)
%7 = call i32 @report(i32 %3, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %6)
ret void
}

LLVM IR (-O2):
@LOG_ERR = global i32 0
@.str = [45 x i8] c"Unable to queue filter for watchtab \22%s\22: %s\00"
@errno = global i32 0
define void @log_kevent_watchtab(i8* %0) {
%2 = load i32, i32* @LOG_ERR
%3 = load i32, i32* @errno
%4 = tail call i32 @strerror(i32 %3)
%5 = tail call i32 @report(i32 %2, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %4)
ret void
}
__attribute__((gnu_)) __attribute__((always_)) int func3b(int x) {
  return x < 14 ? 1 : 2;
}


x86 assembly (clang, -O0):
<func3b>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0x2,%eax
mov    $0x1,%ecx
cmp    $0xe,%edx
cmovl  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func3b>:
xor    %ecx,%ecx
cmp    $0xe,%edi
setl   %cl
mov    $0x2,%eax
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @func3b(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 14
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 1, i32 2
ret i32 %6
}

LLVM IR (-O2):
define i32 @func3b(i32 %0) {
%2 = icmp slt i32 %0, 14
%3 = select i1 %2, i32 1, i32 2
ret i32 %3
}
/* Variables and functions */
char *cunescape_length_with_prefix(char const *, size_t, int /*<<< orphan*/ *);
char *cunescape_length(const char *s, size_t length) {
  return cunescape_length_with_prefix(s, length, NULL);
}


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

x86 assembly (clang, -O2):
<cunescape_length>:
xor    %edx,%edx
jmp    1030 <cunescape_length_with_prefix@plt>

LLVM IR (-O0):
define i8* @cunescape_length(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @cunescape_length_with_prefix(i8* %5, i64 %6, i32* null)
ret i8* %7
}

LLVM IR (-O2):
define i8* @cunescape_length(i8* %0, i64 %1) {
%3 = tail call i8* @cunescape_length_with_prefix(i8* %0, i64 %1, i32* null)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void i2c_close_dev(int fd) { close(fd); }


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

x86 assembly (clang, -O2):
<i2c_close_dev>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @i2c_close_dev(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
int get_BZ_triplets_at_q(int **, int const, int **, int const *, int const *,
                         int const, int const *);
int tpk_get_BZ_triplets_at_q(int triplets[][3], const int grid_point,
                             int bz_grid_address[][3], const int bz_map[],
                             const int map_triplets[],
                             const int num_map_triplets, const int mesh[3]) {
  return get_BZ_triplets_at_q(triplets, grid_point, bz_grid_address, bz_map,
                              map_triplets, num_map_triplets, mesh);
}


x86 assembly (clang, -O0):
<tpk_get_BZ_triplets_at_q>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x2c(%rbp),%r9d
mov    0x10(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <get_BZ_triplets_at_q@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tpk_get_BZ_triplets_at_q>:
jmp    1030 <get_BZ_triplets_at_q@plt>

LLVM IR (-O0):
define i32 @tpk_get_BZ_triplets_at_q([3 x i32]* %0, i32 %1, [3 x i32]* %2, i32* %3, i32* %4, i32 %5, i32* %6) {
%8 = alloca [3 x i32]*
%9 = alloca i32
%10 = alloca [3 x i32]*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i32*
store [3 x i32]* %0, [3 x i32]** %8
store i32 %1, i32* %9
store [3 x i32]* %2, [3 x i32]** %10
store i32* %3, i32** %11
store i32* %4, i32** %12
store i32 %5, i32* %13
store i32* %6, i32** %14
%15 = load [3 x i32]*, [3 x i32]** %8
%16 = bitcast [3 x i32]* %15 to i32**
%17 = load i32, i32* %9
%18 = load [3 x i32]*, [3 x i32]** %10
%19 = bitcast [3 x i32]* %18 to i32**
%20 = load i32*, i32** %11
%21 = load i32*, i32** %12
%22 = load i32, i32* %13
%23 = load i32*, i32** %14
%24 = call i32 @get_BZ_triplets_at_q(i32** %16, i32 %17, i32** %19, i32* %20, i32* %21, i32 %22, i32* %23)
ret i32 %24
}

LLVM IR (-O2):
define i32 @tpk_get_BZ_triplets_at_q([3 x i32]* %0, i32 %1, [3 x i32]* %2, i32* %3, i32* %4, i32 %5, i32* %6) {
%8 = bitcast [3 x i32]* %0 to i32**
%9 = bitcast [3 x i32]* %2 to i32**
%10 = tail call i32 @get_BZ_triplets_at_q(i32** %8, i32 %1, i32** %9, i32* %3, i32* %4, i32 %5, i32* %6)
ret i32 %10
}
int not(int i) { return !i; }


x86 assembly (clang, -O0):
<not>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<not>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @not(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @not(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
int bitAt(int k, int num) { return ((num >> (k - 1)) & 1); }


x86 assembly (clang, -O0):
<bitAt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
sar    %cl,%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitAt>:
mov    %esi,%eax
lea    -0x1(%rdi),%ecx
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @bitAt(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = sub nsw i32 %6, 1
%8 = ashr i32 %5, %7
%9 = and i32 %8, 1
ret i32 %9
}

LLVM IR (-O2):
define i32 @bitAt(i32 %0, i32 %1) {
%3 = add nsw i32 %0, -1
%4 = lshr i32 %1, %3
%5 = and i32 %4, 1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ popNarray(char *, unsigned int);
void popcomplex8array_(char *x, unsigned int *n) { popNarray(x, (*n * 8)); }


x86 assembly (clang, -O0):
<popcomplex8array_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
shl    $0x3,%esi
call   1030 <popNarray@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<popcomplex8array_>:
mov    (%rsi),%esi
shl    $0x3,%esi
jmp    1030 <popNarray@plt>

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

LLVM IR (-O2):
define void @popcomplex8array_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = shl i32 %3, 3
%5 = tail call i32 @popNarray(i8* %0, i32 %4)
ret void
}
int el_cmp(void *ep1, void *ep2) {
  double *tp1 = (double *)ep1, *tp2 = (double *)ep2;
  if (*tp1 > *tp2) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<el_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    113e <el_cmp+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1145 <el_cmp+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<el_cmp>:
movsd  (%rdi),%xmm0
xor    %eax,%eax
ucomisd (%rsi),%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @el_cmp(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double*
%7 = alloca double*
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
store double* %9, double** %6
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to double*
store double* %11, double** %7
%12 = load double*, double** %6
%13 = load double, double* %12
%14 = load double*, double** %7
%15 = load double, double* %14
%16 = fcmp ogt double %13, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 1, i32* %3
br label %19
18: ; preds = %2
store i32 0, i32* %3
br label %19
19: ; preds = %18, %17
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @el_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = bitcast i8* %1 to double*
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ogt double %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
void underflow(void) {
  float f11 = 3.3E-10000000000000000000f;
  float f22 = -3.3E-10000000000000000000f;
  float f1 = 3.3E-46f;
  float f2 = -3.3E-46f;
  float f3 = 0;
  float f4 = -0;
  float f5 = 0.0;
  float f6 = -0.0;
  double d11 = 3.3E-10000000000000000000;
  double d22 = -3.3E-10000000000000000000;
  double d1 = 1.4E-325;
  double d2 = -1.4E-325;
  double d3 = 0;
  double d4 = -0;
  double d5 = 0.0;
  double d6 = -0.0;
}


x86 assembly (clang, -O0):
<underflow>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  0xef4(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xedf(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xeba(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe9d(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe88(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe63(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @underflow() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
store float 0.000000e+00, float* %1
store float -0.000000e+00, float* %2
store float 0.000000e+00, float* %3
store float -0.000000e+00, float* %4
store float 0.000000e+00, float* %5
store float 0.000000e+00, float* %6
store float 0.000000e+00, float* %7
store float -0.000000e+00, float* %8
store double 0.000000e+00, double* %9
store double -0.000000e+00, double* %10
store double 0.000000e+00, double* %11
store double -0.000000e+00, double* %12
store double 0.000000e+00, double* %13
store double 0.000000e+00, double* %14
store double 0.000000e+00, double* %15
store double -0.000000e+00, double* %16
ret void
}

LLVM IR (-O2):
define void @underflow() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dlerror();
void clearError(void) { dlerror(); }


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

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

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

LLVM IR (-O2):
define void @clearError() {
%1 = tail call i32 (...) @dlerror()
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
int isORD(const char *tok) { return strcmp(tok, "ord") == 0; }


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

x86 assembly (clang, -O2):
<isORD>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"ord\00"
define i32 @isORD(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
scalar_t__ INT32_MAX;
double s32tod(int32_t u, int32_t scale) {
  return ((double)u * (double)scale) / (double)INT32_MAX;
}


x86 assembly (clang, -O0):
<s32tod>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
cvtsi2sdq -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mov    0x2ebd(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<s32tod>:
cvtsi2sd %rdi,%xmm1
cvtsi2sd %rsi,%xmm0
mulsd  %xmm1,%xmm0
mov    0x2ecb(%rip),%rax
xorps  %xmm1,%xmm1
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
@INT32_MAX = global i64 0
define double @s32tod(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = sitofp i64 %5 to double
%7 = load i64, i64* %4
%8 = sitofp i64 %7 to double
%9 = fmul double %6, %8
%10 = load i64, i64* @INT32_MAX
%11 = sitofp i64 %10 to double
%12 = fdiv double %9, %11
ret double %12
}

LLVM IR (-O2):
@INT32_MAX = global i64 0
define double @s32tod(i64 %0, i64 %1) {
%3 = sitofp i64 %0 to double
%4 = sitofp i64 %1 to double
%5 = fmul double %3, %4
%6 = load i64, i64* @INT32_MAX
%7 = sitofp i64 %6 to double
%8 = fdiv double %5, %7
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void init_0(void) { printf("init array 0\n"); }


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

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

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

LLVM IR (-O2):
@str = [13 x i8] c"init array 0\00"
define void @init_0() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
char *__strchrnul(s, c) const char *s;
int c;
{
  char *result = strchr(s, c);
  if (result == 0)
    result = strchr(s, '\0');
  return result;
}


x86 assembly (clang, -O0):
<__strchrnul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1149 <__strchrnul+0x39>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__strchrnul>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strchr@plt>
test   %rax,%rax
je     1130 <__strchrnul+0x10>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <strlen@plt>
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @__strchrnul(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 = load i32, i32* %4
%8 = call i8* @strchr(i8* %6, i32 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = call i8* @strchr(i8* %12, i32 0)
store i8* %13, i8** %5
br label %14
14: ; preds = %11, %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
define i8* @__strchrnul(i8* %0, i32 %1) {
%3 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%7 = getelementptr i8, i8* %0, i64 %6
br label %8
8: ; preds = %5, %2
%9 = phi i8* [ %7, %5 ], [ %3, %2 ]
ret i8* %9
}
void NotTraced() {}


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

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

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

LLVM IR (-O2):
define void @NotTraced() {
ret void
}
short int todate(int date, int month, int year) {
  short int date_new = ((short int)(date & 0x0000000F)) << 12;
  short int month_new = ((short int)(month & 0x0000001F)) << 7;
  short int year_new = ((short int)(year & 0x0000007F));
  return (date_new | month_new | year_new);
}


x86 assembly (clang, -O0):
<todate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
cwtl
shl    $0xc,%eax
mov    %ax,-0xe(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1f,%eax
cwtl
shl    $0x7,%eax
mov    %ax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0x7f,%eax
mov    %ax,-0x12(%rbp)
movswl -0xe(%rbp),%eax
movswl -0x10(%rbp),%ecx
or     %ecx,%eax
movswl -0x12(%rbp),%ecx
or     %ecx,%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<todate>:
shl    $0xc,%edi
and    $0x1f,%esi
shl    $0x7,%esi
lea    (%rsi,%rdi,1),%eax
and    $0x7f,%edx
or     %edx,%eax
ret

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

LLVM IR (-O2):
define signext i16 @todate(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %0, 12
%5 = shl i32 %1, 7
%6 = and i32 %5, 3968
%7 = and i32 %2, 127
%8 = or i32 %6, %4
%9 = or i32 %8, %7
%10 = trunc i32 %9 to i16
ret i16 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ gen_encoding_matrix(int /*<<< orphan*/ *, int, int);
int /*<<< orphan*/ get_identity_matrix(int /*<<< orphan*/ *, int);
void gen_total_encoding_matrix(uint8_t *totalEncodingMatrix, int nativeBlockNum,
                               int parityBlockNum) {
  get_identity_matrix(totalEncodingMatrix, nativeBlockNum);
  gen_encoding_matrix(totalEncodingMatrix + nativeBlockNum * nativeBlockNum,
                      parityBlockNum, nativeBlockNum);
}


x86 assembly (clang, -O0):
<gen_total_encoding_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <get_identity_matrix@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <gen_encoding_matrix@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_total_encoding_matrix>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <get_identity_matrix@plt>
mov    %ebp,%eax
imul   %eax,%eax
lea    (%rbx,%rax,4),%rdi
mov    %r14d,%esi
mov    %ebp,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <gen_encoding_matrix@plt>

LLVM IR (-O0):
define void @gen_total_encoding_matrix(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** %4
%8 = load i32, i32* %5
%9 = call i32 @get_identity_matrix(i32* %7, i32 %8)
%10 = load i32*, i32** %4
%11 = load i32, i32* %5
%12 = load i32, i32* %5
%13 = mul nsw i32 %11, %12
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %10, i64 %14
%16 = load i32, i32* %6
%17 = load i32, i32* %5
%18 = call i32 @gen_encoding_matrix(i32* %15, i32 %16, i32 %17)
ret void
}

LLVM IR (-O2):
define void @gen_total_encoding_matrix(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 @get_identity_matrix(i32* %0, i32 %1)
%5 = mul nsw i32 %1, %1
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = tail call i32 @gen_encoding_matrix(i32* %7, i32 %2, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int optk_fsetmode(FILE *stream, int fmode) {
  ((void)(stream));
  ((void)(fmode));
  return 0;
}


x86 assembly (clang, -O0):
<optk_fsetmode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @optk_fsetmode(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
ret i32 0
}

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


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

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

LLVM IR (-O0):
define void @jupe_expire() {
%1 = call i32 @jupe_find(i32* null)
ret void
}

LLVM IR (-O2):
define void @jupe_expire() {
%1 = tail call i32 @jupe_find(i32* null)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ str;

/* Variables and functions */
int read(int /*<<< orphan*/, char *, int);
int scan_char(char *str) {
  int i;
  i = read(0, str, sizeof(str));
  return i;
}


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

x86 assembly (clang, -O2):
<scan_char>:
mov    %rdi,%rsi
xor    %edi,%edi
mov    $0x8,%edx
jmp    1030 <read@plt>

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

LLVM IR (-O2):
define i32 @scan_char(i8* nocapture %0) {
%2 = tail call i32 @read(i32 0, i8* %0, i32 8)
ret i32 %2
}
/* Variables and functions */
scalar_t__ opt_parse(int, char **);
scalar_t__ opt_validate();
int /*<<< orphan*/ usage(char *);
int main(int argc, char *argv[]) {
  if (opt_parse(argc, argv) > 0 || opt_validate() > 0) {
    usage(argv[0]);
    return 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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <opt_parse@plt>
cmp    $0x0,%rax
jg     116d <main+0x3d>
mov    $0x0,%al
call   1030 <opt_validate@plt>
cmp    $0x0,%rax
jle    1185 <main+0x55>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1040 <usage@plt>
movl   $0x1,-0x4(%rbp)
jmp    118c <main+0x5c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1050 <opt_parse@plt>
test   %rax,%rax
jg     114e <main+0x1e>
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <opt_validate@plt>
test   %rax,%rax
jle    115b <main+0x2b>
mov    (%rbx),%rdi
call   1040 <usage@plt>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i64 @opt_parse(i32 %6, i8** %7)
%9 = icmp sgt i64 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %2
%11 = call i64 (...) @opt_validate()
%12 = icmp sgt i64 %11, 0
br i1 %12, label %13, label %18
13: ; preds = %10, %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 0
%16 = load i8*, i8** %15
%17 = call i32 @usage(i8* %16)
store i32 1, i32* %3
br label %19
18: ; preds = %10
store i32 0, i32* %3
br label %19
19: ; preds = %18, %13
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i64 @opt_parse(i32 %0, i8** %1)
%4 = icmp sgt i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i64 (...) @opt_validate()
%7 = icmp sgt i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5, %2
%9 = load i8*, i8** %1
%10 = tail call i32 @usage(i8* %9)
br label %11
11: ; preds = %5, %8
%12 = phi i32 [ 1, %8 ], [ 0, %5 ]
ret i32 %12
}
/* Variables and functions */
char *boyer_moore(char *, int, char *, int);
char *memstr(char *haystack, int h_length, char *needle, int n_length) {
  return boyer_moore(haystack, h_length, needle, n_length);
}


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

x86 assembly (clang, -O2):
<memstr>:
jmp    1030 <boyer_moore@plt>

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

LLVM IR (-O2):
define i8* @memstr(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i8* @boyer_moore(i8* %0, i32 %1, i8* %2, i32 %3)
ret i8* %5
}
/* Variables and functions */
int EXIT_FAILURE;
scalar_t__ EXIT_SUCCESS;
scalar_t__ ft_putchar(char);
int ft_putnbr_base(unsigned int, unsigned int, unsigned int);
int ft_putnbr_basel(unsigned int n, unsigned int base, unsigned int pad) {
  int ret;
  ret = ft_putnbr_base(n, base, pad);
  ret = ft_putchar('\n') == EXIT_SUCCESS ? ret : EXIT_FAILURE;
  return (ret);
}


x86 assembly (clang, -O0):
<ft_putnbr_basel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <ft_putnbr_base@plt>
mov    %eax,-0x10(%rbp)
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
mov    0x2e85(%rip),%rcx
cmp    (%rcx),%rax
jne    1167 <ft_putnbr_basel+0x47>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1173 <ft_putnbr_basel+0x53>
mov    0x2e72(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putnbr_basel>:
push   %rbx
call   1040 <ft_putnbr_base@plt>
mov    %eax,%ebx
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
mov    0x2e9f(%rip),%rcx
cmp    (%rcx),%rax
je     1147 <ft_putnbr_basel+0x27>
mov    0x2e9b(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i64 0
@EXIT_FAILURE = global i32 0
define i32 @ft_putnbr_basel(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @ft_putnbr_base(i32 %8, i32 %9, i32 %10)
store i32 %11, i32* %7
%12 = call i64 @ft_putchar(i8 signext 10)
%13 = load i64, i64* @EXIT_SUCCESS
%14 = icmp eq i64 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %3
%16 = load i32, i32* %7
br label %19
17: ; preds = %3
%18 = load i32, i32* @EXIT_FAILURE
br label %19
19: ; preds = %17, %15
%20 = phi i32 [ %16, %15 ], [ %18, %17 ]
store i32 %20, i32* %7
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i64 0
@EXIT_FAILURE = global i32 0
define i32 @ft_putnbr_basel(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @ft_putnbr_base(i32 %0, i32 %1, i32 %2)
%5 = tail call i64 @ft_putchar(i8 signext 10)
%6 = load i64, i64* @EXIT_SUCCESS
%7 = icmp eq i64 %5, %6
%8 = load i32, i32* @EXIT_FAILURE
%9 = select i1 %7, i32 %4, i32 %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Initialise(int, char **);
int /*<<< orphan*/ Tee();
int /*<<< orphan*/ Tidyup();
int main(int argc, char *argv[]) {
  Initialise(argc, argv);
  Tee();
  Tidyup();
  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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <Initialise@plt>
mov    $0x0,%al
call   1030 <Tee@plt>
mov    $0x0,%al
call   1050 <Tidyup@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <Initialise@plt>
xor    %eax,%eax
call   1030 <Tee@plt>
xor    %eax,%eax
call   1050 <Tidyup@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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @Initialise(i32 %6, i8** %7)
%9 = call i32 (...) @Tee()
%10 = call i32 (...) @Tidyup()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @Initialise(i32 %0, i8** %1)
%4 = tail call i32 (...) @Tee()
%5 = tail call i32 (...) @Tidyup()
ret i32 0
}
int p_alloc_size(void *p) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @p_alloc_size(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ attribute;

/* Variables and functions */
char *get_sysfs_str(char *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
char *get_sas_DiskRev(char *scsi) {
  char attribute[256];
  memset(attribute, 0, sizeof(attribute));
  snprintf(attribute, sizeof(attribute) - 1,
           "/sys/class/scsi_device/%s/device/rev", scsi);
  return (get_sysfs_str(attribute));
}


x86 assembly (clang, -O0):
<get_sas_DiskRev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x110(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1040 <memset@plt>
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0xff,%esi
lea    0xe97(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x110(%rbp),%rdi
call   1050 <get_sysfs_str@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_sas_DiskRev>:
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1040 <memset@plt>
lea    0xeaa(%rip),%rdx
mov    %r14,%rdi
mov    $0xff,%esi
mov    %rbx,%rcx
call   1030 <snprintf@plt>
mov    %r14,%rdi
call   1050 <get_sysfs_str@plt>
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [37 x i8] c"/sys/class/scsi_device/%s/device/rev\00"
define i8* @get_sas_DiskRev(i8* %0) {
%2 = alloca i8*
%3 = alloca [256 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = call i32 @memset(i8* %4, i32 0, i32 256)
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%7 = load i8*, i8** %2
%8 = call i32 @snprintf(i8* %6, i32 255, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%10 = call i8* @get_sysfs_str(i8* %9)
ret i8* %10
}

LLVM IR (-O2):
@.str = [37 x i8] c"/sys/class/scsi_device/%s/device/rev\00"
define i8* @get_sas_DiskRev(i8* %0) {
%2 = alloca [256 x i8]
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%4 = call i32 @memset(i8* %3, i32 0, i32 256)
%5 = call i32 @snprintf(i8* %3, i32 255, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %0)
%6 = call i8* @get_sysfs_str(i8* %3)
ret i8* %6
}
void uart0_putc(char c) {
  while (*(volatile unsigned long *)(0x16000000 + 0x00000018) & (1 << 5))
    ;
  *(volatile unsigned long *)0x16000000 = c;
}


x86 assembly (clang, -O0):
<uart0_putc>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x16000018,%eax
mov    (%rax),%rax
and    $0x20,%rax
cmp    $0x0,%rax
je     1125 <uart0_putc+0x25>
jmp    110a <uart0_putc+0xa>
movsbq -0x1(%rbp),%rcx
mov    $0x16000000,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart0_putc>:
testq  $0x20,0x16000018
jne    1100 <uart0_putc>
movsbq %dil,%rax
mov    %rax,0x16000000
16
ret

LLVM IR (-O0):
define void @uart0_putc(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %7, %1
%4 = load volatile i64, i64* inttoptr (i64 369098776 to i64*)
%5 = and i64 %4, 32
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
%9 = load i8, i8* %2
%10 = sext i8 %9 to i64
store volatile i64 %10, i64* inttoptr (i64 369098752 to i64*)
ret void
}

LLVM IR (-O2):
define void @uart0_putc(i8 signext %0) {
br label %2
2: ; preds = %2, %1
%3 = load volatile i64, i64* inttoptr (i64 369098776 to i64*)
%4 = and i64 %3, 32
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %2
6: ; preds = %2
%7 = sext i8 %0 to i64
store volatile i64 %7, i64* inttoptr (i64 369098752 to i64*)
ret void
}
void playlist_remove() {}


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

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

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

LLVM IR (-O2):
define void @playlist_remove() {
ret void
}
/* Variables and functions */
scalar_t__ bar();
scalar_t__ foo();
int main() {
  foo() + bar();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @foo()
%3 = call i64 (...) @bar()
%4 = add nsw i64 %2, %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @foo()
%2 = tail call i64 (...) @bar()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_BIT_STRING;

/* Variables and functions */
int /*<<< orphan*/ ASN1_BIT_STRING_it;
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
ASN1_BIT_STRING *ASN1_BIT_STRING_new(void) {
  return (ASN1_BIT_STRING *)ASN1_item_new(&ASN1_BIT_STRING_it);
}


x86 assembly (clang, -O0):
<ASN1_BIT_STRING_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASN1_BIT_STRING_new>:
mov    0x2ec9(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@ASN1_BIT_STRING_it = global i32 0
define i32* @ASN1_BIT_STRING_new() {
%1 = call i64 @ASN1_item_new(i32* @ASN1_BIT_STRING_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@ASN1_BIT_STRING_it = global i32 0
define i32* @ASN1_BIT_STRING_new() {
%1 = tail call i64 @ASN1_item_new(i32* @ASN1_BIT_STRING_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}