xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help() {
  printf(
      "\n Custom Command Utility \n\n Use: ccmd -option <operand> \n\n "
      "Options: -a(dd) -r(emove) -l(ist) -i(nstall) -h(elp) -L(icense)\n\n "
      "note: in case of -i(nstall), you need to use sudo [ sudo ccmd -i ]\n\n");
}


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

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

LLVM IR (-O0):
@.str = [194 x i8] c"\0A Custom Command Utility \0A\0A Use: ccmd -option <operand> \0A\0A Options: -a(dd) -r(emove) -l(ist) -i(nstall) -h(elp) -L(icense)\0A\0A note: in case of -i(nstall), you need to use sudo [ sudo ccmd -i ]\0A\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([194 x i8], [194 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [193 x i8] c"\0A Custom Command Utility \0A\0A Use: ccmd -option <operand> \0A\0A Options: -a(dd) -r(emove) -l(ist) -i(nstall) -h(elp) -L(icense)\0A\0A note: in case of -i(nstall), you need to use sudo [ sudo ccmd -i ]\0A\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([193 x i8], [193 x i8]* @str, i64 0, i64 0))
ret void
}
void gdev_vsched_null_replenish_memory(struct gdev_device *gdev) {}


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

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

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

LLVM IR (-O2):
%struct.gdev_device = type opaque
define void @gdev_vsched_null_replenish_memory(%struct.gdev_device* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ app_init(char *, int);
int dpdk_linux_tcpip_init(int, char **);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  int ret = dpdk_linux_tcpip_init(argc, argv);
  if (ret < 0) {
    printf("Invalid arguments\n");
    return 1;
  }
  app_init("192.168.150.63", 7777);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <dpdk_linux_tcpip_init@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1177 <main+0x47>
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    118f <main+0x5f>
lea    0xe95(%rip),%rdi
mov    $0x1e61,%esi
call   1030 <app_init@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1050 <dpdk_linux_tcpip_init@plt>
test   %eax,%eax
js     114f <main+0x1f>
lea    0xebf(%rip),%rdi
mov    $0x1e61,%esi
call   1030 <app_init@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeb9(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str.1 = [15 x i8] c"192.168.150.63\00"
@str = [18 x i8] c"Invalid arguments\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @dpdk_linux_tcpip_init(i32 %0, i8** %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
br label %9
7: ; preds = %2
%8 = tail call i32 @app_init(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 7777)
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ 1, %5 ], [ 0, %7 ]
ret i32 %10
}
/* Variables and functions */
bool nrf51_errata_68(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf51_errata_68() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, int /*<<< orphan*/ *);
void function_empty_notes() { write("csv-task.csv", ",", NULL); }


