xunge/DecIR huggingface dataset:
int all_lower(str)
register char *str;
{
  while (*str) {
    if (!(((unsigned char)*str) <= 0177) || !islower(*str))
      return 0;
    ++str;
  }
  return 1;
}


x86 assembly (clang, -O0):
<all_lower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     116b <all_lower+0x5b>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x7f,%eax
jg     114e <all_lower+0x3e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <islower@plt>
cmp    $0x0,%eax
jne    115a <all_lower+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1172 <all_lower+0x62>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <all_lower+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<all_lower>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     114b <all_lower+0x3b>
mov    %rdi,%rbx
add    $0x1,%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %al,%al
js     1150 <all_lower+0x40>
movzbl %al,%edi
call   1030 <islower@plt>
test   %eax,%eax
je     1150 <all_lower+0x40>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <all_lower+0x20>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @all_lower(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %7
4: ; preds = %11
%5 = load i8, i8* %15
%6 = icmp eq i8 %5, 0
br i1 %6, label %16, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %15, %4 ], [ %0, %1 ]
%10 = icmp sgt i8 %8, -1
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = zext i8 %8 to i32
%13 = tail call i32 @islower(i32 %12)
%14 = icmp eq i32 %13, 0
%15 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %14, label %16, label %4
16: ; preds = %11, %7, %4, %1
%17 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ], [ 0, %11 ]
ret i32 %17
}
fgtu(x, y) unsigned long long int x;
unsigned long long int y;
{
  if (x > y)
    return 13;
  else
    return 140;
}


