xunge/DecIR huggingface dataset:
void *_dictStringKeyValCopyHTValDup(void *privdata, const void *val) {
  int len = strlen(val);
  char *copy = malloc(len + 1);
  ((void)privdata);
  memcpy(copy, val, len);
  copy[len] = '\0';
  return copy;
}


x86 assembly (clang, -O0):
<_dictStringKeyValCopyHTValDup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dictStringKeyValCopyHTValDup>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %rax,%r15
add    $0x1,%eax
movslq %eax,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
movslq %r15d,%r15
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
movb   $0x0,(%rbx,%r15,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define noalias i8* @_dictStringKeyValCopyHTValDup(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = shl i64 %3, 32
%5 = add i64 %4, 4294967296
%6 = ashr exact i64 %5, 32
%7 = tail call i8* @malloc(i64 %6)
%8 = ashr exact i64 %4, 32
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %7, i8* align 1 %1, i64 %8, i1 false)
%9 = getelementptr inbounds i8, i8* %7, i64 %8
store i8 0, i8* %9
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ R_OK;
int access(char *, int /*<<< orphan*/);
int canread(char *filename) { return access(filename, R_OK) == true; }


x86 assembly (clang, -O0):
<canread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<canread>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@R_OK = global i32 0
define i32 @canread(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @R_OK
%5 = call i32 @access(i8* %3, i32 %4)
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
@R_OK = global i32 0
define i32 @canread(i8* nocapture %0) {
%2 = load i32, i32* @R_OK
%3 = tail call i32 @access(i8* %0, i32 %2)
%4 = icmp eq i32 %3, 1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ Interpolate_3(int /*<<< orphan*/, int, int /*<<< orphan*/,
                                 int, int /*<<< orphan*/, int, int);
uint32_t Interp7(uint32_t c1, uint32_t c2, uint32_t c3) {
  return Interpolate_3(c1, 6, c2, 1, c3, 1, 3);
}


x86 assembly (clang, -O0):
<Interp7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%r8d
mov    $0x6,%esi
mov    $0x1,%r9d
mov    %r9d,%ecx
movl   $0x3,(%rsp)
call   1030 <Interpolate_3@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Interp7>:
push   %rax
mov    %edx,%r8d
mov    %esi,%edx
movl   $0x3,(%rsp)
mov    $0x6,%esi
mov    $0x1,%ecx
mov    $0x1,%r9d
call   1030 <Interpolate_3@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @Interp7(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @Interpolate_3(i32 %0, i32 6, i32 %1, i32 1, i32 %2, i32 1, i32 3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  char buffer[64];
  printf("You win this game if you are able to call the function win.'\n");
  gets(buffer);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    -0x50(%rbp),%rdi
call   1040 <gets@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%rdi
call   1040 <gets@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@.str = [62 x i8] c"You win this game if you are able to call the function win.'\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [64 x i8]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%7 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%8 = call i32 @gets(i8* %7)
ret i32 0
}

LLVM IR (-O2):
@str = [61 x i8] c"You win this game if you are able to call the function win.'\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [64 x i8]
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str, i64 0, i64 0))
%6 = call i32 @gets(i8* %4)
ret i32 0
}
/* Type definitions */
struct katcl_line {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ clear_katcl(struct katcl_line *);
int parse_katcl(struct katcl_line *);
scalar_t__ ready_katcl(struct katcl_line *);
int have_katcl(struct katcl_line *l) {
  if (ready_katcl(l)) {
    clear_katcl(l);
  }
  return parse_katcl(l);
}


x86 assembly (clang, -O0):
<have_katcl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ready_katcl@plt>
cmp    $0x0,%rax
je     1158 <have_katcl+0x28>
mov    -0x8(%rbp),%rdi
call   1050 <clear_katcl@plt>
mov    -0x8(%rbp),%rdi
call   1040 <parse_katcl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<have_katcl>:
push   %rbx
mov    %rdi,%rbx
call   1030 <ready_katcl@plt>
test   %rax,%rax
je     1146 <have_katcl+0x16>
mov    %rbx,%rdi
call   1050 <clear_katcl@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <parse_katcl@plt>

LLVM IR (-O0):
%struct.katcl_line = type { i32 }
define i32 @have_katcl(%struct.katcl_line* %0) {
%2 = alloca %struct.katcl_line*
store %struct.katcl_line* %0, %struct.katcl_line** %2
%3 = load %struct.katcl_line*, %struct.katcl_line** %2
%4 = call i64 @ready_katcl(%struct.katcl_line* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load %struct.katcl_line*, %struct.katcl_line** %2
%8 = call i32 @clear_katcl(%struct.katcl_line* %7)
br label %9
9: ; preds = %6, %1
%10 = load %struct.katcl_line*, %struct.katcl_line** %2
%11 = call i32 @parse_katcl(%struct.katcl_line* %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.katcl_line = type { i32 }
define i32 @have_katcl(%struct.katcl_line* %0) {
%2 = tail call i64 @ready_katcl(%struct.katcl_line* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @clear_katcl(%struct.katcl_line* %0)
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @parse_katcl(%struct.katcl_line* %0)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fun_should_not_be_called() { printf("fun_should_not_be_called\n"); }


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

x86 assembly (clang, -O2):
<fun_should_not_be_called>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [25 x i8] c"fun_should_not_be_called\00"
define void @fun_should_not_be_called() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret void
}
int noscramble(int a) { return a; }


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

x86 assembly (clang, -O2):
<noscramble>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @noscramble(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ CompileOffset(int /*<<< orphan*/, int);
int /*<<< orphan*/ DecodeLiteral();
void DoPField(void) { CompileOffset(DecodeLiteral(), 51); }


x86 assembly (clang, -O0):
<DoPField>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <DecodeLiteral@plt>
mov    %eax,%edi
mov    $0x33,%esi
call   1040 <CompileOffset@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoPField>:
push   %rax
xor    %eax,%eax
call   1030 <DecodeLiteral@plt>
mov    %eax,%edi
mov    $0x33,%esi
pop    %rax
jmp    1040 <CompileOffset@plt>

LLVM IR (-O0):
define void @DoPField() {
%1 = call i32 (...) @DecodeLiteral()
%2 = call i32 @CompileOffset(i32 %1, i32 51)
ret void
}

LLVM IR (-O2):
define void @DoPField() {
%1 = tail call i32 (...) @DecodeLiteral()
%2 = tail call i32 @CompileOffset(i32 %1, i32 51)
ret void
}
void end_resp_to_client(void) {}


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

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

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

LLVM IR (-O2):
define void @end_resp_to_client() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void ft_putchar_fd(char c, int fd) {
  (void)write(fd, &c, 0x01);
  return;
}


x86 assembly (clang, -O0):
<ft_putchar_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putchar_fd>:
push   %rax
mov    %esi,%eax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    %eax,%edi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @ft_putchar_fd(i8 signext %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 @write(i32 %5, i8* %3, i32 1)
ret void
}

LLVM IR (-O2):
define void @ft_putchar_fd(i8 signext %0, i32 %1) {
%3 = alloca i8
store i8 %0, i8* %3
%4 = call i32 @write(i32 %1, i8* %3, i32 1)
ret void
}
int test_imm_CEuint16_mem(unsigned short *val) {
  return ((*val) & (-0xCE << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_CEuint16_mem>:
movzwl (%rdi),%eax
test   $0xff32,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_CEuint16_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, -206
%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_CEuint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -206
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x5a() {
  Assert_real((isdigit(90) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              455, ("isdigit should be 0 for Z"));
}


x86 assembly (clang, -O0):
<t_isdigit_0x5a>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5a,%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x1c7,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isdigit_0x5a>:
push   %rax
mov    $0x5a,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1c7,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for Z\00"
define void @t_isdigit_0x5a() {
%1 = call i64 @isdigit(i32 90)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 455, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for Z\00"
define void @t_isdigit_0x5a() {
%1 = tail call i64 @isdigit(i32 90)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 455, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mpz_t;

/* Variables and functions */
int /*<<< orphan*/ mpz_clear(int /*<<< orphan*/);
int /*<<< orphan*/ mpz_init_set_ui(int /*<<< orphan*/, unsigned long);
int /*<<< orphan*/ number_theory_exp_modp(int /*<<< orphan*/,
                                          int /*<<< orphan*/,
                                          int /*<<< orphan*/,
                                          int /*<<< orphan*/);
void number_theory_exp_modp_ui(mpz_t R, mpz_t a, unsigned long int k, mpz_t P) {
  mpz_t K;
  mpz_init_set_ui(K, k);
  number_theory_exp_modp(R, a, K, P);
  mpz_clear(K);
}


x86 assembly (clang, -O0):
<number_theory_exp_modp_ui>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <mpz_init_set_ui@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1040 <number_theory_exp_modp@plt>
mov    -0x18(%rbp),%edi
call   1050 <mpz_clear@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_theory_exp_modp_ui>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    %rdx,%rsi
call   1030 <mpz_init_set_ui@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14d,%ecx
call   1040 <number_theory_exp_modp@plt>
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <mpz_clear@plt>

LLVM IR (-O0):
define void @number_theory_exp_modp_ui(i32 %0, i32 %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%10 = load i32, i32* %9
%11 = load i64, i64* %7
%12 = call i32 @mpz_init_set_ui(i32 %10, i64 %11)
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = load i32, i32* %9
%16 = load i32, i32* %8
%17 = call i32 @number_theory_exp_modp(i32 %13, i32 %14, i32 %15, i32 %16)
%18 = load i32, i32* %9
%19 = call i32 @mpz_clear(i32 %18)
ret void
}

LLVM IR (-O2):
define void @number_theory_exp_modp_ui(i32 %0, i32 %1, i64 %2, i32 %3) {
%5 = tail call i32 @mpz_init_set_ui(i32 undef, i64 %2)
%6 = tail call i32 @number_theory_exp_modp(i32 %0, i32 %1, i32 undef, i32 %3)
%7 = tail call i32 @mpz_clear(i32 undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abs(int);
char const *strerror(int /*<<< orphan*/);
const char *strerror_safe(int error) { return strerror(abs(error)); }


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

x86 assembly (clang, -O2):
<strerror_safe>:
mov    %edi,%eax
neg    %eax
cmovns %eax,%edi
jmp    1030 <strerror@plt>

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

LLVM IR (-O2):
define i8* @strerror_safe(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%3 = tail call i8* @strerror(i32 %2)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ f2();
void f3() { f2(); }


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

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

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

LLVM IR (-O2):
define void @f3() {
%1 = tail call i32 (...) @f2()
ret void
}
/* Variables and functions */
char lower(char);
int ctoi(char c) {
  c = lower(c);
  if (c >= '0' && c <= '9')
    return c - '0';
  if (c >= 'a' && c <= 'f')
    return c - 'a' + 10;
}


x86 assembly (clang, -O0):
<ctoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <lower@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1153 <ctoi+0x43>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1153 <ctoi+0x43>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    117a <ctoi+0x6a>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     117a <ctoi+0x6a>
movsbl -0x5(%rbp),%eax
cmp    $0x66,%eax
jg     117a <ctoi+0x6a>
movsbl -0x5(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctoi>:
push   %rax
call   1030 <lower@plt>
movsbl %al,%eax
lea    -0x30(%rax),%ecx
cmp    $0x9,%cl
ja     1126 <ctoi+0x16>
add    $0xffffffd0,%eax
pop    %rcx
ret
add    $0xffffffa9,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ctoi(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call signext i8 @lower(i8 signext %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
%8 = icmp sge i32 %7, 48
br i1 %8, label %9, label %17
9: ; preds = %1
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = icmp sle i32 %11, 57
br i1 %12, label %13, label %17
13: ; preds = %9
%14 = load i8, i8* %3
%15 = sext i8 %14 to i32
%16 = sub nsw i32 %15, 48
store i32 %16, i32* %2
br label %30
17: ; preds = %9, %1
%18 = load i8, i8* %3
%19 = sext i8 %18 to i32
%20 = icmp sge i32 %19, 97
br i1 %20, label %21, label %30
21: ; preds = %17
%22 = load i8, i8* %3
%23 = sext i8 %22 to i32
%24 = icmp sle i32 %23, 102
br i1 %24, label %25, label %30
25: ; preds = %21
%26 = load i8, i8* %3
%27 = sext i8 %26 to i32
%28 = sub nsw i32 %27, 97
%29 = add nsw i32 %28, 10
store i32 %29, i32* %2
br label %30
30: ; preds = %13, %25, %21, %17
%31 = load i32, i32* %2
ret i32 %31
}

LLVM IR (-O2):
define i32 @ctoi(i8 signext %0) {
%2 = tail call signext i8 @lower(i8 signext %0)
%3 = sext i8 %2 to i32
%4 = add i8 %2, -48
%5 = icmp ult i8 %4, 10
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = add nsw i32 %3, -48
br label %13
8: ; preds = %1
%9 = add i8 %2, -97
%10 = icmp ult i8 %9, 6
%11 = add nsw i32 %3, -87
%12 = select i1 %10, i32 %11, i32 undef
br label %13
13: ; preds = %8, %6
%14 = phi i32 [ %7, %6 ], [ %12, %8 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ALCloopback_Delete(void *ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @ALCloopback_Delete(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
double Multiply_Four(double value) { return value * 4; }


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

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

LLVM IR (-O0):
define double @Multiply_Four(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 4.000000e+00
ret double %4
}

LLVM IR (-O2):
define double @Multiply_Four(double %0) {
%2 = fmul double %0, 4.000000e+00
ret double %2
}
/* Variables and functions */
int g(int, int);
int f(int a, int b) {
  if (a != 5)
    a = 10;
  return g(a, b);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x5,-0x4(%rbp)
je     112f <f+0x1f>
movl   $0xa,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <g@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
xor    %eax,%eax
cmp    $0x5,%edi
setne  %al
lea    (%rax,%rax,4),%edi
add    $0x5,%edi
jmp    1030 <g@plt>

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

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 5
%4 = select i1 %3, i32 5, i32 10
%5 = tail call i32 @g(i32 %4, i32 %1)
ret i32 %5
}
void pid_init(void) {}


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

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

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

LLVM IR (-O2):
define void @pid_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vect_describe_audio_state_1();
void describe_audio_state_1(void) { vect_describe_audio_state_1(); }


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

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

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

LLVM IR (-O2):
define void @describe_audio_state_1() {
%1 = tail call i32 (...) @vect_describe_audio_state_1()
ret void
}
unsigned hash(const char *str) {
  unsigned long h = 5381;
  int c;
  while (c = *str++)
    h = ((h << 5) + h) + c;
  return (unsigned)h;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     114a <hash+0x4a>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
add    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <hash+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <hash+0x2d>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i64 %7, 33
%10 = sext i8 %5 to i64
%11 = add i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = trunc i64 %11 to i32
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 5381, %1 ], [ %15, %14 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *str) {
  fprintf(stderr,
          "usage: %s <log size - 2> <coeff | coeff420 | mag | mag420>\n", str);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [60 x i8] c"usage: %s <log size - 2> <coeff | coeff420 | mag | mag420>\0A\00"
define void @usage(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 ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [60 x i8] c"usage: %s <log size - 2> <coeff | coeff420 | mag | mag420>\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _clear_error_stack();
char *_get_dime_dir_location(char const *);
char *get_dime_dir_location(const char *suffix) {
  { _clear_error_stack(); };
  return (_get_dime_dir_location(suffix));
}


x86 assembly (clang, -O0):
<get_dime_dir_location>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <_clear_error_stack@plt>
mov    -0x8(%rbp),%rdi
call   1030 <_get_dime_dir_location@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_dime_dir_location>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <_clear_error_stack@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <_get_dime_dir_location@plt>

LLVM IR (-O0):
define i8* @get_dime_dir_location(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @_clear_error_stack()
%4 = load i8*, i8** %2
%5 = call i8* @_get_dime_dir_location(i8* %4)
ret i8* %5
}

LLVM IR (-O2):
define i8* @get_dime_dir_location(i8* %0) {
%2 = tail call i32 (...) @_clear_error_stack()
%3 = tail call i8* @_get_dime_dir_location(i8* %0)
ret i8* %3
}
double mul(double x, double y) { return x * y; }


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

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

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

LLVM IR (-O2):
define double @mul(double %0, double %1) {
%3 = fmul double %0, %1
ret double %3
}
void test() {
  int y1[3] = {{1, 2, 3}};
  int y3[4][3] = {
      {1, 3, 5}, {2, 4, 6}, {3, 5, 7}, {4, 6, 8}, {},
  };
  int y4[4][3] = {
      {1, 3, 5, 2},
      {4, 6},
      {3, 5, 7},
      {4, 6, 8},
  };
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xedf(%rip),%eax
mov    %eax,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x30,%edx
call   1030 <memcpy@plt>
lea    -0x70(%rbp),%rdi
lea    0xef4(%rip),%rsi
mov    $0x30,%edx
call   1030 <memcpy@plt>
add    $0x70,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.test.y1 = [3 x i32] [i32 1, i32 0, i32 0]
@__const.test.y3 = [4 x [3 x i32]] [[3 x i32] [i32 1, i32 3, i32 5], [3 x i32] [i32 2, i32 4, i32 6], [3 x i32] [i32 3, i32 5, i32 7], [3 x i32] [i32 4, i32 6, i32 8]]
@__const.test.y4 = [4 x [3 x i32]] [[3 x i32] [i32 1, i32 3, i32 5], [3 x i32] [i32 4, i32 6, i32 0], [3 x i32] [i32 3, i32 5, i32 7], [3 x i32] [i32 4, i32 6, i32 8]]
define void @test() {
%1 = alloca [3 x i32]
%2 = alloca [4 x [3 x i32]]
%3 = alloca [4 x [3 x i32]]
%4 = bitcast [3 x i32]* %1 to i8*
%5 = bitcast [4 x [3 x i32]]* %2 to i8*
%6 = bitcast [4 x [3 x i32]]* %3 to i8*
ret void
}

LLVM IR (-O2):
define void @test() {
ret void
}
int do_646() { return 646; }


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

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

LLVM IR (-O0):
define i32 @do_646() {
ret i32 646
}

LLVM IR (-O2):
define i32 @do_646() {
ret i32 646
}
void foo026(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo026(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_putchar(char);
int my_isneg(int n) {
  if (n < 0)
    my_putchar('N');
  else
    my_putchar('P');
  return (0);
}


x86 assembly (clang, -O0):
<my_isneg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1134 <my_isneg+0x24>
mov    $0x4e,%edi
call   1030 <my_putchar@plt>
jmp    113e <my_isneg+0x2e>
mov    $0x50,%edi
call   1030 <my_putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_isneg>:
push   %rax
not    %edi
shr    $0x1f,%edi
add    %edi,%edi
add    $0x4e,%edi
call   1030 <my_putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @my_isneg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @my_putchar(i8 signext 78)
br label %9
7: ; preds = %1
%8 = call i32 @my_putchar(i8 signext 80)
br label %9
9: ; preds = %7, %5
ret i32 0
}

LLVM IR (-O2):
define i32 @my_isneg(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = select i1 %2, i8 78, i8 80
%4 = tail call i32 @my_putchar(i8 signext %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ crossEntropy(char *, char *, char *, char *, int, int,
                                double *, double *);
void R_crossEntropy(char **R_genotype_file, char **R_missing_data_file,
                    char **R_Q_file, char **R_F_file, int *R_K, int *R_ploidy,
                    double *all_ce, double *masked_ce) {
  crossEntropy(*R_genotype_file, *R_missing_data_file, *R_Q_file, *R_F_file,
               *R_K, *R_ploidy, all_ce, masked_ce);
}


x86 assembly (clang, -O0):
<R_crossEntropy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
mov    -0x20(%rbp),%rax
mov    (%rax),%rcx
mov    -0x28(%rbp),%rax
mov    (%rax),%r8d
mov    -0x30(%rbp),%rax
mov    (%rax),%r9d
mov    0x10(%rbp),%r10
mov    0x18(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <crossEntropy@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<R_crossEntropy>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
mov    (%rdx),%rdx
mov    (%rcx),%rcx
mov    (%r8),%r8d
mov    (%r9),%r9d
jmp    1030 <crossEntropy@plt>

LLVM IR (-O0):
define void @R_crossEntropy(i8** %0, i8** %1, i8** %2, i8** %3, i32* %4, i32* %5, double* %6, double* %7) {
%9 = alloca i8**
%10 = alloca i8**
%11 = alloca i8**
%12 = alloca i8**
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca double*
%16 = alloca double*
store i8** %0, i8*** %9
store i8** %1, i8*** %10
store i8** %2, i8*** %11
store i8** %3, i8*** %12
store i32* %4, i32** %13
store i32* %5, i32** %14
store double* %6, double** %15
store double* %7, double** %16
%17 = load i8**, i8*** %9
%18 = load i8*, i8** %17
%19 = load i8**, i8*** %10
%20 = load i8*, i8** %19
%21 = load i8**, i8*** %11
%22 = load i8*, i8** %21
%23 = load i8**, i8*** %12
%24 = load i8*, i8** %23
%25 = load i32*, i32** %13
%26 = load i32, i32* %25
%27 = load i32*, i32** %14
%28 = load i32, i32* %27
%29 = load double*, double** %15
%30 = load double*, double** %16
%31 = call i32 @crossEntropy(i8* %18, i8* %20, i8* %22, i8* %24, i32 %26, i32 %28, double* %29, double* %30)
ret void
}

LLVM IR (-O2):
define void @R_crossEntropy(i8** nocapture %0, i8** nocapture %1, i8** nocapture %2, i8** nocapture %3, i32* nocapture %4, i32* nocapture %5, double* %6, double* %7) {
%9 = load i8*, i8** %0
%10 = load i8*, i8** %1
%11 = load i8*, i8** %2
%12 = load i8*, i8** %3
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = tail call i32 @crossEntropy(i8* %9, i8* %10, i8* %11, i8* %12, i32 %13, i32 %14, double* %6, double* %7)
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, int);
char *m_itoa(int i) {
  char *s = (char *)malloc(16);
  sprintf(s, "%d", i);
  return s;
}


x86 assembly (clang, -O0):
<m_itoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x10,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xeb9(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_itoa>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x10,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
lea    0xec7(%rip),%rsi
mov    %rax,%rdi
mov    %ebp,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i8* @m_itoa(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i64 @malloc(i32 16)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i32, i32* %2
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i8* @m_itoa(i32 %0) {
%2 = tail call i64 @malloc(i32 16)
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* %3
}
unsigned char f39(unsigned char x, int y) { return (x >> y) | (x << (8 - y)); }


x86 assembly (clang, -O0):
<f39>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
movzbl -0x1(%rbp),%edx
mov    $0x8,%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f39>:
mov    %esi,%ecx
mov    %edi,%eax
ror    %cl,%al
ret

LLVM IR (-O0):
define zeroext i8 @f39(i8 zeroext %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 = zext i8 %5 to i32
%7 = load i32, i32* %4
%8 = ashr i32 %6, %7
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = load i32, i32* %4
%12 = sub nsw i32 8, %11
%13 = shl i32 %10, %12
%14 = or i32 %8, %13
%15 = trunc i32 %14 to i8
ret i8 %15
}

LLVM IR (-O2):
define zeroext i8 @f39(i8 zeroext %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = tail call i8 @llvm.fshr.i8(i8 %0, i8 %0, i8 %3)
ret i8 %4
}
int testAvlTree() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @testAvlTree() {
ret i32 0
}
/* Variables and functions */
unsigned int sad_mx_n_c(unsigned char const *, int, unsigned char const *, int,
                        int, int);
unsigned int vp8_sad8x8_c(const unsigned char *src_ptr, int src_stride,
                          const unsigned char *ref_ptr, int ref_stride,
                          int max_sad) {
  return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 8, 8);
}


x86 assembly (clang, -O0):
<vp8_sad8x8_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    $0x8,%r9d
mov    %r9d,%r8d
call   1030 <sad_mx_n_c@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vp8_sad8x8_c>:
mov    $0x8,%r8d
mov    $0x8,%r9d
jmp    1030 <sad_mx_n_c@plt>

LLVM IR (-O0):
define i32 @vp8_sad8x8_c(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i8*, i8** %8
%14 = load i32, i32* %9
%15 = call i32 @sad_mx_n_c(i8* %11, i32 %12, i8* %13, i32 %14, i32 8, i32 8)
ret i32 %15
}

LLVM IR (-O2):
define i32 @vp8_sad8x8_c(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4) {
%6 = tail call i32 @sad_mx_n_c(i8* %0, i32 %1, i8* %2, i32 %3, i32 8, i32 8)
ret i32 %6
}
/* Variables and functions */
scalar_t__ malloc(size_t);
int /*<<< orphan*/ nerror(char *);
char *cvector(long nl, long nh) {
  char *v;
  v = (char *)malloc((size_t)((nh - nl + 1 + 1) * sizeof(char)));
  if (!v)
    nerror("allocation failure in cvector()");
  return v - nl + 1;
}


x86 assembly (clang, -O0):
<cvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
sub    -0x8(%rbp),%rdi
add    $0x1,%rdi
add    $0x1,%rdi
shl    $0x0,%rdi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1164 <cvector+0x44>
lea    0xea1(%rip),%rdi
call   1040 <nerror@plt>
mov    -0x18(%rbp),%rax
xor    %ecx,%ecx
sub    -0x8(%rbp),%rcx
add    %rcx,%rax
add    $0x1,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvector>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
sub    %rdi,%rsi
lea    0x2(%rsi),%rdi
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1147 <cvector+0x27>
lea    0xebe(%rip),%rdi
call   1040 <nerror@plt>
sub    %r14,%rbx
add    $0x1,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [32 x i8] c"allocation failure in cvector()\00"
define i8* @cvector(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = load i64, i64* %3
%8 = sub nsw i64 %6, %7
%9 = add nsw i64 %8, 1
%10 = add nsw i64 %9, 1
%11 = mul i64 %10, 1
%12 = call i64 @malloc(i64 %11)
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %5
%14 = load i8*, i8** %5
%15 = icmp ne i8* %14, null
br i1 %15, label %18, label %16
16: ; preds = %2
%17 = call i32 @nerror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %16, %2
%19 = load i8*, i8** %5
%20 = load i64, i64* %3
%21 = sub i64 0, %20
%22 = getelementptr inbounds i8, i8* %19, i64 %21
%23 = getelementptr inbounds i8, i8* %22, i64 1
ret i8* %23
}

LLVM IR (-O2):
@.str = [32 x i8] c"allocation failure in cvector()\00"
define i8* @cvector(i64 %0, i64 %1) {
%3 = sub i64 2, %0
%4 = add i64 %3, %1
%5 = tail call i64 @malloc(i64 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @nerror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
%10 = sub i64 0, %0
%11 = inttoptr i64 %5 to i8*
%12 = getelementptr inbounds i8, i8* %11, i64 %10
%13 = getelementptr inbounds i8, i8* %12, i64 1
ret i8* %13
}
void rop3_169_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T | S;
  stk1 = *D ^ stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_169_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_169_1_1>:
mov    %edx,%eax
or     %sil,%al
mov    (%rdi),%cl
or     %cl,%al
not    %al
and    %cl,%sil
and    %dl,%cl
or     %sil,%cl
or     %al,%cl
mov    %cl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_169_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = or i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = xor i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = xor i32 %23, -1
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = xor i32 %29, -1
%31 = and i32 %27, %30
%32 = load i8, i8* %6
%33 = zext i8 %32 to i32
%34 = xor i32 %33, -1
%35 = and i32 %31, %34
%36 = load i8*, i8** %4
%37 = load i8, i8* %36
%38 = zext i8 %37 to i32
%39 = load i8, i8* %5
%40 = zext i8 %39 to i32
%41 = and i32 %38, %40
%42 = or i32 %35, %41
%43 = load i8*, i8** %4
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = load i8, i8* %6
%47 = zext i8 %46 to i32
%48 = and i32 %45, %47
%49 = or i32 %42, %48
%50 = trunc i32 %49 to i8
%51 = load i8*, i8** %4
store i8 %50, i8* %51
ret void
}

LLVM IR (-O2):
define void @rop3_169_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = or i8 %2, %1
%5 = load i8, i8* %0
%6 = or i8 %4, %5
%7 = xor i8 %6, -1
%8 = and i8 %5, %1
%9 = or i8 %8, %7
%10 = and i8 %5, %2
%11 = or i8 %9, %10
store i8 %11, i8* %0
ret void
}
char *langEnumControlsJoyColeco() { return "ColecoVision Joystick"; }


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

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

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

LLVM IR (-O2):
@.str = [22 x i8] c"ColecoVision Joystick\00"
define i8* @langEnumControlsJoyColeco() {
ret i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ CalcuGainPattern_initialize();
int /*<<< orphan*/ CalcuGainPattern_terminate();
int /*<<< orphan*/ main_CalcuGainPattern();
int main(int argc_CalcuGainPattern, const char *const argv_CalcuGainPattern[]) {
  (void)argc_CalcuGainPattern;
  (void)argv_CalcuGainPattern;
  CalcuGainPattern_initialize();
  main_CalcuGainPattern();
  CalcuGainPattern_terminate();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 (...) @CalcuGainPattern_initialize()
%9 = call i32 (...) @main_CalcuGainPattern()
%10 = call i32 (...) @CalcuGainPattern_terminate()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @CalcuGainPattern_initialize()
%4 = tail call i32 (...) @main_CalcuGainPattern()
%5 = tail call i32 (...) @CalcuGainPattern_terminate()
ret i32 0
}
void g_value_set_flags() {}


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

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

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

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