xunge/DecIR huggingface dataset:
int bench(int *v, int N) {
  int *p = v + N - 1;
  int i = 0;
  int j = N - 1;
  while (v < p) {
    *v = 0;
    *v = *p;
    v++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<bench>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1167 <bench+0x67>
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
jmp    1132 <bench+0x32>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bench>:
movslq %esi,%rax
lea    (%rdi,%rax,4),%rax
add    $0xfffffffffffffffc,%rax
cmp    %rdi,%rax
jbe    1123 <bench+0x23>
movl   $0x0,(%rdi)
mov    (%rax),%ecx
mov    %ecx,(%rdi)
add    $0x4,%rdi
cmp    %rax,%rdi
jb     1110 <bench+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @bench(i32* %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = getelementptr inbounds i32, i32* %4, i64 -1
%6 = icmp ugt i32* %5, %0
br i1 %6, label %7, label %12
7: ; preds = %2, %7
%8 = phi i32* [ %10, %7 ], [ %0, %2 ]
store i32 0, i32* %8
%9 = load i32, i32* %5
store i32 %9, i32* %8
%10 = getelementptr inbounds i32, i32* %8, i64 1
%11 = icmp ult i32* %10, %5
br i1 %11, label %7, label %12
12: ; preds = %7, %2
ret i32 0
}
/* Type definitions */
struct Hero {
  int dummy;
};
struct Ability {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Hero_AddBuff(struct Hero *, int /*<<< orphan*/);
int /*<<< orphan*/ LongJuanQiangFaBuff_Get(int);
void ChangWenJun_LongJuanQiangFa_add_buff_to_target(struct Ability *self,
                                                    struct Hero *attacker,
                                                    struct Hero *target) {
  Hero_AddBuff(target, LongJuanQiangFaBuff_Get(10));
}


x86 assembly (clang, -O0):
<ChangWenJun_LongJuanQiangFa_add_buff_to_target>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0xa,%edi
call   1040 <LongJuanQiangFaBuff_Get@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
call   1030 <Hero_AddBuff@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ChangWenJun_LongJuanQiangFa_add_buff_to_target>:
push   %rbx
mov    %rdx,%rbx
mov    $0xa,%edi
call   1040 <LongJuanQiangFaBuff_Get@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <Hero_AddBuff@plt>

LLVM IR (-O0):
%struct.Ability = type { i32 }
%struct.Hero = type { i32 }
define void @ChangWenJun_LongJuanQiangFa_add_buff_to_target(%struct.Ability* %0, %struct.Hero* %1, %struct.Hero* %2) {
%4 = alloca %struct.Ability*
%5 = alloca %struct.Hero*
%6 = alloca %struct.Hero*
store %struct.Ability* %0, %struct.Ability** %4
store %struct.Hero* %1, %struct.Hero** %5
store %struct.Hero* %2, %struct.Hero** %6
%7 = load %struct.Hero*, %struct.Hero** %6
%8 = call i32 @LongJuanQiangFaBuff_Get(i32 10)
%9 = call i32 @Hero_AddBuff(%struct.Hero* %7, i32 %8)
ret void
}

LLVM IR (-O2):
%struct.Ability = type { i32 }
%struct.Hero = type { i32 }
define void @ChangWenJun_LongJuanQiangFa_add_buff_to_target(%struct.Ability* nocapture readnone %0, %struct.Hero* nocapture readnone %1, %struct.Hero* %2) {
%4 = tail call i32 @LongJuanQiangFaBuff_Get(i32 10)
%5 = tail call i32 @Hero_AddBuff(%struct.Hero* %2, i32 %4)
ret void
}
unsigned long b_mem_release(void *mem, unsigned long nbr) {
  unsigned long out;
  asm volatile("call *0x00100058" : "=c"(out) : "a"(mem), "c"(nbr));
  return out;
}


x86 assembly (clang, -O0):
<b_mem_release>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
call   *0x100058
mov    %rcx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_mem_release>:
mov    %rsi,%rcx
mov    %rdi,%rax
call   *0x100058
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @b_mem_release(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i64 asm sideeffect "call *0x00100058", "={cx},{ax},{cx},~{dirflag},~{fpsr},~{flags}"(i8* %6, i64 %7)
store i64 %8, i64* %5
%9 = load i64, i64* %5
ret i64 %9
}

LLVM IR (-O2):
define i64 @b_mem_release(i8* %0, i64 %1) {
%3 = tail call i64 asm sideeffect "call *0x00100058", "={cx},{ax},{cx},~{dirflag},~{fpsr},~{flags}"(i8* %0, i64 %1)
ret i64 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void ADCSequenceUnderflowClear(uint32_t ui32Base, uint32_t ui32SequenceNum) {
  ;
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000018))) = 1 << ui32SequenceNum;
}


x86 assembly (clang, -O0):
<ADCSequenceUnderflowClear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
add    $0x18,%eax
cltq
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCSequenceUnderflowClear>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %edi,%rcx
mov    %eax,0x18(%rcx)
ret

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

LLVM IR (-O2):
define void @ADCSequenceUnderflowClear(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = add nsw i32 %0, 24
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
store volatile i32 %3, i32* %6
ret void
}
/* Variables and functions */
int strlen(char *);
int /*<<< orphan*/ ungetch(char);
void ungets(char s[]) {
  int i;
  for (i = 0; i < strlen(s); i++)
    ungetch(s[i]);
}


x86 assembly (clang, -O0):
<ungets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jge    116e <ungets+0x4e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <ungetch@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <ungets+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ungets>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
test   %eax,%eax
jle    115d <ungets+0x3d>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%r14,%rbx,1),%edi
call   1040 <ungetch@plt>
add    $0x1,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1140 <ungets+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @ungets(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %13
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call i32 @ungetch(i8 signext %7)
%9 = add nuw nsw i64 %5, 1
%10 = tail call i32 @strlen(i8* %0)
%11 = sext i32 %10 to i64
%12 = icmp slt i64 %9, %11
br i1 %12, label %4, label %13
13: ; preds = %4, %1
ret void
}
/* Variables and functions */
int snis_rand();
int snis_randn(int n) { return n * snis_rand() / ((32767) + 1); }