x86 assembly (clang, -O0):
<fgtu>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jbe    1126 <fgtu+0x26>
movl   $0xd,-0x4(%rbp)
jmp    112d <fgtu+0x2d>
movl   $0x8c,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgtu>:
cmp    %rsi,%rdi
mov    $0xd,%ecx
mov    $0x8c,%eax
cmova  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @fgtu(i64 %0, i64 %1) {
%3 = icmp ugt i64 %0, %1
%4 = select i1 %3, i32 13, i32 140
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void fus_bigint_test_title(const char *title) {
  printf("\n");
  printf("# %s:\n", title);
}


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

x86 assembly (clang, -O2):
<fus_bigint_test_title>:
push   %rbx
mov    %rdi,%rbx
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xecb(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str.1 = [7 x i8] c"# %s:\0A\00"
define void @fus_bigint_test_title(i8* %0) {
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
__attribute__((format(printf, 1, 2))) __attribute__((unused)) int
timing_printf(const char *p, ...) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @timing_printf(i8* nocapture readnone %0, ...) {
ret i32 0
}
void av_parse_ratio() {}


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

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

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

LLVM IR (-O2):
define void @av_parse_ratio() {
ret void
}
int kdtree_mem_enabled() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @kdtree_mem_enabled() {
ret i32 0
}
void command_p() {
  printf("%s: %d: %s: %s\n",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/Furzoom/demo-C/refs/heads/master/src/"
         "learn_makefile/command.c",
         7, __func__, "");
}


x86 assembly (clang, -O0):
<command_p>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeee(%rip),%rsi
mov    $0x7,%edx
lea    0xf7a(%rip),%rcx
lea    0xeda(%rip),%r8
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<command_p>:
lea    0xee9(%rip),%rdi
lea    0xef2(%rip),%rsi
lea    0xf83(%rip),%rcx
lea    0xee3(%rip),%r8
mov    $0x7,%edx
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"%s: %d: %s: %s\0A\00"
@.str.1 = [152 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Furzoom/demo-C/refs/heads/master/src/learn_makefile/command.c\00"
@__func__.command_p = [10 x i8] c"command_p\00"
@.str.2 = [1 x i8] zeroinitializer
define void @command_p() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.1, i64 0, i64 0), i32 7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.command_p, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"%s: %d: %s: %s\0A\00"
@.str.1 = [152 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Furzoom/demo-C/refs/heads/master/src/learn_makefile/command.c\00"
@__func__.command_p = [10 x i8] c"command_p\00"
@.str.2 = [1 x i8] zeroinitializer
define void @command_p() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.1, i64 0, i64 0), i32 7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.command_p, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
ret void
}
int main() {
  unsigned long t1 = -1;
  unsigned long t2 = -1;
  return t1 * t2;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0xffffffffffffffff,-0x10(%rbp)
ff
movq   $0xffffffffffffffff,-0x18(%rbp)
ff
mov    -0x10(%rbp),%rax
imul   -0x18(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
store i32 0, i32* %1
store i64 -1, i64* %2
store i64 -1, i64* %3
%4 = load i64, i64* %2
%5 = load i64, i64* %3
%6 = mul i64 %4, %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
char *crypt(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  printf("%s\n", crypt("zygote", "12"));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [7 x i8] c"zygote\00"
@.str.2 = [3 x i8] c"12\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i8* @crypt(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, 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 = [7 x i8] c"zygote\00"
@.str.2 = [3 x i8] c"12\00"
define i32 @main() {
%1 = tail call i8* @crypt(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, 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
}
int test_imm_3Dint8_mem(signed char *val) {
  return ((*val) & (0x3D << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_3Dint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 61
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int main() {
  int res;
  __asm__("movl $338, %eax");
  __asm__("int $0x80");
  __asm__("movl %eax, -4(%ebp)");
  printf("val returned by syscall %d\n", res);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x152,%eax
int    $0x80
mov    %eax,-0x4(%ebp)
mov    -0x8(%rbp),%esi
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x152,%eax
int    $0x80
mov    %eax,-0x4(%ebp)
lea    0xedd(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [28 x i8] c"val returned by syscall %d\0A\00"
define i32 @main() {
tail call void asm sideeffect "movl $$338, %eax", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "int $$0x80", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "movl %eax, -4(%ebp)", "~{dirflag},~{fpsr},~{flags}"()
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 undef)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ doStuff_pointerToConstInt(int *);
void f_4(void) {
  int x = 5;
  doStuff_pointerToConstInt(&x);
}


x86 assembly (clang, -O0):
<f_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x5,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <doStuff_pointerToConstInt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_4>:
push   %rax
movl   $0x5,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <doStuff_pointerToConstInt@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @f_4() {
%1 = alloca i32
store i32 5, i32* %1
%2 = call i32 @doStuff_pointerToConstInt(i32* %1)
ret void
}

LLVM IR (-O2):
define void @f_4() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 5, i32* %1
%3 = call i32 @doStuff_pointerToConstInt(i32* %1)
ret void
}
void loop_manual(void) {}


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

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

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

LLVM IR (-O2):
define void @loop_manual() {
ret void
}
void dcache_disable(void) { return; }


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

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

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

LLVM IR (-O2):
define void @dcache_disable() {
ret void
}
/* Variables and functions */
double sqrt(double);
unsigned long star_gethabhigh(unsigned int lumval) {
  return sqrt((double)lumval / 100.0) * 1.50 * 150;
}


x86 assembly (clang, -O0):
<star_gethabhigh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  0xed5(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  0xecc(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xec8(%rip),%xmm1
mulsd  %xmm1,%xmm0
movaps %xmm0,%xmm1
cvttsd2si %xmm1,%rax
mov    %rax,%rdx
sar    $0x3f,%rdx
movsd  0xeb5(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rcx
and    %rdx,%rcx
or     %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<star_gethabhigh>:
push   %rax
mov    %edi,%eax
cvtsi2sd %rax,%xmm0
divsd  0xee0(%rip),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1130 <star_gethabhigh+0x20>
sqrtsd %xmm0,%xmm0
jmp    1135 <star_gethabhigh+0x25>
call   1030 <sqrt@plt>
mulsd  0xecb(%rip),%xmm0
mulsd  0xecb(%rip),%xmm0
cvttsd2si %xmm0,%rcx
mov    %rcx,%rdx
sar    $0x3f,%rdx
subsd  0xebf(%rip),%xmm0
cvttsd2si %xmm0,%rax
and    %rdx,%rax
or     %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @star_gethabhigh(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = uitofp i32 %3 to double
%5 = fdiv double %4, 1.000000e+02
%6 = call double @sqrt(double %5)
%7 = fmul double %6, 1.500000e+00
%8 = fmul double %7, 1.500000e+02
%9 = fptoui double %8 to i64
ret i64 %9
}

LLVM IR (-O2):
define i64 @star_gethabhigh(i32 %0) {
%2 = uitofp i32 %0 to double
%3 = fdiv double %2, 1.000000e+02
%4 = tail call double @sqrt(double %3)
%5 = fmul double %4, 1.500000e+00
%6 = fmul double %5, 1.500000e+02
%7 = fptoui double %6 to i64
ret i64 %7
}
void TransposeWxH_C() {}


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

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

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

LLVM IR (-O2):
define void @TransposeWxH_C() {
ret void
}
/* Variables and functions */
unsigned int REG_SPI_BASE(unsigned int);
__attribute__((always_)) __attribute__((flatten)) unsigned int
SPI_EXT1(unsigned int i) {
  return (REG_SPI_BASE(i) + 0xf4);
}


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

x86 assembly (clang, -O2):
<SPI_EXT1>:
push   %rax
call   1030 <REG_SPI_BASE@plt>
add    $0xf4,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @SPI_EXT1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @REG_SPI_BASE(i32 %3)
%5 = add i32 %4, 244
ret i32 %5
}

LLVM IR (-O2):
define i32 @SPI_EXT1(i32 %0) {
%2 = tail call i32 @REG_SPI_BASE(i32 %0)
%3 = add i32 %2, 244
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ SonarAltitudeHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void SonarAltitudeRequestUpdate() {
  UAVObjRequestUpdate(SonarAltitudeHandle());
}


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

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

LLVM IR (-O0):
define void @SonarAltitudeRequestUpdate() {
%1 = call i32 (...) @SonarAltitudeHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @SonarAltitudeRequestUpdate() {
%1 = tail call i32 (...) @SonarAltitudeHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void success(const char *msg) { printf(" \e[32m%s\e[0m\n", msg); }


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

x86 assembly (clang, -O2):
<success>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [14 x i8] c" \1B[32m%s\1B[0m\0A\00"
define void @success(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ accept(int /*<<< orphan*/);
scalar_t__ notzero();
bool digit(void) { return accept('0') || notzero(); }


x86 assembly (clang, -O0):
<digit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x30,%edi
call   1040 <accept@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
jne    1155 <digit+0x35>
mov    $0x0,%al
call   1030 <notzero@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<digit>:
push   %rax
mov    $0x30,%edi
call   1040 <accept@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     113a <digit+0x1a>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <notzero@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @digit() {
%1 = call i64 @accept(i32 48)
%2 = icmp ne i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = call i64 (...) @notzero()
%5 = icmp ne i64 %4, 0
br label %6
6: ; preds = %3, %0
%7 = phi i1 [ true, %0 ], [ %5, %3 ]
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @digit() {
%1 = tail call i64 @accept(i32 48)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i64 (...) @notzero()
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 1, %0 ], [ %6, %3 ]
ret i32 %8
}
int __cxa_atexit(void (*destructor)(void *), void *arg, void *dso_handle) {
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @__cxa_atexit(void (i8*)* %0, i8* %1, i8* %2) {
%4 = alloca void (i8*)*
%5 = alloca i8*
%6 = alloca i8*
store void (i8*)* %0, void (i8*)** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @__cxa_atexit(void (i8*)* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ a(int);
void __attribute__((stdcall)) foo(int x) { a(x); }


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

x86 assembly (clang, -O2):
<foo>:
jmp    1030 <a@plt>

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

LLVM IR (-O2):
define void @foo(i32 %0) {
%2 = tail call i32 @a(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_stringlist_deleting();
int /*<<< orphan*/ test_stringlist_inserting();
int /*<<< orphan*/ test_stringlist_inserting_many();
int /*<<< orphan*/ test_stringlist_removing();
int /*<<< orphan*/ tests_show_summary();
int main(void) {
  test_stringlist_inserting();
  test_stringlist_inserting_many();
  test_stringlist_removing();
  test_stringlist_deleting();
  tests_show_summary();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <test_stringlist_inserting@plt>
mov    $0x0,%al
call   1060 <test_stringlist_inserting_many@plt>
mov    $0x0,%al
call   1070 <test_stringlist_removing@plt>
mov    $0x0,%al
call   1040 <test_stringlist_deleting@plt>
mov    $0x0,%al
call   1030 <tests_show_summary@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <test_stringlist_inserting@plt>
xor    %eax,%eax
call   1060 <test_stringlist_inserting_many@plt>
xor    %eax,%eax
call   1070 <test_stringlist_removing@plt>
xor    %eax,%eax
call   1040 <test_stringlist_deleting@plt>
xor    %eax,%eax
call   1030 <tests_show_summary@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_stringlist_inserting()
%3 = call i32 (...) @test_stringlist_inserting_many()
%4 = call i32 (...) @test_stringlist_removing()
%5 = call i32 (...) @test_stringlist_deleting()
%6 = call i32 (...) @tests_show_summary()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_stringlist_inserting()
%2 = tail call i32 (...) @test_stringlist_inserting_many()
%3 = tail call i32 (...) @test_stringlist_removing()
%4 = tail call i32 (...) @test_stringlist_deleting()
%5 = tail call i32 (...) @tests_show_summary()
ret i32 0
}
extern double d1n1n2(double d1, int n1, int n2) { return d1 + n1 + n2; }


x86 assembly (clang, -O0):
<d1n1n2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<d1n1n2>:
cvtsi2sd %edi,%xmm1
addsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %esi,%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @d1n1n2(double %0, i32 %1, i32 %2) {
%4 = alloca double
%5 = alloca i32
%6 = alloca i32
store double %0, double* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load double, double* %4
%8 = load i32, i32* %5
%9 = sitofp i32 %8 to double
%10 = fadd double %7, %9
%11 = load i32, i32* %6
%12 = sitofp i32 %11 to double
%13 = fadd double %10, %12
ret double %13
}

LLVM IR (-O2):
define double @d1n1n2(double %0, i32 %1, i32 %2) {
%4 = sitofp i32 %1 to double
%5 = fadd double %4, %0
%6 = sitofp i32 %2 to double
%7 = fadd double %5, %6
ret double %7
}
unsigned uintlen(unsigned n) {
  unsigned len = 1;
  while (n /= 10) {
    len++;
  }
  return len;
}


x86 assembly (clang, -O0):
<uintlen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1134 <uintlen+0x34>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <uintlen+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uintlen>:
mov    $0x1,%eax
cmp    $0xa,%edi
jb     1134 <uintlen+0x34>
mov    $0x1,%eax
mov    $0xcccccccd,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edi,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
add    $0x1,%eax
cmp    $0x63,%edi
mov    %edx,%edi
ja     1120 <uintlen+0x20>
ret

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

LLVM IR (-O2):
define i32 @uintlen(i32 %0) {
%2 = icmp ult i32 %0, 10
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 1, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = udiv i32 %5, 10
%7 = add i32 %4, 1
%8 = icmp ult i32 %5, 100
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 1, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Type definitions */
struct ListNode {
  int dummy;
};

/* Variables and functions */
struct ListNode *mergeSort(struct ListNode *);
struct ListNode *sortList(struct ListNode *head) {
  return mergeSort(head);
}


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

x86 assembly (clang, -O2):
<sortList>:
jmp    1030 <mergeSort@plt>

LLVM IR (-O0):
%struct.ListNode = type { i32 }
define %struct.ListNode* @sortList(%struct.ListNode* %0) {
%2 = alloca %struct.ListNode*
store %struct.ListNode* %0, %struct.ListNode** %2
%3 = load %struct.ListNode*, %struct.ListNode** %2
%4 = call %struct.ListNode* @mergeSort(%struct.ListNode* %3)
ret %struct.ListNode* %4
}

LLVM IR (-O2):
%struct.ListNode = type { i32 }
define %struct.ListNode* @sortList(%struct.ListNode* %0) {
%2 = tail call %struct.ListNode* @mergeSort(%struct.ListNode* %0)
ret %struct.ListNode* %2
}
int is_valid_uri(const char *uri) {
  return uri[0] == '/' || (uri[0] == '*' && uri[1] == '\0');
}


x86 assembly (clang, -O0):
<is_valid_uri>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x2f,%ecx
mov    %al,-0x9(%rbp)
je     1149 <is_valid_uri+0x49>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x2a,%ecx
mov    %al,-0xa(%rbp)
jne    1143 <is_valid_uri+0x43>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_uri>:
mov    (%rdi),%al
cmp    $0x2f,%al
je     1114 <is_valid_uri+0x14>
cmp    $0x2a,%al
jne    111a <is_valid_uri+0x1a>
xor    %eax,%eax
cmpb   $0x0,0x1(%rdi)
sete   %al
ret
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_valid_uri(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 47
br i1 %7, label %22, label %8
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 42
br i1 %13, label %14, label %20
14: ; preds = %8
%15 = load i8*, i8** %2
%16 = getelementptr inbounds i8, i8* %15, i64 1
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 0
br label %20
20: ; preds = %14, %8
%21 = phi i1 [ false, %8 ], [ %19, %14 ]
br label %22
22: ; preds = %20, %1
%23 = phi i1 [ true, %1 ], [ %21, %20 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @is_valid_uri(i8* nocapture %0) {
%2 = load i8, i8* %0
switch i8 %2, label %8 [
i8 47, label %9
i8 42, label %3
]
3: ; preds = %1
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = zext i1 %6 to i32
br label %9
8: ; preds = %1
br label %9
9: ; preds = %1, %8, %3
%10 = phi i32 [ 1, %1 ], [ %7, %3 ], [ 0, %8 ]
ret i32 %10
}
int get_shifts(unsigned long mask) {
  register int i = 1;
  while (mask >> i)
    i++;
  return i - 1;
}


x86 assembly (clang, -O0):
<get_shifts>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shr    %cl,%rax
cmp    $0x0,%rax
je     1131 <get_shifts+0x31>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <get_shifts+0xf>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_shifts>:
mov    $0x1,%ecx
mov    $0xffffffff,%eax
nopw   0x0(%rax,%rax,1)
mov    %rdi,%rdx
shr    %cl,%rdx
add    $0x1,%rcx
add    $0x1,%eax
test   %rdx,%rdx
jne    1110 <get_shifts+0x10>
ret

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

LLVM IR (-O2):
define i32 @get_shifts(i64 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %6, %2 ], [ 1, %1 ]
%4 = lshr i64 %0, %3
%5 = icmp eq i64 %4, 0
%6 = add nuw i64 %3, 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = trunc i64 %3 to i32
%9 = add nsw i32 %8, -1
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void bgbmid_free(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<bgbmid_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @bgbmid_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ OSReadSwapInt64(int /*<<< orphan*/ *, int /*<<< orphan*/);
uint64_t _OSSwapInt64(uint64_t data) { return OSReadSwapInt64(&data, 0); }


x86 assembly (clang, -O0):
<_OSSwapInt64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
xor    %esi,%esi
call   1030 <OSReadSwapInt64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_OSSwapInt64>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
xor    %esi,%esi
call   1030 <OSReadSwapInt64@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @_OSSwapInt64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @OSReadSwapInt64(i32* %2, i32 0)
ret i32 %3
}

LLVM IR (-O2):
define i32 @_OSSwapInt64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @OSReadSwapInt64(i32* %2, i32 0)
ret i32 %3
}
int main() {
  int i = 0;
  while (i < 10) {
    i = i + 1;
    if (i == 5) {
      i = 10;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    113b <main+0x3b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jne    1136 <main+0x36>
movl   $0xa,-0x8(%rbp)
jmp    1112 <main+0x12>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int base64_stream_decode(char const *const, size_t, char *const, size_t *);
int /*<<< orphan*/ base64_stream_decode_init();
int base64_decode(const char *const src, size_t srclen, char *const out,
                  size_t *outlen) {
  base64_stream_decode_init();
  return base64_stream_decode(src, srclen, out, outlen);
}


x86 assembly (clang, -O0):
<base64_decode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x0,%al
call   1030 <base64_stream_decode_init@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1040 <base64_stream_decode@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<base64_decode>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <base64_stream_decode_init@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <base64_stream_decode@plt>

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

LLVM IR (-O2):
define i32 @base64_decode(i8* %0, i64 %1, i8* %2, i64* %3) {
%5 = tail call i32 (...) @base64_stream_decode_init()
%6 = tail call i32 @base64_stream_decode(i8* %0, i64 %1, i8* %2, i64* %3)
ret i32 %6
}
void foo3f() {}


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

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

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

LLVM IR (-O2):
define void @foo3f() {
ret void
}
int right(int i) { return ((i + 1) << 1); }


x86 assembly (clang, -O0):
<right>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
shl    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<right>:
lea    (%rdi,%rdi,1),%eax
add    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @right(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
%5 = shl i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @right(i32 %0) {
%2 = shl i32 %0, 1
%3 = add i32 %2, 2
ret i32 %3
}
int rom_adddirty(char *filename) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @rom_adddirty(i8* nocapture readnone %0) {
ret i32 0
}
char *um(void) { return "um"; }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"um\00"
define i8* @um() {
ret i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
}
void gtk_icon_source_get_state_wildcarded() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_source_get_state_wildcarded() {
ret void
}
/* Variables and functions */
int is_prime(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, prime;
  printf("Enter number: \n");
  scanf("%d", &n);
  prime = is_prime(n);
  if (prime == 1) {
    printf("1");
  } else {
    printf("0");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <is_prime@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1181 <main+0x51>
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
jmp    118d <main+0x5d>
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xebb(%rip),%rdi
call   1040 <puts@plt>
lea    0xeac(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%edi
call   1050 <is_prime@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
or     $0x30,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [15 x i8] c"Enter number: \00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 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 i32 @is_prime(i32 %5)
%7 = icmp eq i32 %6, 1
%8 = select i1 %7, i32 49, i32 48
%9 = call i32 @putchar(i32 %8)
ret i32 0
}
int f_gt_rr2(float a1, float a2) { return !(((a1) > (a2))); }


x86 assembly (clang, -O0):
<f_gt_rr2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
seta   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_gt_rr2>:
xor    %eax,%eax
ucomiss %xmm1,%xmm0
setbe  %al
ret

LLVM IR (-O0):
define i32 @f_gt_rr2(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp ogt float %5, %6
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @f_gt_rr2(float %0, float %1) {
%3 = fcmp ule float %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ det_fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_err_header(void) {
  det_fprintf(stderr, "\n");
  det_fprintf(stderr, "\x1b[36m"
                      "\x1b[41m"
                      "ATTENTION:"
                      "\x1b[0m"
                      "\n");
}


x86 assembly (clang, -O0):
<print_err_header>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xef4(%rip),%rsi
call   1030 <det_fprintf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1030 <det_fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_err_header>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xef7(%rip),%rsi
call   1030 <det_fprintf@plt>
mov    (%rbx),%edi
lea    0xed1(%rip),%rsi
pop    %rbx
jmp    1030 <det_fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
@.str.1 = [26 x i8] c"\1B[36m\1B[41mATTENTION:\1B[0m\0A\00"
define void @print_err_header() {
%1 = load i32, i32* @stderr
%2 = call i32 @det_fprintf(i32 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @det_fprintf(i32 %3, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
@.str.1 = [26 x i8] c"\1B[36m\1B[41mATTENTION:\1B[0m\0A\00"
define void @print_err_header() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @det_fprintf(i32 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @det_fprintf(i32 %3, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int add(int i, int j) {
  int a = i + j;
  return (a);
}


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

x86 assembly (clang, -O2):
<add>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int64_t sky_timestamp_to_seconds(int64_t value) { return (value >> 20); }


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

x86 assembly (clang, -O2):
<sky_timestamp_to_seconds>:
mov    %edi,%eax
sar    $0x14,%eax
ret

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

LLVM IR (-O2):
define i32 @sky_timestamp_to_seconds(i32 %0) {
%2 = ashr i32 %0, 20
ret i32 %2
}
double _scale_val(double val, double oldlo, double oldhi, double newlo,
                  double newhi) {
  val -= oldlo;
  val *= (newhi - newlo) / (oldhi - oldlo);
  val += newlo;
  return val;
}


x86 assembly (clang, -O0):
<_scale_val>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x20(%rbp),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_scale_val>:
subsd  %xmm1,%xmm0
subsd  %xmm3,%xmm4
subsd  %xmm1,%xmm2
divsd  %xmm2,%xmm4
mulsd  %xmm4,%xmm0
addsd  %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @_scale_val(double %0, double %1, double %2, double %3, double %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%11 = load double, double* %7
%12 = load double, double* %6
%13 = fsub double %12, %11
store double %13, double* %6
%14 = load double, double* %10
%15 = load double, double* %9
%16 = fsub double %14, %15
%17 = load double, double* %8
%18 = load double, double* %7
%19 = fsub double %17, %18
%20 = fdiv double %16, %19
%21 = load double, double* %6
%22 = fmul double %21, %20
store double %22, double* %6
%23 = load double, double* %9
%24 = load double, double* %6
%25 = fadd double %24, %23
store double %25, double* %6
%26 = load double, double* %6
ret double %26
}

LLVM IR (-O2):
define double @_scale_val(double %0, double %1, double %2, double %3, double %4) {
%6 = fsub double %0, %1
%7 = fsub double %4, %3
%8 = fsub double %2, %1
%9 = fdiv double %7, %8
%10 = fmul double %6, %9
%11 = fadd double %10, %3
ret double %11
}
/* Variables and functions */
scalar_t__ _replace_buffer(unsigned char *);
unsigned char *_set_buffer(char *);
int /*<<< orphan*/ _shift2euc(unsigned char *, unsigned char *);
char *toStringEUC(char *str) {
  unsigned char *buf;
  buf = _set_buffer(str);
  _shift2euc((unsigned char *)str, buf);
  return (char *)_replace_buffer(buf);
}


x86 assembly (clang, -O0):
<toStringEUC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <_set_buffer@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <_shift2euc@plt>
mov    -0x10(%rbp),%rdi
call   1040 <_replace_buffer@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toStringEUC>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <_set_buffer@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1030 <_shift2euc@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <_replace_buffer@plt>

LLVM IR (-O0):
define i8* @toStringEUC(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @_set_buffer(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %2
%7 = load i8*, i8** %3
%8 = call i32 @_shift2euc(i8* %6, i8* %7)
%9 = load i8*, i8** %3
%10 = call i64 @_replace_buffer(i8* %9)
%11 = inttoptr i64 %10 to i8*
ret i8* %11
}

LLVM IR (-O2):
define i8* @toStringEUC(i8* %0) {
%2 = tail call i8* @_set_buffer(i8* %0)
%3 = tail call i32 @_shift2euc(i8* %0, i8* %2)
%4 = tail call i64 @_replace_buffer(i8* %2)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}