xunge/DecIR huggingface dataset:
/* Variables and functions */
char *longestPalindrome(char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  printf("%s\n", longestPalindrome("a"));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [2 x i8] c"a\00"
define i32 @main() {
%1 = tail call i8* @longestPalindrome(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}
void var_disconnect(struct variable *v, struct variable *w) {}


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

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

LLVM IR (-O0):
%struct.variable = type opaque
define void @var_disconnect(%struct.variable* %0, %struct.variable* %1) {
%3 = alloca %struct.variable*
%4 = alloca %struct.variable*
store %struct.variable* %0, %struct.variable** %3
store %struct.variable* %1, %struct.variable** %4
ret void
}

LLVM IR (-O2):
%struct.variable = type opaque
define void @var_disconnect(%struct.variable* nocapture %0, %struct.variable* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mkconst(int /*<<< orphan*/);
int /*<<< orphan*/ read_varid();
void mkconst_handler(void) { mkconst(read_varid()); }


x86 assembly (clang, -O0):
<mkconst_handler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <read_varid@plt>
mov    %eax,%edi
call   1030 <mkconst@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkconst_handler>:
push   %rax
xor    %eax,%eax
call   1040 <read_varid@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <mkconst@plt>

LLVM IR (-O0):
define void @mkconst_handler() {
%1 = call i32 (...) @read_varid()
%2 = call i32 @mkconst(i32 %1)
ret void
}

LLVM IR (-O2):
define void @mkconst_handler() {
%1 = tail call i32 (...) @read_varid()
%2 = tail call i32 @mkconst(i32 %1)
ret void
}
/* Type definitions */
typedef int clock_t;

/* Variables and functions */
int _glidix_nanotime();
clock_t clock() { return _glidix_nanotime() / 1000; }


x86 assembly (clang, -O0):
<clock>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <_glidix_nanotime@plt>
mov    $0x3e8,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<clock>:
push   %rax
xor    %eax,%eax
call   1030 <_glidix_nanotime@plt>
cltq
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rax
add    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @clock() {
%1 = call i32 (...) @_glidix_nanotime()
%2 = sdiv i32 %1, 1000
ret i32 %2
}

LLVM IR (-O2):
define i32 @clock() {
%1 = tail call i32 (...) @_glidix_nanotime()
%2 = sdiv i32 %1, 1000
ret i32 %2
}
int min(int a, int b, int c) {
  return (a > b) ? (b > c ? c : b) : (a > c ? c : a);
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1141 <min+0x41>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1130 <min+0x30>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <min+0x36>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1164 <min+0x64>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1158 <min+0x58>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    115e <min+0x5e>
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @min(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 = icmp sgt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %3
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = icmp sgt i32 %11, %12
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = load i32, i32* %6
br label %18
16: ; preds = %10
%17 = load i32, i32* %5
br label %18
18: ; preds = %16, %14
%19 = phi i32 [ %15, %14 ], [ %17, %16 ]
br label %30
20: ; preds = %3
%21 = load i32, i32* %4
%22 = load i32, i32* %6
%23 = icmp sgt i32 %21, %22
br i1 %23, label %24, label %26
24: ; preds = %20
%25 = load i32, i32* %6
br label %28
26: ; preds = %20
%27 = load i32, i32* %4
br label %28
28: ; preds = %26, %24
%29 = phi i32 [ %25, %24 ], [ %27, %26 ]
br label %30
30: ; preds = %28, %18
%31 = phi i32 [ %19, %18 ], [ %29, %28 ]
ret i32 %31
}

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, %2
%5 = select i1 %4, i32 %2, i32 %1
%6 = icmp slt i32 %5, %0
%7 = select i1 %6, i32 %5, i32 %0
ret i32 %7
}
/* Variables and functions */
void *OP1_TYPECAST(void *);
void *OP2_TYPECAST(void *);
void *op_MINUS(void *inp1, void *inp2) {
  inp1 = OP1_TYPECAST(inp1);
  inp2 = OP2_TYPECAST(inp2);
  int first = (int)inp1;
  int second = (int)inp2;
  return (void *)(first - second);
}


x86 assembly (clang, -O0):
<op_MINUS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <OP1_TYPECAST@plt>
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <OP2_TYPECAST@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
sub    -0x18(%rbp),%eax
cltq
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_MINUS>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <OP1_TYPECAST@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <OP2_TYPECAST@plt>
sub    %eax,%ebx
movslq %ebx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @op_MINUS(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = call i8* @OP1_TYPECAST(i8* %7)
store i8* %8, i8** %3
%9 = load i8*, i8** %4
%10 = call i8* @OP2_TYPECAST(i8* %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %3
%12 = ptrtoint i8* %11 to i32
store i32 %12, i32* %5
%13 = load i8*, i8** %4
%14 = ptrtoint i8* %13 to i32
store i32 %14, i32* %6
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = sub nsw i32 %15, %16
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i8*
ret i8* %19
}

LLVM IR (-O2):
define i8* @op_MINUS(i8* %0, i8* %1) {
%3 = tail call i8* @OP1_TYPECAST(i8* %0)
%4 = tail call i8* @OP2_TYPECAST(i8* %1)
%5 = ptrtoint i8* %3 to i64
%6 = ptrtoint i8* %4 to i64
%7 = sub i64 %5, %6
%8 = shl i64 %7, 32
%9 = ashr exact i64 %8, 32
%10 = inttoptr i64 %9 to i8*
ret i8* %10
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(void *, int, int, int /*<<< orphan*/ *);
void DumpBlock(void *b, int size, FILE *D) { fwrite(b, size, 1, D); }


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

x86 assembly (clang, -O2):
<DumpBlock>:
mov    %rdx,%rcx
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
define void @DumpBlock(i8* nocapture %0, i32 %1, i32* nocapture %2) {
%4 = tail call i32 @fwrite(i8* %0, i32 %1, i32 1, i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ send_rebroadcast();
void nonrng_alarm_handler(int sig) { send_rebroadcast(); }


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

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

LLVM IR (-O0):
define void @nonrng_alarm_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @send_rebroadcast()
ret void
}

LLVM IR (-O2):
define void @nonrng_alarm_handler(i32 %0) {
%2 = tail call i32 (...) @send_rebroadcast()
ret void
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_seat_can_graphical(const char *seat) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_seat_can_graphical>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ecf(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_seat_can_graphical>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_seat_can_graphical(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_seat_can_graphical(i8* nocapture readnone %0) {
%2 = load i32, i32* @EINVAL
%3 = sub nsw i32 0, %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_unix_socket_remove_stale() {
  printf("NOT IMPLEMENTED:"
         "pa_unix_socket_remove_stale"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"NOT IMPLEMENTED:pa_unix_socket_remove_stale\0A\00"
define i32 @pa_unix_socket_remove_stale() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [44 x i8] c"NOT IMPLEMENTED:pa_unix_socket_remove_stale\00"
define i32 @pa_unix_socket_remove_stale() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Atm128AlarmC__0__Alarm__stop();
void TransformAlarmC__0__AlarmFrom__stop(void) {
  Atm128AlarmC__0__Alarm__stop();
}


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

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

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

LLVM IR (-O2):
define void @TransformAlarmC__0__AlarmFrom__stop() {
%1 = tail call i32 (...) @Atm128AlarmC__0__Alarm__stop()
ret void
}
/* Variables and functions */
unsigned int irq_disable();
int /*<<< orphan*/ irq_restore(unsigned int);
int /*<<< orphan*/ memcpy(void *, void *, size_t);
void __atomic_exchange_c(size_t size, void *ptr, void *val, void *ret,
                         int memorder) {
  (void)memorder;
  unsigned int mask = irq_disable();
  memcpy(ret, ptr, size);
  memcpy(ptr, val, size);
  irq_restore(mask);
}


x86 assembly (clang, -O0):
<__atomic_exchange_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    $0x0,%al
call   1030 <irq_disable@plt>
mov    %eax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x28(%rbp),%edi
call   1050 <irq_restore@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__atomic_exchange_c>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rcx,%r15
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r12
xor    %eax,%eax
call   1030 <irq_disable@plt>
mov    %eax,%ebp
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
call   1040 <memcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r12,%rdx
call   1040 <memcpy@plt>
mov    %ebp,%edi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <irq_restore@plt>

LLVM IR (-O0):
define void @__atomic_exchange_c(i64 %0, i8* %1, i8* %2, i8* %3, i32 %4) {
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
store i64 %0, i64* %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%12 = load i32, i32* %10
%13 = call i32 (...) @irq_disable()
store i32 %13, i32* %11
%14 = load i8*, i8** %9
%15 = load i8*, i8** %7
%16 = load i64, i64* %6
%17 = call i32 @memcpy(i8* %14, i8* %15, i64 %16)
%18 = load i8*, i8** %7
%19 = load i8*, i8** %8
%20 = load i64, i64* %6
%21 = call i32 @memcpy(i8* %18, i8* %19, i64 %20)
%22 = load i32, i32* %11
%23 = call i32 @irq_restore(i32 %22)
ret void
}

LLVM IR (-O2):
define void @__atomic_exchange_c(i64 %0, i8* %1, i8* %2, i8* %3, i32 %4) {
%6 = tail call i32 (...) @irq_disable()
%7 = tail call i32 @memcpy(i8* %3, i8* %1, i64 %0)
%8 = tail call i32 @memcpy(i8* %1, i8* %2, i64 %0)
%9 = tail call i32 @irq_restore(i32 %6)
ret void
}
void consumer(struct C *c) {}


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

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

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

LLVM IR (-O2):
%struct.C = type opaque
define void @consumer(%struct.C* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MoveMouseAbs250(long, long);
void movemouseabs(long x, long y) { MoveMouseAbs250(x, y); }


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

x86 assembly (clang, -O2):
<movemouseabs>:
jmp    1030 <MoveMouseAbs250@plt>

LLVM IR (-O0):
define void @movemouseabs(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 = load i64, i64* %4
%7 = call i32 @MoveMouseAbs250(i64 %5, i64 %6)
ret void
}

LLVM IR (-O2):
define void @movemouseabs(i64 %0, i64 %1) {
%3 = tail call i32 @MoveMouseAbs250(i64 %0, i64 %1)
ret void
}
void foo621() {}


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

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

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

LLVM IR (-O2):
define void @foo621() {
ret void
}
/* Variables and functions */
double cos(double);
double sin(double);
double tan(double n) { return sin(n) / cos(n); }


x86 assembly (clang, -O0):
<tan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tan>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
call   1030 <sin@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <cos@plt>
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @tan(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @sin(double %3)
%5 = load double, double* %2
%6 = call double @cos(double %5)
%7 = fdiv double %4, %6
ret double %7
}

LLVM IR (-O2):
define double @tan(double %0) {
%2 = tail call double @sin(double %0)
%3 = tail call double @cos(double %0)
%4 = fdiv double %2, %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int);
int main() {
  abort();
  exit(1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int shim_enosys(int /*<<< orphan*/, unsigned int, unsigned int, void *);
int shim_seccomp(unsigned int operation, unsigned int flags, void *args) {
  return shim_enosys(0, operation, flags, args);
}


x86 assembly (clang, -O0):
<shim_seccomp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
xor    %edi,%edi
call   1030 <shim_enosys@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shim_seccomp>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <shim_enosys@plt>

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

LLVM IR (-O2):
define i32 @shim_seccomp(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @shim_enosys(i32 0, i32 %0, i32 %1, i8* %2)
ret i32 %4
}
void sigusr1(int val) { return; }


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

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

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

LLVM IR (-O2):
define void @sigusr1(i32 %0) {
ret void
}
char *fu_basename(name)
char *name;
{
  char *base;
  base = rindex(name, '/');
  return base ? base + 1 : name;
}


x86 assembly (clang, -O0):
<fu_basename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <rindex@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114a <fu_basename+0x3a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1152 <fu_basename+0x42>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fu_basename>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <rindex@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @fu_basename(i8* %0) {
%2 = tail call i8* @rindex(i8* %0, i32 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
void SDCard_RX_ISR(void) {}


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

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

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

LLVM IR (-O2):
define void @SDCard_RX_ISR() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fd_w25q16dw_enable_write();
void fd_hal_external_flash_enable_write(void) { fd_w25q16dw_enable_write(); }


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

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

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

LLVM IR (-O2):
define void @fd_hal_external_flash_enable_write() {
%1 = tail call i32 (...) @fd_w25q16dw_enable_write()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
double log1(int);
int /*<<< orphan*/ printf(char *, double);
int main() {
  printf("%.16f \n", log1(200123));
  double l = log1(200123);
  assert(l == 12.2066874564951746);
  assert(l == 12);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x30dbb,%edi
call   1050 <log1@plt>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x30dbb,%edi
call   1050 <log1@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe97(%rip),%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movsd  -0x10(%rbp),%xmm0
movsd  0xe6c(%rip),%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x30dbb,%edi
call   1050 <log1@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    $0x30dbb,%edi
call   1050 <log1@plt>
movsd  %xmm0,(%rsp)
movsd  0xea2(%rip),%xmm1
cmpeqsd %xmm0,%xmm1
movq   %xmm1,%rdi
and    $0x1,%edi
call   1040 <assert@plt>
movsd  (%rsp),%xmm0
cmpeqsd 0xe8a(%rip),%xmm0
movq   %xmm0,%rdi
and    $0x1,%edi
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%.16f \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = call double @log1(i32 200123)
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %3)
%5 = call double @log1(i32 200123)
store double %5, double* %2
%6 = load double, double* %2
%7 = fcmp oeq double %6, 0x402869D2F03447C8
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load double, double* %2
%11 = fcmp oeq double %10, 1.200000e+01
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%.16f \0A\00"
define i32 @main() {
%1 = tail call double @log1(i32 200123)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %1)
%3 = tail call double @log1(i32 200123)
%4 = fcmp oeq double %3, 0x402869D2F03447C8
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = fcmp oeq double %3, 1.200000e+01
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bar(int, int);
__attribute__((no, noclone)) void f4(int x) {
  if (x == 43 || x == 76 || x == 44 || x == 78 || x == 49 || x == 77 ||
      x == 46 || x == 75 || x == 45 || x == 82)
    bar(x, 4);
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x2b,-0x4(%rbp)
je     117f <f4+0x6f>
cmpl   $0x4c,-0x4(%rbp)
je     117f <f4+0x6f>
cmpl   $0x2c,-0x4(%rbp)
je     117f <f4+0x6f>
cmpl   $0x4e,-0x4(%rbp)
je     117f <f4+0x6f>
cmpl   $0x31,-0x4(%rbp)
je     117f <f4+0x6f>
cmpl   $0x4d,-0x4(%rbp)
je     117f <f4+0x6f>
cmpl   $0x2e,-0x4(%rbp)
je     117f <f4+0x6f>
cmpl   $0x4b,-0x4(%rbp)
je     117f <f4+0x6f>
cmpl   $0x2d,-0x4(%rbp)
je     117f <f4+0x6f>
cmpl   $0x52,-0x4(%rbp)
jne    118c <f4+0x7c>
mov    -0x4(%rbp),%edi
mov    $0x4,%esi
call   1030 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
lea    -0x2b(%rdi),%eax
cmp    $0x27,%eax
ja     1132 <f4+0x22>
movabs $0x8f0000004f,%rcx
bt     %rax,%rcx
jae    1132 <f4+0x22>
mov    $0x4,%esi
jmp    1030 <bar@plt>
ret

LLVM IR (-O0):
define void @f4(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 43
br i1 %4, label %32, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 76
br i1 %7, label %32, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 44
br i1 %10, label %32, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 78
br i1 %13, label %32, label %14
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 49
br i1 %16, label %32, label %17
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 77
br i1 %19, label %32, label %20
20: ; preds = %17
%21 = load i32, i32* %2
%22 = icmp eq i32 %21, 46
br i1 %22, label %32, label %23
23: ; preds = %20
%24 = load i32, i32* %2
%25 = icmp eq i32 %24, 75
br i1 %25, label %32, label %26
26: ; preds = %23
%27 = load i32, i32* %2
%28 = icmp eq i32 %27, 45
br i1 %28, label %32, label %29
29: ; preds = %26
%30 = load i32, i32* %2
%31 = icmp eq i32 %30, 82
br i1 %31, label %32, label %35
32: ; preds = %29, %26, %23, %20, %17, %14, %11, %8, %5, %1
%33 = load i32, i32* %2
%34 = call i32 @bar(i32 %33, i32 4)
br label %35
35: ; preds = %32, %29
ret void
}

LLVM IR (-O2):
define void @f4(i32 %0) {
switch i32 %0, label %4 [
i32 82, label %2
i32 78, label %2
i32 77, label %2
i32 76, label %2
i32 75, label %2
i32 49, label %2
i32 46, label %2
i32 45, label %2
i32 44, label %2
i32 43, label %2
]
2: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
%3 = tail call i32 @bar(i32 %0, i32 4)
br label %4
4: ; preds = %1, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
scalar_t__ strncmp(char const *, char const *, int /*<<< orphan*/);
bool match(const char *topic, const char *key) {
  return 0 == strncmp(topic, key, strlen(key));
}


x86 assembly (clang, -O0):
<match>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<match>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @match(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i64 @strncmp(i8* %5, i8* %6, i32 %8)
%10 = icmp eq i64 0, %9
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @match(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
int is_power_of_two(unsigned int x) { return (x != 0) && !(x & (x - 1)); }


x86 assembly (clang, -O0):
<is_power_of_two>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     112c <is_power_of_two+0x2c>
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_power_of_two>:
test   %edi,%edi
je     110f <is_power_of_two+0xf>
lea    -0x1(%rdi),%ecx
xor    %eax,%eax
test   %ecx,%edi
sete   %al
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @is_power_of_two(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @llvm.ctpop.i32(i32 %0)
%5 = icmp ult i32 %4, 2
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ checkizero(long);
long remain(long num, long den) {
  long result;
  checkizero(den);
  result = num % den;
  return result;
}


x86 assembly (clang, -O0):
<remain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <checkizero@plt>
mov    -0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remain>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <checkizero@plt>
mov    %r14,%rax
or     %rbx,%rax
shr    $0x20,%rax
je     113b <remain+0x2b>
mov    %r14,%rax
cqto
idiv   %rbx
mov    %rdx,%rax
jmp    1144 <remain+0x34>
mov    %r14d,%eax
xor    %edx,%edx
div    %ebx
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @remain(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = call i32 @checkizero(i64 %6)
%8 = load i64, i64* %3
%9 = load i64, i64* %4
%10 = srem i64 %8, %9
store i64 %10, i64* %5
%11 = load i64, i64* %5
ret i64 %11
}

LLVM IR (-O2):
define i64 @remain(i64 %0, i64 %1) {
%3 = tail call i32 @checkizero(i64 %1)
%4 = srem i64 %0, %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ chaz_OS_remove_exe(char *);
void chaz_OS_clean_up(void) { chaz_OS_remove_exe("_charm_run"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"_charm_run\00"
define void @chaz_OS_clean_up() {
%1 = call i32 @chaz_OS_remove_exe(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"_charm_run\00"
define void @chaz_OS_clean_up() {
%1 = tail call i32 @chaz_OS_remove_exe(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct tpg_data {
  int dummy;
};

/* Variables and functions */
int tpg_hdiv(struct tpg_data const *, unsigned int, int /*<<< orphan*/);
int /*<<< orphan*/ tpg_hscale(struct tpg_data const *, unsigned int);
unsigned tpg_hscale_div(const struct tpg_data *tpg, unsigned plane,
                        unsigned x) {
  return tpg_hdiv(tpg, plane, tpg_hscale(tpg, x));
}


x86 assembly (clang, -O0):
<tpg_hscale_div>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1030 <tpg_hscale@plt>
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    %eax,%edx
call   1040 <tpg_hdiv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tpg_hscale_div>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %edx,%esi
call   1030 <tpg_hscale@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <tpg_hdiv@plt>

LLVM IR (-O0):
%struct.tpg_data = type { i32 }
define i32 @tpg_hscale_div(%struct.tpg_data* %0, i32 %1, i32 %2) {
%4 = alloca %struct.tpg_data*
%5 = alloca i32
%6 = alloca i32
store %struct.tpg_data* %0, %struct.tpg_data** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load %struct.tpg_data*, %struct.tpg_data** %4
%8 = load i32, i32* %5
%9 = load %struct.tpg_data*, %struct.tpg_data** %4
%10 = load i32, i32* %6
%11 = call i32 @tpg_hscale(%struct.tpg_data* %9, i32 %10)
%12 = call i32 @tpg_hdiv(%struct.tpg_data* %7, i32 %8, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.tpg_data = type { i32 }
define i32 @tpg_hscale_div(%struct.tpg_data* %0, i32 %1, i32 %2) {
%4 = tail call i32 @tpg_hscale(%struct.tpg_data* %0, i32 %2)
%5 = tail call i32 @tpg_hdiv(%struct.tpg_data* %0, i32 %1, i32 %4)
ret i32 %5
}
/* Variables and functions */
scalar_t__ ePrimo(int);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, int *);
main() {
  int numero;
  puts("informe um numero: ");
  scanf("%d", &numero);
  if (ePrimo(numero))
    puts("e primo");
  else
    puts("Nao é primo");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
lea    0xec2(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <ePrimo@plt>
cmp    $0x0,%rax
je     117e <main+0x4e>
lea    0xea3(%rip),%rdi
call   1030 <puts@plt>
jmp    118a <main+0x5a>
lea    0xe9a(%rip),%rdi
call   1030 <puts@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
lea    0xed0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <ePrimo@plt>
test   %rax,%rax
lea    0xebe(%rip),%rax
lea    0xeaf(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"informe um numero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [8 x i8] c"e primo\00"
@.str.3 = [13 x i8] c"Nao \C3\A9 primo\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i64 @ePrimo(i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %12
10: ; preds = %0
%11 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@.str = [20 x i8] c"informe um numero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [8 x i8] c"e primo\00"
@.str.3 = [13 x i8] c"Nao \C3\A9 primo\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i64 @ePrimo(i32 %5)
%7 = icmp eq i64 %6, 0
%8 = select i1 %7, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0)
%9 = call i32 @puts(i8* dereferenceable(1) %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ zfree(char *);
char *zmalloc(int);
int main() {
  char *world;
  world = zmalloc(6 * sizeof(char));
  world[0] = 'w';
  world[1] = 'o';
  world[2] = 'r';
  world[3] = 'l';
  world[4] = 'd';
  world[5] = '\0';
  printf("hello %s\n", world);
  zfree(world);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x6,%edi
call   1040 <zmalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x77,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x6f,0x1(%rax)
mov    -0x10(%rbp),%rax
movb   $0x72,0x2(%rax)
mov    -0x10(%rbp),%rax
movb   $0x6c,0x3(%rax)
mov    -0x10(%rbp),%rax
movb   $0x64,0x4(%rax)
mov    -0x10(%rbp),%rax
movb   $0x0,0x5(%rax)
mov    -0x10(%rbp),%rsi
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1050 <zfree@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x6,%edi
call   1040 <zmalloc@plt>
mov    %rax,%rbx
movl   $0x6c726f77,(%rax)
movw   $0x64,0x4(%rax)
lea    0xeaf(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1050 <zfree@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"hello %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* @zmalloc(i32 6)
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
store i8 119, i8* %5
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 1
store i8 111, i8* %7
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 2
store i8 114, i8* %9
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 3
store i8 108, i8* %11
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 4
store i8 100, i8* %13
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 5
store i8 0, i8* %15
%16 = load i8*, i8** %2
%17 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %16)
%18 = load i8*, i8** %2
%19 = call i32 @zfree(i8* %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"hello %s\0A\00"
define i32 @main() {
%1 = tail call i8* @zmalloc(i32 6)
store i8 119, i8* %1
%2 = getelementptr inbounds i8, i8* %1, i64 1
store i8 111, i8* %2
%3 = getelementptr inbounds i8, i8* %1, i64 2
store i8 114, i8* %3
%4 = getelementptr inbounds i8, i8* %1, i64 3
store i8 108, i8* %4
%5 = getelementptr inbounds i8, i8* %1, i64 4
store i8 100, i8* %5
%6 = getelementptr inbounds i8, i8* %1, i64 5
store i8 0, i8* %6
%7 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %1)
%8 = tail call i32 @zfree(i8* %1)
ret i32 0
}
void whline() {}


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

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

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

LLVM IR (-O2):
define void @whline() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int trailingZeroes(int);
int main(void) {
  printf("%d\n", trailingZeroes(10));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
call   1040 <trailingZeroes@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @trailingZeroes(i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
int strlen(char *);
void emitn(char *tgt, char *src, int rpt) {
  int n;
  n = strlen(src);
  while (rpt--) {
    memcpy(tgt, src, n);
    tgt += n;
  }
  *tgt = '\0';
}


x86 assembly (clang, -O0):
<emitn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
je     1179 <emitn+0x59>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x18(%rbp),%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    113f <emitn+0x1f>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emitn>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %edx,%ebp
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <strlen@plt>
test   %ebp,%ebp
je     1166 <emitn+0x46>
mov    %eax,%r15d
movslq %eax,%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
call   1040 <memcpy@plt>
add    %r12,%rbx
add    $0xffffffff,%ebp
jne    1150 <emitn+0x30>
movb   $0x0,(%rbx)
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @emitn(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @strlen(i8* %1)
%5 = icmp eq i32 %2, 0
br i1 %5, label %15, label %6
6: ; preds = %3
%7 = sext i32 %4 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i8* [ %0, %6 ], [ %13, %8 ]
%10 = phi i32 [ %2, %6 ], [ %11, %8 ]
%11 = add nsw i32 %10, -1
%12 = tail call i32 @memcpy(i8* %9, i8* %1, i32 %4)
%13 = getelementptr inbounds i8, i8* %9, i64 %7
%14 = icmp eq i32 %11, 0
br i1 %14, label %15, label %8
15: ; preds = %8, %3
%16 = phi i8* [ %0, %3 ], [ %13, %8 ]
store i8 0, i8* %16
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ send_ipi(int *, int, int);
void apic_send_ipi_tophys(uint8_t *baseapic, uint8_t dest, uint32_t type) {
  uint32_t high = dest << 24;
  uint32_t low = 0 | 0 | type;
  send_ipi(baseapic, high, low);
}


x86 assembly (clang, -O0):
<apic_send_ipi_tophys>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x18,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
or     $0x0,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1030 <send_ipi@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<apic_send_ipi_tophys>:
shl    $0x18,%esi
jmp    1030 <send_ipi@plt>

LLVM IR (-O0):
define void @apic_send_ipi_tophys(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %5
%10 = shl i32 %9, 24
store i32 %10, i32* %7
%11 = load i32, i32* %6
%12 = or i32 0, %11
store i32 %12, i32* %8
%13 = load i32*, i32** %4
%14 = load i32, i32* %7
%15 = load i32, i32* %8
%16 = call i32 @send_ipi(i32* %13, i32 %14, i32 %15)
ret void
}

LLVM IR (-O2):
define void @apic_send_ipi_tophys(i32* %0, i32 %1, i32 %2) {
%4 = shl i32 %1, 24
%5 = tail call i32 @send_ipi(i32* %0, i32 %4, i32 %2)
ret void
}
/* Type definitions */
struct timespec {
  int /*<<< orphan*/ tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
int /*<<< orphan*/ srandom(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void init_seed(void) {
  struct timespec ts;
  clock_gettime(CLOCK_REALTIME, &ts);
  srandom(ts.tv_nsec);
  srandom(time(NULL));
}


x86 assembly (clang, -O0):
<init_seed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1040 <clock_gettime@plt>
mov    -0x8(%rbp),%edi
call   1030 <srandom@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1030 <srandom@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_seed>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1040 <clock_gettime@plt>
mov    (%rsp),%edi
call   1030 <srandom@plt>
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1030 <srandom@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define void @init_seed() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_REALTIME
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = call i32 @srandom(i32 %5)
%7 = call i32 @time(i32* null)
%8 = call i32 @srandom(i32 %7)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define void @init_seed() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_REALTIME
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = call i32 @srandom(i32 %6)
%8 = call i32 @time(i32* null)
%9 = call i32 @srandom(i32 %8)
ret void
}
void gtk_tree_view_column_clicked() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_column_clicked() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int LLVMFuzzerTestOneInput(int /*<<< orphan*/ *, size_t);
int _llair_main() {
  size_t Size = 13;
  uint8_t Data[Size];
  return LLVMFuzzerTestOneInput(Data, Size);
}


x86 assembly (clang, -O0):
<_llair_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0xd,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,%rsp
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
call   1030 <LLVMFuzzerTestOneInput@plt>
mov    -0x10(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_llair_main>:
sub    $0x38,%rsp
mov    %rsp,%rdi
mov    $0xd,%esi
call   1030 <LLVMFuzzerTestOneInput@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
define i32 @_llair_main() {
%1 = alloca i64
%2 = alloca i8*
%3 = alloca i64
store i64 13, i64* %1
%4 = load i64, i64* %1
%5 = call i8* @llvm.stacksave()
store i8* %5, i8** %2
%6 = alloca i32, i64 %4
store i64 %4, i64* %3
%7 = load i64, i64* %1
%8 = call i32 @LLVMFuzzerTestOneInput(i32* %6, i64 %7)
%9 = load i8*, i8** %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @_llair_main() {
%1 = alloca [13 x i32]
%2 = getelementptr inbounds [13 x i32], [13 x i32]* %1, i64 0, i64 0
%3 = call i32 @LLVMFuzzerTestOneInput(i32* %2, i64 13)
ret i32 %3
}