xunge/DecIR huggingface dataset:
void mirror_x(unsigned char *bitmap) {
  int c;
  int d;
  int v;
  for (c = 0; c < 8; c++) {
    v = 0;
    for (d = 0; d < 8; d++)
      v |= ((bitmap[c] >> d) & 1) << (7 - d);
    bitmap[c] = v;
  }
}


x86 assembly (clang, -O0):
<mirror_x>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    1181 <mirror_x+0x81>
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x8,-0x10(%rbp)
jge    1163 <mirror_x+0x63>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
mov    $0x7,%ecx
sub    -0x10(%rbp),%ecx
shl    %cl,%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1127 <mirror_x+0x27>
mov    -0x14(%rbp),%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <mirror_x+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mirror_x>:
movq   (%rdi),%xmm0
movdqa %xmm0,%xmm1
psrlw  $0x4,%xmm1
movdqa 0xeeb(%rip),%xmm2
pand   %xmm2,%xmm1
pand   %xmm2,%xmm0
psllw  $0x4,%xmm0
por    %xmm1,%xmm0
movdqa %xmm0,%xmm1
psrlw  $0x2,%xmm1
movdqa 0xed9(%rip),%xmm2
pand   %xmm2,%xmm1
pand   %xmm2,%xmm0
psllw  $0x2,%xmm0
por    %xmm1,%xmm0
movdqa %xmm0,%xmm1
psrlw  $0x1,%xmm1
movdqa 0xec7(%rip),%xmm2
pand   %xmm2,%xmm1
pand   %xmm2,%xmm0
paddb  %xmm0,%xmm0
por    %xmm1,%xmm0
movq   %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @mirror_x(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %6
6: ; preds = %38, %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 8
br i1 %8, label %9, label %41
9: ; preds = %6
store i32 0, i32* %5
store i32 0, i32* %4
br label %10
10: ; preds = %28, %9
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 8
br i1 %12, label %13, label %31
13: ; preds = %10
%14 = load i8*, i8** %2
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = load i32, i32* %4
%21 = ashr i32 %19, %20
%22 = and i32 %21, 1
%23 = load i32, i32* %4
%24 = sub nsw i32 7, %23
%25 = shl i32 %22, %24
%26 = load i32, i32* %5
%27 = or i32 %26, %25
store i32 %27, i32* %5
br label %28
28: ; preds = %13
%29 = load i32, i32* %4
%30 = add nsw i32 %29, 1
store i32 %30, i32* %4
br label %10
31: ; preds = %10
%32 = load i32, i32* %5
%33 = trunc i32 %32 to i8
%34 = load i8*, i8** %2
%35 = load i32, i32* %3
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i8, i8* %34, i64 %36
store i8 %33, i8* %37
br label %38
38: ; preds = %31
%39 = load i32, i32* %3
%40 = add nsw i32 %39, 1
store i32 %40, i32* %3
br label %6
41: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @mirror_x(i8* nocapture %0) {
%2 = bitcast i8* %0 to <8 x i8>*
%3 = load <8 x i8>, <8 x i8>* %2
%4 = call <8 x i8> @llvm.bitreverse.v8i8(<8 x i8> %3)
%5 = bitcast i8* %0 to <8 x i8>*
store <8 x i8> %4, <8 x i8>* %5
ret void
}
void swap(long long int *m, long long int *n) {
  long long int temp = *m;
  *m = *n;
  *n = temp;
}


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

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
mov    %rcx,(%rdi)
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @swap(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca i64
store i64* %0, i64** %3
store i64* %1, i64** %4
%6 = load i64*, i64** %3
%7 = load i64, i64* %6
store i64 %7, i64* %5
%8 = load i64*, i64** %4
%9 = load i64, i64* %8
%10 = load i64*, i64** %3
store i64 %9, i64* %10
%11 = load i64, i64* %5
%12 = load i64*, i64** %4
store i64 %11, i64* %12
ret void
}

LLVM IR (-O2):
define void @swap(i64* nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %0
%4 = load i64, i64* %1
store i64 %4, i64* %0
store i64 %3, i64* %1
ret void
}
double fd(double x) { return x * x; }


x86 assembly (clang, -O0):
<fd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd>:
mulsd  %xmm0,%xmm0
ret

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

LLVM IR (-O2):
define double @fd(double %0) {
%2 = fmul double %0, %0
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void render_nop(uint8_t *vram_ptr, int beam_to) {
  (void)vram_ptr;
  (void)beam_to;
}


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

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

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

LLVM IR (-O2):
define void @render_nop(i32* nocapture %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_packs_pi32(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test_mm_packs_pi32(__m64 a, __m64 b) { return _mm_packs_pi32(a, b); }


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

x86 assembly (clang, -O2):
<test_mm_packs_pi32>:
jmp    1030 <_mm_packs_pi32@plt>

LLVM IR (-O0):
define i32 @test_mm_packs_pi32(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 = call i32 @_mm_packs_pi32(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_packs_pi32(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_packs_pi32(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ init_hires_timer();
void INIT_HIRES_TIMER() { init_hires_timer(); }


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

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

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

LLVM IR (-O2):
define void @INIT_HIRES_TIMER() {
%1 = tail call i32 (...) @init_hires_timer()
ret void
}
void foo547(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo547(i32 %0) {
ret void
}
/* Variables and functions */
int __readonly_area(const void *ptr, size_t size) { return 1; }


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

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

LLVM IR (-O0):
define i32 @__readonly_area(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
ret i32 1
}

LLVM IR (-O2):
define i32 @__readonly_area(i8* nocapture readnone %0, i64 %1) {
ret i32 1
}
void bound_error_nested() {
  int a[3][4][5];
  a[4][3][2] = 0;
}


x86 assembly (clang, -O0):
<bound_error_nested>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,0x94(%rbp)
add    $0x70,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @bound_error_nested() {
%1 = alloca [3 x [4 x [5 x i32]]]
%2 = getelementptr inbounds [3 x [4 x [5 x i32]]], [3 x [4 x [5 x i32]]]* %1, i64 0, i64 4
%3 = getelementptr inbounds [4 x [5 x i32]], [4 x [5 x i32]]* %2, i64 0, i64 3
%4 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 2
store i32 0, i32* %4
ret void
}

LLVM IR (-O2):
define void @bound_error_nested() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ divmodk(unsigned long long, unsigned long long,
                           unsigned long long *);
int /*<<< orphan*/ printk(char *, unsigned long long, unsigned long long);
unsigned long long modk(unsigned long long num, unsigned long long den) {
  printk("%d,%d\n", num, den);
  unsigned long long v;
  (void)divmodk(num, den, &v);
  return v;
}


x86 assembly (clang, -O0):
<modk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xec1(%rip),%rdi
call   1030 <printk@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <divmodk@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<modk>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <printk@plt>
mov    %rsp,%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <divmodk@plt>
mov    (%rsp),%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d,%d\0A\00"
define i64 @modk(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i32 @printk(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64 %6, i64 %7)
%9 = load i64, i64* %3
%10 = load i64, i64* %4
%11 = call i32 @divmodk(i64 %9, i64 %10, i64* %5)
%12 = load i64, i64* %5
ret i64 %12
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d,%d\0A\00"
define i64 @modk(i64 %0, i64 %1) {
%3 = alloca i64
%4 = tail call i32 @printk(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %1)
%5 = bitcast i64* %3 to i8*
%6 = call i32 @divmodk(i64 %0, i64 %1, i64* %3)
%7 = load i64, i64* %3
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 6;
  printf("Hello Rasp!  A = %d", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x6,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%rip),%rdi
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    $0x6,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [20 x i8] c"Hello Rasp! A = %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *binname) {
  printf("Usage: %s [-d <dir>] [outfile]\n", binname);
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Usage: %s [-d <dir>] [outfile]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [32 x i8] c"Usage: %s [-d <dir>] [outfile]\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 -1)
unreachable
}
char *XResourceManagerString() {}


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

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

LLVM IR (-O0):
define i8* @XResourceManagerString() {
%1 = alloca i8*
%2 = load i8*, i8** %1
ret i8* %2
}

LLVM IR (-O2):
define noalias i8* @XResourceManagerString() {
ret i8* undef
}
/* Type definitions */
typedef int uint8_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
void USBHostLPMResume(uint32_t ui32Base) {
  ;
  (*((volatile uint8_t *)(ui32Base + 0x00000362))) |= 0x00000002;
}


x86 assembly (clang, -O0):
<USBHostLPMResume>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x362(%rax),%ecx
or     $0x2,%ecx
mov    %ecx,0x362(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBHostLPMResume>:
orl    $0x2,0x362(%rdi)
ret

LLVM IR (-O0):
define void @USBHostLPMResume(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 866
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = or i32 %6, 2
store volatile i32 %7, i32* %5
ret void
}

LLVM IR (-O2):
define void @USBHostLPMResume(i64 %0) {
%2 = add nsw i64 %0, 866
%3 = inttoptr i64 %2 to i32*
%4 = load volatile i32, i32* %3
%5 = or i32 %4, 2
store volatile i32 %5, i32* %3
ret void
}
char *_add(const char *str, char *pt, const char *const ptlim) {
  while (pt < ptlim && (*pt = *str++) != '\0')
    ++pt;
  return pt;
}


x86 assembly (clang, -O0):
<_add>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
cmp    -0x18(%rbp),%rcx
mov    %al,-0x19(%rbp)
jae    1146 <_add+0x46>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    -0x10(%rbp),%rcx
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1156 <_add+0x56>
jmp    1167 <_add+0x67>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <_add+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_add>:
mov    %rsi,%rax
cmp    %rdx,%rsi
jae    112b <_add+0x2b>
mov    %rdx,%r8
sub    %rax,%r8
xor    %esi,%esi
movzbl (%rdi,%rsi,1),%ecx
mov    %cl,(%rax,%rsi,1)
test   %cl,%cl
je     1128 <_add+0x28>
add    $0x1,%rsi
cmp    %rsi,%r8
jne    1110 <_add+0x10>
mov    %rdx,%rax
ret
add    %rsi,%rax
ret

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

LLVM IR (-O2):
define i8* @_add(i8* nocapture %0, i8* writeonly %1, i8* readnone %2) {
%4 = icmp ult i8* %1, %2
br i1 %4, label %5, label %19
5: ; preds = %3
%6 = ptrtoint i8* %2 to i64
%7 = ptrtoint i8* %1 to i64
%8 = sub i64 %6, %7
%9 = getelementptr i8, i8* %1, i64 %8
br label %10
10: ; preds = %5, %15
%11 = phi i8* [ %16, %15 ], [ %0, %5 ]
%12 = phi i8* [ %17, %15 ], [ %1, %5 ]
%13 = load i8, i8* %11
store i8 %13, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %19, label %15
15: ; preds = %10
%16 = getelementptr inbounds i8, i8* %11, i64 1
%17 = getelementptr inbounds i8, i8* %12, i64 1
%18 = icmp eq i8* %17, %9
br i1 %18, label %19, label %10
19: ; preds = %10, %15, %3
%20 = phi i8* [ %1, %3 ], [ %9, %15 ], [ %12, %10 ]
ret i8* %20
}
unsigned fmsynth_get_version(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @fmsynth_get_version() {
ret i32 1
}

LLVM IR (-O2):
define i32 @fmsynth_get_version() {
ret i32 1
}
int get_hashValue(char *s) {
  long value = 0;
  for (int i = 0; *(s + i) != '\0'; i++)
    value = value + *(s + i);
  int key = (int)value % 96;
  return key;
}


x86 assembly (clang, -O0):
<get_hashValue>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1152 <get_hashValue+0x52>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movsbq (%rcx,%rdx,1),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <get_hashValue+0x17>
mov    -0x10(%rbp),%rax
mov    $0x60,%ecx
cltd
idiv   %ecx
mov    %edx,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_hashValue>:
mov    (%rdi),%al
test   %al,%al
je     1142 <get_hashValue+0x42>
add    $0x1,%rdi
xor    %ecx,%ecx
nopl   0x0(%rax)
movsbq %al,%rax
add    %rax,%rcx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <get_hashValue+0x10>
movslq %ecx,%rax
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x24,%rcx
add    %edx,%ecx
shl    $0x5,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @get_hashValue(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %7, label %9
4: ; preds = %9
%5 = trunc i64 %14 to i32
%6 = srem i32 %5, 96
br label %7
7: ; preds = %4, %1
%8 = phi i32 [ 0, %1 ], [ %6, %4 ]
ret i32 %8
9: ; preds = %1, %9
%10 = phi i64 [ %15, %9 ], [ 0, %1 ]
%11 = phi i8 [ %17, %9 ], [ %2, %1 ]
%12 = phi i64 [ %14, %9 ], [ 0, %1 ]
%13 = sext i8 %11 to i64
%14 = add nsw i64 %12, %13
%15 = add nuw nsw i64 %10, 1
%16 = getelementptr inbounds i8, i8* %0, i64 %15
%17 = load i8, i8* %16
%18 = icmp eq i8 %17, 0
br i1 %18, label %4, label %9
}
int update_hash1(int h, int c) {
  return ((h << ((21 + (3 - 1)) / 3)) + c) & ((1 << 21) - 1);
}


x86 assembly (clang, -O0):
<update_hash1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x7,%eax
add    -0x8(%rbp),%eax
and    $0x1fffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_hash1>:
shl    $0x7,%edi
lea    (%rdi,%rsi,1),%eax
and    $0x1fffff,%eax
ret

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

LLVM IR (-O2):
define i32 @update_hash1(i32 %0, i32 %1) {
%3 = shl i32 %0, 7
%4 = add nsw i32 %3, %1
%5 = and i32 %4, 2097151
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t reglib_min(uint32_t a, uint32_t b) { return (a > b) ? b : a; }


x86 assembly (clang, -O0):
<reglib_min>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1127 <reglib_min+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <reglib_min+0x2f>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reglib_min>:
mov    %rdi,%rax
cmp    %rsi,%rdi
cmovg  %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @reglib_min(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %1, i64 %0
ret i64 %4
}
/* Type definitions */
struct backing_dev_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bdi_update_bandwidth(struct backing_dev_info *,
                                        int /*<<< orphan*/, int /*<<< orphan*/,
                                        int /*<<< orphan*/, unsigned long);
void bdi_update_write_bandwidth(struct backing_dev_info *bdi,
                                unsigned long start_time) {
  bdi_update_bandwidth(bdi, 0, 0, 0, start_time);
}


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

x86 assembly (clang, -O2):
<bdi_update_write_bandwidth>:
mov    %rsi,%r8
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <bdi_update_bandwidth@plt>

LLVM IR (-O0):
%struct.backing_dev_info = type { i32 }
define void @bdi_update_write_bandwidth(%struct.backing_dev_info* %0, i64 %1) {
%3 = alloca %struct.backing_dev_info*
%4 = alloca i64
store %struct.backing_dev_info* %0, %struct.backing_dev_info** %3
store i64 %1, i64* %4
%5 = load %struct.backing_dev_info*, %struct.backing_dev_info** %3
%6 = load i64, i64* %4
%7 = call i32 @bdi_update_bandwidth(%struct.backing_dev_info* %5, i32 0, i32 0, i32 0, i64 %6)
ret void
}

LLVM IR (-O2):
%struct.backing_dev_info = type { i32 }
define void @bdi_update_write_bandwidth(%struct.backing_dev_info* %0, i64 %1) {
%3 = tail call i32 @bdi_update_bandwidth(%struct.backing_dev_info* %0, i32 0, i32 0, i32 0, i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int print_usage() {
  printf(" Usage: asp_data [options]\n");
  printf(" Option:\n");
  printf(" \t[ -s <vector size> ] (default: %d)\n", 1024);
  return 1;
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
mov    $0x400,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
lea    0xefe(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0d(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
mov    $0x400,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c" Usage: asp_data [options]\0A\00"
@.str.1 = [10 x i8] c" Option:\0A\00"
@.str.2 = [38 x i8] c" \09[ -s <vector size> ] (default: %d)\0A\00"
define i32 @print_usage() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 1024)
ret i32 1
}

LLVM IR (-O2):
@.str.2 = [38 x i8] c" \09[ -s <vector size> ] (default: %d)\0A\00"
@str = [27 x i8] c" Usage: asp_data [options]\00"
@str.3 = [9 x i8] c" Option:\00"
define i32 @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 1024)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void DMA2_Stream3_IRQHandler() { default_handler(); }


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

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

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

LLVM IR (-O2):
define weak void @DMA2_Stream3_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
unsigned long long fibo(int n) {
  if (n <= 2)
    return 1;
  return fibo(n - 1) + fibo(n - 2);
}


x86 assembly (clang, -O0):
<fibo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jg     1132 <fibo+0x22>
movq   $0x1,-0x8(%rbp)
jmp    115a <fibo+0x4a>
mov    -0xc(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibo@plt>
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibo@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibo>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%r14d
cmp    $0x3,%edi
jl     1147 <fibo+0x37>
mov    %edi,%ebx
add    $0x2,%ebx
xor    %r14d,%r14d
nopw   0x0(%rax,%rax,1)
lea    -0x3(%rbx),%edi
call   1030 <fibo@plt>
add    %rax,%r14
add    $0xfffffffe,%ebx
cmp    $0x4,%ebx
ja     1130 <fibo+0x20>
add    $0x1,%r14
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @fibo(i32 %0) {
%2 = icmp slt i32 %0, 3
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i64 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i64 @fibo(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add i64 %7, %5
%10 = icmp ult i32 %4, 5
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = add i64 %9, 1
br label %13
13: ; preds = %11, %1
%14 = phi i64 [ 1, %1 ], [ %12, %11 ]
ret i64 %14
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
int main() {
  int e = 1;
  foo(e);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  printf("%d%d%d\n", n % 10, n / 10 % 10, n / 100);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    -0xc(%rbp),%edx
mov    %eax,%ecx
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0x4(%rsp),%rax
imul   $0x66666667,%rax,%rdx
mov    %rdx,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rdx
add    %ecx,%edx
lea    (%rdx,%rdx,1),%ecx
lea    (%rcx,%rcx,4),%edi
imul   $0x51eb851f,%rax,%rcx
mov    %eax,%esi
sub    %edi,%esi
movslq %edx,%rdx
imul   $0x66666667,%rdx,%rax
mov    %rax,%rdi
shr    $0x3f,%rdi
sar    $0x22,%rax
add    %edi,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%edx
mov    %rcx,%rax
shr    $0x3f,%rax
sar    $0x25,%rcx
add    %eax,%ecx
lea    0xe75(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [8 x i8] c"%d%d%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = srem i32 %4, 10
%6 = load i32, i32* %2
%7 = sdiv i32 %6, 10
%8 = srem i32 %7, 10
%9 = load i32, i32* %2
%10 = sdiv i32 %9, 100
%11 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %8, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [8 x i8] c"%d%d%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = srem i32 %4, 10
%6 = sdiv i32 %4, 10
%7 = srem i32 %6, 10
%8 = sdiv i32 %4, 100
%9 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %7, i32 %8)
ret i32 0
}
int execute_clock_gettime() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_clock_gettime() {
ret i32 0
}
void foo598(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo598(i32 %0) {
ret void
}
/* Variables and functions */
void *av_realloc(void *, unsigned int);
void *av_fast_realloc(void *ptr, unsigned int *size, unsigned int min_size) {
  if (min_size < *size)
    return ptr;
  *size = min_size + 10 * 1024;
  return av_realloc(ptr, *size);
}


x86 assembly (clang, -O0):
<av_fast_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jae    113f <av_fast_realloc+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1161 <av_fast_realloc+0x51>
mov    -0x1c(%rbp),%ecx
add    $0x2800,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
call   1030 <av_realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_fast_realloc>:
cmp    %edx,(%rsi)
jbe    1118 <av_fast_realloc+0x8>
mov    %rdi,%rax
ret
add    $0x2800,%edx
mov    %edx,(%rsi)
mov    %edx,%esi
jmp    1030 <av_realloc@plt>

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

LLVM IR (-O2):
define i8* @av_fast_realloc(i8* %0, i32* nocapture %1, i32 %2) {
%4 = load i32, i32* %1
%5 = icmp ugt i32 %4, %2
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = add i32 %2, 10240
store i32 %7, i32* %1
%8 = tail call i8* @av_realloc(i8* %0, i32 %7)
br label %9
9: ; preds = %3, %6
%10 = phi i8* [ %8, %6 ], [ %0, %3 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
__attribute__((always_)) void tu_move(int y, int x) {
  printf("\x1b[%d;%dH", y + 1, x + 1);
}


x86 assembly (clang, -O0):
<tu_move>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
add    $0x1,%esi
mov    -0x8(%rbp),%edx
add    $0x1,%edx
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tu_move>:
lea    0x1(%rdi),%eax
lea    0x1(%rsi),%edx
lea    0xee3(%rip),%rdi
mov    %eax,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"\1B[%d;%dH\00"
define void @tu_move(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 = add nsw i32 %5, 1
%7 = load i32, i32* %4
%8 = add nsw i32 %7, 1
%9 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[%d;%dH\00"
define void @tu_move(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 1
%4 = add nsw i32 %1, 1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
ret void
}
double stat_fmin2(double a, double b) { return (a < b) ? a : b; }


x86 assembly (clang, -O0):
<stat_fmin2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <stat_fmin2+0x31>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    113b <stat_fmin2+0x3b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<stat_fmin2>:
minsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @stat_fmin2(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp olt double %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load double, double* %3
br label %12
10: ; preds = %2
%11 = load double, double* %4
br label %12
12: ; preds = %10, %8
%13 = phi double [ %9, %8 ], [ %11, %10 ]
ret double %13
}

LLVM IR (-O2):
define double @stat_fmin2(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
scalar_t__ close(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void socket_close(int server) {
  if (close(server) < 0) {
    perror("close() failed.");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<socket_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
cmp    $0x0,%rax
jge    1167 <socket_close+0x37>
lea    0xeac(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_close>:
push   %rax
call   1030 <close@plt>
test   %rax,%rax
js     113d <socket_close+0xd>
pop    %rax
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"close() failed.\00"
@EXIT_FAILURE = global i32 0
define void @socket_close(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @close(i32 %3)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = call i32 @exit(i32 %8)
unreachable
10: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"close() failed.\00"
@EXIT_FAILURE = global i32 0
define void @socket_close(i32 %0) {
%2 = tail call i64 @close(i32 %0)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret void
}
void XChangeActivePointerGrab() {}


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

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

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

LLVM IR (-O2):
define void @XChangeActivePointerGrab() {
ret void
}
/* Type definitions */
struct __test_metadata {
  int dummy;
};
struct __fixture_variant_metadata {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ epoll41(struct __test_metadata *);
void wrapper_epoll41(struct __test_metadata *_metadata,
                     struct __fixture_variant_metadata *variant) {
  epoll41(_metadata);
}


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

x86 assembly (clang, -O2):
<wrapper_epoll41>:
jmp    1030 <epoll41@plt>

LLVM IR (-O0):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll41(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* %1) {
%3 = alloca %struct.__test_metadata*
%4 = alloca %struct.__fixture_variant_metadata*
store %struct.__test_metadata* %0, %struct.__test_metadata** %3
store %struct.__fixture_variant_metadata* %1, %struct.__fixture_variant_metadata** %4
%5 = load %struct.__test_metadata*, %struct.__test_metadata** %3
%6 = call i32 @epoll41(%struct.__test_metadata* %5)
ret void
}

LLVM IR (-O2):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll41(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* nocapture readnone %1) {
%3 = tail call i32 @epoll41(%struct.__test_metadata* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ squeeze(char *, char *);
int main() {
  char s1[] = "Hello, world!\"";
  char s2[] = "lw,o\"";
  squeeze(s1, s2);
  printf("%s\n", s1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x13(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0xb(%rbp)
mov    0xec2(%rip),%ax
mov    %ax,-0x7(%rbp)
mov    0xeba(%rip),%al
mov    %al,-0x5(%rbp)
mov    0xeb2(%rip),%eax
mov    %eax,-0x19(%rbp)
mov    0xeac(%rip),%ax
mov    %ax,-0x15(%rbp)
lea    -0x13(%rbp),%rdi
lea    -0x19(%rbp),%rsi
call   1030 <squeeze@plt>
lea    -0x13(%rbp),%rsi
lea    0xe92(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movabs $0x2221646c726f77,%rax
mov    %rax,0x17(%rsp)
movabs $0x77202c6f6c6c6548,%rax
2c 20 77
mov    %rax,0x10(%rsp)
movw   $0x22,0xc(%rsp)
movl   $0x6f2c776c,0x8(%rsp)
6f
lea    0x10(%rsp),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <squeeze@plt>
lea    0xeaa(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.s1 = [15 x i8] c"Hello, world!\22\00"
@__const.main.s2 = [6 x i8] c"lw,o\22\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [15 x i8]
%3 = alloca [6 x i8]
store i32 0, i32* %1
%4 = bitcast [15 x i8]* %2 to i8*
%5 = bitcast [6 x i8]* %3 to i8*
%6 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%8 = call i32 @squeeze(i8* %6, i8* %7)
%9 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s1 = [15 x i8] c"Hello, world!\22\00"
@__const.main.s2 = [6 x i8] c"lw,o\22\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [15 x i8]
%2 = alloca [6 x i8]
%3 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%5 = call i32 @squeeze(i8* %3, i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
int __ffsdi2(long long i) {
  int b;
  if (i == 0)
    return 0;
  for (b = 1; !(i & 1); ++b)
    i = (unsigned long long)i >> 1;
  return b;
}


x86 assembly (clang, -O0):
<__ffsdi2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <__ffsdi2+0x1f>
movl   $0x0,-0x4(%rbp)
jmp    1164 <__ffsdi2+0x64>
movl   $0x1,-0x14(%rbp)
mov    -0x10(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1144 <__ffsdi2+0x44>
jmp    115e <__ffsdi2+0x5e>
mov    -0x10(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <__ffsdi2+0x26>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ffsdi2>:
test   %rdi,%rdi
je     1130 <__ffsdi2+0x30>
mov    $0x1,%eax
test   $0x1,%dil
jne    112f <__ffsdi2+0x2f>
mov    $0x1,%eax
mov    %rdi,%rcx
nopl   0x0(%rax,%rax,1)
shr    %rcx
add    $0x1,%eax
test   $0x2,%dil
mov    %rcx,%rdi
je     1120 <__ffsdi2+0x20>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @__ffsdi2(i64 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %22
8: ; preds = %1
store i32 1, i32* %4
br label %9
9: ; preds = %17, %8
%10 = load i64, i64* %3
%11 = and i64 %10, 1
%12 = icmp ne i64 %11, 0
%13 = xor i1 %12, true
br i1 %13, label %14, label %20
14: ; preds = %9
%15 = load i64, i64* %3
%16 = lshr i64 %15, 1
store i64 %16, i64* %3
br label %17
17: ; preds = %14
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
store i32 %19, i32* %4
br label %9
20: ; preds = %9
%21 = load i32, i32* %4
store i32 %21, i32* %2
br label %22
22: ; preds = %20, %7
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @__ffsdi2(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = and i64 %0, 1
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %3, %6
%7 = phi i32 [ %10, %6 ], [ 1, %3 ]
%8 = phi i64 [ %9, %6 ], [ %0, %3 ]
%9 = lshr i64 %8, 1
%10 = add nuw nsw i32 %7, 1
%11 = and i64 %8, 2
%12 = icmp eq i64 %11, 0
br i1 %12, label %6, label %13
13: ; preds = %6, %3, %1
%14 = phi i32 [ 0, %1 ], [ 1, %3 ], [ %10, %6 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int unquote(int, char *);
int unquote2(char *);
int main(void) {
  printf("Result is %d \n", unquote(7, "a + 5 > 20"));
  printf("Result is %d \n", unquote2("7 + 5 > 20"));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x7,%edi
lea    0xec4(%rip),%rsi
call   1050 <unquote@plt>
mov    %eax,%esi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb5(%rip),%rdi
call   1040 <unquote2@plt>
mov    %eax,%esi
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed7(%rip),%rsi
mov    $0x7,%edi
call   1050 <unquote@plt>
lea    0xeb7(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
call   1040 <unquote2@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Result is %d \0A\00"
@.str.1 = [11 x i8] c"a + 5 > 20\00"
@.str.2 = [11 x i8] c"7 + 5 > 20\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @unquote(i32 7, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 @unquote2(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Result is %d \0A\00"
@.str.1 = [11 x i8] c"a + 5 > 20\00"
@.str.2 = [11 x i8] c"7 + 5 > 20\00"
define i32 @main() {
%1 = tail call i32 @unquote(i32 7, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @unquote2(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
float area(width, height)
float width;
float height;
{ return (width * height); }


x86 assembly (clang, -O0):
<area>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm1,-0x10(%rbp)
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<area>:
cvtsd2ss %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
mulss  %xmm2,%xmm0
ret

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

LLVM IR (-O2):
define float @area(double %0, double %1) {
%3 = fptrunc double %0 to float
%4 = fptrunc double %1 to float
%5 = fmul float %3, %4
ret float %5
}