xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ breakpoint3();
int /*<<< orphan*/ f();
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int main(void) {
  int ret = 42;
  breakpoint3();
  while (1) {
    f();
    fflush(stdout);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2a,-0x8(%rbp)
mov    $0x0,%al
call   1040 <breakpoint3@plt>
mov    $0x0,%al
call   1030 <f@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
jmp    114d <main+0x1d>

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <breakpoint3@plt>
mov    0x2ea1(%rip),%rbx
nop
xor    %eax,%eax
call   1030 <f@plt>
mov    (%rbx),%edi
call   1050 <fflush@plt>
jmp    1140 <main+0x10>

LLVM IR (-O0):
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 42, i32* %2
%3 = call i32 (...) @breakpoint3()
br label %4
4: ; preds = %0, %4
%5 = call i32 (...) @f()
%6 = load i32, i32* @stdout
%7 = call i32 @fflush(i32 %6)
br label %4
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @breakpoint3()
br label %2
2: ; preds = %2, %0
%3 = tail call i32 (...) @f()
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
br label %2
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int dopr(char *, size_t, char const *, int /*<<< orphan*/);
int rep_vsnprintf(char *str, size_t count, const char *fmt, va_list args) {
  return dopr(str, count, fmt, args);
}


x86 assembly (clang, -O0):
<rep_vsnprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <dopr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rep_vsnprintf>:
jmp    1030 <dopr@plt>

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

LLVM IR (-O2):
define i32 @rep_vsnprintf(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = tail call i32 @dopr(i8* %0, i64 %1, i8* %2, i32 %3)
ret i32 %5
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
void minipack_pack_uint32(void *ptr, uint32_t value, size_t *sz) {
  *sz = 5;
  *((uint8_t *)ptr) = 0xCE;
  *((uint32_t *)(ptr + 1)) = htonl(value);
}


x86 assembly (clang, -O0):
<minipack_pack_uint32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movq   $0x5,(%rax)
mov    -0x8(%rbp),%rax
movl   $0xce,(%rax)
mov    -0xc(%rbp),%edi
call   1030 <htonl@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x1(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<minipack_pack_uint32>:
push   %rbx
mov    %rdi,%rbx
movq   $0x5,(%rdx)
movl   $0xce,(%rdi)
mov    %esi,%edi
call   1030 <htonl@plt>
mov    %eax,0x1(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @minipack_pack_uint32(i8* %0, i32 %1, i64* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i64* %2, i64** %6
%7 = load i64*, i64** %6
store i64 5, i64* %7
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
store i32 206, i32* %9
%10 = load i32, i32* %5
%11 = call i32 @htonl(i32 %10)
%12 = load i8*, i8** %4
%13 = getelementptr i8, i8* %12, i64 1
%14 = bitcast i8* %13 to i32*
store i32 %11, i32* %14
ret void
}

LLVM IR (-O2):
define void @minipack_pack_uint32(i8* nocapture writeonly %0, i32 %1, i64* nocapture writeonly %2) {
store i64 5, i64* %2
%4 = bitcast i8* %0 to i32*
store i32 206, i32* %4
%5 = tail call i32 @htonl(i32 %1)
%6 = getelementptr i8, i8* %0, i64 1
%7 = bitcast i8* %6 to i32*
store i32 %5, i32* %7
ret void
}
int main() { return sizeof(signed long long); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 8
}
void __attribute__((weak)) EXTI2_Callback(void) {}


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

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

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

LLVM IR (-O2):
define weak void @EXTI2_Callback() {
ret void
}
void os_drawline(int x1, int y1, int x2, int y2, int colour1, int colour2) {}


x86 assembly (clang, -O0):
<os_drawline>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @os_drawline(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
ret void
}
void av_get_channel_layout_string() {}


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

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

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

LLVM IR (-O2):
define void @av_get_channel_layout_string() {
ret void
}
void gtk_widget_queue_resize() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_queue_resize() {
ret void
}
/* Variables and functions */
size_t ptr_hash(void *x) { return (size_t)x >> 2; }


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

x86 assembly (clang, -O2):
<ptr_hash>:
mov    %rdi,%rax
shr    $0x2,%rax
ret

LLVM IR (-O0):
define i64 @ptr_hash(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = lshr i64 %4, 2
ret i64 %5
}

LLVM IR (-O2):
define i64 @ptr_hash(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = lshr i64 %2, 2
ret i64 %3
}
/* Type definitions */
struct connection_state {
  int dummy;
};

/* Variables and functions */
int tlscomm_expect(struct connection_state *, char *, char *, int);
int tlscomm_gets(char *buf, int buflen, struct connection_state *scs) {
  return (tlscomm_expect(scs, "", buf, buflen));
}


x86 assembly (clang, -O0):
<tlscomm_gets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xecb(%rip),%rsi
call   1030 <tlscomm_expect@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tlscomm_gets>:
mov    %esi,%ecx
mov    %rdi,%rax
lea    0xee4(%rip),%rsi
mov    %rdx,%rdi
mov    %rax,%rdx
jmp    1030 <tlscomm_expect@plt>

LLVM IR (-O0):
%struct.connection_state = type { i32 }
@.str = [1 x i8] zeroinitializer
define i32 @tlscomm_gets(i8* %0, i32 %1, %struct.connection_state* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca %struct.connection_state*
store i8* %0, i8** %4
store i32 %1, i32* %5
store %struct.connection_state* %2, %struct.connection_state** %6
%7 = load %struct.connection_state*, %struct.connection_state** %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = call i32 @tlscomm_expect(%struct.connection_state* %7, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.connection_state = type { i32 }
@.str = [1 x i8] zeroinitializer
define i32 @tlscomm_gets(i8* %0, i32 %1, %struct.connection_state* %2) {
%4 = tail call i32 @tlscomm_expect(%struct.connection_state* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret i32 %4
}
void glutButtonBoxFunc(void (*func)(int button, int state)) {}


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

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

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

LLVM IR (-O2):
define void @glutButtonBoxFunc(void (i32, i32)* nocapture %0) {
ret void
}
int pbcGetHandlerAssertLevel() { return 3; }


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

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

LLVM IR (-O0):
define i32 @pbcGetHandlerAssertLevel() {
ret i32 3
}

LLVM IR (-O2):
define i32 @pbcGetHandlerAssertLevel() {
ret i32 3
}
void closeaccess_() {}


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

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

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

LLVM IR (-O2):
define void @closeaccess_() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FLUSH_BUFFER_COM(int);
void FLUSH_BUFFERS(void) { FLUSH_BUFFER_COM(1); }


x86 assembly (clang, -O0):
<FLUSH_BUFFERS>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <FLUSH_BUFFER_COM@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FLUSH_BUFFERS>:
mov    $0x1,%edi
jmp    1030 <FLUSH_BUFFER_COM@plt>

LLVM IR (-O0):
define void @FLUSH_BUFFERS() {
%1 = call i32 @FLUSH_BUFFER_COM(i32 1)
ret void
}

LLVM IR (-O2):
define void @FLUSH_BUFFERS() {
%1 = tail call i32 @FLUSH_BUFFER_COM(i32 1)
ret void
}
void nmiISR(void) {
#pragma diag_push
#pragma CHECK_ULP("-2.1")
  while (1) {
  }
#pragma diag_pop
}


x86 assembly (clang, -O0):
<nmiISR>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <nmiISR+0x9>
jmp    1109 <nmiISR+0x9>

x86 assembly (clang, -O2):
<nmiISR>:
jmp    1100 <nmiISR>

LLVM IR (-O0):
define void @nmiISR() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @nmiISR() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_slli_si128(int /*<<< orphan*/, int);
__m128i test_mm_slli_si128(__m128i A) { return _mm_slli_si128(A, 5); }


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

x86 assembly (clang, -O2):
<test_mm_slli_si128>:
mov    $0x5,%esi
jmp    1030 <_mm_slli_si128@plt>

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

LLVM IR (-O2):
define i32 @test_mm_slli_si128(i32 %0) {
%2 = tail call i32 @_mm_slli_si128(i32 %0, i32 5)
ret i32 %2
}
long long int __infer_nondet_long_long_int() {
  long long int ret;
  return ret;
}


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

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

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

LLVM IR (-O2):
define i64 @__infer_nondet_long_long_int() {
ret i64 undef
}
/* Type definitions */
typedef int uint_fast32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
uint_fast32_t mod_add(uint_fast32_t a, uint_fast32_t b) {
  assert(a <= 0x7FFFFFFE);
  assert(b <= 0x7FFFFFFE);
  return (a + b) % 0x7FFFFFFF;
}


x86 assembly (clang, -O0):
<mod_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x7ffffffe,-0x4(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x7ffffffe,-0x8(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    $0x7fffffff,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod_add>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x7fffffff,%ebp
setne  %dil
call   1030 <assert@plt>
xor    %edi,%edi
cmp    $0x7fffffff,%ebx
setne  %dil
call   1030 <assert@plt>
add    %ebp,%ebx
movslq %ebx,%rax
mov    %rax,%rcx
shl    $0x1e,%rcx
add    %rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x3d,%rcx
add    %edx,%ecx
mov    %ecx,%edx
shl    $0x1f,%edx
sub    %edx,%ecx
add    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @mod_add(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 = icmp sle i32 %5, 2147483646
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %4
%10 = icmp sle i32 %9, 2147483646
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = add nsw i32 %13, %14
%16 = srem i32 %15, 2147483647
ret i32 %16
}

LLVM IR (-O2):
define i32 @mod_add(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 2147483647
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = icmp ne i32 %1, 2147483647
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = add nsw i32 %1, %0
%10 = srem i32 %9, 2147483647
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ free(void **);
void **malloc(int);
int tcache_enable() {
  void **p = malloc(sizeof(size_t) * 32);
  *p = (void *)0xdeadbeefu;
  free(p);
  if (*p == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<tcache_enable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x100,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0xdeadbeef,%ecx
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1165 <tcache_enable+0x45>
movl   $0x1,-0x4(%rbp)
jmp    116c <tcache_enable+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcache_enable>:
push   %rbx
mov    $0x100,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    $0xdeadbeef,%eax
mov    %rax,(%rbx)
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
cmpq   $0x0,(%rbx)
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @tcache_enable() {
%1 = alloca i32
%2 = alloca i8**
%3 = call i8** @malloc(i32 256)
store i8** %3, i8*** %2
%4 = load i8**, i8*** %2
store i8* inttoptr (i64 3735928559 to i8*), i8** %4
%5 = load i8**, i8*** %2
%6 = call i32 @free(i8** %5)
%7 = load i8**, i8*** %2
%8 = load i8*, i8** %7
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %11
10: ; preds = %0
store i32 1, i32* %1
br label %12
11: ; preds = %0
store i32 0, i32* %1
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
define i32 @tcache_enable() {
%1 = tail call i8** @malloc(i32 256)
store i8* inttoptr (i64 3735928559 to i8*), i8** %1
%2 = tail call i32 @free(i8** %1)
%3 = load i8*, i8** %1
%4 = icmp eq i8* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}
short int alaw2linear(unsigned char alaw) {
  int i;
  int seg;
  alaw ^= 0x55;
  i = ((alaw & 0x0F) << 4);
  seg = (((int)alaw & 0x70) >> 4);
  if (seg)
    i = (i + 0x100) << (seg - 1);
  return (short int)((alaw & 0x80) ? i : -i);
}


x86 assembly (clang, -O0):
<alaw2linear>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
xor    $0x55,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xf,%eax
shl    $0x4,%eax
mov    %eax,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x70,%eax
sar    $0x4,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     114b <alaw2linear+0x4b>
mov    -0x8(%rbp),%eax
add    $0x100,%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
shl    %cl,%eax
mov    %eax,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1168 <alaw2linear+0x68>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1170 <alaw2linear+0x70>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<alaw2linear>:
xor    $0x55,%dil
movzbl %dil,%edx
mov    %edx,%eax
shl    $0x4,%eax
movzbl %al,%eax
mov    %edx,%esi
shr    $0x4,%esi
and    $0x7,%esi
lea    -0x1(%rsi),%ecx
lea    0x100(%rax),%edi
shl    %cl,%edi
cmp    $0x1,%esi
cmovb  %eax,%edi
mov    %edi,%eax
neg    %eax
test   $0x80,%dl
cmovne %edi,%eax
ret

LLVM IR (-O0):
define signext i16 @alaw2linear(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i32
%4 = alloca i32
store i8 %0, i8* %2
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = xor i32 %6, 85
%8 = trunc i32 %7 to i8
store i8 %8, i8* %2
%9 = load i8, i8* %2
%10 = zext i8 %9 to i32
%11 = and i32 %10, 15
%12 = shl i32 %11, 4
store i32 %12, i32* %3
%13 = load i8, i8* %2
%14 = zext i8 %13 to i32
%15 = and i32 %14, 112
%16 = ashr i32 %15, 4
store i32 %16, i32* %4
%17 = load i32, i32* %4
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %25
19: ; preds = %1
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 256
%22 = load i32, i32* %4
%23 = sub nsw i32 %22, 1
%24 = shl i32 %21, %23
store i32 %24, i32* %3
br label %25
25: ; preds = %19, %1
%26 = load i8, i8* %2
%27 = zext i8 %26 to i32
%28 = and i32 %27, 128
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %25
%31 = load i32, i32* %3
br label %35
32: ; preds = %25
%33 = load i32, i32* %3
%34 = sub nsw i32 0, %33
br label %35
35: ; preds = %32, %30
%36 = phi i32 [ %31, %30 ], [ %34, %32 ]
%37 = trunc i32 %36 to i16
ret i16 %37
}

LLVM IR (-O2):
define signext i16 @alaw2linear(i8 zeroext %0) {
%2 = xor i8 %0, 85
%3 = zext i8 %2 to i32
%4 = shl nuw nsw i32 %3, 4
%5 = and i32 %4, 240
%6 = lshr i32 %3, 4
%7 = and i32 %6, 7
%8 = icmp eq i32 %7, 0
%9 = or i32 %5, 256
%10 = add nsw i32 %7, -1
%11 = shl i32 %9, %10
%12 = select i1 %8, i32 %5, i32 %11
%13 = and i32 %3, 128
%14 = icmp eq i32 %13, 0
%15 = sub nsw i32 0, %12
%16 = select i1 %14, i32 %15, i32 %12
%17 = trunc i32 %16 to i16
ret i16 %17
}
float computeOmega(float LS, float RS, float TS, int k, int ksel2, int m,
                   int msel2) {
  float numerator = (LS + RS) / (ksel2 + msel2);
  float denominator = (TS - LS - RS) / (k * m) + 0.00001;
  float omega = numerator / denominator;
  return omega;
}


x86 assembly (clang, -O0):
<computeOmega>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
mov    -0x14(%rbp),%eax
add    -0x1c(%rbp),%eax
cvtsi2ss %eax,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0xc(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%eax
imul   -0x18(%rbp),%eax
cvtsi2ss %eax,%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe9a(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x20(%rbp),%xmm0
divss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x28(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<computeOmega>:
subss  %xmm0,%xmm2
addss  %xmm1,%xmm0
add    %ecx,%esi
cvtsi2ss %esi,%xmm3
subss  %xmm1,%xmm2
imul   %edx,%edi
xorps  %xmm1,%xmm1
cvtsi2ss %edi,%xmm1
divss  %xmm1,%xmm2
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
addsd  0xed1(%rip),%xmm1
divss  %xmm3,%xmm0
cvtsd2ss %xmm1,%xmm1
divss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @computeOmega(float %0, float %1, float %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca float
%16 = alloca float
%17 = alloca float
store float %0, float* %8
store float %1, float* %9
store float %2, float* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%18 = load float, float* %8
%19 = load float, float* %9
%20 = fadd float %18, %19
%21 = load i32, i32* %12
%22 = load i32, i32* %14
%23 = add nsw i32 %21, %22
%24 = sitofp i32 %23 to float
%25 = fdiv float %20, %24
store float %25, float* %15
%26 = load float, float* %10
%27 = load float, float* %8
%28 = fsub float %26, %27
%29 = load float, float* %9
%30 = fsub float %28, %29
%31 = load i32, i32* %11
%32 = load i32, i32* %13
%33 = mul nsw i32 %31, %32
%34 = sitofp i32 %33 to float
%35 = fdiv float %30, %34
%36 = fpext float %35 to double
%37 = fadd double %36, 1.000000e-05
%38 = fptrunc double %37 to float
store float %38, float* %16
%39 = load float, float* %15
%40 = load float, float* %16
%41 = fdiv float %39, %40
store float %41, float* %17
%42 = load float, float* %17
ret float %42
}

LLVM IR (-O2):
define float @computeOmega(float %0, float %1, float %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = fadd float %0, %1
%9 = add nsw i32 %6, %4
%10 = sitofp i32 %9 to float
%11 = fdiv float %8, %10
%12 = fsub float %2, %0
%13 = fsub float %12, %1
%14 = mul nsw i32 %5, %3
%15 = sitofp i32 %14 to float
%16 = fdiv float %13, %15
%17 = fpext float %16 to double
%18 = fadd double %17, 1.000000e-05
%19 = fptrunc double %18 to float
%20 = fdiv float %11, %19
ret float %20
}
/* Variables and functions */
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ curscr;
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ signal(int, int /*<<< orphan*/);
int /*<<< orphan*/ werase(int /*<<< orphan*/);
int /*<<< orphan*/ wmove(int /*<<< orphan*/, int /*<<< orphan*/,
                         int /*<<< orphan*/);
int /*<<< orphan*/ wrefresh(int /*<<< orphan*/);
void die(int sig) {
  signal(sig, SIG_IGN);
  werase(curscr);
  wmove(curscr, 0, 0);
  wrefresh(curscr);
  endwin();
  exit(0);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e73(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
mov    0x2e4d(%rip),%rax
mov    (%rax),%edi
call   1080 <werase@plt>
mov    0x2e3f(%rip),%rax
mov    (%rax),%edi
xor    %edx,%edx
mov    %edx,%esi
call   1070 <wmove@plt>
mov    0x2e2d(%rip),%rax
mov    (%rax),%edi
call   1030 <wrefresh@plt>
mov    $0x0,%al
call   1050 <endwin@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rbx
mov    0x2e80(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
mov    0x2e5a(%rip),%rbx
mov    (%rbx),%edi
call   1080 <werase@plt>
mov    (%rbx),%edi
xor    %esi,%esi
xor    %edx,%edx
call   1070 <wmove@plt>
mov    (%rbx),%edi
call   1030 <wrefresh@plt>
xor    %eax,%eax
call   1050 <endwin@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@SIG_IGN = global i32 0
@curscr = global i32 0
define void @die(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIG_IGN
%5 = call i32 @signal(i32 %3, i32 %4)
%6 = load i32, i32* @curscr
%7 = call i32 @werase(i32 %6)
%8 = load i32, i32* @curscr
%9 = call i32 @wmove(i32 %8, i32 0, i32 0)
%10 = load i32, i32* @curscr
%11 = call i32 @wrefresh(i32 %10)
%12 = call i32 (...) @endwin()
%13 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@SIG_IGN = global i32 0
@curscr = global i32 0
define void @die(i32 %0) {
%2 = load i32, i32* @SIG_IGN
%3 = tail call i32 @signal(i32 %0, i32 %2)
%4 = load i32, i32* @curscr
%5 = tail call i32 @werase(i32 %4)
%6 = load i32, i32* @curscr
%7 = tail call i32 @wmove(i32 %6, i32 0, i32 0)
%8 = load i32, i32* @curscr
%9 = tail call i32 @wrefresh(i32 %8)
%10 = tail call i32 (...) @endwin()
%11 = tail call i32 @exit(i32 0)
unreachable
}
int SDL_imageFilterSubByteMMX(unsigned char *Src1, unsigned char *Dest,
                              int length, unsigned char C) {
  return (0);
}


x86 assembly (clang, -O0):
<SDL_imageFilterSubByteMMX>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %al,-0x15(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @SDL_imageFilterSubByteMMX(i8* %0, i8* %1, i32 %2, i8 zeroext %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8 %3, i8* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @SDL_imageFilterSubByteMMX(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i8 zeroext %3) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int strlen(char *);
int getline2(char *line, int max) {
  if (fgets(line, max, stdin) == NULL)
    return 0;
  else
    return strlen(line);
}


x86 assembly (clang, -O0):
<getline2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
call   1040 <fgets@plt>
cmp    $0x0,%rax
jne    115a <getline2+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    1166 <getline2+0x46>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getline2>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ebd(%rip),%rax
mov    (%rax),%edx
call   1040 <fgets@plt>
test   %rax,%rax
je     1140 <getline2+0x20>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strlen@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @getline2(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%6 = load i8*, i8** %4
%7 = load i32, i32* %5
%8 = load i32, i32* @stdin
%9 = call i32* @fgets(i8* %6, i32 %7, i32 %8)
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 0, i32* %3
br label %15
12: ; preds = %2
%13 = load i8*, i8** %4
%14 = call i32 @strlen(i8* %13)
store i32 %14, i32* %3
br label %15
15: ; preds = %12, %11
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @getline2(i8* %0, i32 %1) {
%3 = load i32, i32* @stdin
%4 = tail call i32* @fgets(i8* %0, i32 %1, i32 %3)
%5 = icmp eq i32* %4, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @strlen(i8* %0)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void printTableLine(int current) {
  printf(" %10d | %10d | %10d \n", current, current * current,
         current * current * current);
}


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

x86 assembly (clang, -O2):
<printTableLine>:
mov    %edi,%esi
mov    %edi,%edx
imul   %edi,%edx
mov    %edx,%ecx
imul   %edi,%ecx
lea    0xedd(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c" %10d | %10d | %10d \0A\00"
define void @printTableLine(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = mul nsw i32 %4, %5
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = mul nsw i32 %7, %8
%10 = load i32, i32* %2
%11 = mul nsw i32 %9, %10
%12 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %6, i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c" %10d | %10d | %10d \0A\00"
define void @printTableLine(i32 %0) {
%2 = mul nsw i32 %0, %0
%3 = mul nsw i32 %2, %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %2, i32 %3)
ret void
}
int test_imm_D2uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0xD2 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_D2uint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 16
%6 = and i64 %5, 210
%7 = icmp ne i64 %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_D2uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 13762560
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
float ticks2seconds(float ticks) { return ticks / 1000; }


x86 assembly (clang, -O0):
<ticks2seconds>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeea(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @ticks2seconds(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fdiv float %3, 1.000000e+03
ret float %4
}

LLVM IR (-O2):
define float @ticks2seconds(float %0) {
%2 = fdiv float %0, 1.000000e+03
ret float %2
}
/* Variables and functions */
void *_c_zalloc(size_t, char const *, int);
void *_c_calloc(size_t nmemb, size_t size, const char *name, int line) {
  return _c_zalloc(nmemb * size, name, line);
}


x86 assembly (clang, -O0):
<_c_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
imul   -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <_c_zalloc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_c_calloc>:
imul   %rsi,%rdi
mov    %rdx,%rsi
mov    %ecx,%edx
jmp    1030 <_c_zalloc@plt>

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

LLVM IR (-O2):
define i8* @_c_calloc(i64 %0, i64 %1, i8* %2, i32 %3) {
%5 = mul i64 %1, %0
%6 = tail call i8* @_c_zalloc(i64 %5, i8* %2, i32 %3)
ret i8* %6
}
/* Variables and functions */
float saturate(float);
float RemapValClamped(float val, float A, float B, float C, float D) {
  float cVal = (val - A) / (B - A);
  cVal = saturate(cVal);
  return C + (D - C) * cVal;
}


x86 assembly (clang, -O0):
<RemapValClamped>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
subss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
call   1030 <saturate@plt>
movss  %xmm0,-0x18(%rbp)
movss  -0x10(%rbp),%xmm1
movss  -0x14(%rbp),%xmm0
subss  -0x10(%rbp),%xmm0
movss  -0x18(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RemapValClamped>:
push   %rax
movss  %xmm4,0x4(%rsp)
movss  %xmm3,(%rsp)
subss  %xmm1,%xmm0
subss  %xmm1,%xmm2
divss  %xmm2,%xmm0
call   1030 <saturate@plt>
movss  (%rsp),%xmm1
movss  0x4(%rsp),%xmm2
subss  %xmm1,%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @RemapValClamped(float %0, float %1, float %2, float %3, float %4) {
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%12 = load float, float* %6
%13 = load float, float* %7
%14 = fsub float %12, %13
%15 = load float, float* %8
%16 = load float, float* %7
%17 = fsub float %15, %16
%18 = fdiv float %14, %17
store float %18, float* %11
%19 = load float, float* %11
%20 = call float @saturate(float %19)
store float %20, float* %11
%21 = load float, float* %9
%22 = load float, float* %10
%23 = load float, float* %9
%24 = fsub float %22, %23
%25 = load float, float* %11
%26 = call float @llvm.fmuladd.f32(float %24, float %25, float %21)
ret float %26
}

LLVM IR (-O2):
define float @RemapValClamped(float %0, float %1, float %2, float %3, float %4) {
%6 = fsub float %0, %1
%7 = fsub float %2, %1
%8 = fdiv float %6, %7
%9 = tail call float @saturate(float %8)
%10 = fsub float %4, %3
%11 = tail call float @llvm.fmuladd.f32(float %10, float %9, float %3)
ret float %11
}
char *strsave(string)
char *string;
{ return (strcpy(alloc((unsigned)(strlen(string) + 1)), string)); }


x86 assembly (clang, -O0):
<strsave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%rax
mov    %eax,%edi
mov    $0x0,%al
call   1050 <alloc@plt>
movslq %eax,%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strsave>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
xor    %eax,%eax
call   1050 <alloc@plt>
movslq %eax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @strsave(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
%5 = add i64 %4, 1
%6 = trunc i64 %5 to i32
%7 = call i32 (i32, ...) bitcast (i32 (...)* @alloc to i32 (i32, ...)*)(i32 %6)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
%10 = load i8*, i8** %2
%11 = call i8* @strcpy(i8* %9, i8* %10)
ret i8* %11
}

LLVM IR (-O2):
define i8* @strsave(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = add i32 %3, 1
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @alloc to i32 (i32, ...)*)(i32 %4)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
%8 = tail call i8* @strcpy(i8* dereferenceable(1) %7, i8* dereferenceable(1) %0)
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ substra(int);
void op_psubstra() { substra(1); }


x86 assembly (clang, -O0):
<op_psubstra>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <substra@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_psubstra>:
mov    $0x1,%edi
jmp    1030 <substra@plt>

LLVM IR (-O0):
define void @op_psubstra() {
%1 = call i32 @substra(i32 1)
ret void
}

LLVM IR (-O2):
define void @op_psubstra() {
%1 = tail call i32 @substra(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_integrate();
int /*<<< orphan*/ test_reverse_iv();
int main(int argc, char *argv[]) {
  test_reverse_iv();
  test_integrate();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_reverse_iv()
%4 = tail call i32 (...) @test_integrate()
ret i32 0
}
/* Variables and functions */
unsigned int REG_SPI_BASE(unsigned int);
__attribute__((always_)) __attribute__((flatten)) unsigned int
SPI_SLAVE2(unsigned int i) {
  return (REG_SPI_BASE(i) + 0x38);
}


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

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

LLVM IR (-O0):
define i32 @SPI_SLAVE2(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, 56
ret i32 %5
}

LLVM IR (-O2):
define i32 @SPI_SLAVE2(i32 %0) {
%2 = tail call i32 @REG_SPI_BASE(i32 %0)
%3 = add i32 %2, 56
ret i32 %3
}
/* Variables and functions */
int yahoo_M1Common(unsigned int, int);
int yahoo_f01_0e(int Salt, int Parameter) {
  unsigned b = Salt * 0x7C466A4B + 0x29BF;
  return yahoo_M1Common(b, Parameter);
}


x86 assembly (clang, -O0):
<yahoo_f01_0e>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x7c466a4b,-0x4(%rbp),%eax
add    $0x29bf,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <yahoo_M1Common@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_0e>:
imul   $0x7c466a4b,%edi,%edi
add    $0x29bf,%edi
jmp    1030 <yahoo_M1Common@plt>

LLVM IR (-O0):
define i32 @yahoo_f01_0e(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 = mul nsw i32 %6, 2084989515
%8 = add nsw i32 %7, 10687
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = call i32 @yahoo_M1Common(i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @yahoo_f01_0e(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 2084989515
%4 = add nsw i32 %3, 10687
%5 = tail call i32 @yahoo_M1Common(i32 %4, i32 %1)
ret i32 %5
}
/* Variables and functions */
long double __qsqrt(long double);
long double __q_sqrt(long double *arg) { return (__qsqrt(*arg)); }


x86 assembly (clang, -O0):
<__q_sqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
fldt   (%rax)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <__qsqrt@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__q_sqrt>:
sub    $0x18,%rsp
fldt   (%rdi)
fstpt  (%rsp)
call   1030 <__qsqrt@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @__q_sqrt(x86_fp80* %0) {
%2 = alloca x86_fp80*
store x86_fp80* %0, x86_fp80** %2
%3 = load x86_fp80*, x86_fp80** %2
%4 = load x86_fp80, x86_fp80* %3
%5 = call x86_fp80 @__qsqrt(x86_fp80 %4)
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @__q_sqrt(x86_fp80* nocapture %0) {
%2 = load x86_fp80, x86_fp80* %0
%3 = tail call x86_fp80 @__qsqrt(x86_fp80 %2)
ret x86_fp80 %3
}
/* Variables and functions */
int /*<<< orphan*/ xputc(int /*<<< orphan*/);
void xputs(const char *str) {
  while (*str)
    xputc(*str++);
}


x86 assembly (clang, -O0):
<xputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <xputs+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <xputc@plt>
jmp    111c <xputs+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xputs>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <xputs+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <xputc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <xputs+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @xputs(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %2
%10 = load i8, i8* %8
%11 = sext i8 %10 to i32
%12 = call i32 @xputc(i32 %11)
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @xputs(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @xputc(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ tlv;
struct snd_ctl_tlv {
  int dummy;
};

/* Variables and functions */
int main(void) {
  struct snd_ctl_tlv tlv;
  (void)tlv;
  return sizeof(tlv);
}


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

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

LLVM IR (-O0):
%struct.snd_ctl_tlv = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.snd_ctl_tlv
store i32 0, i32* %1
ret i32 4
}

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ printf(char *, char);
void Reverse() {
  char c;
  c = getchar();
  if (c != '\n') {
    Reverse();
    printf("%c", c);
  }
}


x86 assembly (clang, -O0):
<Reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
je     1164 <Reverse+0x34>
call   1050 <Reverse@plt>
lea    0xea5(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Reverse>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xa,%al
jne    113e <Reverse+0xe>
pop    %rbx
ret
mov    %eax,%ebx
call   1050 <Reverse@plt>
movsbl %bl,%esi
lea    0xeb1(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define void @Reverse() {
%1 = alloca i8
%2 = call signext i8 (...) @getchar()
store i8 %2, i8* %1
%3 = load i8, i8* %1
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 10
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i8, i8* %1
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %7)
br label %9
9: ; preds = %6, %0
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @Reverse() {
%1 = tail call signext i8 (...) @getchar()
%2 = icmp eq i8 %1, 10
br i1 %2, label %3, label %4
3: ; preds = %0, %4
ret void
4: ; preds = %0
tail call void @Reverse()
%5 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %1)
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int g_file_close(int fd) {
  close(fd);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @g_file_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 0
}
void StringTests(void) {}


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

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

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

LLVM IR (-O2):
define void @StringTests() {
ret void
}
/* Variables and functions */
char *strcpy(char *dest, const char *src) {
  size_t i;
  for (i = 0; src[i] != '\0'; i++)
    dest[i] = src[i];
  dest[++i] = '\0';
  return dest;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1150 <strcpy+0x50>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <strcpy+0x14>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movb   $0x0,0x1(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    (%rsi),%dl
mov    $0x1,%ecx
test   %dl,%dl
je     1120 <strcpy+0x20>
xchg   %ax,%ax
mov    %dl,-0x1(%rax,%rcx,1)
movzbl (%rsi,%rcx,1),%edx
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
movb   $0x0,(%rax,%rcx,1)
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i64 [ %9, %5 ], [ 0, %2 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 %6, i8* %8
%9 = add i64 %7, 1
%10 = getelementptr inbounds i8, i8* %1, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5
%14 = add i64 %7, 2
br label %15
15: ; preds = %13, %2
%16 = phi i64 [ 1, %2 ], [ %14, %13 ]
%17 = getelementptr inbounds i8, i8* %0, i64 %16
store i8 0, i8* %17
ret i8* %0
}
/* Variables and functions */
int mt_rand_uint64();
double mt_rand_double_1(void) {
  return (mt_rand_uint64() >> 11) * (1.0 / 9007199254740991.0);
}


x86 assembly (clang, -O0):
<mt_rand_double_1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <mt_rand_uint64@plt>
sar    $0xb,%eax
cvtsi2sd %eax,%xmm0
movsd  0xed6(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mt_rand_double_1>:
push   %rax
xor    %eax,%eax
call   1030 <mt_rand_uint64@plt>
sar    $0xb,%eax
cvtsi2sd %eax,%xmm0
mulsd  0xed9(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @mt_rand_double_1() {
%1 = call i32 (...) @mt_rand_uint64()
%2 = ashr i32 %1, 11
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 0x3CA0000000000001
ret double %4
}

LLVM IR (-O2):
define double @mt_rand_double_1() {
%1 = tail call i32 (...) @mt_rand_uint64()
%2 = ashr i32 %1, 11
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 0x3CA0000000000001
ret double %4
}
void batadv_mcast_free(struct batadv_priv *bat_priv) {}


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

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

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

LLVM IR (-O2):
%struct.batadv_priv = type opaque
define void @batadv_mcast_free(%struct.batadv_priv* nocapture %0) {
ret void
}