x86 assembly (clang, -O0):
<snis_randn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <snis_rand@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
imul   %ecx,%eax
mov    $0x8000,%ecx
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<snis_randn>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <snis_rand@plt>
imul   %ebx,%eax
lea    0x7fff(%rax),%ecx
test   %eax,%eax
cmovs  %ecx,%eax
sar    $0xf,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @snis_randn(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (...) @snis_rand()
%5 = mul nsw i32 %3, %4
%6 = sdiv i32 %5, 32768
ret i32 %6
}

LLVM IR (-O2):
define i32 @snis_randn(i32 %0) {
%2 = tail call i32 (...) @snis_rand()
%3 = mul nsw i32 %2, %0
%4 = sdiv i32 %3, 32768
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_aupdate_write_swap() {
  printf("NOT IMPLEMENTED:"
         "pa_aupdate_write_swap"
         "\n");
}


x86 assembly (clang, -O0):
<pa_aupdate_write_swap>:
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_aupdate_write_swap>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

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


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

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

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

LLVM IR (-O2):
define void @sdhc_exit() {
%1 = tail call i32 (...) @sdhc_shutdown()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ func_breakable_die(int /*<<< orphan*/);
void func_breakable_use(void) { func_breakable_die(0); }


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

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

LLVM IR (-O0):
define void @func_breakable_use() {
%1 = call i32 @func_breakable_die(i32 0)
ret void
}

LLVM IR (-O2):
define void @func_breakable_use() {
%1 = tail call i32 @func_breakable_die(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
long syscall(int);
int main() {
  long int hello_world_call = syscall(545);
  printf("Hello_world returned %ld\n", hello_world_call);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"Hello_world returned %ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
%3 = call i64 @syscall(i32 545)
store i64 %3, i64* %2
%4 = load i64, i64* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"Hello_world returned %ld\0A\00"
define i32 @main() {
%1 = tail call i64 @syscall(i32 545)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ run_instance();
int main(int argc, char **argv) {
  run_instance();
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @run_instance()
ret i32 0
}
const char *getBuildEnvironment(void) { return "Linux"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"Linux\00"
define i8* @getBuildEnvironment() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"Linux\00"
define i8* @getBuildEnvironment() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int rom_present(char *);
int wd1007vse1_available(void) {
  return (rom_present(L"roms/hdd/esdi_at/62-000279-061.bin"));
}


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

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

LLVM IR (-O0):
@.str = [35 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 104, i32 100, i32 100, i32 47, i32 101, i32 115, i32 100, i32 105, i32 95, i32 97, i32 116, i32 47, i32 54, i32 50, i32 45, i32 48, i32 48, i32 48, i32 50, i32 55, i32 57, i32 45, i32 48, i32 54, i32 49, i32 46, i32 98, i32 105, i32 110, i32 0]
define i32 @wd1007vse1_available() {
%1 = call i32 @rom_present(i8* bitcast ([35 x i32]* @.str to i8*))
ret i32 %1
}

LLVM IR (-O2):
@.str = [35 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 104, i32 100, i32 100, i32 47, i32 101, i32 115, i32 100, i32 105, i32 95, i32 97, i32 116, i32 47, i32 54, i32 50, i32 45, i32 48, i32 48, i32 48, i32 50, i32 55, i32 57, i32 45, i32 48, i32 54, i32 49, i32 46, i32 98, i32 105, i32 110, i32 0]
define i32 @wd1007vse1_available() {
%1 = tail call i32 @rom_present(i8* bitcast ([35 x i32]* @.str to i8*))
ret i32 %1
}
void gdk_modifier_type_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gdk_modifier_type_get_type() {
ret void
}
/* Variables and functions */
int roundf(float);
float round_pixel(float pixel) { return roundf(pixel * 64) / 64; }


x86 assembly (clang, -O0):
<round_pixel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xedb(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
call   1030 <roundf@plt>
mov    $0x40,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<round_pixel>:
push   %rax
mulss  0xee7(%rip),%xmm0
call   1030 <roundf@plt>
lea    0x3f(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
sar    $0x6,%ecx
xorps  %xmm0,%xmm0
cvtsi2ss %ecx,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @round_pixel(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 6.400000e+01
%5 = call i32 @roundf(float %4)
%6 = sdiv i32 %5, 64
%7 = sitofp i32 %6 to float
ret float %7
}

LLVM IR (-O2):
define float @round_pixel(float %0) {
%2 = fmul float %0, 6.400000e+01
%3 = tail call i32 @roundf(float %2)
%4 = sdiv i32 %3, 64
%5 = sitofp i32 %4 to float
ret float %5
}
int s5pc11x_pm_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @s5pc11x_pm_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void MemManage_Handler() { default_handler(); }


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

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

LLVM IR (-O0):
define weak void @MemManage_Handler() {
%1 = call i32 (...) @default_handler()
ret void
}

LLVM IR (-O2):
define weak void @MemManage_Handler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
__attribute__((no)) long trampoline_load_native_code(unsigned long n1) {
  long ret;
  __asm__ __volatile__("leaq 1f(%%rip), %%r11\n\t"
                       "movq %%r11, %%fs:0x20\n\t"
                       "jmpq *%%gs:0x10000+"
                       "0x88"
                       "\n\t"
                       "1:\n\t"
                       : "=a"(ret)
                       : "D"(n1)
                       : "memory");
  return ret;
}


x86 assembly (clang, -O0):
<trampoline_load_native_code>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0x11(%rip),%r11
mov    %r11,%fs:0x20
jmp    *%gs:0x10088
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<trampoline_load_native_code>:
lea    0x11(%rip),%r11
mov    %r11,%fs:0x20
jmp    *%gs:0x10088
ret

LLVM IR (-O0):
define i64 @trampoline_load_native_code(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 asm sideeffect "leaq 1f(%rip), %r11\0A\09movq %r11, %fs:0x20\0A\09jmpq *%gs:0x10000+0x88\0A\091:\0A\09", "={ax},{di},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
define i64 @trampoline_load_native_code(i64 %0) {
%2 = tail call i64 asm sideeffect "leaq 1f(%rip), %r11\0A\09movq %r11, %fs:0x20\0A\09jmpq *%gs:0x10000+0x88\0A\091:\0A\09", "={ax},{di},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() { printf("usage: hyzcut <filename> <prefix>\n"); }


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"usage: hyzcut <filename> <prefix>\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [34 x i8] c"usage: hyzcut <filename> <prefix>\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void suggest(const char *prog) {
  fprintf(stderr, "Try '%s -h' for more information.\n", prog);
}


x86 assembly (clang, -O0):
<suggest>:
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>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<suggest>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"Try '%s -h' for more information.\0A\00"
define void @suggest(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 ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"Try '%s -h' for more information.\0A\00"
define void @suggest(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void U_WMREOF_print(const char *contents) { (void)(contents); }


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

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

LLVM IR (-O0):
define void @U_WMREOF_print(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
ret void
}

LLVM IR (-O2):
define void @U_WMREOF_print(i8* nocapture %0) {
ret void
}
void mutex_leave(void *mtx) {}


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

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

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

LLVM IR (-O2):
define void @mutex_leave(i8* nocapture %0) {
ret void
}
void INT_Excep_PERIA_INTA223(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIA_INTA223() {
ret void
}
int subtract(unsigned a, unsigned b) { return a - b; }


x86 assembly (clang, -O0):
<subtract>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @subtract(i32 %0, i32 %1) {
%3 = sub i32 %0, %1
ret i32 %3
}
/* Variables and functions */
double sla_epb_(double *);
double slaEpb(double date) {
  double DATE;
  double result;
  DATE = date;
  result = sla_epb_(&DATE);
  return result;
}


x86 assembly (clang, -O0):
<slaEpb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <sla_epb_@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slaEpb>:
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <sla_epb_@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define double @slaEpb(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
store double %0, double* %2
%4 = call double @sla_epb_(double* %2)
ret double %4
}
/* Variables and functions */
long time(int /*<<< orphan*/ *);
long get_seconds() { return time(NULL); }


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

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

LLVM IR (-O0):
define i64 @get_seconds() {
%1 = call i64 @time(i32* null)
ret i64 %1
}

LLVM IR (-O2):
define i64 @get_seconds() {
%1 = tail call i64 @time(i32* null)
ret i64 %1
}
unsigned int rotr(const unsigned int value, int shift) {
  if ((shift &= sizeof(value) * 8 - 1) == 0)
    return value;
  return (value >> shift) | (value << (sizeof(value) * 8 - shift));
}


x86 assembly (clang, -O0):
<rotr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
and    $0x1f,%rax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jne    1129 <rotr+0x29>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1149 <rotr+0x49>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shr    %cl,%eax
mov    -0x8(%rbp),%edx
movslq -0xc(%rbp),%rsi
mov    $0x20,%ecx
sub    %rsi,%rcx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotr>:
mov    %esi,%ecx
mov    %edi,%eax
ror    %cl,%eax
ret

LLVM IR (-O0):
define i32 @rotr(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = sext i32 %6 to i64
%8 = and i64 %7, 31
%9 = trunc i64 %8 to i32
store i32 %9, i32* %5
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load i32, i32* %4
store i32 %12, i32* %3
br label %24
13: ; preds = %2
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = lshr i32 %14, %15
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = sub i64 32, %19
%21 = trunc i64 %20 to i32
%22 = shl i32 %17, %21
%23 = or i32 %16, %22
store i32 %23, i32* %3
br label %24
24: ; preds = %13, %11
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @rotr(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.fshr.i32(i32 %0, i32 %0, i32 %1)
ret i32 %3
}
void supervisor_resource_mmr_write(void) {
  int *i = (void *)0xFFC00014;
  *i = 0;
}


x86 assembly (clang, -O0):
<supervisor_resource_mmr_write>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffc00014,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<supervisor_resource_mmr_write>:
mov    $0xffc00014,%eax
movl   $0x0,(%rax)
ret

LLVM IR (-O0):
define void @supervisor_resource_mmr_write() {
%1 = alloca i32*
store i32* inttoptr (i64 4290773012 to i32*), i32** %1
%2 = load i32*, i32** %1
store i32 0, i32* %2
ret void
}

LLVM IR (-O2):
define void @supervisor_resource_mmr_write() {
store i32 0, i32* inttoptr (i64 4290773012 to i32*)
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int n = __VERIFIER_nondet_int();
  int m = __VERIFIER_nondet_int();
  int i, j;
  if (m > 0 && n > m) {
    i = 0;
    j = 0;
    while (i < n) {
      if (j < m) {
        j++;
      } else {
        j = 0;
        i++;
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1197 <main+0x87>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1197 <main+0x87>
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1192 <main+0x82>
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    117d <main+0x6d>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    118d <main+0x7d>
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1157 <main+0x47>
jmp    1197 <main+0x87>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ LDX_();
int /*<<< orphan*/ c64_memAbsoluteAddrY();
void LDX_absy(void) {
  c64_memAbsoluteAddrY();
  LDX_();
}


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

x86 assembly (clang, -O2):
<LDX_absy>:
push   %rax
xor    %eax,%eax
call   1040 <c64_memAbsoluteAddrY@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <LDX_@plt>

LLVM IR (-O0):
define void @LDX_absy() {
%1 = call i32 (...) @c64_memAbsoluteAddrY()
%2 = call i32 (...) @LDX_()
ret void
}

LLVM IR (-O2):
define void @LDX_absy() {
%1 = tail call i32 (...) @c64_memAbsoluteAddrY()
%2 = tail call i32 (...) @LDX_()
ret void
}
char *ct_numb(cp, n)
register char *cp;
int n;
{
  cp++;
  if (n >= 10)
    *cp++ = (n / 10) % 10 + '0';
  else
    *cp++ = ' ';
  *cp++ = n % 10 + '0';
  return (cp);
}


x86 assembly (clang, -O0):
<ct_numb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
cmpl   $0xa,-0xc(%rbp)
jl     114f <ct_numb+0x4f>
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%edx
mov    %dl,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    1161 <ct_numb+0x61>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x20,(%rax)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%edx
mov    %dl,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ct_numb>:
mov    %rdi,%rax
mov    $0x20,%cl
cmp    $0xa,%esi
jl     112e <ct_numb+0x2e>
mov    %esi,%ecx
mov    $0xcccccccd,%edx
imul   %rdx,%rcx
shr    $0x23,%rcx
mov    %rcx,%rdi
imul   %rdx,%rdi
shr    $0x23,%rdi
add    %edi,%edi
lea    (%rdi,%rdi,4),%edx
sub    %edx,%ecx
or     $0x30,%cl
mov    %cl,0x1(%rax)
movslq %esi,%rcx
imul   $0x66666667,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%esi
add    $0x30,%sil
mov    %sil,0x2(%rax)
add    $0x3,%rax
ret

LLVM IR (-O0):
define i8* @ct_numb(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i32 1
store i8* %6, i8** %3
%7 = load i32, i32* %4
%8 = icmp sge i32 %7, 10
br i1 %8, label %9, label %17
9: ; preds = %2
%10 = load i32, i32* %4
%11 = sdiv i32 %10, 10
%12 = srem i32 %11, 10
%13 = add nsw i32 %12, 48
%14 = trunc i32 %13 to i8
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %3
store i8 %14, i8* %15
br label %20
17: ; preds = %2
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %3
store i8 32, i8* %18
br label %20
20: ; preds = %17, %9
%21 = load i32, i32* %4
%22 = srem i32 %21, 10
%23 = add nsw i32 %22, 48
%24 = trunc i32 %23 to i8
%25 = load i8*, i8** %3
%26 = getelementptr inbounds i8, i8* %25, i32 1
store i8* %26, i8** %3
store i8 %24, i8* %25
%27 = load i8*, i8** %3
ret i8* %27
}

LLVM IR (-O2):
define i8* @ct_numb(i8* writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 9
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = udiv i32 %1, 10
%6 = urem i32 %5, 10
%7 = trunc i32 %6 to i8
%8 = or i8 %7, 48
br label %9
9: ; preds = %2, %4
%10 = phi i8 [ %8, %4 ], [ 32, %2 ]
%11 = getelementptr inbounds i8, i8* %0, i64 2
%12 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %10, i8* %12
%13 = srem i32 %1, 10
%14 = trunc i32 %13 to i8
%15 = add nsw i8 %14, 48
%16 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %15, i8* %11
ret i8* %16
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void func(void) { printf("func\n"); }


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"func\00"
define void @func() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ __builtin_exp10l(long double);
int /*<<< orphan*/ link_failure_builtin_exp10l();
void test_builtin_exp10l(long double ld) {
  if (__builtin_exp10l(ld) != __builtin_exp10l(ld))
    link_failure_builtin_exp10l();
}


x86 assembly (clang, -O0):
<test_builtin_exp10l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <__builtin_exp10l@plt>
mov    %rax,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <__builtin_exp10l@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     1163 <test_builtin_exp10l+0x43>
mov    $0x0,%al
call   1030 <link_failure_builtin_exp10l@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_builtin_exp10l>:
push   %rbx
sub    $0x20,%rsp
fldt   0x30(%rsp)
fld    %st(0)
fstpt  0x14(%rsp)
fstpt  (%rsp)
call   1040 <__builtin_exp10l@plt>
mov    %rax,%rbx
fldt   0x14(%rsp)
fstpt  (%rsp)
call   1040 <__builtin_exp10l@plt>
cmp    %rax,%rbx
jne    1151 <test_builtin_exp10l+0x31>
add    $0x20,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
jmp    1030 <link_failure_builtin_exp10l@plt>

LLVM IR (-O0):
define void @test_builtin_exp10l(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call i64 @__builtin_exp10l(x86_fp80 %3)
%5 = load x86_fp80, x86_fp80* %2
%6 = call i64 @__builtin_exp10l(x86_fp80 %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_builtin_exp10l()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_builtin_exp10l(x86_fp80 %0) {
%2 = tail call i64 @__builtin_exp10l(x86_fp80 %0)
%3 = tail call i64 @__builtin_exp10l(x86_fp80 %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_builtin_exp10l()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
scalar_t__ floor(int /*<<< orphan*/);
int /*<<< orphan*/ pow(double, double);
int iw_dbm2mwatt(int in) {
  return ((int)(floor(pow(10.0, (((double)in) / 10.0)))));
}


x86 assembly (clang, -O0):
<iw_dbm2mwatt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xec8(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xebc(%rip),%xmm0
call   1030 <pow@plt>
mov    %eax,%edi
call   1040 <floor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iw_dbm2mwatt>:
push   %rax
cvtsi2sd %edi,%xmm1
movsd  0xed3(%rip),%xmm0
divsd  %xmm0,%xmm1
call   1030 <pow@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <floor@plt>

LLVM IR (-O0):
define i32 @iw_dbm2mwatt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = fdiv double %4, 1.000000e+01
%6 = call i32 @pow(double 1.000000e+01, double %5)
%7 = call i64 @floor(i32 %6)
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @iw_dbm2mwatt(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fdiv double %2, 1.000000e+01
%4 = tail call i32 @pow(double 1.000000e+01, double %3)
%5 = tail call i64 @floor(i32 %4)
%6 = trunc i64 %5 to i32
ret i32 %6
}
void adis16060_uninitialize_ring(struct iio_ring_buffer *ring) {}


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

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

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

LLVM IR (-O2):
%struct.iio_ring_buffer = type opaque
define void @adis16060_uninitialize_ring(%struct.iio_ring_buffer* nocapture %0) {
ret void
}
int test_imm_D7int64_lowword_mem(long long *val) {
  return ((*val) & (0xD7 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_D7int64_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, 215
%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_D7int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 215
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int HelpItem133(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem133() {
ret i32 0
}
const char *query_modinfo_type(int type) {
  if (type & (1 << 0))
    return "(int)";
  if (type & (1 << 1))
    return "(float)";
  if (type & (1 << 2))
    return "(string)";
  return "ERR";
}


x86 assembly (clang, -O0):
<query_modinfo_type>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1126 <query_modinfo_type+0x26>
lea    0xee3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116f <query_modinfo_type+0x6f>
mov    -0xc(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1145 <query_modinfo_type+0x45>
lea    0xeca(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116f <query_modinfo_type+0x6f>
mov    -0xc(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     1164 <query_modinfo_type+0x64>
lea    0xeb3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116f <query_modinfo_type+0x6f>
lea    0xeac(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<query_modinfo_type>:
test   $0x1,%dil
jne    1123 <query_modinfo_type+0x23>
test   $0x2,%dil
jne    112b <query_modinfo_type+0x2b>
test   $0x4,%dil
lea    0xf00(%rip),%rcx
lea    0xef0(%rip),%rax
cmove  %rcx,%rax
ret
lea    0xed6(%rip),%rax
ret
lea    0xed4(%rip),%rax
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"(int)\00"
@.str.1 = [8 x i8] c"(float)\00"
@.str.2 = [9 x i8] c"(string)\00"
@.str.3 = [4 x i8] c"ERR\00"
define i8* @query_modinfo_type(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = and i32 %0, 2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = and i32 %0, 4
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0)
br label %11
11: ; preds = %7, %4, %1
%12 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %1 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %4 ], [ %10, %7 ]
ret i8* %12
}
/* Type definitions */
typedef int /*<<< orphan*/ pc;
typedef int /*<<< orphan*/ c;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  char c;
  char *pc = &c;
  printf("sizeof() of char c = [%ld]\n", sizeof(c));
  printf("sizeof() of char *pc = [%ld]\n", sizeof(pc));
  printf("sizeof() of char = [%ld]\n", sizeof(char));
  printf("sizeof() of char * = [%ld]\n", sizeof(char *));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x5(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xf00(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xf09(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"sizeof() of char c = [%ld]\0A\00"
@.str.1 = [30 x i8] c"sizeof() of char *pc = [%ld]\0A\00"
@.str.2 = [26 x i8] c"sizeof() of char = [%ld]\0A\00"
@.str.3 = [28 x i8] c"sizeof() of char * = [%ld]\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8*
store i32 0, i32* %1
store i8* %2, i8** %3
%4 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 1)
%5 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 8)
%6 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 1)
%7 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32 8)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"sizeof() of char c = [%ld]\0A\00"
@.str.1 = [30 x i8] c"sizeof() of char *pc = [%ld]\0A\00"
@.str.2 = [26 x i8] c"sizeof() of char = [%ld]\0A\00"
@.str.3 = [28 x i8] c"sizeof() of char * = [%ld]\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 8)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32 8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ uart_putstring(char *);
void logit(char *foo) {
  uart_putstring(foo);
  return;
}


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

x86 assembly (clang, -O2):
<logit>:
jmp    1030 <uart_putstring@plt>

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

LLVM IR (-O2):
define void @logit(i8* %0) {
%2 = tail call i32 @uart_putstring(i8* %0)
ret void
}
/* Type definitions */
struct PKplex_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ clear_args(struct PKplex_args_info *);
int /*<<< orphan*/ clear_given(struct PKplex_args_info *);
int /*<<< orphan*/ init_args_info(struct PKplex_args_info *);
void PKplex_cmdline_parser_init(struct PKplex_args_info *args_info) {
  clear_given(args_info);
  clear_args(args_info);
  init_args_info(args_info);
}


x86 assembly (clang, -O0):
<PKplex_cmdline_parser_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <clear_given@plt>
mov    -0x8(%rbp),%rdi
call   1030 <clear_args@plt>
mov    -0x8(%rbp),%rdi
call   1050 <init_args_info@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PKplex_cmdline_parser_init>:
push   %rbx
mov    %rdi,%rbx
call   1040 <clear_given@plt>
mov    %rbx,%rdi
call   1030 <clear_args@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <init_args_info@plt>

LLVM IR (-O0):
%struct.PKplex_args_info = type { i32 }
define void @PKplex_cmdline_parser_init(%struct.PKplex_args_info* %0) {
%2 = alloca %struct.PKplex_args_info*
store %struct.PKplex_args_info* %0, %struct.PKplex_args_info** %2
%3 = load %struct.PKplex_args_info*, %struct.PKplex_args_info** %2
%4 = call i32 @clear_given(%struct.PKplex_args_info* %3)
%5 = load %struct.PKplex_args_info*, %struct.PKplex_args_info** %2
%6 = call i32 @clear_args(%struct.PKplex_args_info* %5)
%7 = load %struct.PKplex_args_info*, %struct.PKplex_args_info** %2
%8 = call i32 @init_args_info(%struct.PKplex_args_info* %7)
ret void
}

LLVM IR (-O2):
%struct.PKplex_args_info = type { i32 }
define void @PKplex_cmdline_parser_init(%struct.PKplex_args_info* %0) {
%2 = tail call i32 @clear_given(%struct.PKplex_args_info* %0)
%3 = tail call i32 @clear_args(%struct.PKplex_args_info* %0)
%4 = tail call i32 @init_args_info(%struct.PKplex_args_info* %0)
ret void
}