xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
char *fgets_or_exit(char *buffer, int size, FILE *stream) {
  if (fgets(buffer, size, stream) == NULL) {
    perror("fprintf");
    exit(NULL);
  }
  return buffer;
}


x86 assembly (clang, -O0):
<fgets_or_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <fgets@plt>
cmp    $0x0,%rax
jne    1172 <fgets_or_exit+0x42>
lea    0xe9c(%rip),%rdi
call   1040 <perror@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgets_or_exit>:
push   %rbx
mov    %rdi,%rbx
call   1030 <fgets@plt>
test   %rax,%rax
je     1143 <fgets_or_exit+0x13>
mov    %rbx,%rax
pop    %rbx
ret
lea    0xeb6(%rip),%rdi
call   1040 <perror@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"fprintf\00"
define i8* @fgets_or_exit(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i32*, i32** %6
%10 = call i32* @fgets(i8* %7, i32 %8, i32* %9)
%11 = icmp eq i32* %10, null
br i1 %11, label %12, label %15
12: ; preds = %3
%13 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @exit(i32* null)
unreachable
15: ; preds = %3
%16 = load i8*, i8** %4
ret i8* %16
}

LLVM IR (-O2):
@.str = [8 x i8] c"fprintf\00"
define i8* @fgets_or_exit(i8* returned %0, i32 %1, i32* nocapture %2) {
%4 = tail call i32* @fgets(i8* %0, i32 %1, i32* %2)
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32* null)
unreachable
9: ; preds = %3
ret i8* %0
}
void gdk_rgb_ditherable() {}


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

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

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

LLVM IR (-O2):
define void @gdk_rgb_ditherable() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *progname) {
  printf("usage: %s Experimentspecification gaborimagedir graph_directory "
         "output_directory maskfile\n",
         progname);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [91 x i8] c"usage: %s Experimentspecification gaborimagedir graph_directory output_directory maskfile\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 ([91 x i8], [91 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [91 x i8] c"usage: %s Experimentspecification gaborimagedir graph_directory output_directory maskfile\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int strings_free(char *ptr) {
  if (ptr != NULL) {
    free(ptr);
    ptr = NULL;
  }
  return 0;
}


x86 assembly (clang, -O0):
<strings_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1138 <strings_free+0x28>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strings_free>:
test   %rdi,%rdi
je     111f <strings_free+0xf>
push   %rax
call   1030 <free@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @strings_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 %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
store i8* null, i8** %2
br label %8
8: ; preds = %5, %1
ret i32 0
}

