xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ AL_evaluatePitch(int, int *, int *);
int /*<<< orphan*/ AL_initiateTone(int, int, int);
void fmStartTone(int channel, int pitch) {
  int exponent;
  int mantissa;
  AL_evaluatePitch(pitch, &exponent, &mantissa);
  AL_initiateTone(channel, exponent, mantissa);
}


x86 assembly (clang, -O0):
<fmStartTone>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <AL_evaluatePitch@plt>
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <AL_initiateTone@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmStartTone>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%eax
mov    %edi,%ebx
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %eax,%edi
call   1040 <AL_evaluatePitch@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
mov    %ebx,%edi
call   1030 <AL_initiateTone@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @fmStartTone(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @AL_evaluatePitch(i32 %1, i32* %3, i32* %4)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @AL_initiateTone(i32 %0, i32 %8, i32 %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
int text_to_wav(char *text, char *wave) {
  printf("convert '%s' to wave file '%s'\n", text, wave);
  return 0;
}


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

x86 assembly (clang, -O2):
<text_to_wav>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"convert '%s' to wave file '%s'\0A\00"
define i32 @text_to_wav(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"convert '%s' to wave file '%s'\0A\00"
define i32 @text_to_wav(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __buf_size_arg_constraint(char *, int);
int /*<<< orphan*/ clang_analyzer_eval(int);
void test_buf_size_symbolic(int s) {
  char buf[3];
  __buf_size_arg_constraint(buf, s);
  clang_analyzer_eval(s <= 3);
}


x86 assembly (clang, -O0):
<test_buf_size_symbolic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x7(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1030 <__buf_size_arg_constraint@plt>
cmpl   $0x3,-0x4(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_buf_size_symbolic>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0xd(%rsp),%rdi
mov    %ebx,%esi
call   1030 <__buf_size_arg_constraint@plt>
xor    %edi,%edi
cmp    $0x4,%ebx
setl   %dil
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @test_buf_size_symbolic(i32 %0) {
%2 = alloca i32
%3 = alloca [3 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @__buf_size_arg_constraint(i8* %4, i32 %5)
%7 = load i32, i32* %2
%8 = icmp sle i32 %7, 3
%9 = zext i1 %8 to i32
%10 = call i32 @clang_analyzer_eval(i32 %9)
ret void
}

LLVM IR (-O2):
define void @test_buf_size_symbolic(i32 %0) {
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%4 = call i32 @__buf_size_arg_constraint(i8* %3, i32 %0)
%5 = icmp slt i32 %0, 4
%6 = zext i1 %5 to i32
%7 = call i32 @clang_analyzer_eval(i32 %6)
ret void
}
void JugarMultijugador() {}


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

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

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

LLVM IR (-O2):
define void @JugarMultijugador() {
ret void
}
int fun587() { return 587; }


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

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

LLVM IR (-O0):
define i32 @fun587() {
ret i32 587
}

LLVM IR (-O2):
define i32 @fun587() {
ret i32 587
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
scalar_t__ bundle_raw_get_sdnv_off(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ sdnv_decode(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int ar_sr_extract_cp_timestamp(uint8_t *ar, uint64_t *timestamp) {
  int off = 3;
  off += bundle_raw_get_sdnv_off((uint8_t *)ar + off, 2);
  sdnv_decode((uint8_t *)ar + off, (uint64_t *)timestamp);
  return 0;
}


x86 assembly (clang, -O0):
<ar_sr_extract_cp_timestamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    $0x2,%esi
call   1040 <bundle_raw_get_sdnv_off@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <sdnv_decode@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ar_sr_extract_cp_timestamp>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
add    $0xc,%rdi
mov    $0x2,%esi
call   1040 <bundle_raw_get_sdnv_off@plt>
shl    $0x20,%rax
movabs $0x300000000,%rdi
add    %rax,%rdi
sar    $0x1e,%rdi
add    %rbx,%rdi
mov    %r14,%rsi
call   1030 <sdnv_decode@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @ar_sr_extract_cp_timestamp(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
store i32 3, i32* %5
%6 = load i32*, i32** %3
%7 = load i32, i32* %5
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %6, i64 %8
%10 = call i64 @bundle_raw_get_sdnv_off(i32* %9, i32 2)
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = add nsw i64 %12, %10
%14 = trunc i64 %13 to i32
store i32 %14, i32* %5
%15 = load i32*, i32** %3
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
%19 = load i32*, i32** %4
%20 = call i32 @sdnv_decode(i32* %18, i32* %19)
ret i32 0
}

LLVM IR (-O2):
define i32 @ar_sr_extract_cp_timestamp(i32* %0, i32* %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 3
%4 = tail call i64 @bundle_raw_get_sdnv_off(i32* %3, i32 2)
%5 = shl i64 %4, 32
%6 = add i64 %5, 12884901888
%7 = ashr exact i64 %6, 32
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = tail call i32 @sdnv_decode(i32* %8, i32* %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_loadl_epi64(int /*<<< orphan*/ *);
__m128i t1(__m128i *p) { return _mm_loadl_epi64(p); }


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

x86 assembly (clang, -O2):
<t1>:
jmp    1030 <_mm_loadl_epi64@plt>

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

LLVM IR (-O2):
define i32 @t1(i32* %0) {
%2 = tail call i32 @_mm_loadl_epi64(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fread(int *, int, int, int /*<<< orphan*/ *);
int fgetc(FILE *stream) {
  int ret = 0;
  if (fread(&ret, sizeof(char), 1, stream) != 1)
    return EOF;
  return ret;
}


x86 assembly (clang, -O0):
<fgetc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fread@plt>
cmp    $0x1,%eax
je     1151 <fgetc+0x41>
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1157 <fgetc+0x47>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgetc>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rcx
movl   $0x0,0xc(%rsp)
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
cmp    $0x1,%eax
je     1143 <fgetc+0x33>
mov    0x2ea5(%rip),%rbx
mov    (%rbx),%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @fgetc(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @fread(i32* %2, i32 1, i32 1, i32* %0)
%5 = icmp eq i32 %4, 1
%6 = load i32, i32* %2
%7 = load i32, i32* @EOF
%8 = select i1 %5, i32 %6, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ EX_OSERR;
int /*<<< orphan*/ pfpanic(char *, unsigned short, unsigned short, char const *,
                           char const *, int, int, int /*<<< orphan*/);
void __pfpanic_mutex_init(unsigned short _syslog, unsigned short _verbose,
                          const char *_function_name, const char *_file_name,
                          int _line_number, int _errno) {
  pfpanic("Unable to init mutex", _syslog, _verbose, _function_name, _file_name,
          _line_number, _errno, EX_OSERR);
}


x86 assembly (clang, -O0):
<__pfpanic_mutex_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %si,%ax
mov    %di,%si
mov    %si,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x2(%rbp),%si
mov    -0x4(%rbp),%dx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
mov    -0x20(%rbp),%r10d
mov    0x2e8b(%rip),%rax
mov    (%rax),%eax
lea    0xea2(%rip),%rdi
movzwl %si,%esi
movzwl %dx,%edx
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <pfpanic@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__pfpanic_mutex_init>:
push   %rax
mov    %r9d,%r10d
mov    %r8d,%r9d
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
mov    0x2eb8(%rip),%rdi
mov    (%rdi),%eax
lea    0xecf(%rip),%rdi
push   %rax
push   %r10
call   1030 <pfpanic@plt>
add    $0x10,%rsp
pop    %rax
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Unable to init mutex\00"
@EX_OSERR = global i32 0
define void @__pfpanic_mutex_init(i16 zeroext %0, i16 zeroext %1, i8* %2, i8* %3, i32 %4, i32 %5) {
%7 = alloca i16
%8 = alloca i16
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
store i16 %0, i16* %7
store i16 %1, i16* %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i16, i16* %7
%14 = load i16, i16* %8
%15 = load i8*, i8** %9
%16 = load i8*, i8** %10
%17 = load i32, i32* %11
%18 = load i32, i32* %12
%19 = load i32, i32* @EX_OSERR
%20 = call i32 @pfpanic(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i16 zeroext %13, i16 zeroext %14, i8* %15, i8* %16, i32 %17, i32 %18, i32 %19)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Unable to init mutex\00"
@EX_OSERR = global i32 0
define void @__pfpanic_mutex_init(i16 zeroext %0, i16 zeroext %1, i8* %2, i8* %3, i32 %4, i32 %5) {
%7 = load i32, i32* @EX_OSERR
%8 = tail call i32 @pfpanic(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i16 zeroext %0, i16 zeroext %1, i8* %2, i8* %3, i32 %4, i32 %5, i32 %7)
ret void
}
int a_twist_u_on_eloc(eloc)
int eloc;
{
  int temp_arr[12];
  a_eloc_unpack(eloc, temp_arr);
  four_cycle(temp_arr, 0, 1, 2, 3);
  return a_eloc_pack(temp_arr);
}


x86 assembly (clang, -O0):
<a_twist_u_on_eloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x40(%rbp),%rsi
mov    $0x0,%al
call   1040 <a_eloc_unpack@plt>
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x2,%ecx
mov    $0x3,%r8d
mov    $0x0,%al
call   1030 <four_cycle@plt>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <a_eloc_pack@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_twist_u_on_eloc>:
push   %rbx
sub    $0x30,%rsp
mov    %rsp,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <a_eloc_unpack@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x2,%ecx
mov    $0x3,%r8d
xor    %eax,%eax
call   1030 <four_cycle@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <a_eloc_pack@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @a_twist_u_on_eloc(i32 %0) {
%2 = alloca i32
%3 = alloca [12 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%6 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @a_eloc_unpack to i32 (i32, i32*, ...)*)(i32 %4, i32* %5)
%7 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%8 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @four_cycle to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %7, i32 0, i32 1, i32 2, i32 3)
%9 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%10 = call i32 (i32*, ...) bitcast (i32 (...)* @a_eloc_pack to i32 (i32*, ...)*)(i32* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @a_twist_u_on_eloc(i32 %0) {
%2 = alloca [12 x i32]
%3 = bitcast [12 x i32]* %2 to i8*
%4 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 0
%5 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @a_eloc_unpack to i32 (i32, i32*, ...)*)(i32 %0, i32* %4)
%6 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @four_cycle to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %4, i32 0, i32 1, i32 2, i32 3)
%7 = call i32 (i32*, ...) bitcast (i32 (...)* @a_eloc_pack to i32 (i32*, ...)*)(i32* %4)
ret i32 %7
}
__attribute__((always_)) void writeb(unsigned char b, volatile void *addr) {
  *(volatile unsigned char *)addr = b;
}


x86 assembly (clang, -O0):
<writeb>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeb>:
mov    %dil,(%rsi)
ret

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

LLVM IR (-O2):
define void @writeb(i8 zeroext %0, i8* %1) {
store volatile i8 %0, i8* %1
ret void
}
void cbcp_open(unit) int unit;
{ dbglog("cbcp_open"); }


x86 assembly (clang, -O0):
<cbcp_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <dbglog@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [10 x i8] c"cbcp_open\00"
define void @cbcp_open(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @dbglog to i32 (i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"cbcp_open\00"
define void @cbcp_open(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @dbglog to i32 (i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syscon_number_of_standard_polynomials(int *length) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(22, length, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_number_of_standard_polynomials>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x16,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_number_of_standard_polynomials>:
mov    %rdi,%rsi
mov    $0x16,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @syscon_number_of_standard_polynomials(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = load i32*, i32** %3
%8 = load double*, double** %5
%9 = call i32 @_ada_use_c2phc4c(i32 22, i32* %6, i32* %7, double* %8, i32 0)
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @syscon_number_of_standard_polynomials(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc4c(i32 22, i32* %0, i32* undef, double* undef, i32 0)
ret i32 %2
}
/* Type definitions */
struct timeval {
  double tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double wctime() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return (tv.tv_sec + 1E-6 * tv.tv_usec);
}


x86 assembly (clang, -O0):
<wctime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm1
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xec9(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wctime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdl 0x10(%rsp),%xmm0
mulsd  0xed2(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i32 }
define double @wctime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load i32, i32* %5
%7 = sitofp i32 %6 to double
%8 = call double @llvm.fmuladd.f64(double 0x3EB0C6F7A0B5ED8D, double %7, double %4)
ret double %8
}

LLVM IR (-O2):
%struct.timeval = type { double, i32 }
define double @wctime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i32, i32* %6
%8 = sitofp i32 %7 to double
%9 = tail call double @llvm.fmuladd.f64(double %8, double 0x3EB0C6F7A0B5ED8D, double %5)
ret double %9
}
/* Variables and functions */
float ceilf(float);
float num_ceil(float a) { return ceilf(a); }


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

x86 assembly (clang, -O2):
<num_ceil>:
jmp    1030 <ceilf@plt>

LLVM IR (-O0):
define float @num_ceil(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.ceil.f32(float %3)
ret float %4
}

LLVM IR (-O2):
define float @num_ceil(float %0) {
%2 = tail call float @llvm.ceil.f32(float %0)
ret float %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ ntoh16(int /*<<< orphan*/ const *);
int ptls_decode16(uint16_t *value, const uint8_t **src, const uint8_t *end) {
  if (end - *src < 2)
    return 50;
  *value = ntoh16(*src);
  *src += 2;
  return 0;
}


x86 assembly (clang, -O0):
<ptls_decode16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rcx),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
cmp    $0x2,%rax
jge    114c <ptls_decode16+0x3c>
movl   $0x32,-0x4(%rbp)
jmp    1175 <ptls_decode16+0x65>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1030 <ntoh16@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
add    $0x8,%rcx
mov    %rcx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptls_decode16>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rsi),%rdi
sub    %rdi,%rdx
mov    $0x32,%eax
cmp    $0x8,%rdx
jl     1139 <ptls_decode16+0x29>
mov    %rsi,%rbx
call   1030 <ntoh16@plt>
mov    %eax,(%r14)
addq   $0x8,(%rbx)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @ptls_decode16(i32* %0, i32** %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32**
%7 = alloca i32*
store i32* %0, i32** %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 = ptrtoint i32* %8 to i64
%12 = ptrtoint i32* %10 to i64
%13 = sub i64 %11, %12
%14 = sdiv exact i64 %13, 4
%15 = icmp slt i64 %14, 2
br i1 %15, label %16, label %17
16: ; preds = %3
store i32 50, i32* %4
br label %25
17: ; preds = %3
%18 = load i32**, i32*** %6
%19 = load i32*, i32** %18
%20 = call i32 @ntoh16(i32* %19)
%21 = load i32*, i32** %5
store i32 %20, i32* %21
%22 = load i32**, i32*** %6
%23 = load i32*, i32** %22
%24 = getelementptr inbounds i32, i32* %23, i64 2
store i32* %24, i32** %22
store i32 0, i32* %4
br label %25
25: ; preds = %17, %16
%26 = load i32, i32* %4
ret i32 %26
}

LLVM IR (-O2):
define i32 @ptls_decode16(i32* nocapture writeonly %0, i32** nocapture %1, i32* %2) {
%4 = load i32*, i32** %1
%5 = ptrtoint i32* %2 to i64
%6 = ptrtoint i32* %4 to i64
%7 = sub i64 %5, %6
%8 = icmp slt i64 %7, 8
br i1 %8, label %13, label %9
9: ; preds = %3
%10 = tail call i32 @ntoh16(i32* %4)
store i32 %10, i32* %0
%11 = load i32*, i32** %1
%12 = getelementptr inbounds i32, i32* %11, i64 2
store i32* %12, i32** %1
br label %13
13: ; preds = %3, %9
%14 = phi i32 [ 0, %9 ], [ 50, %3 ]
ret i32 %14
}
unsigned is_straight(const unsigned LUMP, const unsigned SMASK) {
  return (LUMP & SMASK) == SMASK;
}


x86 assembly (clang, -O0):
<is_straight>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_straight>:
not    %edi
xor    %eax,%eax
test   %edi,%esi
sete   %al
ret

LLVM IR (-O0):
define i32 @is_straight(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 = and i32 %5, %6
%8 = load i32, i32* %4
%9 = icmp eq i32 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_straight(i32 %0, i32 %1) {
%3 = and i32 %1, %0
%4 = icmp eq i32 %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ free(double *);
void free_double_array(double **anArray, int nbRows) {
  int i;
  for (i = 0; i < nbRows; i++) {
    free(anArray[i]);
  }
}


x86 assembly (clang, -O0):
<free_double_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <free_double_array+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <free_double_array+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_double_array>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1142 <free_double_array+0x32>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_double_array+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @free_double_array(double** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds double*, double** %0, i64 %7
%9 = load double*, double** %8
%10 = tail call i32 @free(double* %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tty_reset();
void tty_atexit(void) { tty_reset(); }


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

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

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

LLVM IR (-O2):
define void @tty_atexit() {
%1 = tail call i32 (...) @tty_reset()
ret void
}
__attribute__((no)) char nondet_char() {}


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

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

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

LLVM IR (-O2):
define signext i8 @nondet_char() {
ret i8 undef
}
unsigned int sinistro(int i) { return ((2 * i) + 1); }


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

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

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

LLVM IR (-O2):
define i32 @sinistro(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = or i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *, char const *);
scalar_t__ strcmp(char const *, char const *);
char *xdg_mime_get_mime_type_from_file_name(char const *);
void test_one_match(const char *filename, const char *expected) {
  const char *actual;
  actual = xdg_mime_get_mime_type_from_file_name(filename);
  if (strcmp(actual, expected) != 0) {
    printf("Test Failed: mime type of %s is %s, expected %s\n", filename,
           actual, expected);
  }
}


x86 assembly (clang, -O0):
<test_one_match>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <xdg_mime_get_mime_type_from_file_name@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     117c <test_one_match+0x4c>
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_one_match>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1050 <xdg_mime_get_mime_type_from_file_name@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     116d <test_one_match+0x3d>
lea    0xea6(%rip),%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <printf@plt>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [49 x i8] c"Test Failed: mime type of %s is %s, expected %s\0A\00"
define void @test_one_match(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i8* @xdg_mime_get_mime_type_from_file_name(i8* %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = load i8*, i8** %4
%10 = call i64 @strcmp(i8* %8, i8* %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %2
%13 = load i8*, i8** %3
%14 = load i8*, i8** %5
%15 = load i8*, i8** %4
%16 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %13, i8* %14, i8* %15)
br label %17
17: ; preds = %12, %2
ret void
}

LLVM IR (-O2):
@.str = [49 x i8] c"Test Failed: mime type of %s is %s, expected %s\0A\00"
define void @test_one_match(i8* %0, i8* %1) {
%3 = tail call i8* @xdg_mime_get_mime_type_from_file_name(i8* %0)
%4 = tail call i64 @strcmp(i8* %3, i8* %1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %3, i8* %1)
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UPnPResponse_RenderingControl_GetColorTemperature(void *,
                                                                     int);
int /*<<< orphan*/ printf(char *, unsigned int);
void UPnPRenderingControl_GetColorTemperature(void *upnptoken,
                                              unsigned int InstanceID) {
  printf("Invoke: UPnPRenderingControl_GetColorTemperature(%u);\r\n",
         InstanceID);
  UPnPResponse_RenderingControl_GetColorTemperature(upnptoken, 250);
}


x86 assembly (clang, -O0):
<UPnPRenderingControl_GetColorTemperature>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    $0xfa,%esi
call   1040 <UPnPResponse_RenderingControl_GetColorTemperature@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UPnPRenderingControl_GetColorTemperature>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfa,%esi
pop    %rbx
jmp    1040 <UPnPResponse_RenderingControl_GetColorTemperature@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"Invoke: UPnPRenderingControl_GetColorTemperature(%u);\0D\0A\00"
define void @UPnPRenderingControl_GetColorTemperature(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %3
%8 = call i32 @UPnPResponse_RenderingControl_GetColorTemperature(i8* %7, i32 250)
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"Invoke: UPnPRenderingControl_GetColorTemperature(%u);\0D\0A\00"
define void @UPnPRenderingControl_GetColorTemperature(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = tail call i32 @UPnPResponse_RenderingControl_GetColorTemperature(i8* %0, i32 250)
ret void
}
/* Variables and functions */
char *rindex(char *, char);
char *basename(char *path) {
  char *basename = rindex(path, '/');
  return basename ? ++basename : path;
}


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

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

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

LLVM IR (-O2):
define i8* @basename(i8* %0) {
%2 = tail call i8* @rindex(i8* %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
/* Variables and functions */
int core7_safe(char const *);
int U_EMRSETBRUSHORGEX_safe(const char *record) { return (core7_safe(record)); }


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

x86 assembly (clang, -O2):
<U_EMRSETBRUSHORGEX_safe>:
jmp    1030 <core7_safe@plt>

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

LLVM IR (-O2):
define i32 @U_EMRSETBRUSHORGEX_safe(i8* %0) {
%2 = tail call i32 @core7_safe(i8* %0)
ret i32 %2
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ exit(int);
int flip_endian(int);
int /*<<< orphan*/ print_usage(char **);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  if (argc < 2) {
    print_usage(argv);
    exit(1);
  }
  int n = atoi(argv[1]);
  printf("%d\n", flip_endian(n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1183 <main+0x33>
mov    -0x10(%rbp),%rdi
call   1070 <print_usage@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <flip_endian@plt>
mov    %eax,%esi
lea    0xe5c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jle    1178 <main+0x28>
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
call   1040 <flip_endian@plt>
lea    0xe93(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    %rsi,%rdi
call   1070 <print_usage@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = call i32 @print_usage(i8** %10)
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @atoi(i8* %16)
store i32 %17, i32* %6
%18 = load i32, i32* %6
%19 = call i32 @flip_endian(i32 %18)
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @print_usage(i8** %1)
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @atoi(i8* %9)
%11 = tail call i32 @flip_endian(i32 %10)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
ret i32 0
}
void leds_init() {
  (*(volatile unsigned int *)(0x44e000AC) = (unsigned int)(0x40002));
  (*(volatile unsigned int *)(0x4804C134) =
       (*(volatile unsigned int *)(0x4804C134)) & ~(0xf << 21));
}


x86 assembly (clang, -O0):
<leds_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x44e000ac,%eax
movl   $0x40002,(%rax)
mov    $0x4804c134,%eax
mov    (%rax),%ecx
and    $0xfe1fffff,%ecx
mov    $0x4804c134,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<leds_init>:
movl   $0x40002,0x44e000ac
andl   $0xfe1fffff,0x4804c134
ff ff 1f fe
ret

LLVM IR (-O0):
define void @leds_init() {
store volatile i32 262146, i32* inttoptr (i64 1155530924 to i32*)
%1 = load volatile i32, i32* inttoptr (i64 1208271156 to i32*)
%2 = and i32 %1, -31457281
store volatile i32 %2, i32* inttoptr (i64 1208271156 to i32*)
ret void
}

LLVM IR (-O2):
define void @leds_init() {
store volatile i32 262146, i32* inttoptr (i64 1155530924 to i32*)
%1 = load volatile i32, i32* inttoptr (i64 1208271156 to i32*)
%2 = and i32 %1, -31457281
store volatile i32 %2, i32* inttoptr (i64 1208271156 to i32*)
ret void
}
/* Variables and functions */
int syscall(int, void *, int);
int swapoff(const char *a, int i) { return syscall(115, (void *)a, i); }


x86 assembly (clang, -O0):
<swapoff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    $0x73,%edi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swapoff>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x73,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @swapoff(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @syscall(i32 115, i8* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @swapoff(i8* %0, i32 %1) {
%3 = tail call i32 @syscall(i32 115, i8* %0, i32 %1)
ret i32 %3
}
void PyErr_NoMemory() {}


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

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

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

LLVM IR (-O2):
define void @PyErr_NoMemory() {
ret void
}
char thermo_hex_to_temp(unsigned int val) {
  char temp;
  temp = (val >> 8) & 0xFF;
  ;
  return temp;
}


x86 assembly (clang, -O0):
<thermo_hex_to_temp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @thermo_hex_to_temp(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = lshr i32 %4, 8
%6 = and i32 %5, 255
%7 = trunc i32 %6 to i8
store i8 %7, i8* %3
%8 = load i8, i8* %3
ret i8 %8
}

LLVM IR (-O2):
define signext i8 @thermo_hex_to_temp(i32 %0) {
%2 = lshr i32 %0, 8
%3 = trunc i32 %2 to i8
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
int main(int argc, char *argv[], char *envp[]) {
  int i = 0;
  for (i = 0; i <= argc; i++)
    printf("argv[%d]=%s\n", i, argv[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     116d <main+0x5d>
mov    -0x1c(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1138 <main+0x28>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
js     1147 <main+0x37>
mov    %rsi,%r14
mov    %edi,%r15d
add    $0x1,%r15d
xor    %ebx,%ebx
lea    0xed1(%rip),%r12
nop
mov    (%r14,%rbx,8),%rdx
mov    %r12,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [13 x i8] c"argv[%d]=%s\0A\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i32
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
store i32 0, i32* %8
store i32 0, i32* %8
br label %9
9: ; preds = %21, %3
%10 = load i32, i32* %8
%11 = load i32, i32* %5
%12 = icmp sle i32 %10, %11
br i1 %12, label %13, label %24
13: ; preds = %9
%14 = load i32, i32* %8
%15 = load i8**, i8*** %6
%16 = load i32, i32* %8
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8*, i8** %15, i64 %17
%19 = load i8*, i8** %18
%20 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %14, i8* %19)
br label %21
21: ; preds = %13
%22 = load i32, i32* %8
%23 = add nsw i32 %22, 1
store i32 %23, i32* %8
br label %9
24: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"argv[%d]=%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1, i8** nocapture readnone %2) {
%4 = icmp slt i32 %0, 0
br i1 %4, label %16, label %5
5: ; preds = %3
%6 = add nuw i32 %0, 1
%7 = zext i32 %6 to i64
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ 0, %5 ], [ %14, %8 ]
%10 = getelementptr inbounds i8*, i8** %1, i64 %9
%11 = load i8*, i8** %10
%12 = trunc i64 %9 to i32
%13 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %12, i8* %11)
%14 = add nuw nsw i64 %9, 1
%15 = icmp eq i64 %14, %7
br i1 %15, label %16, label %8
16: ; preds = %8, %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ my_putchar(char);
void my_putblank(int nb) {
  int i;
  i = -1;
  if (nb < 0)
    return;
  while (++i < nb)
    my_putchar(' ');
}


x86 assembly (clang, -O0):
<my_putblank>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1131 <my_putblank+0x21>
jmp    1157 <my_putblank+0x47>
jmp    1136 <my_putblank+0x26>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmp    -0x4(%rbp),%eax
jge    1157 <my_putblank+0x47>
mov    $0x20,%edi
call   1030 <my_putchar@plt>
jmp    1136 <my_putblank+0x26>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_putblank>:
push   %rbx
test   %edi,%edi
jle    112f <my_putblank+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <my_putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <my_putblank+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @my_putblank(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 -1, i32* %3
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
br label %15
7: ; preds = %1
br label %8
8: ; preds = %13, %7
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
store i32 %10, i32* %3
%11 = load i32, i32* %2
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = call i32 @my_putchar(i8 signext 32)
br label %8
15: ; preds = %6, %8
ret void
}

LLVM IR (-O2):
define void @my_putblank(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @my_putchar(i8 signext 32)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
void kasan_unpoison_object_data(struct kmem_cache *cache, void *object) {}


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

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

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

LLVM IR (-O2):
%struct.kmem_cache = type opaque
define void @kasan_unpoison_object_data(%struct.kmem_cache* nocapture %0, i8* nocapture %1) {
ret void
}
void SwapUVRow_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @SwapUVRow_SSSE3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OPENSSL_add_all_algorithms_noconf();
void OpenSSL_add_all_algorithms() { OPENSSL_add_all_algorithms_noconf(); }


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

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

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

LLVM IR (-O2):
define void @OpenSSL_add_all_algorithms() {
%1 = tail call i32 (...) @OPENSSL_add_all_algorithms_noconf()
ret void
}