xunge/DecIR huggingface dataset:
int test_get_bit(void *opaque) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @test_get_bit(i8* nocapture readnone %0) {
ret i32 1
}
/* Type definitions */
struct stmt {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ interp_stmt(struct stmt *, int /*<<< orphan*/ *);
void interp(struct stmt *s) { interp_stmt(s, NULL); }


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

x86 assembly (clang, -O2):
<interp>:
xor    %esi,%esi
jmp    1030 <interp_stmt@plt>

LLVM IR (-O0):
%struct.stmt = type { i32 }
define void @interp(%struct.stmt* %0) {
%2 = alloca %struct.stmt*
store %struct.stmt* %0, %struct.stmt** %2
%3 = load %struct.stmt*, %struct.stmt** %2
%4 = call i32 @interp_stmt(%struct.stmt* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.stmt = type { i32 }
define void @interp(%struct.stmt* %0) {
%2 = tail call i32 @interp_stmt(%struct.stmt* %0, i32* null)
ret void
}
void handle_dump_state(int sig, void *eloop_ctx, void *signal_ctx) {}


x86 assembly (clang, -O0):
<handle_dump_state>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @handle_dump_state(i32 %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
void cleanUpEnumeration() {}


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

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

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

LLVM IR (-O2):
define void @cleanUpEnumeration() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MHal_MOD_PVDD_Power_Setting(unsigned char);
void MApi_MOD_PVDD_Power_Setting(unsigned char bIs2p5) {
  ;
  MHal_MOD_PVDD_Power_Setting(bIs2p5);
  ;
}


x86 assembly (clang, -O0):
<MApi_MOD_PVDD_Power_Setting>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <MHal_MOD_PVDD_Power_Setting@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MApi_MOD_PVDD_Power_Setting>:
jmp    1030 <MHal_MOD_PVDD_Power_Setting@plt>

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

LLVM IR (-O2):
define void @MApi_MOD_PVDD_Power_Setting(i8 zeroext %0) {
%2 = tail call i32 @MHal_MOD_PVDD_Power_Setting(i8 zeroext %0)
ret void
}
void integer_placeholder(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
void *ofpbuf_put_uninit(struct ofpbuf *, size_t);
void *ofpbuf_put(struct ofpbuf *b, const void *p, size_t size) {
  void *dst = ofpbuf_put_uninit(b, size);
  memcpy(dst, p, size);
  return dst;
}


x86 assembly (clang, -O0):
<ofpbuf_put>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <ofpbuf_put_uninit@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ofpbuf_put>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdx,%rsi
call   1040 <ofpbuf_put_uninit@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.ofpbuf = type { i32 }
define i8* @ofpbuf_put(%struct.ofpbuf* %0, i8* %1, i64 %2) {
%4 = alloca %struct.ofpbuf*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
store %struct.ofpbuf* %0, %struct.ofpbuf** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load %struct.ofpbuf*, %struct.ofpbuf** %4
%9 = load i64, i64* %6
%10 = call i8* @ofpbuf_put_uninit(%struct.ofpbuf* %8, i64 %9)
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = load i8*, i8** %5
%13 = load i64, i64* %6
%14 = call i32 @memcpy(i8* %11, i8* %12, i64 %13)
%15 = load i8*, i8** %7
ret i8* %15
}

LLVM IR (-O2):
%struct.ofpbuf = type { i32 }
define i8* @ofpbuf_put(%struct.ofpbuf* %0, i8* %1, i64 %2) {
%4 = tail call i8* @ofpbuf_put_uninit(%struct.ofpbuf* %0, i64 %2)
%5 = tail call i32 @memcpy(i8* %4, i8* %1, i64 %2)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void mdie(const char *why) {
  fprintf(stderr, "die: %s\n", why);
  exit(2);
}


x86 assembly (clang, -O0):
<mdie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<mdie>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [9 x i8] c"die: %s\0A\00"
define void @mdie(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [9 x i8] c"die: %s\0A\00"
define void @mdie(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 2)
unreachable
}
int f(int x, int y) {
  if (x > -1024 && x < 0 && y > -1024 && y < 0) {
    x = x ^ y;
    if (x < 0 || x > 1023)
      return 1234;
  }
  return x;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0xfffffc00,-0x8(%rbp)
jle    1169 <f+0x69>
cmpl   $0x0,-0x8(%rbp)
jge    1169 <f+0x69>
cmpl   $0xfffffc00,-0xc(%rbp)
jle    1169 <f+0x69>
cmpl   $0x0,-0xc(%rbp)
jge    1169 <f+0x69>
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1158 <f+0x58>
cmpl   $0x3ff,-0x8(%rbp)
jle    1164 <f+0x64>
movl   $0x4d2,-0x4(%rbp)
jmp    116f <f+0x6f>
jmp    1169 <f+0x69>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
cmp    $0xfffffc01,%edi
jb     111f <f+0x1f>
cmp    $0xfffffc01,%esi
jb     111f <f+0x1f>
xor    %esi,%edi
mov    $0x4d2,%eax
cmp    $0x3ff,%edi
ja     1121 <f+0x21>
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = icmp ugt i32 %0, -1024
%4 = icmp ugt i32 %1, -1024
%5 = and i1 %3, %4
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = xor i32 %1, %0
%8 = icmp ugt i32 %7, 1023
br i1 %8, label %11, label %9
9: ; preds = %6, %2
%10 = phi i32 [ %7, %6 ], [ %0, %2 ]
br label %11
11: ; preds = %6, %9
%12 = phi i32 [ %10, %9 ], [ 1234, %6 ]
ret i32 %12
}
/* Variables and functions */
int mkdir(char *);
int ILibFileDir_CreateDir(char *path) { return (mkdir(path)); }


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

x86 assembly (clang, -O2):
<ILibFileDir_CreateDir>:
jmp    1030 <mkdir@plt>

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

LLVM IR (-O2):
define i32 @ILibFileDir_CreateDir(i8* nocapture %0) {
%2 = tail call i32 @mkdir(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ _makespace(char **, int /*<<< orphan*/);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strlen(char *);
void xstrcat(char **str1, char *str2) {
  _makespace(str1, strlen(str2));
  strcat(*str1, str2);
}


x86 assembly (clang, -O0):
<xstrcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1040 <_makespace@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <strcat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrcat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <_makespace@plt>
mov    (%rbx),%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <strcat@plt>

LLVM IR (-O0):
define void @xstrcat(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 @strlen(i8* %6)
%8 = call i32 @_makespace(i8** %5, i32 %7)
%9 = load i8**, i8*** %3
%10 = load i8*, i8** %9
%11 = load i8*, i8** %4
%12 = call i32 @strcat(i8* %10, i8* %11)
ret void
}

LLVM IR (-O2):
define void @xstrcat(i8** %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @_makespace(i8** %0, i32 %3)
%5 = load i8*, i8** %0
%6 = tail call i32 @strcat(i8* %5, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ posix_binary_file_read(char *, char **, size_t *, int *);
void ext_configuration_read(char **buffer, size_t *buffer_size,
                            bool *needs_deallocation) {
  posix_binary_file_read("kaa_configuration.bin", buffer, buffer_size,
                         needs_deallocation);
}


x86 assembly (clang, -O0):
<ext_configuration_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xec9(%rip),%rdi
call   1030 <posix_binary_file_read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ext_configuration_read>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee0(%rip),%rdi
jmp    1030 <posix_binary_file_read@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"kaa_configuration.bin\00"
define void @ext_configuration_read(i8** %0, i64* %1, i32* %2) {
%4 = alloca i8**
%5 = alloca i64*
%6 = alloca i32*
store i8** %0, i8*** %4
store i64* %1, i64** %5
store i32* %2, i32** %6
%7 = load i8**, i8*** %4
%8 = load i64*, i64** %5
%9 = load i32*, i32** %6
%10 = call i32 @posix_binary_file_read(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8** %7, i64* %8, i32* %9)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"kaa_configuration.bin\00"
define void @ext_configuration_read(i8** %0, i64* %1, i32* %2) {
%4 = tail call i32 @posix_binary_file_read(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8** %0, i64* %1, i32* %2)
ret void
}
void vnum_result3(int *data) {
  int k = data[2];
  data[k] = 2;
  data[0] = 0;
}


x86 assembly (clang, -O0):
<vnum_result3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x2,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<vnum_result3>:
movslq 0x8(%rdi),%rax
movl   $0x2,(%rdi,%rax,4)
movl   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @vnum_result3(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 2
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %7, i64 %9
store i32 2, i32* %10
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 0
store i32 0, i32* %12
ret void
}

LLVM IR (-O2):
define void @vnum_result3(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 2, i32* %5
store i32 0, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void ouchbehavior(int sig) {
  printf("   OUCH! - I got signal %d , and this was my reaction.\n", sig);
  printf("   Give me a Ctrl+ \\ to really stop me! \n");
}


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

x86 assembly (clang, -O2):
<ouchbehavior>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf00(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [56 x i8] c" OUCH! - I got signal %d , and this was my reaction.\0A\00"
@.str.1 = [42 x i8] c" Give me a Ctrl+ \\ to really stop me! \0A\00"
define void @ouchbehavior(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c" OUCH! - I got signal %d , and this was my reaction.\0A\00"
@str = [41 x i8] c" Give me a Ctrl+ \\ to really stop me! \00"
define void @ouchbehavior(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int GLint;
typedef int /*<<< orphan*/ GLfloat;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *spewPrimitiveEPS(int /*<<< orphan*/ *,
                                     int /*<<< orphan*/ *);
void spewUnsortedFeedback(FILE *file, GLint size, GLfloat *buffer) {
  GLfloat *loc, *end;
  loc = buffer;
  end = buffer + size;
  while (loc < end) {
    loc = spewPrimitiveEPS(file, loc);
  }
}


x86 assembly (clang, -O0):
<spewUnsortedFeedback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jae    1162 <spewUnsortedFeedback+0x52>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <spewPrimitiveEPS@plt>
mov    %rax,-0x20(%rbp)
jmp    113e <spewUnsortedFeedback+0x2e>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spewUnsortedFeedback>:
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    1140 <spewUnsortedFeedback+0x30>
mov    %rdx,%rax
mov    %rdi,%r14
movslq %esi,%rcx
lea    (%rdx,%rcx,4),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %rax,%rsi
call   1030 <spewPrimitiveEPS@plt>
cmp    %rbx,%rax
jb     1130 <spewUnsortedFeedback+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @spewUnsortedFeedback(i32* %0, i32 %1, i32* %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %2, i64 %4
%6 = icmp sgt i32 %1, 0
br i1 %6, label %7, label %11
7: ; preds = %3, %7
%8 = phi i32* [ %9, %7 ], [ %2, %3 ]
%9 = tail call i32* @spewPrimitiveEPS(i32* %0, i32* %8)
%10 = icmp ult i32* %9, %5
br i1 %10, label %7, label %11
11: ; preds = %7, %3
ret void
}
void init_sub_color_span_funcs_c(void) {}


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

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

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

LLVM IR (-O2):
define void @init_sub_color_span_funcs_c() {
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t bswap_64(uint64_t val) {
  return ((val & (uint64_t)0x00000000000000ffULL) << 56) |
         ((val & (uint64_t)0x000000000000ff00ULL) << 40) |
         ((val & (uint64_t)0x0000000000ff0000ULL) << 24) |
         ((val & (uint64_t)0x00000000ff000000ULL) << 8) |
         ((val & (uint64_t)0x000000ff00000000ULL) >> 8) |
         ((val & (uint64_t)0x0000ff0000000000ULL) >> 24) |
         ((val & (uint64_t)0x00ff000000000000ULL) >> 40) |
         ((val & (uint64_t)0xff00000000000000ULL) >> 56);
}


x86 assembly (clang, -O0):
<bswap_64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    $0x38,%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
and    $0xff00,%edx
mov    $0x28,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff000000,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0x0,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0x0,%ecx
sar    $0x18,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%edx
and    $0x0,%edx
mov    $0x28,%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%edx
and    $0x0,%edx
mov    $0x38,%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @bswap_64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 56
%6 = load i32, i32* %2
%7 = and i32 %6, 65280
%8 = shl i32 %7, 40
%9 = or i32 %5, %8
%10 = load i32, i32* %2
%11 = and i32 %10, 16711680
%12 = shl i32 %11, 24
%13 = or i32 %9, %12
%14 = load i32, i32* %2
%15 = and i32 %14, -16777216
%16 = shl i32 %15, 8
%17 = or i32 %13, %16
%18 = load i32, i32* %2
%19 = and i32 %18, 0
%20 = ashr i32 %19, 8
%21 = or i32 %17, %20
%22 = load i32, i32* %2
%23 = and i32 %22, 0
%24 = ashr i32 %23, 24
%25 = or i32 %21, %24
%26 = load i32, i32* %2
%27 = and i32 %26, 0
%28 = ashr i32 %27, 40
%29 = or i32 %25, %28
%30 = load i32, i32* %2
%31 = and i32 %30, 0
%32 = ashr i32 %31, 56
%33 = or i32 %29, %32
ret i32 %33
}

LLVM IR (-O2):
define i32 @bswap_64(i32 %0) {
ret i32 poison
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int strlen(char *);
int istail(char *str, char *of) {
  int d = strlen(of) - strlen(str);
  if (d < 0 || strcmp(&of[d], str) != 0)
    return (-1);
  return (d);
}


x86 assembly (clang, -O0):
<istail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jl     1177 <istail+0x57>
mov    -0x18(%rbp),%rdi
movslq -0x1c(%rbp),%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     1183 <istail+0x63>
movl   $0xffffffff,-0x4(%rbp)
jmp    1189 <istail+0x69>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<istail>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %eax,%ebx
mov    %r14,%rdi
call   1030 <strlen@plt>
sub    %eax,%ebx
js     115a <istail+0x3a>
mov    %ebx,%eax
add    %rax,%r15
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
neg    %rax
sbb    %eax,%eax
or     %ebx,%eax
jmp    115f <istail+0x3f>
mov    $0xffffffff,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @istail(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @strlen(i8* %0)
%5 = sub nsw i32 %3, %4
%6 = icmp slt i32 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %2
%8 = zext i32 %5 to i64
%9 = getelementptr inbounds i8, i8* %1, i64 %8
%10 = tail call i64 @strcmp(i8* %9, i8* %0)
%11 = icmp eq i64 %10, 0
%12 = select i1 %11, i32 %5, i32 -1
br label %13
13: ; preds = %7, %2
%14 = phi i32 [ -1, %2 ], [ %12, %7 ]
ret i32 %14
}
int test_imm_A4uint16_mem(unsigned short *val) {
  return ((*val) & (0xA4 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_A4uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 164
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int wchar_t;

/* Variables and functions */
wchar_t *wcscpy(wchar_t *dst, const wchar_t *src) {
  wchar_t *ret;
  ret = dst;
  for (; *src != L'\0'; *dst++ = *src++)
    ;
  *dst = L'\0';
  return ret;
}


x86 assembly (clang, -O0):
<wcscpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
je     114d <wcscpy+0x4d>
jmp    1126 <wcscpy+0x26>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
jmp    1114 <wcscpy+0x14>
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcscpy>:
mov    %rdi,%rax
mov    (%rsi),%ecx
mov    %rdi,%rdx
test   %ecx,%ecx
je     1130 <wcscpy+0x30>
add    $0x4,%rsi
mov    %rax,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ecx,(%rdx)
add    $0x4,%rdx
mov    (%rsi),%ecx
add    $0x4,%rsi
test   %ecx,%ecx
jne    1120 <wcscpy+0x20>
movl   $0x0,(%rdx)
ret

LLVM IR (-O0):
define i32* @wcscpy(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
store i32* %6, i32** %5
br label %7
7: ; preds = %12, %2
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %7
br label %12
12: ; preds = %11
%13 = load i32*, i32** %4
%14 = getelementptr inbounds i32, i32* %13, i32 1
store i32* %14, i32** %4
%15 = load i32, i32* %13
%16 = load i32*, i32** %3
%17 = getelementptr inbounds i32, i32* %16, i32 1
store i32* %17, i32** %3
store i32 %15, i32* %16
br label %7
18: ; preds = %7
%19 = load i32*, i32** %3
store i32 0, i32* %19
%20 = load i32*, i32** %5
ret i32* %20
}

LLVM IR (-O2):
define i32* @wcscpy(i32* returned writeonly %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %11, %5 ], [ %3, %2 ]
%7 = phi i32* [ %10, %5 ], [ %0, %2 ]
%8 = phi i32* [ %9, %5 ], [ %1, %2 ]
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = getelementptr inbounds i32, i32* %7, i64 1
store i32 %6, i32* %7
%11 = load i32, i32* %9
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i32* [ %0, %2 ], [ %10, %5 ]
store i32 0, i32* %14
ret i32* %0
}
/* Variables and functions */
char *CopyStr(char *, char const *);
int strlen(char *);
char *CopyStrLen(char *Dest, const char *Src, int len) {
  char *ptr;
  ptr = CopyStr(Dest, Src);
  if ((ptr ? strlen(ptr) : 0) > len)
    ptr[len] = 0;
  return (ptr);
}


x86 assembly (clang, -O0):
<CopyStrLen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <CopyStr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1160 <CopyStrLen+0x40>
mov    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x24(%rbp)
jmp    116a <CopyStrLen+0x4a>
xor    %eax,%eax
mov    %eax,-0x24(%rbp)
jmp    116a <CopyStrLen+0x4a>
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    1182 <CopyStrLen+0x62>
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CopyStrLen>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
call   1040 <CopyStr@plt>
mov    %rax,%rbx
test   %rax,%rax
je     114f <CopyStrLen+0x2f>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cmp    %ebp,%eax
jle    1145 <CopyStrLen+0x25>
movslq %ebp,%rax
movb   $0x0,(%rbx,%rax,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
xor    %eax,%eax
cmp    %ebp,%eax
jg     113e <CopyStrLen+0x1e>
jmp    1145 <CopyStrLen+0x25>

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

LLVM IR (-O2):
define i8* @CopyStrLen(i8* %0, i8* %1, i32 %2) {
%4 = tail call i8* @CopyStr(i8* %0, i8* %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @strlen(i8* %4)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %7, %6 ], [ 0, %3 ]
%10 = icmp sgt i32 %9, %2
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = sext i32 %2 to i64
%13 = getelementptr inbounds i8, i8* %4, i64 %12
store i8 0, i8* %13
br label %14
14: ; preds = %11, %8
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ fa_huffman_rom_init();
int /*<<< orphan*/ fa_mdctquant_rom_init();
int /*<<< orphan*/ fa_protect_db_rom_init();
int /*<<< orphan*/ fa_psychomodel1_rom_init();
void fa_aacenc_rom_init() {
  fa_psychomodel1_rom_init();
  fa_mdctquant_rom_init();
  fa_huffman_rom_init();
  fa_protect_db_rom_init();
}


x86 assembly (clang, -O0):
<fa_aacenc_rom_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <fa_psychomodel1_rom_init@plt>
mov    $0x0,%al
call   1040 <fa_mdctquant_rom_init@plt>
mov    $0x0,%al
call   1060 <fa_huffman_rom_init@plt>
mov    $0x0,%al
call   1030 <fa_protect_db_rom_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fa_aacenc_rom_init>:
push   %rax
xor    %eax,%eax
call   1050 <fa_psychomodel1_rom_init@plt>
xor    %eax,%eax
call   1040 <fa_mdctquant_rom_init@plt>
xor    %eax,%eax
call   1060 <fa_huffman_rom_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <fa_protect_db_rom_init@plt>

LLVM IR (-O0):
define void @fa_aacenc_rom_init() {
%1 = call i32 (...) @fa_psychomodel1_rom_init()
%2 = call i32 (...) @fa_mdctquant_rom_init()
%3 = call i32 (...) @fa_huffman_rom_init()
%4 = call i32 (...) @fa_protect_db_rom_init()
ret void
}

LLVM IR (-O2):
define void @fa_aacenc_rom_init() {
%1 = tail call i32 (...) @fa_psychomodel1_rom_init()
%2 = tail call i32 (...) @fa_mdctquant_rom_init()
%3 = tail call i32 (...) @fa_huffman_rom_init()
%4 = tail call i32 (...) @fa_protect_db_rom_init()
ret void
}
void disable_xp_(void) {}


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

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

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

LLVM IR (-O2):
define void @disable_xp_() {
ret void
}
int i2c_read_reg(int regnum) {
  return (*(volatile unsigned char *)((0x900000007F00B000ULL) + regnum));
}


x86 assembly (clang, -O0):
<i2c_read_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movabs $0x900000007f00b000,%rcx
add    %rcx,%rax
mov    (%rax),%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_read_reg>:
movslq %edi,%rax
movabs $0x900000007f00b000,%rcx
movzbl (%rax,%rcx,1),%eax
ret

LLVM IR (-O0):
define i32 @i2c_read_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = add i64 -8070450530117177344, %4
%6 = inttoptr i64 %5 to i8*
%7 = load volatile i8, i8* %6
%8 = zext i8 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @i2c_read_reg(i32 %0) {
%2 = sext i32 %0 to i64
%3 = add nsw i64 %2, -8070450530117177344
%4 = inttoptr i64 %3 to i8*
%5 = load volatile i8, i8* %4
%6 = zext i8 %5 to i32
ret i32 %6
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int dobldobl_scale_solutions(int dim, int basis, double *cff) {
  int fail;
  fail = _ada_use_c2phc(595, &dim, &basis, cff);
  return fail;
}


x86 assembly (clang, -O0):
<dobldobl_scale_solutions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    $0x253,%edi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dobldobl_scale_solutions>:
push   %rax
mov    %rdx,%rcx
mov    %edi,0x4(%rsp)
mov    %esi,(%rsp)
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
mov    $0x253,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @dobldobl_scale_solutions(i32 %0, i32 %1, double* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca double*
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store double* %2, double** %6
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc(i32 595, i32* %4, i32* %5, double* %8)
store i32 %9, i32* %7
%10 = load i32, i32* %7
ret i32 %10
}

LLVM IR (-O2):
define i32 @dobldobl_scale_solutions(i32 %0, i32 %1, double* %2) {
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 @_ada_use_c2phc(i32 595, i32* %4, i32* %5, double* %2)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ send_ec_command(int);
int send_ec_data(int /*<<< orphan*/);
int ec_write(uint8_t addr, uint8_t data) {
  send_ec_command(0x81);
  send_ec_data(addr);
  return send_ec_data(data);
}


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

x86 assembly (clang, -O2):
<ec_write>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x81,%edi
call   1030 <send_ec_command@plt>
mov    %ebp,%edi
call   1040 <send_ec_data@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <send_ec_data@plt>

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

LLVM IR (-O2):
define i32 @ec_write(i32 %0, i32 %1) {
%3 = tail call i32 @send_ec_command(i32 129)
%4 = tail call i32 @send_ec_data(i32 %0)
%5 = tail call i32 @send_ec_data(i32 %1)
ret i32 %5
}
/* Variables and functions */
int f320(int *);
int f321(int *p) { return f320(p); }


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

x86 assembly (clang, -O2):
<f321>:
jmp    1030 <f320@plt>

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

LLVM IR (-O2):
define i32 @f321(i32* %0) {
%2 = tail call i32 @f320(i32* %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ isspace(char);
char *tx_ltrim(char *str) {
  char *cptr = str;
  while (isspace(*cptr))
    cptr++;
  return cptr;
}


x86 assembly (clang, -O0):
<tx_ltrim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     114b <tx_ltrim+0x3b>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <tx_ltrim+0x14>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tx_ltrim>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <tx_ltrim+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @tx_ltrim(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
void fprint_addc_data(FILE *stream, uint8_t data) {
  fprintf(stream,
          "ADDC  A, #"
          "0x%02X"
          "                  ",
          data);
}


x86 assembly (clang, -O0):
<fprint_addc_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprint_addc_data>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"ADDC A,x%02X \00"
define void @fprint_addc_data(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"ADDC A,x%02X \00"
define void @fprint_addc_data(i32* nocapture %0, i32 %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, int *);
int read_int(FILE *fp) {
  int i;
  fscanf(fp, "%d", &i);
  return i;
}


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

x86 assembly (clang, -O2):
<read_int>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1030 <fscanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @read_int(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @fscanf(i32* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @read_int(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
ret i32 %5
}
void level(struct node *root) {}


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

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

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

LLVM IR (-O2):
%struct.node = type opaque
define void @level(%struct.node* nocapture %0) {
ret void
}
void do_some_work() {
  int i;
  for (i = 0; i < 0x2000; i++) {
    i = i * 10.0 / 5 / 2;
  }
}


x86 assembly (clang, -O0):
<do_some_work>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x2000,-0x4(%rbp)
jge    1156 <do_some_work+0x56>
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xeeb(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed7(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xec3(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <do_some_work+0xb>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @do_some_work() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %12, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 8192
br i1 %4, label %5, label %15
5: ; preds = %2
%6 = load i32, i32* %1
%7 = sitofp i32 %6 to double
%8 = fmul double %7, 1.000000e+01
%9 = fdiv double %8, 5.000000e+00
%10 = fdiv double %9, 2.000000e+00
%11 = fptosi double %10 to i32
store i32 %11, i32* %1
br label %12
12: ; preds = %5
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 1
store i32 %14, i32* %1
br label %2
15: ; preds = %2
ret void
}

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


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @SwapWords(i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int ieee_isnan(double x) {
  int hx, lx;
  hx = (*(int *)&x & 0x7fffffff);
  lx = *(1 + (int *)&x);
  hx |= (unsigned)(lx | (-lx)) >> 31;
  hx = 0x7ff00000 - hx;
  return ((unsigned)(hx)) >> 31;
}


x86 assembly (clang, -O0):
<ieee_isnan>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x7fffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    %ecx,%ecx
sub    -0x10(%rbp),%ecx
or     %ecx,%eax
shr    $0x1f,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x7ff00000,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x1f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee_isnan>:
movq   %xmm0,%rax
mov    %eax,%ecx
and    $0x7fffffff,%ecx
xor    %edx,%edx
shr    $0x20,%rax
setne  %dl
or     %ecx,%edx
xor    %eax,%eax
cmp    $0x7ff00001,%edx
setae  %al
ret

LLVM IR (-O0):
define i32 @ieee_isnan(double %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca i32
store double %0, double* %2
%5 = bitcast double* %2 to i32*
%6 = load i32, i32* %5
%7 = and i32 %6, 2147483647
store i32 %7, i32* %3
%8 = bitcast double* %2 to i32*
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load i32, i32* %9
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = load i32, i32* %4
%13 = sub nsw i32 0, %12
%14 = or i32 %11, %13
%15 = lshr i32 %14, 31
%16 = load i32, i32* %3
%17 = or i32 %16, %15
store i32 %17, i32* %3
%18 = load i32, i32* %3
%19 = sub nsw i32 2146435072, %18
store i32 %19, i32* %3
%20 = load i32, i32* %3
%21 = lshr i32 %20, 31
ret i32 %21
}

LLVM IR (-O2):
define i32 @ieee_isnan(double %0) {
%2 = bitcast double %0 to i64
%3 = trunc i64 %2 to i32
%4 = and i32 %3, 2147483647
%5 = icmp ugt i64 %2, 4294967295
%6 = zext i1 %5 to i32
%7 = or i32 %4, %6
%8 = icmp ugt i32 %7, 2146435072
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *, char const *, char const *);
int /*<<< orphan*/ exit(int);
scalar_t__ link(char const *, char const *);
void dohardlink(const char *oldfile, const char *newfile) {
  if (link(oldfile, newfile)) {
    err(1, "%s or %s", oldfile, newfile);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<dohardlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <link@plt>
cmp    $0x0,%rax
je     117a <dohardlink+0x4a>
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0x1,%edi
lea    0xe95(%rip),%rsi
call   1030 <err@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dohardlink>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <link@plt>
test   %rax,%rax
jne    114c <dohardlink+0x1c>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xead(%rip),%rsi
mov    $0x1,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1030 <err@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%s or %s\00"
define void @dohardlink(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 i64 @link(i8* %5, i8* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = load i8*, i8** %4
%12 = call i32 @err(i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11)
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s or %s\00"
define void @dohardlink(i8* %0, i8* %1) {
%3 = tail call i64 @link(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XCloseIM() {
  printf("XCloseIM called\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<XCloseIM>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [16 x i8] c"XCloseIM called\00"
define i32 @XCloseIM() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret i32 0
}