LLVM IR (-O2):
define i32 @strings_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 = %3, %1
ret i32 0
}
/* Variables and functions */
char *get_cmus_home_file(char *);
char *get_cmusfm_socket_file(void) {
  return get_cmus_home_file("cmusfm.socket");
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"cmusfm.socket\00"
define i8* @get_cmusfm_socket_file() {
%1 = call i8* @get_cmus_home_file(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [14 x i8] c"cmusfm.socket\00"
define i8* @get_cmusfm_socket_file() {
%1 = tail call i8* @get_cmus_home_file(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
main() {
  extern int i;
  extern int i;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mat_mul(int **, int **);
void mat_pow(int F[2][2], int n) {
  int M[2][2] = {{1, 1}, {1, 0}};
  for (int i = 2; i <= n; i++)
    mat_mul(F, M);
}


x86 assembly (clang, -O0):
<mat_pow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x2,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1163 <mat_pow+0x53>
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <mat_mul@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    113c <mat_pow+0x2c>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat_pow>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movaps 0xee0(%rip),%xmm0
movaps %xmm0,(%rsp)
cmp    $0x2,%esi
jl     1150 <mat_pow+0x40>
mov    %esi,%ebx
mov    %rdi,%r14
add    $0xffffffff,%ebx
mov    %rsp,%r15
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <mat_mul@plt>
add    $0xffffffff,%ebx
jne    1140 <mat_pow+0x30>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.mat_pow.M = [2 x [2 x i32]] [[2 x i32] [i32 1, i32 1], [2 x i32] [i32 1, i32 0]]
define void @mat_pow([2 x i32]* %0, i32 %1) {
%3 = alloca [2 x i32]*
%4 = alloca i32
%5 = alloca [2 x [2 x i32]]
%6 = alloca i32
store [2 x i32]* %0, [2 x i32]** %3
store i32 %1, i32* %4
%7 = bitcast [2 x [2 x i32]]* %5 to i8*
store i32 2, i32* %6
br label %8
8: ; preds = %18, %2
%9 = load i32, i32* %6
%10 = load i32, i32* %4
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %21
12: ; preds = %8
%13 = load [2 x i32]*, [2 x i32]** %3
%14 = bitcast [2 x i32]* %13 to i32**
%15 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %5, i64 0, i64 0
%16 = bitcast [2 x i32]* %15 to i32**
%17 = call i32 @mat_mul(i32** %14, i32** %16)
br label %18
18: ; preds = %12
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
br label %8
21: ; preds = %8
ret void
}

LLVM IR (-O2):
@__const.mat_pow.M = [2 x [2 x i32]] [[2 x i32] [i32 1, i32 1], [2 x i32] [i32 1, i32 0]]
define void @mat_pow([2 x i32]* %0, i32 %1) {
%3 = alloca [2 x [2 x i32]]
%4 = bitcast [2 x [2 x i32]]* %3 to i8*
%5 = icmp slt i32 %1, 2
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = bitcast [2 x i32]* %0 to i32**
%8 = bitcast [2 x [2 x i32]]* %3 to i32**
br label %10
9: ; preds = %10, %2
ret void
10: ; preds = %6, %10
%11 = phi i32 [ 2, %6 ], [ %13, %10 ]
%12 = call i32 @mat_mul(i32** %7, i32** %8)
%13 = add nuw i32 %11, 1
%14 = icmp eq i32 %11, %1
br i1 %14, label %9, label %10
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t get_rs(int32_t instruction) { return (instruction & 0x03e00000) >> 21; }


x86 assembly (clang, -O0):
<get_rs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3e00000,%eax
sar    $0x15,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_rs>:
mov    %edi,%eax
shr    $0x15,%eax
and    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @get_rs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65011712
%5 = ashr i32 %4, 21
ret i32 %5
}

LLVM IR (-O2):
define i32 @get_rs(i32 %0) {
%2 = lshr i32 %0, 21
%3 = and i32 %2, 31
ret i32 %3
}
int minInt(int a, int b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<minInt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <minInt+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <minInt+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @minInt(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int config_MODULE_CAMD35_TCP(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @config_MODULE_CAMD35_TCP() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ b1_put_byte(unsigned int, unsigned int);
void b1_put_word(unsigned int base, unsigned int val) {
  b1_put_byte(base, val & 0xff);
  b1_put_byte(base, (val >> 8) & 0xff);
  b1_put_byte(base, (val >> 16) & 0xff);
  b1_put_byte(base, (val >> 24) & 0xff);
}


x86 assembly (clang, -O0):
<b1_put_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
and    $0xff,%esi
call   1030 <b1_put_byte@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
shr    $0x8,%esi
and    $0xff,%esi
call   1030 <b1_put_byte@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
shr    $0x10,%esi
and    $0xff,%esi
call   1030 <b1_put_byte@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
shr    $0x18,%esi
and    $0xff,%esi
call   1030 <b1_put_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b1_put_word>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
movzbl %bl,%esi
call   1030 <b1_put_byte@plt>
movzbl %bh,%esi
mov    %ebp,%edi
call   1030 <b1_put_byte@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%esi
mov    %ebp,%edi
call   1030 <b1_put_byte@plt>
shr    $0x18,%ebx
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <b1_put_byte@plt>

LLVM IR (-O0):
define void @b1_put_word(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = and i32 %6, 255
%8 = call i32 @b1_put_byte(i32 %5, i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = lshr i32 %10, 8
%12 = and i32 %11, 255
%13 = call i32 @b1_put_byte(i32 %9, i32 %12)
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = lshr i32 %15, 16
%17 = and i32 %16, 255
%18 = call i32 @b1_put_byte(i32 %14, i32 %17)
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = lshr i32 %20, 24
%22 = and i32 %21, 255
%23 = call i32 @b1_put_byte(i32 %19, i32 %22)
ret void
}

LLVM IR (-O2):
define void @b1_put_word(i32 %0, i32 %1) {
%3 = and i32 %1, 255
%4 = tail call i32 @b1_put_byte(i32 %0, i32 %3)
%5 = lshr i32 %1, 8
%6 = and i32 %5, 255
%7 = tail call i32 @b1_put_byte(i32 %0, i32 %6)
%8 = lshr i32 %1, 16
%9 = and i32 %8, 255
%10 = tail call i32 @b1_put_byte(i32 %0, i32 %9)
%11 = lshr i32 %1, 24
%12 = tail call i32 @b1_put_byte(i32 %0, i32 %11)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void SysCtlDeepSleepPowerSet(uint32_t ui32Config) {
  (*((volatile uint32_t *)(0x400FE18C))) = ui32Config;
}


x86 assembly (clang, -O0):
<SysCtlDeepSleepPowerSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x400fe18c,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlDeepSleepPowerSet>:
mov    %edi,0x400fe18c
ret

LLVM IR (-O0):
define void @SysCtlDeepSleepPowerSet(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
store volatile i32 %3, i32* inttoptr (i64 1074782604 to i32*)
ret void
}

LLVM IR (-O2):
define void @SysCtlDeepSleepPowerSet(i32 %0) {
store volatile i32 %0, i32* inttoptr (i64 1074782604 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ calltrap(int /*<<< orphan*/);
int GetVersion(void) { calltrap(0); }


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

x86 assembly (clang, -O2):
<GetVersion>:
xor    %edi,%edi
jmp    1030 <calltrap@plt>

LLVM IR (-O0):
define i32 @GetVersion() {
%1 = alloca i32
%2 = call i32 @calltrap(i32 0)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @GetVersion() {
%1 = tail call i32 @calltrap(i32 0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usageExit(char *program) {
  fprintf(stderr, "Usage: %s [file] [length] [char]\n", program);
  exit(EXIT_FAILURE);
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"Usage: %s [file] [length] [char]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usageExit(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ hello(int);
int main(int argc, char **argv) {
  (void)argc;
  (void)argv;
#pragma omp parallel
  {
#pragma omp for
    for (int i = 0; i < 10; i++) {
      hello(i);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    114d <main+0x3d>
mov    -0x14(%rbp),%edi
call   1030 <hello@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <hello@plt>
mov    $0x1,%edi
call   1030 <hello@plt>
mov    $0x2,%edi
call   1030 <hello@plt>
mov    $0x3,%edi
call   1030 <hello@plt>
mov    $0x4,%edi
call   1030 <hello@plt>
mov    $0x5,%edi
call   1030 <hello@plt>
mov    $0x6,%edi
call   1030 <hello@plt>
mov    $0x7,%edi
call   1030 <hello@plt>
mov    $0x8,%edi
call   1030 <hello@plt>
mov    $0x9,%edi
call   1030 <hello@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**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
store i32 0, i32* %6
br label %9
9: ; preds = %15, %2
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 10
br i1 %11, label %12, label %18
12: ; preds = %9
%13 = load i32, i32* %6
%14 = call i32 @hello(i32 %13)
br label %15
15: ; preds = %12
%16 = load i32, i32* %6
%17 = add nsw i32 %16, 1
store i32 %17, i32* %6
br label %9
18: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @hello(i32 0)
%4 = tail call i32 @hello(i32 1)
%5 = tail call i32 @hello(i32 2)
%6 = tail call i32 @hello(i32 3)
%7 = tail call i32 @hello(i32 4)
%8 = tail call i32 @hello(i32 5)
%9 = tail call i32 @hello(i32 6)
%10 = tail call i32 @hello(i32 7)
%11 = tail call i32 @hello(i32 8)
%12 = tail call i32 @hello(i32 9)
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ backing_store;
};
typedef TYPE_1__ Screen;

/* Variables and functions */
int get_Screen_backing_store(void *_p) {
  return (int)((Screen *)_p)->backing_store;
}


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

x86 assembly (clang, -O2):
<get_Screen_backing_store>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_Screen_backing_store(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_Screen_backing_store(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void fail2(void) { abort(); }


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

x86 assembly (clang, -O2):
<fail2>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @fail2() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @fail2() {
%1 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ abort();
main() {
  int x[][2] = {1, 2, 3, 4};
  if (x[1][0] != 3)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x3,-0x18(%rbp)
je     1146 <main+0x36>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.x = [2 x [2 x i32]] [[2 x i32] [i32 1, i32 2], [2 x i32] [i32 3, i32 4]]
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x [2 x i32]]
store i32 0, i32* %1
%3 = bitcast [2 x [2 x i32]]* %2 to i8*
%4 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %2, i64 0, i64 1
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
%6 = load i32, i32* %5
%7 = icmp ne i32 %6, 3
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Welcome\nto\nC!\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 = [15 x i8] c"Welcome\0Ato\0AC!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Welcome\0Ato\0AC!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void test7_Y_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test7_Y_targetInit__I() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_src(char *);
void div_handler(void) {
  write_src("{\n");
  write_src("imm_t b = POP();\n");
  write_src("imm_t a = POP();\n");
  write_src("PUSH(a/b);\n");
  write_src("}\n");
}


x86 assembly (clang, -O0):
<div_handler>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <write_src@plt>
lea    0xedc(%rip),%rdi
call   1030 <write_src@plt>
lea    0xee2(%rip),%rdi
call   1030 <write_src@plt>
lea    0xee8(%rip),%rdi
call   1030 <write_src@plt>
lea    0xee8(%rip),%rdi
call   1030 <write_src@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<div_handler>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <write_src@plt>
lea    0xedf(%rip),%rdi
call   1030 <write_src@plt>
lea    0xee5(%rip),%rdi
call   1030 <write_src@plt>
lea    0xeeb(%rip),%rdi
call   1030 <write_src@plt>
lea    0xeeb(%rip),%rdi
pop    %rax
jmp    1030 <write_src@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"{\0A\00"
@.str.1 = [18 x i8] c"imm_t b = POP();\0A\00"
@.str.2 = [18 x i8] c"imm_t a = POP();\0A\00"
@.str.3 = [12 x i8] c"PUSH(a/b);\0A\00"
@.str.4 = [3 x i8] c"}\0A\00"
define void @div_handler() {
%1 = call i32 @write_src(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @write_src(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @write_src(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @write_src(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @write_src(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"{\0A\00"
@.str.1 = [18 x i8] c"imm_t b = POP();\0A\00"
@.str.2 = [18 x i8] c"imm_t a = POP();\0A\00"
@.str.3 = [12 x i8] c"PUSH(a/b);\0A\00"
@.str.4 = [3 x i8] c"}\0A\00"
define void @div_handler() {
%1 = tail call i32 @write_src(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @write_src(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @write_src(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @write_src(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @write_src(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_instr(char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
void cgen_loop(int num) {
  char str[100];
  sprintf(str, "j LOOP%d", num);
  print_instr(str);
}


x86 assembly (clang, -O0):
<cgen_loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xec7(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rdi
call   1030 <print_instr@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgen_loop>:
push   %rbx
sub    $0x70,%rsp
mov    %edi,%edx
lea    0xed2(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <print_instr@plt>
add    $0x70,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"j LOOP%d\00"
define void @cgen_loop(i32 %0) {
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i32 @print_instr(i8* %3)
ret void
}
/* Type definitions */
typedef scalar_t__ uint_fast16_t;

/* Variables and functions */
bool SHAREMIND_MAP_KEY_EQUALS_uint_fast16_t(uint_fast16_t const k1,
                                            uint_fast16_t const k2) {
  return k1 == k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_EQUALS_uint_fast16_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_MAP_KEY_EQUALS_uint_fast16_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_MAP_KEY_EQUALS_uint_fast16_t(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_EQUALS_uint_fast16_t(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void UI_TeamOrdersMenu_Cache(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ rand();
uint64_t randULong(uint64_t min, uint64_t max) {
  uint64_t t = (uint64_t)rand();
  return min + t % (max - min);
}


x86 assembly (clang, -O0):
<randULong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%eax
add    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randULong>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
sub    %ebp,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @randULong(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i32 (...) @rand()
store i32 %6, i32* %5
%7 = load i32, i32* %3
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = load i32, i32* %3
%11 = sub nsw i32 %9, %10
%12 = srem i32 %8, %11
%13 = add nsw i32 %7, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @randULong(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = sub nsw i32 %1, %0
%5 = srem i32 %3, %4
%6 = add nsw i32 %5, %0
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_167() {
  Assert_real((isqrt(167) == 12),
              "/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/stdlib/isqrt.c",
              840, ("Integer square root of 167 should be 12"));
}


x86 assembly (clang, -O0):
<t_sqrt_167>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa7,%edi
call   1030 <isqrt@plt>
cmp    $0xc,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x348,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_167>:
push   %rax
mov    $0xa7,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xc,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x348,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 167 should be 12\00"
define void @t_sqrt_167() {
%1 = call i32 @isqrt(i32 167)
%2 = icmp eq i32 %1, 12
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 840, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 167 should be 12\00"
define void @t_sqrt_167() {
%1 = tail call i32 @isqrt(i32 167)
%2 = icmp eq i32 %1, 12
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 840, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void gtk_tooltips_enable() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tooltips_enable() {
ret void
}
/* Variables and functions */
unsigned long rk_hash(unsigned long key) {
  key += ~(key << 15);
  key ^= (key >> 10);
  key += (key << 3);
  key ^= (key >> 6);
  key += ~(key << 11);
  key ^= (key >> 16);
  return key;
}


x86 assembly (clang, -O0):
<rk_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0xf,%rax
xor    $0xffffffffffffffff,%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0xa,%rax
xor    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x3,%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x6,%rax
xor    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0xb,%rax
xor    $0xffffffffffffffff,%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x10,%rax
xor    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rk_hash>:
mov    %rdi,%rax
shl    $0xf,%rax
not    %rax
add    %rdi,%rax
mov    %rax,%rcx
shr    $0xa,%rcx
xor    %rax,%rcx
lea    (%rcx,%rcx,8),%rax
mov    %rax,%rcx
shr    $0x6,%rcx
xor    %rax,%rcx
mov    %rcx,%rdx
shl    $0xb,%rdx
not    %rdx
add    %rcx,%rdx
mov    %rdx,%rax
shr    $0x10,%rax
xor    %rdx,%rax
ret

LLVM IR (-O0):
define i64 @rk_hash(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = shl i64 %3, 15
%5 = xor i64 %4, -1
%6 = load i64, i64* %2
%7 = add i64 %6, %5
store i64 %7, i64* %2
%8 = load i64, i64* %2
%9 = lshr i64 %8, 10
%10 = load i64, i64* %2
%11 = xor i64 %10, %9
store i64 %11, i64* %2
%12 = load i64, i64* %2
%13 = shl i64 %12, 3
%14 = load i64, i64* %2
%15 = add i64 %14, %13
store i64 %15, i64* %2
%16 = load i64, i64* %2
%17 = lshr i64 %16, 6
%18 = load i64, i64* %2
%19 = xor i64 %18, %17
store i64 %19, i64* %2
%20 = load i64, i64* %2
%21 = shl i64 %20, 11
%22 = xor i64 %21, -1
%23 = load i64, i64* %2
%24 = add i64 %23, %22
store i64 %24, i64* %2
%25 = load i64, i64* %2
%26 = lshr i64 %25, 16
%27 = load i64, i64* %2
%28 = xor i64 %27, %26
store i64 %28, i64* %2
%29 = load i64, i64* %2
ret i64 %29
}

LLVM IR (-O2):
define i64 @rk_hash(i64 %0) {
%2 = shl i64 %0, 15
%3 = xor i64 %2, -1
%4 = add i64 %3, %0
%5 = lshr i64 %4, 10
%6 = xor i64 %5, %4
%7 = mul i64 %6, 9
%8 = lshr i64 %7, 6
%9 = xor i64 %8, %7
%10 = shl i64 %9, 11
%11 = xor i64 %10, -1
%12 = add i64 %9, %11
%13 = lshr i64 %12, 16
%14 = xor i64 %13, %12
ret i64 %14
}
void brcm_pm_usb_remove(void) {}


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

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

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

LLVM IR (-O2):
define void @brcm_pm_usb_remove() {
ret void
}
int test15(int fd, int argc, const char **argv) { return 0; }


x86 assembly (clang, -O0):
<test15>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test15(i32 %0, i32 %1, i8** nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__36__IO__clr();
void Msp430GpioC__0__HplGeneralIO__clr(void) {
  HplMsp430GeneralIOP__36__IO__clr();
}


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

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

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

LLVM IR (-O2):
define void @Msp430GpioC__0__HplGeneralIO__clr() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__36__IO__clr()
ret void
}
void data_write_miss(void) {
  int *i = (void *)0x87654320;
  *i = 0;
}


x86 assembly (clang, -O0):
<data_write_miss>:
push   %rbp
mov    %rsp,%rbp
mov    $0x87654320,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<data_write_miss>:
mov    $0x87654320,%eax
movl   $0x0,(%rax)
ret

LLVM IR (-O0):
define void @data_write_miss() {
%1 = alloca i32*
store i32* inttoptr (i64 2271560480 to i32*), i32** %1
%2 = load i32*, i32** %1
store i32 0, i32* %2
ret void
}

LLVM IR (-O2):
define void @data_write_miss() {
store i32 0, i32* inttoptr (i64 2271560480 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%lu\n", sizeof(int));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%lu\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
ret i32 0
}
void UT_main() {}


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

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

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

LLVM IR (-O2):
define void @UT_main() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ xlFmtError(char *);
void checkfneg(double farg) {
  if (farg < 0.0)
    xlFmtError("square root of a negative number");
}


x86 assembly (clang, -O0):
<checkfneg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1137 <checkfneg+0x27>
lea    0xece(%rip),%rdi
call   1030 <xlFmtError@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkfneg>:
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    1126 <checkfneg+0x16>
lea    0xedf(%rip),%rdi
jmp    1030 <xlFmtError@plt>
ret

LLVM IR (-O0):
@.str = [33 x i8] c"square root of a negative number\00"
define void @checkfneg(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @xlFmtError(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"square root of a negative number\00"
define void @checkfneg(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @xlFmtError(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ UARTBaseValid(unsigned long);
void UARTFIFOEnable(unsigned long ulBase) {
  DEBUG_ASSERT(UARTBaseValid(ulBase));
  (*((volatile unsigned long *)(ulBase + 0x0000002C))) |= 0x00000010;
}


x86 assembly (clang, -O0):
<UARTFIFOEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <UARTBaseValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%rcx
or     $0x10,%rcx
mov    %rcx,0x2c(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTFIFOEnable>:
push   %rbx
mov    %rdi,%rbx
call   1040 <UARTBaseValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
orq    $0x10,0x2c(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @UARTFIFOEnable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @UARTBaseValid(i64 %3)
%5 = call i32 @DEBUG_ASSERT(i32 %4)
%6 = load i64, i64* %2
%7 = add i64 %6, 44
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = or i64 %9, 16
store volatile i64 %10, i64* %8
ret void
}

LLVM IR (-O2):
define void @UARTFIFOEnable(i64 %0) {
%2 = tail call i32 @UARTBaseValid(i64 %0)
%3 = tail call i32 @DEBUG_ASSERT(i32 %2)
%4 = add i64 %0, 44
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = or i64 %6, 16
store volatile i64 %7, i64* %5
ret void
}
/* Variables and functions */
scalar_t__ floor(scalar_t__);
scalar_t__ rand_norm(float, float);
int rand_disc_norm(float m, float s) {
  int i = (int)floor(rand_norm(m, s) + 0.5);
  return i;
}


x86 assembly (clang, -O0):
<rand_disc_norm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <rand_norm@plt>
cvtsi2sd %rax,%xmm0
movsd  0xeb2(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1040 <floor@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_disc_norm>:
push   %rax
call   1030 <rand_norm@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0xeca(%rip),%xmm0
cvttsd2si %xmm0,%rdi
pop    %rax
jmp    1040 <floor@plt>

LLVM IR (-O0):
define i32 @rand_disc_norm(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca i32
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = load float, float* %4
%8 = call i64 @rand_norm(float %6, float %7)
%9 = sitofp i64 %8 to double
%10 = fadd double %9, 5.000000e-01
%11 = fptosi double %10 to i64
%12 = call i64 @floor(i64 %11)
%13 = trunc i64 %12 to i32
store i32 %13, i32* %5
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
define i32 @rand_disc_norm(float %0, float %1) {
%3 = tail call i64 @rand_norm(float %0, float %1)
%4 = sitofp i64 %3 to double
%5 = fadd double %4, 5.000000e-01
%6 = fptosi double %5 to i64
%7 = tail call i64 @floor(i64 %6)
%8 = trunc i64 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ dlerror();
void *dlsym(void *, char const *);
void *mdp_dlsym(void *handle, const char *symbol) {
  dlerror();
  return dlsym(handle, symbol);
}


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

x86 assembly (clang, -O2):
<mdp_dlsym>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <dlerror@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <dlsym@plt>

LLVM IR (-O0):
define i8* @mdp_dlsym(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 (...) @dlerror()
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i8* @dlsym(i8* %6, i8* %7)
ret i8* %8
}

LLVM IR (-O2):
define i8* @mdp_dlsym(i8* %0, i8* %1) {
%3 = tail call i32 (...) @dlerror()
%4 = tail call i8* @dlsym(i8* %0, i8* %1)
ret i8* %4
}
/* Variables and functions */
float fmaf(float, float, float);
float fnma32(float x, float y, float z) { return fmaf(-x, y, -z); }


x86 assembly (clang, -O0):
<fnma32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movd   %xmm2,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
call   1030 <fmaf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnma32>:
movaps 0xee9(%rip),%xmm3
xorps  %xmm3,%xmm0
xorps  %xmm3,%xmm2
jmp    1030 <fmaf@plt>

LLVM IR (-O0):
define float @fnma32(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = fneg float %7
%9 = load float, float* %5
%10 = load float, float* %6
%11 = fneg float %10
%12 = call float @llvm.fma.f32(float %8, float %9, float %11)
ret float %12
}

LLVM IR (-O2):
define float @fnma32(float %0, float %1, float %2) {
%4 = fneg float %0
%5 = fneg float %2
%6 = tail call float @llvm.fma.f32(float %4, float %1, float %5)
ret float %6
}
/* Forward declarations */
typedef struct TYPE_5__ TYPE_2__;
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int sival_int;
};
struct TYPE_5__ {
  int si_code;
  TYPE_1__ si_value;
};
typedef TYPE_2__ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void sig_rt(int signo, siginfo_t *info, void *context) {
  printf("received signal %d, code = %d, ival = %d\n", signo, info->si_code,
         info->si_value.sival_int);
}


x86 assembly (clang, -O0):
<sig_rt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%ecx
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_rt>:
mov    %edi,%eax
mov    (%rsi),%edx
mov    0x4(%rsi),%ecx
lea    0xee2(%rip),%rdi
mov    %eax,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.TYPE_5__ = type { i32, %struct.TYPE_4__ }
%struct.TYPE_4__ = type { i32 }
@.str = [42 x i8] c"received signal %d, code = %d, ival = %d\0A\00"
define void @sig_rt(i32 %0, %struct.TYPE_5__* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.TYPE_5__*
%6 = alloca i8*
store i32 %0, i32* %4
store %struct.TYPE_5__* %1, %struct.TYPE_5__** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load %struct.TYPE_5__*, %struct.TYPE_5__** %5
%9 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %8, i32 0, i32 0
%10 = load i32, i32* %9
%11 = load %struct.TYPE_5__*, %struct.TYPE_5__** %5
%12 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %11, i32 0, i32 1
%13 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %12, i32 0, i32 0
%14 = load i32, i32* %13
%15 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %10, i32 %14)
ret void
}

LLVM IR (-O2):
%struct.TYPE_5__ = type { i32, %struct.TYPE_4__ }
%struct.TYPE_4__ = type { i32 }
@.str = [42 x i8] c"received signal %d, code = %d, ival = %d\0A\00"
define void @sig_rt(i32 %0, %struct.TYPE_5__* nocapture %1, i8* nocapture readnone %2) {
%4 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %1, i64 0, i32 1, i32 0
%7 = load i32, i32* %6
%8 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %5, i32 %7)
ret void
}