x86 assembly (clang, -O0):
<function_empty_notes>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeeb(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_empty_notes>:
lea    0xee9(%rip),%rdi
lea    0xeef(%rip),%rsi
xor    %edx,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [2 x i8] c",\00"
define void @function_empty_notes() {
%1 = call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [2 x i8] c",\00"
define void @function_empty_notes() {
%1 = tail call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nmea_unload_parsers();
void nmea_cleanup() { nmea_unload_parsers(); }


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

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

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

LLVM IR (-O2):
define void @nmea_cleanup() {
%1 = tail call i32 (...) @nmea_unload_parsers()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SI446X_CHANGE_STATE(int);
int /*<<< orphan*/ SI446X_CONFIG_INIT();
int SI446X_GET_DEVICE_STATE();
int /*<<< orphan*/ SI446X_RESET();
int /*<<< orphan*/ SI446X_START_RX(int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/, int);
void SI446X_RXCONFIG(void) {
  SI446X_RESET();
  SI446X_CONFIG_INIT();
  SI446X_CHANGE_STATE(6);
  while (SI446X_GET_DEVICE_STATE() != 6)
    ;
  SI446X_START_RX(0, 0, 0, 0, 0, 3);
}


x86 assembly (clang, -O0):
<SI446X_RXCONFIG>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <SI446X_RESET@plt>
mov    $0x0,%al
call   1070 <SI446X_CONFIG_INIT@plt>
mov    $0x6,%edi
call   1040 <SI446X_CHANGE_STATE@plt>
mov    $0x0,%al
call   1030 <SI446X_GET_DEVICE_STATE@plt>
cmp    $0x6,%eax
je     1181 <SI446X_RXCONFIG+0x31>
jmp    116c <SI446X_RXCONFIG+0x1c>
xor    %r8d,%r8d
mov    $0x3,%r9d
mov    %r8d,%edi
mov    %r8d,%esi
mov    %r8d,%edx
mov    %r8d,%ecx
call   1060 <SI446X_START_RX@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SI446X_RXCONFIG>:
push   %rax
xor    %eax,%eax
call   1050 <SI446X_RESET@plt>
xor    %eax,%eax
call   1070 <SI446X_CONFIG_INIT@plt>
mov    $0x6,%edi
call   1040 <SI446X_CHANGE_STATE@plt>
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <SI446X_GET_DEVICE_STATE@plt>
cmp    $0x6,%eax
jne    1170 <SI446X_RXCONFIG+0x20>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    $0x3,%r9d
pop    %rax
jmp    1060 <SI446X_START_RX@plt>

LLVM IR (-O0):
define void @SI446X_RXCONFIG() {
%1 = call i32 (...) @SI446X_RESET()
%2 = call i32 (...) @SI446X_CONFIG_INIT()
%3 = call i32 @SI446X_CHANGE_STATE(i32 6)
br label %4
4: ; preds = %7, %0
%5 = call i32 (...) @SI446X_GET_DEVICE_STATE()
%6 = icmp ne i32 %5, 6
br i1 %6, label %7, label %8
7: ; preds = %4
br label %4
8: ; preds = %4
%9 = call i32 @SI446X_START_RX(i32 0, i32 0, i32 0, i32 0, i32 0, i32 3)
ret void
}

LLVM IR (-O2):
define void @SI446X_RXCONFIG() {
%1 = tail call i32 (...) @SI446X_RESET()
%2 = tail call i32 (...) @SI446X_CONFIG_INIT()
%3 = tail call i32 @SI446X_CHANGE_STATE(i32 6)
br label %4
4: ; preds = %4, %0
%5 = tail call i32 (...) @SI446X_GET_DEVICE_STATE()
%6 = icmp eq i32 %5, 6
br i1 %6, label %7, label %4
7: ; preds = %4
%8 = tail call i32 @SI446X_START_RX(i32 0, i32 0, i32 0, i32 0, i32 0, i32 3)
ret void
}
int test_imm_CDuint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0xCD << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_CDuint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 205
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ htonl(int);
int get_physical_medium(void *data) {
  uint32_t *pm = (uint32_t *)data;
  *pm = htonl(6);
  return 1;
}


x86 assembly (clang, -O0):
<get_physical_medium>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x6,%edi
call   1030 <htonl@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_physical_medium>:
push   %rbx
mov    %rdi,%rbx
mov    $0x6,%edi
call   1030 <htonl@plt>
mov    %eax,(%rbx)
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @get_physical_medium(i8* nocapture writeonly %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @htonl(i32 6)
store i32 %3, i32* %2
ret i32 1
}
int __attribute__((target("sse4.2"))) foo(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @foo() {
ret i32 0
}
int _npy_signbit_d(double x) {
  union {
    double d;
    short s[4];
    int i[2];
  } u;
  u.d = x;
  return u.s[3] < 0;
}


x86 assembly (clang, -O0):
<_npy_signbit_d>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movswl -0xa(%rbp),%eax
cmp    $0x0,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_npy_signbit_d>:
movmskpd %xmm0,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
%union.anon = type { double }
define i32 @_npy_signbit_d(double %0) {
%2 = alloca double
%3 = alloca %union.anon
store double %0, double* %2
%4 = load double, double* %2
%5 = bitcast %union.anon* %3 to double*
store double %4, double* %5
%6 = bitcast %union.anon* %3 to [4 x i16]*
%7 = getelementptr inbounds [4 x i16], [4 x i16]* %6, i64 0, i64 3
%8 = load i16, i16* %7
%9 = sext i16 %8 to i32
%10 = icmp slt i32 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @_npy_signbit_d(double %0) {
%2 = bitcast double %0 to i64
%3 = lshr i64 %2, 63
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ notify_pvcall(char *);
int pvFreeFrameBuffer(char byBoardNum) {
  notify_pvcall("f");
  return (0);
}


x86 assembly (clang, -O0):
<pvFreeFrameBuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xedb(%rip),%rdi
call   1030 <notify_pvcall@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pvFreeFrameBuffer>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <notify_pvcall@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"f\00"
define i32 @pvFreeFrameBuffer(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @notify_pvcall(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"f\00"
define i32 @pvFreeFrameBuffer(i8 signext %0) {
%2 = tail call i32 @notify_pvcall(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int dd_is_positive(const double *a) { return (a[0] > 0.0) ? 1 : 0; }


x86 assembly (clang, -O0):
<dd_is_positive>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
xor    %eax,%eax
mov    $0x1,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @dd_is_positive(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = fcmp ogt double %5, 0.000000e+00
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 1, i32 0
ret i32 %8
}

LLVM IR (-O2):
define i32 @dd_is_positive(double* nocapture %0) {
%2 = load double, double* %0
%3 = fcmp ogt double %2, 0.000000e+00
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct sched_entity {
  int dummy;
};
struct cfs_rq {
  int dummy;
};

/* Variables and functions */
struct sched_entity *__pick_next_entity(struct cfs_rq *);
struct sched_entity *pick_next_entity_hw(struct cfs_rq *cfs_rq) {
  struct sched_entity *se = __pick_next_entity(cfs_rq);
  return se;
}


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

x86 assembly (clang, -O2):
<pick_next_entity_hw>:
jmp    1030 <__pick_next_entity@plt>

LLVM IR (-O0):
%struct.sched_entity = type { i32 }
%struct.cfs_rq = type { i32 }
define %struct.sched_entity* @pick_next_entity_hw(%struct.cfs_rq* %0) {
%2 = alloca %struct.cfs_rq*
%3 = alloca %struct.sched_entity*
store %struct.cfs_rq* %0, %struct.cfs_rq** %2
%4 = load %struct.cfs_rq*, %struct.cfs_rq** %2
%5 = call %struct.sched_entity* @__pick_next_entity(%struct.cfs_rq* %4)
store %struct.sched_entity* %5, %struct.sched_entity** %3
%6 = load %struct.sched_entity*, %struct.sched_entity** %3
ret %struct.sched_entity* %6
}

LLVM IR (-O2):
%struct.sched_entity = type { i32 }
%struct.cfs_rq = type { i32 }
define %struct.sched_entity* @pick_next_entity_hw(%struct.cfs_rq* %0) {
%2 = tail call %struct.sched_entity* @__pick_next_entity(%struct.cfs_rq* %0)
ret %struct.sched_entity* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fgetc(int /*<<< orphan*/ *);
int read_single(FILE *f, char buf[4]) {
  int c = fgetc(f);
  if (c == EOF)
    return -1;
  buf[0] = (char)c;
  return 1;
}


x86 assembly (clang, -O0):
<read_single>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    0x2eb2(%rip),%rcx
cmp    (%rcx),%eax
jne    114a <read_single+0x3a>
movl   $0xffffffff,-0x4(%rbp)
jmp    115c <read_single+0x4c>
mov    -0x1c(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_single>:
push   %rbx
mov    %rsi,%rbx
call   1030 <fgetc@plt>
mov    0x2ec8(%rip),%rdx
mov    $0xffffffff,%ecx
cmp    (%rdx),%eax
je     1130 <read_single+0x20>
mov    %al,(%rbx)
mov    $0x1,%ecx
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @read_single(i32* nocapture %0, i8* nocapture writeonly %1) {
%3 = tail call i32 @fgetc(i32* %0)
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = trunc i32 %3 to i8
store i8 %7, i8* %1
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ 1, %6 ], [ -1, %2 ]
ret i32 %9
}
void pci_save_ptm_state(struct pci_dev *dev) {}


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
define void @pci_save_ptm_state(%struct.pci_dev* nocapture %0) {
ret void
}
/* Variables and functions */
char *getcwd(int /*<<< orphan*/ *, int /*<<< orphan*/);
char *file_getcwd(void) { return getcwd(NULL, 0); }


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

x86 assembly (clang, -O2):
<file_getcwd>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <getcwd@plt>

LLVM IR (-O0):
define i8* @file_getcwd() {
%1 = call i8* @getcwd(i32* null, i32 0)
ret i8* %1
}

LLVM IR (-O2):
define i8* @file_getcwd() {
%1 = tail call i8* @getcwd(i32* null, i32 0)
ret i8* %1
}
extern int _close(int file) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @_close(i32 %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ all_tests(int, int);
void testTortureExecute(void) {
  all_tests(0, 0);
  all_tests(1, 2);
  all_tests(4, 3);
  return;
}


x86 assembly (clang, -O0):
<testTortureExecute>:
push   %rbp
mov    %rsp,%rbp
xor    %esi,%esi
mov    %esi,%edi
call   1030 <all_tests@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <all_tests@plt>
mov    $0x4,%edi
mov    $0x3,%esi
call   1030 <all_tests@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testTortureExecute>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1030 <all_tests@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <all_tests@plt>
mov    $0x4,%edi
mov    $0x3,%esi
pop    %rax
jmp    1030 <all_tests@plt>

LLVM IR (-O0):
define void @testTortureExecute() {
%1 = call i32 @all_tests(i32 0, i32 0)
%2 = call i32 @all_tests(i32 1, i32 2)
%3 = call i32 @all_tests(i32 4, i32 3)
ret void
}

LLVM IR (-O2):
define void @testTortureExecute() {
%1 = tail call i32 @all_tests(i32 0, i32 0)
%2 = tail call i32 @all_tests(i32 1, i32 2)
%3 = tail call i32 @all_tests(i32 4, i32 3)
ret void
}
/* Type definitions */
typedef int uint;

/* Variables and functions */
uint clog_2(uint a) {
  uint log = 0;
  for (; a; log++) {
    a >>= 1;
  }
  return log;
}


x86 assembly (clang, -O0):
<clog_2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112f <clog_2+0x2f>
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <clog_2+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clog_2>:
xor    %eax,%eax
test   %edi,%edi
je     111c <clog_2+0x1c>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
sar    %ecx
add    $0x1,%eax
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <clog_2+0x10>
ret

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

LLVM IR (-O2):
define i32 @clog_2(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = ashr i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i32 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ init_idt();
int /*<<< orphan*/ init_keyboard();
int /*<<< orphan*/ init_timer(int /*<<< orphan*/);
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ run();
void main() {
  init_idt();
  init_timer(0);
  init_keyboard();
  char *message = "Witamy! - RowanBerryOS Team ;D\n";
  print(message);
  run();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <init_idt@plt>
xor    %edi,%edi
call   1070 <init_timer@plt>
mov    $0x0,%al
call   1050 <init_keyboard@plt>
lea    0xe8c(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <print@plt>
mov    $0x0,%al
call   1030 <run@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <init_idt@plt>
xor    %edi,%edi
call   1070 <init_timer@plt>
xor    %eax,%eax
call   1050 <init_keyboard@plt>
lea    0xe93(%rip),%rdi
call   1040 <print@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <run@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Witamy! - RowanBerryOS Team ;D\0A\00"
define void @main() {
%1 = alloca i8*
%2 = call i32 (...) @init_idt()
%3 = call i32 @init_timer(i32 0)
%4 = call i32 (...) @init_keyboard()
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8** %1
%5 = load i8*, i8** %1
%6 = call i32 @print(i8* %5)
%7 = call i32 (...) @run()
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"Witamy! - RowanBerryOS Team ;D\0A\00"
define void @main() {
%1 = tail call i32 (...) @init_idt()
%2 = tail call i32 @init_timer(i32 0)
%3 = tail call i32 (...) @init_keyboard()
%4 = tail call i32 @print(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (...) @run()
ret void
}
double pa_to_psi(double p) { return p / 6894.75729; }


x86 assembly (clang, -O0):
<pa_to_psi>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pa_to_psi>:
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @pa_to_psi(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 0x40BAEEC1DDC1E796
ret double %4
}

LLVM IR (-O2):
define double @pa_to_psi(double %0) {
%2 = fdiv double %0, 0x40BAEEC1DDC1E796
ret double %2
}
unsigned int f51(unsigned int x, int y __attribute__((unused))) {
  return (x << (8 * 4 - 1)) ^ (x >> 1);
}


x86 assembly (clang, -O0):
<f51>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1f,%eax
mov    -0x4(%rbp),%ecx
shr    $0x1,%ecx
xor    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f51(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 = shl i32 %5, 31
%7 = load i32, i32* %3
%8 = lshr i32 %7, 1
%9 = xor i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @f51(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %0, i32 31)
ret i32 %3
}
/* Type definitions */
typedef scalar_t__ clock_t;

/* Variables and functions */
double CLOCKS_PER_SEC;
scalar_t__ clock();
int /*<<< orphan*/ printf(char *, int, double);
int solve();
int main() {
  clock_t begin = clock();
  int result = solve();
  clock_t end = clock();
  double time = (double)(end - begin) / CLOCKS_PER_SEC;
  printf("%d [in %f seconds]", result, time);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1040 <clock@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <solve@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <clock@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
sub    -0x8(%rbp),%rax
cvtsi2sd %rax,%xmm0
mov    0x2e7c(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0xc(%rbp),%esi
movsd  -0x20(%rbp),%xmm0
lea    0xe7c(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <clock@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <solve@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <clock@plt>
sub    %rbx,%rax
cvtsi2sd %rax,%xmm0
mov    0x2e8c(%rip),%rax
divsd  (%rax),%xmm0
lea    0xe99(%rip),%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global double 0.000000e+00
@.str = [19 x i8] c"%d [in %f seconds]\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i32
%3 = alloca i64
%4 = alloca double
%5 = call i64 (...) @clock()
store i64 %5, i64* %1
%6 = call i32 (...) @solve()
store i32 %6, i32* %2
%7 = call i64 (...) @clock()
store i64 %7, i64* %3
%8 = load i64, i64* %3
%9 = load i64, i64* %1
%10 = sub nsw i64 %8, %9
%11 = sitofp i64 %10 to double
%12 = load double, double* @CLOCKS_PER_SEC
%13 = fdiv double %11, %12
store double %13, double* %4
%14 = load i32, i32* %2
%15 = load double, double* %4
%16 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %14, double %15)
ret i32 0
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global double 0.000000e+00
@.str = [19 x i8] c"%d [in %f seconds]\00"
define i32 @main() {
%1 = tail call i64 (...) @clock()
%2 = tail call i32 (...) @solve()
%3 = tail call i64 (...) @clock()
%4 = sub nsw i64 %3, %1
%5 = sitofp i64 %4 to double
%6 = load double, double* @CLOCKS_PER_SEC
%7 = fdiv double %5, %6
%8 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %2, double %7)
ret i32 0
}
__typeof__(mempcpy(1, 1, 1)) test_mempcpy_120(void) { return mempcpy(1, 1, 1); }


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

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

LLVM IR (-O0):
define i8* @test_mempcpy_120() {
ret i8* getelementptr inbounds (i8, i8* inttoptr (i64 1 to i8*), i64 1)
}

LLVM IR (-O2):
define i8* @test_mempcpy_120() {
ret i8* inttoptr (i64 2 to i8*)
}
char *langRomTypeMegaRam128() { return "128kB MegaRAM"; }


x86 assembly (clang, -O0):
<langRomTypeMegaRam128>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<langRomTypeMegaRam128>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [14 x i8] c"128kB MegaRAM\00"
define i8* @langRomTypeMegaRam128() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [14 x i8] c"128kB MegaRAM\00"
define i8* @langRomTypeMegaRam128() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
unsigned short int f85(unsigned short int x, unsigned int y) {
  return (x << ((-y) & (8 * 2 - 1))) + (x >> y);
}


x86 assembly (clang, -O0):
<f85>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
movzwl -0x2(%rbp),%eax
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
and    $0xf,%ecx
shl    %cl,%eax
movzwl -0x2(%rbp),%edx
mov    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f85>:
mov    %esi,%ecx
neg    %cl
and    $0xf,%cl
mov    %edi,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f85(i16 zeroext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i32
store i16 %0, i16* %3
store i32 %1, i32* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i32, i32* %4
%8 = sub i32 0, %7
%9 = and i32 %8, 15
%10 = shl i32 %6, %9
%11 = load i16, i16* %3
%12 = zext i16 %11 to i32
%13 = load i32, i32* %4
%14 = ashr i32 %12, %13
%15 = add nsw i32 %10, %14
%16 = trunc i32 %15 to i16
ret i16 %16
}

LLVM IR (-O2):
define zeroext i16 @f85(i16 zeroext %0, i32 %1) {
%3 = zext i16 %0 to i32
%4 = sub i32 0, %1
%5 = and i32 %4, 15
%6 = shl nuw nsw i32 %3, %5
%7 = lshr i32 %3, %1
%8 = add nuw nsw i32 %6, %7
%9 = trunc i32 %8 to i16
ret i16 %9
}
/* Type definitions */
struct timeval {
  int tv_usec;
  scalar_t__ tv_sec;
};
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int64_t gettime(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
}


x86 assembly (clang, -O0):
<gettime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0x8(%rbp),%rax
imul   $0xf4240,%eax,%eax
add    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x10(%rsp),%eax
add    0x8(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i32 @gettime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = trunc i64 %4 to i32
%6 = mul nsw i32 %5, 1000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%8 = load i32, i32* %7
%9 = add nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i32 @gettime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = mul nsw i32 %6, 1000000
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%9 = load i32, i32* %8
%10 = add nsw i32 %7, %9
ret i32 %10
}
char __ocl_min_char_char(char src1, char src2) {
  return (src1 < src2) ? src1 : src2;
}


x86 assembly (clang, -O0):
<__ocl_min_char_char>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
cmp    %ecx,%eax
jge    112c <__ocl_min_char_char+0x2c>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <__ocl_min_char_char+0x33>
movsbl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @__ocl_min_char_char(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = icmp slt i32 %6, %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i8, i8* %3
%12 = sext i8 %11 to i32
br label %16
13: ; preds = %2
%14 = load i8, i8* %4
%15 = sext i8 %14 to i32
br label %16
16: ; preds = %13, %10
%17 = phi i32 [ %12, %10 ], [ %15, %13 ]
%18 = trunc i32 %17 to i8
ret i8 %18
}

LLVM IR (-O2):
define signext i8 @__ocl_min_char_char(i8 signext %0, i8 signext %1) {
%3 = icmp slt i8 %0, %1
%4 = select i1 %3, i8 %0, i8 %1
ret i8 %4
}
void I422ToI420() {}


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

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

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

LLVM IR (-O2):
define void @I422ToI420() {
ret void
}
double ldexp(double x, int exp) { return x * (1 << exp); }


x86 assembly (clang, -O0):
<ldexp>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldexp>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @ldexp(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%5 = load double, double* %3
%6 = load i32, i32* %4
%7 = shl i32 1, %6
%8 = sitofp i32 %7 to double
%9 = fmul double %5, %8
ret double %9
}

LLVM IR (-O2):
define double @ldexp(double %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = sitofp i32 %3 to double
%5 = fmul double %4, %0
ret double %5
}
void X509_verify(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_verify() {
ret void
}
/* Variables and functions */
int hgd_user_del_db(char *);
int hgd_user_del(char *uname) { return (hgd_user_del_db(uname)); }


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

x86 assembly (clang, -O2):
<hgd_user_del>:
jmp    1030 <hgd_user_del_db@plt>

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

LLVM IR (-O2):
define i32 @hgd_user_del(i8* %0) {
%2 = tail call i32 @hgd_user_del_db(i8* %0)
ret i32 %2
}
/* Variables and functions */
void _pico_unixify(char *path) {
  if (path == NULL)
    return;
  while (*path) {
    if (*path == '\\')
      *path = '/';
    path++;
  }
}


x86 assembly (clang, -O0):
<_pico_unixify>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1118 <_pico_unixify+0x18>
jmp    1152 <_pico_unixify+0x52>
jmp    111d <_pico_unixify+0x1d>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1152 <_pico_unixify+0x52>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
jne    1141 <_pico_unixify+0x41>
mov    -0x8(%rbp),%rax
movb   $0x2f,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111d <_pico_unixify+0x1d>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_pico_unixify>:
test   %rdi,%rdi
jne    1117 <_pico_unixify+0x17>
jmp    1122 <_pico_unixify+0x22>
nopw   0x0(%rax,%rax,1)
movb   $0x2f,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x5c,%al
je     1110 <_pico_unixify+0x10>
test   %al,%al
jne    1113 <_pico_unixify+0x13>
ret

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

LLVM IR (-O2):
define void @_pico_unixify(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1, %7
%4 = phi i8* [ %8, %7 ], [ %0, %1 ]
%5 = load i8, i8* %4
switch i8 %5, label %7 [
i8 0, label %9
i8 92, label %6
]
6: ; preds = %3
store i8 47, i8* %4
br label %7
7: ; preds = %3, %6
%8 = getelementptr inbounds i8, i8* %4, i64 1
br label %3
9: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t bswap64(uint64_t v) {
  v = (v & 0x00000000FFFFFFFFULL) << 32 | (v & 0xFFFFFFFF00000000ULL) >> 32;
  v = (v & 0x0000FFFF0000FFFFULL) << 16 | (v & 0xFFFF0000FFFF0000ULL) >> 16;
  v = (v & 0x00FF00FF00FF00FFULL) << 8 | (v & 0xFF00FF00FF00FF00ULL) >> 8;
  return v;
}


x86 assembly (clang, -O0):
<bswap64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movabs $0xffffffff,%rcx
and    %rcx,%rax
shl    $0x20,%rax
movslq -0x4(%rbp),%rcx
movabs $0xffffffff00000000,%rdx
ff ff ff
and    %rdx,%rcx
shr    $0x20,%rcx
or     %rcx,%rax
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movabs $0xffff0000ffff,%rcx
and    %rcx,%rax
shl    $0x10,%rax
movslq -0x4(%rbp),%rcx
movabs $0xffff0000ffff0000,%rdx
and    %rdx,%rcx
shr    $0x10,%rcx
or     %rcx,%rax
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movabs $0xff00ff00ff00ff,%rcx
and    %rcx,%rax
shl    $0x8,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff00ff00ff00ff00,%rdx
and    %rdx,%rcx
shr    $0x8,%rcx
or     %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bswap64>:
mov    %edi,%eax
sar    $0x1f,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @bswap64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = and i64 %4, 4294967295
%6 = shl i64 %5, 32
%7 = load i32, i32* %2
%8 = sext i32 %7 to i64
%9 = and i64 %8, -4294967296
%10 = lshr i64 %9, 32
%11 = or i64 %6, %10
%12 = trunc i64 %11 to i32
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = sext i32 %13 to i64
%15 = and i64 %14, 281470681808895
%16 = shl i64 %15, 16
%17 = load i32, i32* %2
%18 = sext i32 %17 to i64
%19 = and i64 %18, -281470681808896
%20 = lshr i64 %19, 16
%21 = or i64 %16, %20
%22 = trunc i64 %21 to i32
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = sext i32 %23 to i64
%25 = and i64 %24, 71777214294589695
%26 = shl i64 %25, 8
%27 = load i32, i32* %2
%28 = sext i32 %27 to i64
%29 = and i64 %28, -71777214294589696
%30 = lshr i64 %29, 8
%31 = or i64 %26, %30
%32 = trunc i64 %31 to i32
store i32 %32, i32* %2
%33 = load i32, i32* %2
ret i32 %33
}

LLVM IR (-O2):
define i32 @bswap64(i32 %0) {
%2 = ashr i32 %0, 31
%3 = tail call i32 @llvm.bswap.i32(i32 %2)
ret i32 %3
}
/* Variables and functions */
char *TableStrRegister2(char const *, int);
scalar_t__ strlen(char *);
char *TableStrRegister(const char *Str) {
  return TableStrRegister2(Str, (int)strlen((char *)Str));
}


x86 assembly (clang, -O0):
<TableStrRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <TableStrRegister2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TableStrRegister>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <TableStrRegister2@plt>

LLVM IR (-O0):
define i8* @TableStrRegister(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = trunc i64 %5 to i32
%7 = call i8* @TableStrRegister2(i8* %3, i32 %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @TableStrRegister(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = tail call i8* @TableStrRegister2(i8* %0, i32 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *name) {
  fprintf(stderr, "Usage: %s [options] n file\n", name);
  fprintf(stderr, "   or: %s [options] -1 file\n", name);
  fprintf(stderr, "For more information type: %s -h \n\n", name);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed7(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ec2(%rip),%r14
mov    (%r14),%edi
lea    0xed8(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xee2(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xeed(%rip),%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"Usage: %s [options] n file\0A\00"
@.str.1 = [29 x i8] c" or: %s [options] -1 file\0A\00"
@.str.2 = [36 x i8] c"For more information type: %s -h \0A\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %2
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %2
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i8* %10)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"Usage: %s [options] n file\0A\00"
@.str.1 = [29 x i8] c" or: %s [options] -1 file\0A\00"
@.str.2 = [36 x i8] c"For more information type: %s -h \0A\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i8* %0)
ret void
}
int PyMPELog_Stop(void) {
  int ierr = 0;
  return ierr;
}


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

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

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

LLVM IR (-O2):
define i32 @PyMPELog_Stop() {
ret i32 0
}
void enqueue(int item, int *items, int *_tail, int cap) {
  int tail = *_tail;
  items[tail] = item;
  *_tail = (tail + 1) % cap;
}


x86 assembly (clang, -O0):
<enqueue>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
cltd
idivl  -0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    %edx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<enqueue>:
mov    %rdx,%r8
movslq (%rdx),%rax
mov    %edi,(%rsi,%rax,4)
add    $0x1,%eax
cltd
idiv   %ecx
mov    %edx,(%r8)
ret

LLVM IR (-O0):
define void @enqueue(i32 %0, i32* %1, i32* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%10 = load i32*, i32** %7
%11 = load i32, i32* %10
store i32 %11, i32* %9
%12 = load i32, i32* %5
%13 = load i32*, i32** %6
%14 = load i32, i32* %9
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
store i32 %12, i32* %16
%17 = load i32, i32* %9
%18 = add nsw i32 %17, 1
%19 = load i32, i32* %8
%20 = srem i32 %18, %19
%21 = load i32*, i32** %7
store i32 %20, i32* %21
ret void
}

LLVM IR (-O2):
define void @enqueue(i32 %0, i32* nocapture writeonly %1, i32* nocapture %2, i32 %3) {
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %1, i64 %6
store i32 %0, i32* %7
%8 = add nsw i32 %5, 1
%9 = srem i32 %8, %3
store i32 %9, i32* %2
ret void
}
int do_886() { return 886; }


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

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

LLVM IR (-O0):
define i32 @do_886() {
ret i32 886
}

LLVM IR (-O2):
define i32 @do_886() {
ret i32 886
}
/* Variables and functions */
int /*<<< orphan*/ reader();
void *cons(void *data) {
  reader();
  return 0;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @cons(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @reader()
ret i8* null
}