xunge/DecIR huggingface dataset:
/* Type definitions */
struct addrinfo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ multi_dns_seq(int, char **, struct addrinfo **);
int main(int argc, char **argv) {
  char *names = "google.com";
  struct addrinfo *infos;
  multi_dns_seq(1, &names, &infos);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    $0x1,%edi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1030 <multi_dns_seq@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    $0x1,%edi
call   1030 <multi_dns_seq@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.addrinfo = type { i32 }
@.str = [11 x i8] c"google.com\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca %struct.addrinfo*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %6
%8 = call i32 @multi_dns_seq(i32 1, i8** %6, %struct.addrinfo** %7)
ret i32 0
}

LLVM IR (-O2):
%struct.addrinfo = type { i32 }
@.str = [11 x i8] c"google.com\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i8*
%4 = alloca %struct.addrinfo*
%5 = bitcast i8** %3 to i8*
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %3
%6 = bitcast %struct.addrinfo** %4 to i8*
%7 = call i32 @multi_dns_seq(i32 1, i8** %3, %struct.addrinfo** %4)
ret i32 0
}
void i2v_GENERAL_NAME(void) {}


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

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

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

LLVM IR (-O2):
define void @i2v_GENERAL_NAME() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void _sig_handler(int n) {
  fprintf(stderr, "SIGSEGV is catched.\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<_sig_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<_sig_handler>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"SIGSEGV is catched.\0A\00"
define void @_sig_handler(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 -1)
unreachable
}
/* Type definitions */
struct traversal_algorithm {
  int dummy;
};
struct expr_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ safe_free_impl(struct expr_list *, char *, int);
void ast_safe_free_el(struct expr_list *ptr, struct traversal_algorithm *algo) {
  (void)(algo);
  safe_free_impl(
      ptr,
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/fg123/wendy/refs/heads/master/src/ast.c",
      55);
}


x86 assembly (clang, -O0):
<ast_safe_free_el>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed5(%rip),%rsi
mov    $0x37,%edx
call   1030 <safe_free_impl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ast_safe_free_el>:
lea    0xee9(%rip),%rsi
mov    $0x37,%edx
jmp    1030 <safe_free_impl@plt>

LLVM IR (-O0):
%struct.expr_list = type { i32 }
%struct.traversal_algorithm = type { i32 }
@.str = [130 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fg123/wendy/refs/heads/master/src/ast.c\00"
define void @ast_safe_free_el(%struct.expr_list* %0, %struct.traversal_algorithm* %1) {
%3 = alloca %struct.expr_list*
%4 = alloca %struct.traversal_algorithm*
store %struct.expr_list* %0, %struct.expr_list** %3
store %struct.traversal_algorithm* %1, %struct.traversal_algorithm** %4
%5 = load %struct.traversal_algorithm*, %struct.traversal_algorithm** %4
%6 = load %struct.expr_list*, %struct.expr_list** %3
%7 = call i32 @safe_free_impl(%struct.expr_list* %6, i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 55)
ret void
}

LLVM IR (-O2):
%struct.expr_list = type { i32 }
%struct.traversal_algorithm = type { i32 }
@.str = [130 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fg123/wendy/refs/heads/master/src/ast.c\00"
define void @ast_safe_free_el(%struct.expr_list* %0, %struct.traversal_algorithm* nocapture readnone %1) {
%3 = tail call i32 @safe_free_impl(%struct.expr_list* %0, i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 55)
ret void
}
char *hello() { return "extension_hello"; }


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

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

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

LLVM IR (-O2):
@.str = [16 x i8] c"extension_hello\00"
define i8* @hello() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}
unsigned int lzx_footer_bits(unsigned int position_slot) {
  if (position_slot < 2) {
    return 0;
  } else if (position_slot < 38) {
    return ((position_slot / 2) - 1);
  } else {
    return 17;
  }
}


x86 assembly (clang, -O0):
<lzx_footer_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jae    111d <lzx_footer_bits+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    113f <lzx_footer_bits+0x3f>
cmpl   $0x26,-0x8(%rbp)
jae    1138 <lzx_footer_bits+0x38>
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113f <lzx_footer_bits+0x3f>
movl   $0x11,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lzx_footer_bits>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     1118 <lzx_footer_bits+0x18>
mov    $0x11,%eax
cmp    $0x25,%edi
ja     1118 <lzx_footer_bits+0x18>
shr    %edi
add    $0xffffffff,%edi
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @lzx_footer_bits(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ult i32 %4, 2
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %15
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp ult i32 %8, 38
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load i32, i32* %3
%12 = udiv i32 %11, 2
%13 = sub i32 %12, 1
store i32 %13, i32* %2
br label %15
14: ; preds = %7
store i32 17, i32* %2
br label %15
15: ; preds = %14, %10, %6
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @lzx_footer_bits(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = icmp ult i32 %0, 38
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = lshr i32 %0, 1
%7 = add nsw i32 %6, -1
br label %8
8: ; preds = %3, %1, %5
%9 = phi i32 [ %7, %5 ], [ 0, %1 ], [ 17, %3 ]
ret i32 %9
}
/* Variables and functions */
char *consume_token(char *, int);
int /*<<< orphan*/ execute(char *);
char *parse_number_expression(char *, int *);
void cmd_if(char *args) {
  int condition;
  if (args = parse_number_expression(args, &condition)) {
    if (condition) {
      if (args = consume_token(args, 19)) {
        execute(args);
      }
    }
  }
}


x86 assembly (clang, -O0):
<cmd_if>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <parse_number_expression@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
je     1190 <cmd_if+0x60>
cmpl   $0x0,-0xc(%rbp)
je     118b <cmd_if+0x5b>
mov    -0x8(%rbp),%rdi
mov    $0x13,%esi
call   1050 <consume_token@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
je     1186 <cmd_if+0x56>
mov    -0x8(%rbp),%rdi
call   1030 <execute@plt>
jmp    118b <cmd_if+0x5b>
jmp    1190 <cmd_if+0x60>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_if>:
push   %rax
lea    0x4(%rsp),%rsi
call   1040 <parse_number_expression@plt>
test   %rax,%rax
je     1161 <cmd_if+0x31>
cmpl   $0x0,0x4(%rsp)
je     1161 <cmd_if+0x31>
mov    %rax,%rdi
mov    $0x13,%esi
call   1050 <consume_token@plt>
test   %rax,%rax
je     1161 <cmd_if+0x31>
mov    %rax,%rdi
call   1030 <execute@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @cmd_if(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @parse_number_expression(i8* %4, i32* %3)
store i8* %5, i8** %2
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %19
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %18
10: ; preds = %7
%11 = load i8*, i8** %2
%12 = call i8* @consume_token(i8* %11, i32 19)
store i8* %12, i8** %2
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load i8*, i8** %2
%16 = call i32 @execute(i8* %15)
br label %17
17: ; preds = %14, %10
br label %18
18: ; preds = %17, %7
br label %19
19: ; preds = %18, %1
ret void
}

LLVM IR (-O2):
define void @cmd_if(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i8* @parse_number_expression(i8* %0, i32* %2)
%5 = icmp ne i8* %4, null
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
%8 = select i1 %5, i1 %7, i1 false
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = call i8* @consume_token(i8* %4, i32 19)
%11 = icmp eq i8* %10, null
br i1 %11, label %14, label %12
12: ; preds = %9
%13 = call i32 @execute(i8* %10)
br label %14
14: ; preds = %12, %9, %1
ret void
}
/* Type definitions */
struct menu_entry_instance {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ menu_back(int);
int net_menu_done_cb(struct menu_entry_instance *instance) {
  (void)instance;
  menu_back(7);
  return 0;
}


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

x86 assembly (clang, -O2):
<net_menu_done_cb>:
push   %rax
mov    $0x7,%edi
call   1030 <menu_back@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.menu_entry_instance = type { i32 }
define i32 @net_menu_done_cb(%struct.menu_entry_instance* %0) {
%2 = alloca %struct.menu_entry_instance*
store %struct.menu_entry_instance* %0, %struct.menu_entry_instance** %2
%3 = load %struct.menu_entry_instance*, %struct.menu_entry_instance** %2
%4 = call i32 @menu_back(i32 7)
ret i32 0
}

LLVM IR (-O2):
%struct.menu_entry_instance = type { i32 }
define i32 @net_menu_done_cb(%struct.menu_entry_instance* nocapture readnone %0) {
%2 = tail call i32 @menu_back(i32 7)
ret i32 0
}
/* Type definitions */
struct comp {
  int dummy;
};
struct BrzUnaryFunc_ {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SEND_ACKDOWN_DELAYED(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ SEND_DATAOFF_DELAYED(int /*<<< orphan*/, int);
void BrzUnaryFunc_ackdown(struct comp *comp, int port) {
  struct BrzUnaryFunc_ *c = (struct BrzUnaryFunc_ *)comp;
  SEND_ACKDOWN_DELAYED(0, 0);
  SEND_DATAOFF_DELAYED(0, 1);
}


x86 assembly (clang, -O0):
<BrzUnaryFunc_ackdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
xor    %esi,%esi
mov    %esi,%edi
call   1030 <SEND_ACKDOWN_DELAYED@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <SEND_DATAOFF_DELAYED@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BrzUnaryFunc_ackdown>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1030 <SEND_ACKDOWN_DELAYED@plt>
xor    %edi,%edi
mov    $0x1,%esi
pop    %rax
jmp    1040 <SEND_DATAOFF_DELAYED@plt>

LLVM IR (-O0):
%struct.comp = type { i32 }
%struct.BrzUnaryFunc_ = type { i32 }
define void @BrzUnaryFunc_ackdown(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
%5 = alloca %struct.BrzUnaryFunc_*
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%6 = load %struct.comp*, %struct.comp** %3
%7 = bitcast %struct.comp* %6 to %struct.BrzUnaryFunc_*
store %struct.BrzUnaryFunc_* %7, %struct.BrzUnaryFunc_** %5
%8 = call i32 @SEND_ACKDOWN_DELAYED(i32 0, i32 0)
%9 = call i32 @SEND_DATAOFF_DELAYED(i32 0, i32 1)
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
define void @BrzUnaryFunc_ackdown(%struct.comp* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @SEND_ACKDOWN_DELAYED(i32 0, i32 0)
%4 = tail call i32 @SEND_DATAOFF_DELAYED(i32 0, i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void mpeg2_cpu_state_init(uint32_t accel) {}


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

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

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

LLVM IR (-O2):
define void @mpeg2_cpu_state_init(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void prefetch_abort_handler(void) { printf("PREFETCH ABORT HANDLER\n"); }


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

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

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

LLVM IR (-O2):
@str = [23 x i8] c"PREFETCH ABORT HANDLER\00"
define void @prefetch_abort_handler() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
int /*<<< orphan*/ write_time_prefix(int /*<<< orphan*/ *);
void log_error(const char *message, void *stream) {
  FILE *write_stream = (FILE *)stream;
  write_time_prefix(write_stream);
  fprintf(write_stream, "ERROR: %s\n", message);
}


x86 assembly (clang, -O0):
<log_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <write_time_prefix@plt>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_error>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <write_time_prefix@plt>
lea    0xec7(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @log_error(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = call i32 @write_time_prefix(i32* %8)
%10 = load i32*, i32** %5
%11 = load i8*, i8** %3
%12 = call i32 @fprintf(i32* %10, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %11)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @log_error(i8* %0, i8* %1) {
%3 = bitcast i8* %1 to i32*
%4 = tail call i32 @write_time_prefix(i32* %3)
%5 = tail call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
int /*<<< orphan*/ run_host();
int /*<<< orphan*/ set_affinity(void *);
void *start_host(void *arg) {
  set_affinity(arg);
  run_host();
  pthread_exit(NULL);
}


x86 assembly (clang, -O0):
<start_host>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <set_affinity@plt>
mov    $0x0,%al
call   1050 <run_host@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<start_host>:
push   %rax
call   1040 <set_affinity@plt>
xor    %eax,%eax
call   1050 <run_host@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <pthread_exit@plt>

LLVM IR (-O0):
define i8* @start_host(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @set_affinity(i8* %4)
%6 = call i32 (...) @run_host()
%7 = call i32 @pthread_exit(i32* null)
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
define noalias i8* @start_host(i8* %0) {
%2 = tail call i32 @set_affinity(i8* %0)
%3 = tail call i32 (...) @run_host()
%4 = tail call i32 @pthread_exit(i32* null)
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ scale(int);
int /*<<< orphan*/ symbolize(int);
void resymbolize(int datamax) {
  scale(datamax);
  symbolize(datamax);
}


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

x86 assembly (clang, -O2):
<resymbolize>:
push   %rbx
mov    %edi,%ebx
call   1040 <scale@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <symbolize@plt>

LLVM IR (-O0):
define void @resymbolize(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @scale(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @symbolize(i32 %5)
ret void
}

LLVM IR (-O2):
define void @resymbolize(i32 %0) {
%2 = tail call i32 @scale(i32 %0)
%3 = tail call i32 @symbolize(i32 %0)
ret void
}
/* Variables and functions */
float atan(float);
float smblprewarp(float w) { return 2.0f * atan(w / 2.0f); }


x86 assembly (clang, -O0):
<smblprewarp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xed6(%rip),%xmm1
divss  %xmm1,%xmm0
call   1030 <atan@plt>
movaps %xmm0,%xmm1
movss  0xec2(%rip),%xmm0
mulss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smblprewarp>:
push   %rax
mulss  0xee7(%rip),%xmm0
call   1030 <atan@plt>
addss  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @smblprewarp(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fdiv float %3, 2.000000e+00
%5 = call float @atan(float %4)
%6 = fmul float 2.000000e+00, %5
ret float %6
}

LLVM IR (-O2):
define float @smblprewarp(float %0) {
%2 = fmul float %0, 5.000000e-01
%3 = tail call float @atan(float %2)
%4 = fmul float %3, 2.000000e+00
ret float %4
}
int PyDTrace_FUNCTION_RETURN_ENABLED(void) { return 0; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fread(float *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
scalar_t__ malloc(int);
float *binReadFloats(FILE *fin, int n) {
  float *x_ptr = (float *)malloc(n * sizeof(float));
  fread(x_ptr, sizeof(float), n, fin);
  fseek(fin, 0, SEEK_SET);
  return x_ptr;
}


x86 assembly (clang, -O0):
<binReadFloats>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rcx
mov    $0x4,%esi
call   1030 <fread@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e6e(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <fseek@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<binReadFloats>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %rdi,%r14
lea    0x0(,%rbx,4),%edi
call   1040 <malloc@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    $0x4,%esi
mov    %ebx,%edx
mov    %r14,%rcx
call   1030 <fread@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1050 <fseek@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@SEEK_SET = global i32 0
define float* @binReadFloats(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca float*
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = mul i64 %7, 4
%9 = trunc i64 %8 to i32
%10 = call i64 @malloc(i32 %9)
%11 = inttoptr i64 %10 to float*
store float* %11, float** %5
%12 = load float*, float** %5
%13 = load i32, i32* %4
%14 = load i32*, i32** %3
%15 = call i32 @fread(float* %12, i32 4, i32 %13, i32* %14)
%16 = load i32*, i32** %3
%17 = load i32, i32* @SEEK_SET
%18 = call i32 @fseek(i32* %16, i32 0, i32 %17)
%19 = load float*, float** %5
ret float* %19
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
define float* @binReadFloats(i32* nocapture %0, i32 %1) {
%3 = shl i32 %1, 2
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to float*
%6 = tail call i32 @fread(float* %5, i32 4, i32 %1, i32* %0)
%7 = load i32, i32* @SEEK_SET
%8 = tail call i32 @fseek(i32* %0, i32 0, i32 %7)
ret float* %5
}
unsigned long hash(char *str) {
  unsigned long idx = 5381;
  int c;
  while ((c = *str++))
    idx = ((idx << 5) + idx) + c;
  return idx % 2053;
}


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
mov    $0x805,%ecx
xor    %edx,%edx
div    %rcx
mov    %rdx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%al
test   %al,%al
je     114e <hash+0x4e>
add    $0x1,%rdi
mov    $0x1505,%ecx
nop
mov    %rcx,%rdx
shl    $0x5,%rdx
add    %rcx,%rdx
movsbq %al,%rcx
add    %rdx,%rcx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <hash+0x10>
movabs $0xff6063c1a6f7a539,%rdx
63 60 ff
mov    %rcx,%rax
mul    %rdx
shr    $0xb,%rdx
imul   $0x805,%rdx,%rax
sub    %rax,%rcx
mov    %rcx,%rax
ret
mov    $0x4fb,%eax
ret

LLVM IR (-O0):
define i64 @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 = urem i64 %20, 2053
ret i64 %21
}

LLVM IR (-O2):
define i64 @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 = urem i64 %11, 2053
br label %16
16: ; preds = %14, %1
%17 = phi i64 [ 1275, %1 ], [ %15, %14 ]
ret i64 %17
}
/* Type definitions */
struct openconnect_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ script_config_tun(struct openconnect_info *);
int /*<<< orphan*/ setenv(char *, char *, int);
void script_reconnect(struct openconnect_info *vpninfo) {
  setenv("reason", "reconnect", 1);
  script_config_tun(vpninfo);
}


x86 assembly (clang, -O0):
<script_reconnect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
lea    0xecd(%rip),%rsi
mov    $0x1,%edx
call   1040 <setenv@plt>
mov    -0x8(%rbp),%rdi
call   1030 <script_config_tun@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<script_reconnect>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    $0x1,%edx
call   1040 <setenv@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <script_config_tun@plt>

LLVM IR (-O0):
%struct.openconnect_info = type { i32 }
@.str = [7 x i8] c"reason\00"
@.str.1 = [10 x i8] c"reconnect\00"
define void @script_reconnect(%struct.openconnect_info* %0) {
%2 = alloca %struct.openconnect_info*
store %struct.openconnect_info* %0, %struct.openconnect_info** %2
%3 = call i32 @setenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 1)
%4 = load %struct.openconnect_info*, %struct.openconnect_info** %2
%5 = call i32 @script_config_tun(%struct.openconnect_info* %4)
ret void
}

LLVM IR (-O2):
%struct.openconnect_info = type { i32 }
@.str = [7 x i8] c"reason\00"
@.str.1 = [10 x i8] c"reconnect\00"
define void @script_reconnect(%struct.openconnect_info* %0) {
%2 = tail call i32 @setenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 1)
%3 = tail call i32 @script_config_tun(%struct.openconnect_info* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_dmatrix(double **m, long lowRow, long lowCol) {
  free((char *)(m[lowRow] + lowCol - 1));
  free((char *)(m + lowRow - 1));
}


x86 assembly (clang, -O0):
<free_dmatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x18(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_dmatrix>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi,%rsi,8),%rax
lea    (%rax,%rdx,8),%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
lea    (%rbx,%r14,8),%rdi
add    $0xfffffffffffffff8,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_dmatrix(double** %0, i64 %1, i64 %2) {
%4 = alloca double**
%5 = alloca i64
%6 = alloca i64
store double** %0, double*** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load double**, double*** %4
%8 = load i64, i64* %5
%9 = getelementptr inbounds double*, double** %7, i64 %8
%10 = load double*, double** %9
%11 = load i64, i64* %6
%12 = getelementptr inbounds double, double* %10, i64 %11
%13 = getelementptr inbounds double, double* %12, i64 -1
%14 = bitcast double* %13 to i8*
%15 = call i32 @free(i8* %14)
%16 = load double**, double*** %4
%17 = load i64, i64* %5
%18 = getelementptr inbounds double*, double** %16, i64 %17
%19 = getelementptr inbounds double*, double** %18, i64 -1
%20 = bitcast double** %19 to i8*
%21 = call i32 @free(i8* %20)
ret void
}

LLVM IR (-O2):
define void @free_dmatrix(double** nocapture %0, i64 %1, i64 %2) {
%4 = getelementptr inbounds double*, double** %0, i64 %1
%5 = load double*, double** %4
%6 = getelementptr inbounds double, double* %5, i64 %2
%7 = getelementptr inbounds double, double* %6, i64 -1
%8 = bitcast double* %7 to i8*
%9 = tail call i32 @free(i8* %8)
%10 = getelementptr inbounds double*, double** %4, i64 -1
%11 = bitcast double** %10 to i8*
%12 = tail call i32 @free(i8* %11)
ret void
}
/* Variables and functions */
unsigned long inl(int);
unsigned long inl_p(int port) { return (inl(port)); }


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

x86 assembly (clang, -O2):
<inl_p>:
jmp    1030 <inl@plt>

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

LLVM IR (-O2):
define i64 @inl_p(i32 %0) {
%2 = tail call i64 @inl(i32 %0)
ret i64 %2
}
void BN_is_bit_set(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_is_bit_set() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fprintf(int /*<<< orphan*/ *, char *, double);
int zomp_writeDouble(void *file, double val) {
  return fprintf((FILE *)file, "%f", val);
}


x86 assembly (clang, -O0):
<zomp_writeDouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zomp_writeDouble>:
lea    0xee9(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define i32 @zomp_writeDouble(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load double, double* %4
%8 = call i32 @fprintf(i32* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %7)
ret i32 %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i32 @zomp_writeDouble(i8* nocapture %0, double %1) {
%3 = bitcast i8* %0 to i32*
%4 = tail call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main(void) {
  if (0) {
    printf("0 is true\n");
  } else {
    printf("0 is false\n");
  }
  if (1) {
    printf("1 is true\n");
  } else {
    printf("1 is false\n");
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xed7(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@str = [11 x i8] c"0 is false\00"
@str.2 = [10 x i8] c"1 is true\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void function(void) { printf("dynamic link library : function\n"); }


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

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

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

LLVM IR (-O2):
@str = [32 x i8] c"dynamic link library : function\00"
define void @function() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ funcion_1();
int /*<<< orphan*/ printf(char *, int, int, int, int);
main() {
  extern int var1;
  static int var2;
  register int var3 = 0;
  int var4 = 0;
  var1 += 2;
  printf("%d  %d  %d  %d\n", var1, var2, var3, var4);
  funcion_1();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    0x2eab(%rip),%rax
mov    (%rax),%ecx
add    $0x2,%ecx
mov    0x2e9f(%rip),%rax
mov    %ecx,(%rax)
mov    0x2e96(%rip),%rax
mov    (%rax),%esi
mov    0x2eda(%rip),%edx
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%r8d
lea    0xe98(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <funcion_1@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
add    $0x2,%esi
mov    %esi,(%rax)
lea    0xeca(%rip),%rdi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <funcion_1@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@main.var2 = internal global i32 0
@var1 = external global i32
@.str = [16 x i8] c"%d %d %d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* @var1
%4 = add nsw i32 %3, 2
store i32 %4, i32* @var1
%5 = load i32, i32* @var1
%6 = load i32, i32* @main.var2
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6, i32 %7, i32 %8)
%10 = call i32 (...) @funcion_1()
ret i32 0
}

LLVM IR (-O2):
@var1 = external global i32
@.str = [16 x i8] c"%d %d %d %d\0A\00"
define i32 @main() {
%1 = load i32, i32* @var1
%2 = add nsw i32 %1, 2
store i32 %2, i32* @var1
%3 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %2, i32 0, i32 0, i32 0)
%4 = tail call i32 (...) @funcion_1()
ret i32 0
}
void adios_cleanup_(void) {}


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

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

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

LLVM IR (-O2):
define void @adios_cleanup_() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dhcp6_sendmessage(void *, void (*)(void *));
void dhcp6_sendconfirm(void *arg) { dhcp6_sendmessage(arg, dhcp6_sendconfirm); }


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

x86 assembly (clang, -O2):
<dhcp6_sendconfirm>:
mov    0x2ed1(%rip),%rsi
jmp    1030 <dhcp6_sendmessage@plt>

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

LLVM IR (-O2):
define void @dhcp6_sendconfirm(i8* %0) {
%2 = tail call i32 @dhcp6_sendmessage(i8* %0, void (i8*)* @dhcp6_sendconfirm)
ret void
}
/* Variables and functions */
int ei_write_fill_t(int, char *, int, int /*<<< orphan*/);
int ei_write_fill(int fd, char *buf, int len) {
  return ei_write_fill_t(fd, buf, len, 0);
}


x86 assembly (clang, -O0):
<ei_write_fill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <ei_write_fill_t@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ei_write_fill>:
xor    %ecx,%ecx
jmp    1030 <ei_write_fill_t@plt>

LLVM IR (-O0):
define i32 @ei_write_fill(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 i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @ei_write_fill_t(i32 %7, i8* %8, i32 %9, i32 0)
ret i32 %10
}

LLVM IR (-O2):
define i32 @ei_write_fill(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @ei_write_fill_t(i32 %0, i8* %1, i32 %2, i32 0)
ret i32 %4
}
int test_imm_55int32_mem(int *val) {
  return ((*val) & (0x55 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_55int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 85
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void glUniformMatrix4fv(void) { return; }


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

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

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

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


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @post_process() {
ret void
}
void func5(int *a) {
  if (a) {
    *a = 500;
  }
  *a = 600;
}


x86 assembly (clang, -O0):
<func5>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     111d <func5+0x1d>
mov    -0x8(%rbp),%rax
movl   $0x1f4,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x258,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<func5>:
movl   $0x258,(%rdi)
ret

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

LLVM IR (-O2):
define void @func5(i32* writeonly %0) {
store i32 600, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int n;
  scanf("%d", &n);
  printf("%d\n", n * 2);
  char s[15];
  scanf("%s", &s);
  printf("%s\n", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
shl    $0x1,%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeab(%rip),%rdi
lea    -0x17(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    -0x17(%rbp),%rsi
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xec4(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0xc(%rsp),%esi
add    %esi,%esi
lea    0xeae(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea4(%rip),%rdi
lea    0x11(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [15 x i8]
%3 = bitcast i32* %1 to i8*
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = shl nsw i32 %5, 1
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), [15 x i8]* %2)
%10 = call i32 @puts(i8* %8)
ret i32 0
}
int fun1260() { return 1260; }


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

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

LLVM IR (-O0):
define i32 @fun1260() {
ret i32 1260
}

LLVM IR (-O2):
define i32 @fun1260() {
ret i32 1260
}
char *test_tape() { return 0; }


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

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

LLVM IR (-O0):
define i8* @test_tape() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @test_tape() {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
#pragma xmp tasks
  {
#pragma xmp task on p[0 : 4]
      {
#pragma xmp barrier on p
      }
#pragma xmp task on p[4 : 4]
      {
#pragma xmp barrier on p
      }}
#pragma xmp task on p[0]
  {
    printf("PASS\n");
  }
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"PASS\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int isNumber(char letter) {
  if (((int)letter <= (int)'9') && ((int)letter > (int)'0')) {
    return 1;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<isNumber>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1130 <isNumber+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jle    1130 <isNumber+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <isNumber+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isNumber>:
add    $0xcf,%dil
xor    %eax,%eax
cmp    $0x9,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @isNumber(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sle i32 %5, 57
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sgt i32 %9, 48
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %13
12: ; preds = %7, %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @isNumber(i8 signext %0) {
%2 = add i8 %0, -49
%3 = icmp ult i8 %2, 9
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x54() {
  Assert_real((isascii(84)),
              "/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_isascii.c",
              425, ("isascii should be 1 for T"));
}


x86 assembly (clang, -O0):
<t_isascii_0x54>:
push   %rbp
mov    %rsp,%rbp
mov    $0x54,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x1a9,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x54>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x1a9,%edx
jmp    1030 <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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for T\00"
define void @t_isascii_0x54() {
%1 = call i32 @isascii(i32 84)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 425, 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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for T\00"
define void @t_isascii_0x54() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 425, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void testwhile(void) {
  do
    ;
  while (0);
  while (0)
    ;
  for (; 0;)
    ;
}


x86 assembly (clang, -O0):
<testwhile>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <testwhile+0x9>
jmp    110e <testwhile+0xe>
jmp    1113 <testwhile+0x13>
xor    %eax,%eax
test   $0x1,%al
jne    1122 <testwhile+0x22>
jmp    1127 <testwhile+0x27>
jmp    1113 <testwhile+0x13>
jmp    112c <testwhile+0x2c>
xor    %eax,%eax
test   $0x1,%al
jne    113b <testwhile+0x3b>
jmp    1140 <testwhile+0x40>
jmp    112c <testwhile+0x2c>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @testwhile() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
br label %3
3: ; preds = %4, %2
br i1 false, label %4, label %5
4: ; preds = %3
br label %3
5: ; preds = %3
br label %6
6: ; preds = %7, %5
br i1 false, label %7, label %8
7: ; preds = %6
br label %6
8: ; preds = %6
ret void
}

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