xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xd0() {
  Assert_real((isalnum(208) == 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_isalnum.c",
              1045, ("isalnum should be 0 for 0xd0"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0xd0>:
push   %rax
mov    $0xd0,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x415,%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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xd0\00"
define void @t_isalnum_0xd0() {
%1 = call i64 @isalnum(i32 208)
%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 1045, i8* getelementptr inbounds ([29 x i8], [29 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xd0\00"
define void @t_isalnum_0xd0() {
%1 = tail call i64 @isalnum(i32 208)
%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 1045, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void gtk_accel_label_set_accel_widget() {}


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

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

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

LLVM IR (-O2):
define void @gtk_accel_label_set_accel_widget() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy_power7(void *, void const *, unsigned long);
void *builtin_memcpy(void *to, const void *from, unsigned long n) {
  if (n)
    memcpy_power7(to, from, n);
  return to;
}


x86 assembly (clang, -O0):
<builtin_memcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1140 <builtin_memcpy+0x30>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy_power7@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<builtin_memcpy>:
push   %rbx
mov    %rdi,%rbx
test   %rdx,%rdx
je     1121 <builtin_memcpy+0x11>
mov    %rbx,%rdi
call   1030 <memcpy_power7@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @builtin_memcpy(i8* returned %0, i8* %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @memcpy_power7(i8* %0, i8* %1, i64 %2)
br label %7
7: ; preds = %5, %3
ret i8* %0
}
int rclose(fd) const int fd;
{ return close(fd); }


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

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

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

LLVM IR (-O2):
define i32 @rclose(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 %0)
ret i32 %2
}
/* Type definitions */
struct parser {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ next(struct parser *);
void skip(struct parser *p, unsigned n) {
  while (n--) {
    (void)next(p);
  }
}


x86 assembly (clang, -O0):
<skip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     1141 <skip+0x31>
mov    -0x8(%rbp),%rdi
call   1030 <next@plt>
jmp    111f <skip+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip>:
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
je     112d <skip+0x1d>
mov    %esi,%ebx
mov    %rdi,%r14
nopl   (%rax)
mov    %r14,%rdi
call   1030 <next@plt>
add    $0xffffffff,%ebx
jne    1120 <skip+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.parser = type { i32 }
define void @skip(%struct.parser* %0, i32 %1) {
%3 = alloca %struct.parser*
%4 = alloca i32
store %struct.parser* %0, %struct.parser** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %9, %2
%6 = load i32, i32* %4
%7 = add i32 %6, -1
store i32 %7, i32* %4
%8 = icmp ne i32 %6, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load %struct.parser*, %struct.parser** %3
%11 = call i32 @next(%struct.parser* %10)
br label %5
12: ; preds = %5
ret void
}

LLVM IR (-O2):
%struct.parser = type { i32 }
define void @skip(%struct.parser* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %1, %2 ]
%6 = add i32 %5, -1
%7 = tail call i32 @next(%struct.parser* %0)
%8 = icmp eq i32 %6, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret void
}
void cbcp_protrej(int iface) {}


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

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

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

LLVM IR (-O2):
define void @cbcp_protrej(i32 %0) {
ret void
}
/* Type definitions */
struct ini_section {
  int dummy;
};

/* Variables and functions */
int atoi(char const *);
char *get_string_setting(struct ini_section *, char const *,
                         int /*<<< orphan*/ *);
int get_int_setting(struct ini_section *sect, const char *s, int defval) {
  const char *val = get_string_setting(sect, s, NULL);
  if (val)
    return atoi(val);
  return defval;
}


x86 assembly (clang, -O0):
<get_int_setting>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <get_string_setting@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     1164 <get_int_setting+0x44>
mov    -0x28(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x4(%rbp)
jmp    116a <get_int_setting+0x4a>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_int_setting>:
push   %rbx
mov    %edx,%ebx
xor    %edx,%edx
call   1030 <get_string_setting@plt>
test   %rax,%rax
je     1138 <get_int_setting+0x18>
mov    %rax,%rdi
pop    %rbx
jmp    1040 <atoi@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.ini_section = type { i32 }
define i32 @get_int_setting(%struct.ini_section* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.ini_section*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store %struct.ini_section* %0, %struct.ini_section** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%9 = load %struct.ini_section*, %struct.ini_section** %5
%10 = load i8*, i8** %6
%11 = call i8* @get_string_setting(%struct.ini_section* %9, i8* %10, i32* null)
store i8* %11, i8** %8
%12 = load i8*, i8** %8
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %17
14: ; preds = %3
%15 = load i8*, i8** %8
%16 = call i32 @atoi(i8* %15)
store i32 %16, i32* %4
br label %19
17: ; preds = %3
%18 = load i32, i32* %7
store i32 %18, i32* %4
br label %19
19: ; preds = %17, %14
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
%struct.ini_section = type { i32 }
define i32 @get_int_setting(%struct.ini_section* %0, i8* %1, i32 %2) {
%4 = tail call i8* @get_string_setting(%struct.ini_section* %0, i8* %1, i32* null)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @atoi(i8* %4)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %7, %6 ], [ %2, %3 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ ofl_stats_type_print(int /*<<< orphan*/ *,
                                        int /*<<< orphan*/);
int /*<<< orphan*/ *open_memstream(char **, size_t *);
char *ofl_stats_type_to_string(uint16_t type) {
  char *str;
  size_t str_size;
  FILE *stream = open_memstream(&str, &str_size);
  ofl_stats_type_print(stream, type);
  fclose(stream);
  return str;
}


x86 assembly (clang, -O0):
<ofl_stats_type_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <open_memstream@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1030 <ofl_stats_type_print@plt>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ofl_stats_type_to_string>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebp
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1040 <open_memstream@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %ebp,%esi
call   1030 <ofl_stats_type_print@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    0x8(%rsp),%rax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @ofl_stats_type_to_string(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32*
store i32 %0, i32* %2
%6 = call i32* @open_memstream(i8** %3, i64* %4)
store i32* %6, i32** %5
%7 = load i32*, i32** %5
%8 = load i32, i32* %2
%9 = call i32 @ofl_stats_type_print(i32* %7, i32 %8)
%10 = load i32*, i32** %5
%11 = call i32 @fclose(i32* %10)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @ofl_stats_type_to_string(i32 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = bitcast i8** %2 to i8*
%5 = bitcast i64* %3 to i8*
%6 = call i32* @open_memstream(i8** %2, i64* %3)
%7 = call i32 @ofl_stats_type_print(i32* %6, i32 %0)
%8 = call i32 @fclose(i32* %6)
%9 = load i8*, i8** %2
ret i8* %9
}
/* Type definitions */
typedef int /*<<< orphan*/ intmax_t;

/* Variables and functions */
intmax_t imaxabs(intmax_t a) { return a > 0 ? a : -a; }


x86 assembly (clang, -O0):
<imaxabs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    111c <imaxabs+0x1c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <imaxabs+0x24>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @imaxabs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
int WebPGetDemuxVersion(void) { return (0 << 16) | (1 << 8) | 1; }


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

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

LLVM IR (-O0):
define i32 @WebPGetDemuxVersion() {
ret i32 257
}

LLVM IR (-O2):
define i32 @WebPGetDemuxVersion() {
ret i32 257
}
/* Variables and functions */
int /*<<< orphan*/ assert(void *);
void destroy(void *opaque) { assert(opaque); }


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

x86 assembly (clang, -O2):
<destroy>:
jmp    1030 <assert@plt>

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

LLVM IR (-O2):
define void @destroy(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int main(int argc, char *argv[]) { exit((1) ? EXIT_SUCCESS : EXIT_FAILURE); }


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    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
@EXIT_FAILURE = global i32 0
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* @EXIT_SUCCESS
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void __str_free__(char *v) {
  if (!v)
    return;
  free(v);
}


x86 assembly (clang, -O0):
<__str_free__>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <__str_free__+0x1c>
jmp    1135 <__str_free__+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__str_free__>:
test   %rdi,%rdi
je     111a <__str_free__+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @__str_free__(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %1, %3
ret void
}
const char *vde_chain_nm2_name_in(int i) {
  switch (i) {
  case 0:
    return "i0";
  case 1:
    return "i1";
  case 2:
    return "i2";
  case 3:
    return "i3";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<vde_chain_nm2_name_in>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x3,%rax
ja     116c <vde_chain_nm2_name_in+0x6c>
mov    -0x18(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xedd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vde_chain_nm2_name_in+0x74>
lea    0xed0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vde_chain_nm2_name_in+0x74>
lea    0xec3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vde_chain_nm2_name_in+0x74>
lea    0xeb6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vde_chain_nm2_name_in+0x74>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vde_chain_nm2_name_in>:
cmp    $0x3,%edi
ja     1117 <vde_chain_nm2_name_in+0x17>
movslq %edi,%rax
lea    0xefd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"i0\00"
@.str.1 = [3 x i8] c"i1\00"
@.str.2 = [3 x i8] c"i2\00"
@.str.3 = [3 x i8] c"i3\00"
define i8* @vde_chain_nm2_name_in(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %9 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %10
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %10
7: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %10
8: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %10
9: ; preds = %1
store i8* null, i8** %2
br label %10
10: ; preds = %9, %8, %7, %6, %5
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@.str = [3 x i8] c"i0\00"
@.str.1 = [3 x i8] c"i1\00"
@.str.2 = [3 x i8] c"i2\00"
@.str.3 = [3 x i8] c"i3\00"
@reltable.vde_chain_nm2_name_in = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str to i64), i64 ptrtoint ([4 x i32]* @reltable.vde_chain_nm2_name_in to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.1 to i64), i64 ptrtoint ([4 x i32]* @reltable.vde_chain_nm2_name_in to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.2 to i64), i64 ptrtoint ([4 x i32]* @reltable.vde_chain_nm2_name_in to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.3 to i64), i64 ptrtoint ([4 x i32]* @reltable.vde_chain_nm2_name_in to i64)) to i32)]
define i8* @vde_chain_nm2_name_in(i32 %0) {
%2 = icmp ult i32 %0, 4
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = shl i64 %4, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.vde_chain_nm2_name_in to i8*), i64 %5)
br label %7
7: ; preds = %1, %3
%8 = phi i8* [ %6, %3 ], [ null, %1 ]
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ writeBinaryFromShort(int);
void convertPositionToBinary(int pos) { writeBinaryFromShort(pos); }


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

x86 assembly (clang, -O2):
<convertPositionToBinary>:
jmp    1030 <writeBinaryFromShort@plt>

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

LLVM IR (-O2):
define void @convertPositionToBinary(i32 %0) {
%2 = tail call i32 @writeBinaryFromShort(i32 %0)
ret void
}
int function_b() { return 2; }


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

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

LLVM IR (-O0):
define i32 @function_b() {
ret i32 2
}

LLVM IR (-O2):
define i32 @function_b() {
ret i32 2
}
/* Variables and functions */
int *malloc(int);
int main_array() {
  int y = 10;
  int *x = malloc(y * sizeof(int));
  int w = x[y];
  int z = 2;
  x[y] = z;
  int *elt;
  elt = &x[y];
  int z2 = 4;
  *elt = z2;
  return z;
}


x86 assembly (clang, -O0):
<main_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0xa,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
movl   $0x2,-0x18(%rbp)
mov    -0x18(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
movl   $0x4,-0x24(%rbp)
mov    -0x24(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main_array>:
push   %rax
mov    $0x28,%edi
call   1030 <malloc@plt>
mov    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main_array() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i32 10, i32* %1
%7 = load i32, i32* %1
%8 = sext i32 %7 to i64
%9 = mul i64 %8, 4
%10 = trunc i64 %9 to i32
%11 = call i32* @malloc(i32 %10)
store i32* %11, i32** %2
%12 = load i32*, i32** %2
%13 = load i32, i32* %1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
store i32 %16, i32* %3
store i32 2, i32* %4
%17 = load i32, i32* %4
%18 = load i32*, i32** %2
%19 = load i32, i32* %1
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32 %17, i32* %21
%22 = load i32*, i32** %2
%23 = load i32, i32* %1
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i32, i32* %22, i64 %24
store i32* %25, i32** %5
store i32 4, i32* %6
%26 = load i32, i32* %6
%27 = load i32*, i32** %5
store i32 %26, i32* %27
%28 = load i32, i32* %4
ret i32 %28
}

LLVM IR (-O2):
define i32 @main_array() {
%1 = tail call i32* @malloc(i32 40)
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ dbg_channel_write(char *, int);
int _write(int fd, char *ptr, int len) {
  dbg_channel_write(ptr, len);
  return len;
}


x86 assembly (clang, -O0):
<_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <dbg_channel_write@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_write>:
push   %rbx
mov    %edx,%ebx
mov    %rsi,%rdi
mov    %edx,%esi
call   1030 <dbg_channel_write@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @_write(i32 %0, i8* %1, i32 returned %2) {
%4 = tail call i32 @dbg_channel_write(i8* %1, i32 %2)
ret i32 %2
}
int gsync(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @gsync() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
void f(int n) {
  char buf[1024];
  memset(buf, 0, sizeof(buf));
  if (n > 0)
    f(n - 1);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x410(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1040 <memset@plt>
cmpl   $0x0,-0x4(%rbp)
jle    1156 <f+0x36>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <f@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbx
sub    $0x400,%rsp
mov    %edi,%ebx
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1040 <memset@plt>
test   %ebx,%ebx
jle    1147 <f+0x27>
add    $0xffffffff,%ebx
mov    %ebx,%edi
call   1030 <f@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @f(i32 %0) {
%2 = alloca i32
%3 = alloca [1024 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i32 @memset(i8* %4, i32 0, i32 1024)
%6 = load i32, i32* %2
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 1
br label %11
11: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @f(i32 %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @memset(i8* %3, i32 0, i32 1024)
%5 = icmp sgt i32 %0, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = add nsw i32 %0, -1
br label %8
8: ; preds = %6, %1
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int main(int argc, char const *argv[]) { return strcmp("hello", "helloWORLD"); }


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)
lea    0xed3(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1030 <strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
@.str.1 = [11 x i8] c"helloWORLD\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
ret i32 %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 -1
}
void a_or(volatile void *p, int v) {
  __asm__("lock ; .byte 0x67\n\tor %1, %0"
          : "=m"(*(int *)p)
          : "r"(v)
          : "memory");
}


x86 assembly (clang, -O0):
<a_or>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
lock or %ecx,(%eax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_or>:
lock or %esi,(%edi)
ret

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

LLVM IR (-O2):
define void @a_or(i8* %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
tail call void asm "lock ; .byte 0x67\0A\09or $1, $0", "=*m,r,~{memory},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %3, i32 %1)
ret void
}
void GotAlarm(sig) int sig;
{}


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

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

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

LLVM IR (-O2):
define void @GotAlarm(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, int);
int /*<<< orphan*/ vfprintf(int /*<<< orphan*/ *, char *, int /*<<< orphan*/);
void panic_func(FILE *fp, char *file, int line, char *fmt, va_list ap) {
  fprintf(fp, "Panic!!file..%s line ..%d\n", file, line);
  if (fmt) {
    vfprintf(fp, fmt, ap);
  }
}


x86 assembly (clang, -O0):
<panic_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
cmpq   $0x0,-0x20(%rbp)
je     116d <panic_func+0x4d>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
call   1040 <vfprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<panic_func>:
push   %rbp
push   %r14
push   %rbx
mov    %r8d,%r14d
mov    %rcx,%rbx
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rbp
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
test   %rbx,%rbx
je     1155 <panic_func+0x35>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <vfprintf@plt>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Panic!!file..%s line ..%d\0A\00"
define void @panic_func(i32* %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
store i32* %0, i32** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i32*, i32** %6
%12 = load i8*, i8** %7
%13 = load i32, i32* %8
%14 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %12, i32 %13)
%15 = load i8*, i8** %9
%16 = icmp ne i8* %15, null
br i1 %16, label %17, label %22
17: ; preds = %5
%18 = load i32*, i32** %6
%19 = load i8*, i8** %9
%20 = load i32, i32* %10
%21 = call i32 @vfprintf(i32* %18, i8* %19, i32 %20)
br label %22
22: ; preds = %17, %5
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"Panic!!file..%s line ..%d\0A\00"
define void @panic_func(i32* nocapture %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2)
%7 = icmp eq i8* %3, null
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 @vfprintf(i32* %0, i8* %3, i32 %4)
br label %10
10: ; preds = %8, %5
ret void
}
/* Variables and functions */
int get_mem(int);
int has_sgb_features() { return get_mem(0x0146) == 0x03; }


x86 assembly (clang, -O0):
<has_sgb_features>:
push   %rbp
mov    %rsp,%rbp
mov    $0x146,%edi
call   1030 <get_mem@plt>
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<has_sgb_features>:
push   %rax
mov    $0x146,%edi
call   1030 <get_mem@plt>
xor    %ecx,%ecx
cmp    $0x3,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @has_sgb_features() {
%1 = call i32 @get_mem(i32 326)
%2 = icmp eq i32 %1, 3
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @has_sgb_features() {
%1 = tail call i32 @get_mem(i32 326)
%2 = icmp eq i32 %1, 3
%3 = zext i1 %2 to i32
ret i32 %3
}
void gtk_cell_renderer_state_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_cell_renderer_state_get_type() {
ret void
}
int _strstrip_nl(char *s) {
  while (*s) {
    if (*s == '\r' || *s == '\n')
      *s = '\0';
    s++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<_strstrip_nl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114d <_strstrip_nl+0x4d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
je     1135 <_strstrip_nl+0x35>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    113c <_strstrip_nl+0x3c>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <_strstrip_nl+0x8>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_strstrip_nl>:
jmp    1117 <_strstrip_nl+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x0,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0xa,%al
je     1110 <_strstrip_nl+0x10>
cmp    $0xd,%al
je     1110 <_strstrip_nl+0x10>
test   %al,%al
jne    1113 <_strstrip_nl+0x13>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @_strstrip_nl(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 13, label %5
i8 10, label %5
]
5: ; preds = %2, %2
store i8 0, i8* %3
br label %6
6: ; preds = %2, %5
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cc_allocator_fini();
int /*<<< orphan*/ cc_mmclient_fini();
void cc_fini(void) {
  cc_allocator_fini();
  cc_mmclient_fini();
}


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

x86 assembly (clang, -O2):
<cc_fini>:
push   %rax
xor    %eax,%eax
call   1030 <cc_allocator_fini@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <cc_mmclient_fini@plt>

LLVM IR (-O0):
define void @cc_fini() {
%1 = call i32 (...) @cc_allocator_fini()
%2 = call i32 (...) @cc_mmclient_fini()
ret void
}

LLVM IR (-O2):
define void @cc_fini() {
%1 = tail call i32 (...) @cc_allocator_fini()
%2 = tail call i32 (...) @cc_mmclient_fini()
ret void
}
/* Type definitions */
struct lineFile {
  int dummy;
};
struct hash {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ lineFileClose(struct lineFile **);
struct lineFile *lineFileOpen(char *, int);
struct hash *raNextStanza(struct lineFile *);
struct hash *raReadSingle(char *fileName) {
  struct lineFile *lf = lineFileOpen(fileName, 1);
  struct hash *hash = raNextStanza(lf);
  lineFileClose(&lf);
  return hash;
}


x86 assembly (clang, -O0):
<raReadSingle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1050 <lineFileOpen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <raNextStanza@plt>
mov    %rax,-0x18(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <lineFileClose@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<raReadSingle>:
push   %rbx
sub    $0x10,%rsp
mov    $0x1,%esi
call   1050 <lineFileOpen@plt>
mov    %rax,0x8(%rsp)
mov    %rax,%rdi
call   1040 <raNextStanza@plt>
mov    %rax,%rbx
lea    0x8(%rsp),%rdi
call   1030 <lineFileClose@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.hash = type { i32 }
%struct.lineFile = type { i32 }
define %struct.hash* @raReadSingle(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.lineFile*
%4 = alloca %struct.hash*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call %struct.lineFile* @lineFileOpen(i8* %5, i32 1)
store %struct.lineFile* %6, %struct.lineFile** %3
%7 = load %struct.lineFile*, %struct.lineFile** %3
%8 = call %struct.hash* @raNextStanza(%struct.lineFile* %7)
store %struct.hash* %8, %struct.hash** %4
%9 = call i32 @lineFileClose(%struct.lineFile** %3)
%10 = load %struct.hash*, %struct.hash** %4
ret %struct.hash* %10
}

LLVM IR (-O2):
%struct.hash = type { i32 }
%struct.lineFile = type { i32 }
define %struct.hash* @raReadSingle(i8* %0) {
%2 = alloca %struct.lineFile*
%3 = bitcast %struct.lineFile** %2 to i8*
%4 = tail call %struct.lineFile* @lineFileOpen(i8* %0, i32 1)
store %struct.lineFile* %4, %struct.lineFile** %2
%5 = tail call %struct.hash* @raNextStanza(%struct.lineFile* %4)
%6 = call i32 @lineFileClose(%struct.lineFile** %2)
ret %struct.hash* %5
}
int fMax6(int a, int b) {
  int flag = ((a - b) >> 31) & 1;
  return a - (a - b) * flag;
}


x86 assembly (clang, -O0):
<fMax6>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
sar    $0x1f,%eax
and    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fMax6>:
mov    %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

LLVM IR (-O0):
define i32 @fMax6(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = sub nsw i32 %6, %7
%9 = ashr i32 %8, 31
%10 = and i32 %9, 1
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = sub nsw i32 %12, %13
%15 = load i32, i32* %5
%16 = mul nsw i32 %14, %15
%17 = sub nsw i32 %11, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @fMax6(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ createDirectory(int /*<<< orphan*/, char *,
                                   int /*<<< orphan*/);
int /*<<< orphan*/ getUserGameDataDir();
void InitUserDataDirectory() {
  createDirectory(getUserGameDataDir(), "user data", 0);
}


x86 assembly (clang, -O0):
<InitUserDataDirectory>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <getUserGameDataDir@plt>
mov    %eax,%edi
lea    0xecc(%rip),%rsi
xor    %edx,%edx
call   1030 <createDirectory@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitUserDataDirectory>:
push   %rax
xor    %eax,%eax
call   1040 <getUserGameDataDir@plt>
lea    0xed1(%rip),%rsi
mov    %eax,%edi
xor    %edx,%edx
pop    %rax
jmp    1030 <createDirectory@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"user data\00"
define void @InitUserDataDirectory() {
%1 = call i32 (...) @getUserGameDataDir()
%2 = call i32 @createDirectory(i32 %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"user data\00"
define void @InitUserDataDirectory() {
%1 = tail call i32 (...) @getUserGameDataDir()
%2 = tail call i32 @createDirectory(i32 %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}
void I444ToNV21() {}


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

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

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

LLVM IR (-O2):
define void @I444ToNV21() {
ret void
}
/* Variables and functions */
double *calloc(int, int);
int zeros(int n, int m, double **zero) {
  *zero = calloc(n * m, sizeof(double));
  return 0;
}


x86 assembly (clang, -O0):
<zeros>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
imul   -0x8(%rbp),%edi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zeros>:
push   %rbx
mov    %rdx,%rbx
imul   %esi,%edi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @zeros(i32 %0, i32 %1, double** nocapture writeonly %2) {
%4 = mul nsw i32 %1, %0
%5 = tail call double* @calloc(i32 %4, i32 8)
store double* %5, double** %2
ret i32 0
}
/* Variables and functions */
double RAND_MAX;
scalar_t__ rand();
double rand_double(void) { return (double)rand() / RAND_MAX; }


x86 assembly (clang, -O0):
<rand_double>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec1(%rip),%rax
divsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_double>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec4(%rip),%rax
divsd  (%rax),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define double @rand_double() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load double, double* @RAND_MAX
%4 = fdiv double %2, %3
ret double %4
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define double @rand_double() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load double, double* @RAND_MAX
%4 = fdiv double %2, %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ entry_a(int /*<<< orphan*/ *);
int /*<<< orphan*/ test1();
int /*<<< orphan*/ test2();
int main(int argc, char **argv) {
  test1();
  test2();
  entry_a(NULL);
  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   1030 <test1@plt>
mov    $0x0,%al
call   1050 <test2@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <entry_a@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test1@plt>
xor    %eax,%eax
call   1050 <test2@plt>
xor    %edi,%edi
call   1040 <entry_a@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test1()
%4 = tail call i32 (...) @test2()
%5 = tail call i32 @entry_a(i32* null)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(double *, double **, int);
void store(int flag, double *out, double local_out[][((128 + 4 - 1) / 4)],
           int num_rows) {
#pragma HLS inline off
  if (flag) {
    memcpy(out, local_out, sizeof(double) * num_rows);
  }
}


x86 assembly (clang, -O0):
<store>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1147 <store+0x37>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
movslq -0x1c(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<store>:
test   %edi,%edi
je     1124 <store+0x14>
shl    $0x3,%ecx
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %ecx,%edx
jmp    1030 <memcpy@plt>
ret

LLVM IR (-O0):
define void @store(i32 %0, double* %1, [32 x double]* %2, i32 %3) {
%5 = alloca i32
%6 = alloca double*
%7 = alloca [32 x double]*
%8 = alloca i32
store i32 %0, i32* %5
store double* %1, double** %6
store [32 x double]* %2, [32 x double]** %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %20
11: ; preds = %4
%12 = load double*, double** %6
%13 = load [32 x double]*, [32 x double]** %7
%14 = bitcast [32 x double]* %13 to double**
%15 = load i32, i32* %8
%16 = sext i32 %15 to i64
%17 = mul i64 8, %16
%18 = trunc i64 %17 to i32
%19 = call i32 @memcpy(double* %12, double** %14, i32 %18)
br label %20
20: ; preds = %11, %4
ret void
}

LLVM IR (-O2):
define void @store(i32 %0, double* %1, [32 x double]* %2, i32 %3) {
%5 = icmp eq i32 %0, 0
br i1 %5, label %10, label %6
6: ; preds = %4
%7 = bitcast [32 x double]* %2 to double**
%8 = shl i32 %3, 3
%9 = tail call i32 @memcpy(double* %1, double** %7, i32 %8)
br label %10
10: ; preds = %6, %4
ret void
}
int BaseToSymbol(int base) {
  switch (base) {
  case 'a':
  case 'A':
    return 0;
  case 'c':
  case 'C':
    return 1;
  case 'g':
  case 'G':
    return 2;
  case 't':
  case 'T':
    return 3;
  default:
    return 4;
  }
}


x86 assembly (clang, -O0):
<BaseToSymbol>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffbf,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x33,%eax
ja     1160 <BaseToSymbol+0x60>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    1167 <BaseToSymbol+0x67>
movl   $0x1,-0x4(%rbp)
jmp    1167 <BaseToSymbol+0x67>
movl   $0x2,-0x4(%rbp)
jmp    1167 <BaseToSymbol+0x67>
movl   $0x3,-0x4(%rbp)
jmp    1167 <BaseToSymbol+0x67>
movl   $0x4,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BaseToSymbol>:
add    $0xffffffbf,%edi
cmp    $0x33,%edi
ja     112c <BaseToSymbol+0x2c>
xor    %eax,%eax
lea    0xeef(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x1,%eax
ret
mov    $0x2,%eax
ret
mov    $0x3,%eax
ret
mov    $0x4,%eax
ret

LLVM IR (-O0):
define i32 @BaseToSymbol(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %9 [
i32 97, label %5
i32 65, label %5
i32 99, label %6
i32 67, label %6
i32 103, label %7
i32 71, label %7
i32 116, label %8
i32 84, label %8
]
5: ; preds = %1, %1
store i32 0, i32* %2
br label %10
6: ; preds = %1, %1
store i32 1, i32* %2
br label %10
7: ; preds = %1, %1
store i32 2, i32* %2
br label %10
8: ; preds = %1, %1
store i32 3, i32* %2
br label %10
9: ; preds = %1
store i32 4, i32* %2
br label %10
10: ; preds = %9, %8, %7, %6, %5
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @BaseToSymbol(i32 %0) {
switch i32 %0, label %5 [
i32 97, label %6
i32 65, label %6
i32 99, label %2
i32 67, label %2
i32 103, label %3
i32 71, label %3
i32 116, label %4
i32 84, label %4
]
2: ; preds = %1, %1
br label %6
3: ; preds = %1, %1
br label %6
4: ; preds = %1, %1
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %1, %5, %4, %3, %2
%7 = phi i32 [ 4, %5 ], [ 3, %4 ], [ 2, %3 ], [ 1, %2 ], [ 0, %1 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, int /*<<< orphan*/, int, int);
void usage(const char *file) {
  printf("Usage: %s [-i machine_id] [-p port] [-b backlog] [-d]\n"
         "  -i machine_id        : Set this server id(0 - 127). The default "
         "machine_id: %d\n"
         "  -p port              : Set server port(1 - 65535). The default "
         "port: %d\n"
         "  -b backlog           : Set server connection backlog. The default "
         "backlog: %d\n"
         "  -d                   : Run server in background.\n",
         file, 0, 18989, 1024);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
xor    %edx,%edx
mov    $0x4a2d,%ecx
mov    $0x400,%r8d
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
xor    %edx,%edx
mov    $0x4a2d,%ecx
mov    $0x400,%r8d
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [341 x i8] c"Usage: %s [-i machine_id] [-p port] [-b backlog] [-d]\0A -i machine_id : Set this server id(0 - 127). The default machine_id: %d\0A -p port : Set server port(1 - 65535). The default port: %d\0A -b backlog : Set server connection backlog. The default backlog: %d\0A -d : Run server in background.\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([341 x i8], [341 x i8]* @.str, i64 0, i64 0), i8* %3, i32 0, i32 18989, i32 1024)
ret void
}

LLVM IR (-O2):
@.str = [341 x i8] c"Usage: %s [-i machine_id] [-p port] [-b backlog] [-d]\0A -i machine_id : Set this server id(0 - 127). The default machine_id: %d\0A -p port : Set server port(1 - 65535). The default port: %d\0A -b backlog : Set server connection backlog. The default backlog: %d\0A -d : Run server in background.\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([341 x i8], [341 x i8]* @.str, i64 0, i64 0), i8* %0, i32 0, i32 18989, i32 1024)
ret void
}