xunge/DecIR huggingface dataset:
foo(int *p) {
  int x = baz();
  if (p == 0)
    goto L78;
  else {
    x = *p;
    if (p)
      x = x + 1;
  L78:
    if (p) {
      x = baz(*p);
      if (p)
        return x + 3;
    }
    return x - 3;
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <baz@plt>
mov    %eax,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1136 <foo+0x26>
jmp    1158 <foo+0x48>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1153 <foo+0x43>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1158 <foo+0x48>
cmpq   $0x0,-0x10(%rbp)
je     1191 <foo+0x81>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    $0x0,%al
call   1030 <baz@plt>
mov    %eax,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     118c <foo+0x7c>
mov    -0x14(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x4(%rbp)
jmp    119a <foo+0x8a>
jmp    1191 <foo+0x81>
mov    -0x14(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <baz@plt>
test   %rbx,%rbx
je     112e <foo+0x1e>
mov    (%rbx),%edi
xor    %eax,%eax
call   1030 <baz@plt>
add    $0x3,%eax
pop    %rbx
ret
add    $0xfffffffd,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @foo(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
%5 = call i32 (...) @baz()
store i32 %5, i32* %4
%6 = load i32*, i32** %3
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %9
8: ; preds = %1
br label %18
9: ; preds = %1
%10 = load i32*, i32** %3
%11 = load i32, i32* %10
store i32 %11, i32* %4
%12 = load i32*, i32** %3
%13 = icmp ne i32* %12, null
br i1 %13, label %14, label %17
14: ; preds = %9
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
store i32 %16, i32* %4
br label %17
17: ; preds = %14, %9
br label %18
18: ; preds = %17, %8
%19 = load i32*, i32** %3
%20 = icmp ne i32* %19, null
br i1 %20, label %21, label %31
21: ; preds = %18
%22 = load i32*, i32** %3
%23 = load i32, i32* %22
%24 = call i32 (i32, ...) bitcast (i32 (...)* @baz to i32 (i32, ...)*)(i32 %23)
store i32 %24, i32* %4
%25 = load i32*, i32** %3
%26 = icmp ne i32* %25, null
br i1 %26, label %27, label %30
27: ; preds = %21
%28 = load i32, i32* %4
%29 = add nsw i32 %28, 3
store i32 %29, i32* %2
br label %34
30: ; preds = %21
br label %31
31: ; preds = %30, %18
%32 = load i32, i32* %4
%33 = sub nsw i32 %32, 3
store i32 %33, i32* %2
br label %34
34: ; preds = %31, %27
%35 = load i32, i32* %2
ret i32 %35
}

LLVM IR (-O2):
define i32 @foo(i32* %0) {
%2 = tail call i32 (...) @baz()
%3 = icmp eq i32* %0, null
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = load i32, i32* %0
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @baz to i32 (i32, ...)*)(i32 %5)
%7 = add nsw i32 %6, 3
br label %10
8: ; preds = %1
%9 = add nsw i32 %2, -3
br label %10
10: ; preds = %8, %4
%11 = phi i32 [ %7, %4 ], [ %9, %8 ]
ret i32 %11
}
int of_mtd_parse_partitions(struct device *dev, struct device_node *node,
                            struct mtd_partition **pparts) {
  return 0;
}


x86 assembly (clang, -O0):
<of_mtd_parse_partitions>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.device = type opaque
%struct.device_node = type opaque
%struct.mtd_partition = type opaque
define i32 @of_mtd_parse_partitions(%struct.device* %0, %struct.device_node* %1, %struct.mtd_partition** %2) {
%4 = alloca %struct.device*
%5 = alloca %struct.device_node*
%6 = alloca %struct.mtd_partition**
store %struct.device* %0, %struct.device** %4
store %struct.device_node* %1, %struct.device_node** %5
store %struct.mtd_partition** %2, %struct.mtd_partition*** %6
ret i32 0
}

LLVM IR (-O2):
%struct.device = type opaque
%struct.device_node = type opaque
%struct.mtd_partition = type opaque
define i32 @of_mtd_parse_partitions(%struct.device* nocapture readnone %0, %struct.device_node* nocapture readnone %1, %struct.mtd_partition** nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void min_caml_print_int(void *fv, int n) { printf("%d", n); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @min_caml_print_int(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void signal_callback_handler(int segnum) { printf("ExetinG!!: %i \n", segnum); }


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

x86 assembly (clang, -O2):
<signal_callback_handler>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"ExetinG!!: %i \0A\00"
define void @signal_callback_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"ExetinG!!: %i \0A\00"
define void @signal_callback_handler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void fermer_mesh(FILE *handle) { fclose(handle); }


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

x86 assembly (clang, -O2):
<fermer_mesh>:
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
define void @fermer_mesh(i32* nocapture %0) {
%2 = tail call i32 @fclose(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free_imatrix(int **m, long nrl, long nrh, long ncl, long nch) {
  free((void *)(m[nrl] + ncl - 1));
  free((void *)(m + nrl - 1));
}


x86 assembly (clang, -O0):
<free_imatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x20(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
add    $0xfffffffffffffffc,%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    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_imatrix>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi,%rsi,8),%rax
lea    (%rax,%rcx,4),%rdi
add    $0xfffffffffffffffc,%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_imatrix(i32** %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca i32**
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store i32** %0, i32*** %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%11 = load i32**, i32*** %6
%12 = load i64, i64* %7
%13 = getelementptr inbounds i32*, i32** %11, i64 %12
%14 = load i32*, i32** %13
%15 = load i64, i64* %9
%16 = getelementptr inbounds i32, i32* %14, i64 %15
%17 = getelementptr inbounds i32, i32* %16, i64 -1
%18 = bitcast i32* %17 to i8*
%19 = call i32 @free(i8* %18)
%20 = load i32**, i32*** %6
%21 = load i64, i64* %7
%22 = getelementptr inbounds i32*, i32** %20, i64 %21
%23 = getelementptr inbounds i32*, i32** %22, i64 -1
%24 = bitcast i32** %23 to i8*
%25 = call i32 @free(i8* %24)
ret void
}

LLVM IR (-O2):
define void @free_imatrix(i32** nocapture %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = getelementptr inbounds i32*, i32** %0, i64 %1
%7 = load i32*, i32** %6
%8 = getelementptr inbounds i32, i32* %7, i64 %3
%9 = getelementptr inbounds i32, i32* %8, i64 -1
%10 = bitcast i32* %9 to i8*
%11 = tail call i32 @free(i8* %10)
%12 = getelementptr inbounds i32*, i32** %6, i64 -1
%13 = bitcast i32** %12 to i8*
%14 = tail call i32 @free(i8* %13)
ret void
}
/* Type definitions */
struct timespec {
  int tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/ *);
void sleep_ms(int ms) {
  struct timespec t;
  t.tv_sec = 0;
  t.tv_nsec = ms * 1000000L;
  nanosleep(&t, NULL);
}


x86 assembly (clang, -O0):
<sleep_ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movslq -0x4(%rbp),%rax
imul   $0xf4240,%rax,%rax
mov    %eax,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep_ms>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
imul   $0xf4240,%edi,%eax
mov    %eax,0x8(%rsp)
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
define void @sleep_ms(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timespec
store i32 %0, i32* %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i64 0, i64* %4
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = mul nsw i64 %6, 1000000
%8 = trunc i64 %7 to i32
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i32 %8, i32* %9
%10 = call i32 @nanosleep(%struct.timespec* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
define void @sleep_ms(i32 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i64 0, i64* %4
%5 = mul i32 %0, 1000000
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 %5, i32* %6
%7 = call i32 @nanosleep(%struct.timespec* %2, i32* null)
ret void
}
Dummy_Switch(Unit, device, sw, value) int *Unit, device, sw, *value;
{
  *value = rand() & 1;
  return (1);
}


x86 assembly (clang, -O0):
<Dummy_Switch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%ecx
and    $0x1,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Dummy_Switch>:
push   %rbx
mov    %rcx,%rbx
xor    %eax,%eax
call   1030 <rand@plt>
and    $0x1,%eax
mov    %eax,(%rbx)
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @Dummy_Switch(i32* %0, i32 %1, i32 %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%9 = call i32 (...) @rand()
%10 = and i32 %9, 1
%11 = load i32*, i32** %8
store i32 %10, i32* %11
ret i32 1
}

LLVM IR (-O2):
define i32 @Dummy_Switch(i32* nocapture readnone %0, i32 %1, i32 %2, i32* nocapture writeonly %3) {
%5 = tail call i32 (...) @rand()
%6 = and i32 %5, 1
store i32 %6, i32* %3
ret i32 1
}
void b(int i) { i++; }


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

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

LLVM IR (-O0):
define void @b(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
store i32 %4, i32* %2
ret void
}

LLVM IR (-O2):
define void @b(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void check_num_min(int num_teeth) {
  if (num_teeth < 8)
    printf(
        "Warning: %d gear teeth is below recommended minimum of 8.\n         "
        "Consider scaling all gear teeth numbers with a single multiplier.\n",
        num_teeth);
}


x86 assembly (clang, -O0):
<check_num_min>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x8,-0x4(%rbp)
jge    1134 <check_num_min+0x24>
mov    -0x4(%rbp),%esi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_num_min>:
cmp    $0x7,%edi
jg     1123 <check_num_min+0x13>
mov    %edi,%esi
lea    0xee2(%rip),%rdi
jmp    1030 <printf@plt>
ret

LLVM IR (-O0):
@.str = [134 x i8] c"Warning: %d gear teeth is below recommended minimum of 8.\0A Consider scaling all gear teeth numbers with a single multiplier.\0A\00"
define void @check_num_min(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 8
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@.str = [134 x i8] c"Warning: %d gear teeth is below recommended minimum of 8.\0A Consider scaling all gear teeth numbers with a single multiplier.\0A\00"
define void @check_num_min(i32 %0) {
%2 = icmp slt i32 %0, 8
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %5
5: ; preds = %3, %1
ret void
}
int f3(volatile int *a) {
  int b = a[1];
  int c = a[3];
  int d = a[0];
  int e = a[2];
  return b + c + d + e;
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
mov    0x4(%rdi),%eax
add    0xc(%rdi),%eax
add    (%rdi),%eax
add    0x8(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @f3(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %2
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load volatile i32, i32* %8
store i32 %9, i32* %3
%10 = load i32*, i32** %2
%11 = getelementptr inbounds i32, i32* %10, i64 3
%12 = load volatile i32, i32* %11
store i32 %12, i32* %4
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 0
%15 = load volatile i32, i32* %14
store i32 %15, i32* %5
%16 = load i32*, i32** %2
%17 = getelementptr inbounds i32, i32* %16, i64 2
%18 = load volatile i32, i32* %17
store i32 %18, i32* %6
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = add nsw i32 %19, %20
%22 = load i32, i32* %5
%23 = add nsw i32 %21, %22
%24 = load i32, i32* %6
%25 = add nsw i32 %23, %24
ret i32 %25
}

LLVM IR (-O2):
define i32 @f3(i32* %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load volatile i32, i32* %2
%4 = getelementptr inbounds i32, i32* %0, i64 3
%5 = load volatile i32, i32* %4
%6 = load volatile i32, i32* %0
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load volatile i32, i32* %7
%9 = add nsw i32 %5, %3
%10 = add nsw i32 %9, %6
%11 = add nsw i32 %10, %8
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ cgneg();
int /*<<< orphan*/ gentext();
void genneg(void) {
  gentext();
  cgneg();
}


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

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

LLVM IR (-O0):
define void @genneg() {
%1 = call i32 (...) @gentext()
%2 = call i32 (...) @cgneg()
ret void
}

LLVM IR (-O2):
define void @genneg() {
%1 = tail call i32 (...) @gentext()
%2 = tail call i32 (...) @cgneg()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void aes_free_schedule_ni(void *schedule) {
  if (schedule != NULL) {
    free(schedule);
  }
}


x86 assembly (clang, -O0):
<aes_free_schedule_ni>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <aes_free_schedule_ni+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @aes_free_schedule_ni(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)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @aes_free_schedule_ni(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 void
}
/* Variables and functions */
int /*<<< orphan*/ _Error(long, char *);
void Error_SyntaxNotAllowedInThisContext(long p_position) {
  _Error(p_position, "This syntax is not allowed for this module type");
}


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

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

LLVM IR (-O0):
@.str = [48 x i8] c"This syntax is not allowed for this module type\00"
define void @Error_SyntaxNotAllowedInThisContext(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @_Error(i64 %3, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [48 x i8] c"This syntax is not allowed for this module type\00"
define void @Error_SyntaxNotAllowedInThisContext(i64 %0) {
%2 = tail call i32 @_Error(i64 %0, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
ret void
}
int count_wordtab_words(char **wt) {
  int i;
  for (i = 0; wt[i]; i++)
    ;
  return (i);
}


x86 assembly (clang, -O0):
<count_wordtab_words>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1135 <count_wordtab_words+0x35>
jmp    1127 <count_wordtab_words+0x27>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <count_wordtab_words+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_wordtab_words>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpq   $0x0,(%rdi)
lea    0x8(%rdi),%rdi
jne    1110 <count_wordtab_words+0x10>
ret

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

LLVM IR (-O2):
define i32 @count_wordtab_words(i8** nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8*, i8** %0, i64 %3
%5 = load i8*, i8** %4
%6 = icmp eq i8* %5, null
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
void hw_reset_lcd(void) {}


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

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

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

LLVM IR (-O2):
define void @hw_reset_lcd() {
ret void
}
/* Type definitions */
typedef scalar_t__ time_t;
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, long, int);
int settimeofday(struct timeval *, int /*<<< orphan*/ *);
int settime(long long time) {
  struct timeval now;
  int ret;
  now.tv_sec = (time_t)time;
  now.tv_usec = 0;
  ret = settimeofday(&now, NULL);
  printf("Setting time to 0x%lx: %d\n", (long)time, ret);
  return ret;
}


x86 assembly (clang, -O0):
<settime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <settimeofday@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x1c(%rbp),%edx
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<settime>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%rbx
mov    %rdi,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1040 <settimeofday@plt>
mov    %eax,%ebp
lea    0xeb4(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <printf@plt>
mov    %ebp,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
@.str = [27 x i8] c"Setting time to 0x%lx: %d\0A\00"
define i32 @settime(i64 %0) {
%2 = alloca i64
%3 = alloca %struct.timeval
%4 = alloca i32
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 1
store i64 %5, i64* %6
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
store i64 0, i64* %7
%8 = call i32 @settimeofday(%struct.timeval* %3, i32* null)
store i32 %8, i32* %4
%9 = load i64, i64* %2
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i64 %9, i32 %10)
%12 = load i32, i32* %4
ret i32 %12
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
@.str = [27 x i8] c"Setting time to 0x%lx: %d\0A\00"
define i32 @settime(i64 %0) {
%2 = alloca %struct.timeval
%3 = bitcast %struct.timeval* %2 to i8*
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 1
store i64 %0, i64* %4
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 0
store i64 0, i64* %5
%6 = call i32 @settimeofday(%struct.timeval* %2, i32* null)
%7 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i64 %0, i32 %6)
ret i32 %6
}
char const *caris_status_message(int in_status, int in_verbose) { return 0; }


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

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

LLVM IR (-O0):
define i8* @caris_status_message(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @caris_status_message(i32 %0, i32 %1) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ latent_use_after_free(int, int *);
void manifest_use_after_free(int *x) { latent_use_after_free(1, x); }


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

x86 assembly (clang, -O2):
<manifest_use_after_free>:
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <latent_use_after_free@plt>

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

LLVM IR (-O2):
define void @manifest_use_after_free(i32* %0) {
%2 = tail call i32 @latent_use_after_free(i32 1, i32* %0)
ret void
}
int is_mvr_buffer_almost_full() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @is_mvr_buffer_almost_full() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ finished_tiling_all_conns();
int /*<<< orphan*/ finished_tiling_all_fills();
int /*<<< orphan*/ finished_tiling_all_node_textures();
int /*<<< orphan*/ make_clean_tiles();
void finished_tiling() {
  finished_tiling_all_conns();
  finished_tiling_all_node_textures();
  finished_tiling_all_fills();
  make_clean_tiles();
}


x86 assembly (clang, -O0):
<finished_tiling>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <finished_tiling_all_conns@plt>
mov    $0x0,%al
call   1030 <finished_tiling_all_node_textures@plt>
mov    $0x0,%al
call   1050 <finished_tiling_all_fills@plt>
mov    $0x0,%al
call   1040 <make_clean_tiles@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<finished_tiling>:
push   %rax
xor    %eax,%eax
call   1060 <finished_tiling_all_conns@plt>
xor    %eax,%eax
call   1030 <finished_tiling_all_node_textures@plt>
xor    %eax,%eax
call   1050 <finished_tiling_all_fills@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <make_clean_tiles@plt>

LLVM IR (-O0):
define void @finished_tiling() {
%1 = call i32 (...) @finished_tiling_all_conns()
%2 = call i32 (...) @finished_tiling_all_node_textures()
%3 = call i32 (...) @finished_tiling_all_fills()
%4 = call i32 (...) @make_clean_tiles()
ret void
}

LLVM IR (-O2):
define void @finished_tiling() {
%1 = tail call i32 (...) @finished_tiling_all_conns()
%2 = tail call i32 (...) @finished_tiling_all_node_textures()
%3 = tail call i32 (...) @finished_tiling_all_fills()
%4 = tail call i32 (...) @make_clean_tiles()
ret void
}
/* Variables and functions */
double ceil(double);
double floor(double);
double carve_round(double value) {
  return (value >= 0) ? floor(value + 0.5) : ceil(value - 0.5);
}


x86 assembly (clang, -O0):
<carve_round>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     115b <carve_round+0x3b>
movsd  0xeb9(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1040 <floor@plt>
movsd  %xmm0,-0x10(%rbp)
jmp    1176 <carve_round+0x56>
movsd  -0x8(%rbp),%xmm0
movsd  0xe98(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <ceil@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<carve_round>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jae    1137 <carve_round+0x17>
addsd  0xed6(%rip),%xmm0
jmp    1030 <ceil@plt>
addsd  0xec1(%rip),%xmm0
jmp    1040 <floor@plt>

LLVM IR (-O0):
define double @carve_round(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load double, double* %2
%7 = fadd double %6, 5.000000e-01
%8 = call double @llvm.floor.f64(double %7)
br label %13
9: ; preds = %1
%10 = load double, double* %2
%11 = fsub double %10, 5.000000e-01
%12 = call double @llvm.ceil.f64(double %11)
br label %13
13: ; preds = %9, %5
%14 = phi double [ %8, %5 ], [ %12, %9 ]
ret double %14
}

LLVM IR (-O2):
define double @carve_round(double %0) {
%2 = fcmp ult double %0, 0.000000e+00
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = fadd double %0, 5.000000e-01
%5 = tail call double @llvm.floor.f64(double %4)
br label %9
6: ; preds = %1
%7 = fadd double %0, -5.000000e-01
%8 = tail call double @llvm.ceil.f64(double %7)
br label %9
9: ; preds = %6, %3
%10 = phi double [ %5, %3 ], [ %8, %6 ]
ret double %10
}
/* Type definitions */
struct bitstream {
  int dummy;
};

/* Variables and functions */
int bits_get(struct bitstream *, int);
void bits_get_array(struct bitstream *bits, int *array, int size, int n) {
  for (int i = 0; i < size; i++)
    array[i] = bits_get(bits, n);
}


x86 assembly (clang, -O0):
<bits_get_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1160 <bits_get_array+0x50>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%esi
call   1030 <bits_get@plt>
mov    %eax,%edx
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112d <bits_get_array+0x1d>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bits_get_array>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
test   %edx,%edx
jle    1148 <bits_get_array+0x38>
mov    %ecx,%r14d
mov    %rsi,%r15
mov    %rdi,%r12
mov    %edx,%ebx
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    %r12,%rdi
mov    %r14d,%esi
call   1030 <bits_get@plt>
mov    %eax,(%r15,%rbp,4)
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1130 <bits_get_array+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
%struct.bitstream = type { i32 }
define void @bits_get_array(%struct.bitstream* %0, i32* nocapture writeonly %1, i32 %2, i32 %3) {
%5 = icmp sgt i32 %2, 0
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = zext i32 %2 to i64
br label %9
8: ; preds = %9, %4
ret void
9: ; preds = %6, %9
%10 = phi i64 [ 0, %6 ], [ %13, %9 ]
%11 = tail call i32 @bits_get(%struct.bitstream* %0, i32 %3)
%12 = getelementptr inbounds i32, i32* %1, i64 %10
store i32 %11, i32* %12
%13 = add nuw nsw i64 %10, 1
%14 = icmp eq i64 %13, %7
br i1 %14, label %8, label %9
}
void ff_hevc_put_hevc_uni_qpel_v24_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_v24_12_sse4() {
ret void
}
/* Variables and functions */
int mem_reserveRange(unsigned int, unsigned int);
int mem_reserve(unsigned int startAddr, unsigned int size) {
  if (size == 0)
    return -1;
  unsigned int endAddr = startAddr + size;
  return mem_reserveRange(startAddr, endAddr);
}


x86 assembly (clang, -O0):
<mem_reserve>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1134 <mem_reserve+0x24>
movl   $0xffffffff,-0x4(%rbp)
jmp    114b <mem_reserve+0x3b>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <mem_reserveRange@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_reserve>:
test   %esi,%esi
je     111b <mem_reserve+0xb>
add    %edi,%esi
jmp    1030 <mem_reserveRange@plt>
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @mem_reserve(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = add i32 %1, %0
%6 = tail call i32 @mem_reserveRange(i32 %0, i32 %5)
br label %7
7: ; preds = %2, %4
%8 = phi i32 [ %6, %4 ], [ -1, %2 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ SD_MusicOff();
void SD_FadeOutMusic(void) { SD_MusicOff(); }


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

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

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

LLVM IR (-O2):
define void @SD_FadeOutMusic() {
%1 = tail call i32 (...) @SD_MusicOff()
ret void
}
void typeof_test(void) {
  double a;
  typeof(a) b;
  typeof(float) c;
  a = 1.5;
  b = 2.5;
  c = 3.5;
  printf("a=%f b=%f c=%f\n", a, b, c);
}


x86 assembly (clang, -O0):
<typeof_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  0xef0(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movss  0xec6(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xebf(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<typeof_test>:
lea    0xf01(%rip),%rdi
movsd  0xee1(%rip),%xmm0
movsd  0xee1(%rip),%xmm1
movsd  0xee1(%rip),%xmm2
mov    $0x3,%al
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"a=%f b=%f c=%f\0A\00"
define void @typeof_test() {
%1 = alloca double
%2 = alloca double
%3 = alloca float
store double 1.500000e+00, double* %1
store double 2.500000e+00, double* %2
store float 3.500000e+00, float* %3
%4 = load double, double* %1
%5 = load double, double* %2
%6 = load float, float* %3
%7 = fpext float %6 to double
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), double %4, double %5, double %7)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"a=%f b=%f c=%f\0A\00"
define void @typeof_test() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), double 1.500000e+00, double 2.500000e+00, double 3.500000e+00)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void clrscr(void) {
  printf("\033[2J");
  printf("\033[0;0f");
}


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

x86 assembly (clang, -O2):
<clrscr>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [7 x i8] c"\1B[0;0f\00"
define void @clrscr() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [7 x i8] c"\1B[0;0f\00"
define void @clrscr() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int my_max(int x, int y) { return (x > y ? x : y); }


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

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

LLVM IR (-O0):
define i32 @my_max(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 sgt 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 @my_max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
scalar_t__ getpgid(scalar_t__);
scalar_t__ pidfile_getpid(char const *);
pid_t pidfile_getpgid(const char *path) {
  pid_t pid = pidfile_getpid(path);
  if (pid > 0) {
    return getpgid(pid);
  }
  return 0;
}


x86 assembly (clang, -O0):
<pidfile_getpgid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <pidfile_getpid@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jle    1156 <pidfile_getpgid+0x36>
mov    -0x18(%rbp),%rdi
call   1040 <getpgid@plt>
mov    %rax,-0x8(%rbp)
jmp    115e <pidfile_getpgid+0x3e>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pidfile_getpgid>:
push   %rax
call   1030 <pidfile_getpid@plt>
test   %rax,%rax
jle    1134 <pidfile_getpgid+0x14>
mov    %rax,%rdi
pop    %rax
jmp    1040 <getpgid@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i64 @pidfile_getpgid(i8* %0) {
%2 = tail call i64 @pidfile_getpid(i8* %0)
%3 = icmp sgt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i64 @getpgid(i64 %2)
br label %6
6: ; preds = %1, %4
%7 = phi i64 [ %5, %4 ], [ 0, %1 ]
ret i64 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_add_epi32(int /*<<< orphan*/, int /*<<< orphan*/ const);
int /*<<< orphan*/ _mm_set1_epi32(int);
int /*<<< orphan*/ _mm_srai_epi32(int /*<<< orphan*/ const, int);
__m128i xx_roundn_epi32_unsigned(__m128i v_val_d, int bits) {
  const __m128i v_bias_d = _mm_set1_epi32((1 << bits) >> 1);
  const __m128i v_tmp_d = _mm_add_epi32(v_val_d, v_bias_d);
  return _mm_srai_epi32(v_tmp_d, bits);
}


x86 assembly (clang, -O0):
<xx_roundn_epi32_unsigned>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%edi
shl    %cl,%edi
sar    $0x1,%edi
call   1050 <_mm_set1_epi32@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <_mm_srai_epi32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xx_roundn_epi32_unsigned>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x1,%edi
mov    %ebx,%ecx
shl    %cl,%edi
sar    %edi
call   1050 <_mm_set1_epi32@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <_mm_srai_epi32@plt>

LLVM IR (-O0):
define i32 @xx_roundn_epi32_unsigned(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = shl i32 1, %7
%9 = ashr i32 %8, 1
%10 = call i32 @_mm_set1_epi32(i32 %9)
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = load i32, i32* %5
%13 = call i32 @_mm_add_epi32(i32 %11, i32 %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = load i32, i32* %4
%16 = call i32 @_mm_srai_epi32(i32 %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @xx_roundn_epi32_unsigned(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = ashr i32 %3, 1
%5 = tail call i32 @_mm_set1_epi32(i32 %4)
%6 = tail call i32 @_mm_add_epi32(i32 %0, i32 %5)
%7 = tail call i32 @_mm_srai_epi32(i32 %6, i32 %1)
ret i32 %7
}
/* Variables and functions */
int f293(int *);
int f294(int *p) { return f293(p); }


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

x86 assembly (clang, -O2):
<f294>:
jmp    1030 <f293@plt>

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

LLVM IR (-O2):
define i32 @f294(i32* %0) {
%2 = tail call i32 @f293(i32* %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ _gettemp(char *, int *, int /*<<< orphan*/, int /*<<< orphan*/);
int mkstemp(char *path) {
  int fd;
  return (_gettemp(path, &fd, 0, 0) ? fd : -1);
}


x86 assembly (clang, -O0):
<mkstemp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <_gettemp@plt>
cmp    $0x0,%rax
je     1142 <mkstemp+0x32>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    114f <mkstemp+0x3f>
mov    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    114f <mkstemp+0x3f>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkstemp>:
push   %rax
lea    0x4(%rsp),%rsi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <_gettemp@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
or     0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @mkstemp(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i64 @_gettemp(i8* %0, i32* %2, i32 0, i32 0)
%5 = icmp eq i64 %4, 0
%6 = load i32, i32* %2
%7 = select i1 %5, i32 -1, i32 %6
ret i32 %7
}
/* Variables and functions */
int _talloc_free(void *);
int talloc_free(void *ptr) { return _talloc_free(ptr); }


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

x86 assembly (clang, -O2):
<talloc_free>:
jmp    1030 <_talloc_free@plt>

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

LLVM IR (-O2):
define i32 @talloc_free(i8* %0) {
%2 = tail call i32 @_talloc_free(i8* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ size;

/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned long long *, unsigned char const *, int);
unsigned long long unpackValueUnsignedLongLong(unsigned char const **data) {
  unsigned long long size;
  memcpy(&size, *data, sizeof(size));
  *data += sizeof(size);
  return size;
}


x86 assembly (clang, -O0):
<unpackValueUnsignedLongLong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    -0x10(%rbp),%rdi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x8,%rcx
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpackValueUnsignedLongLong>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    (%rdi),%rsi
lea    0x8(%rsp),%rdi
mov    $0x8,%edx
call   1030 <memcpy@plt>
addq   $0x8,(%rbx)
mov    0x8(%rsp),%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i64 @unpackValueUnsignedLongLong(i8** %0) {
%2 = alloca i8**
%3 = alloca i64
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = call i32 @memcpy(i64* %3, i8* %5, i32 8)
%7 = load i8**, i8*** %2
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i8, i8* %8, i64 8
store i8* %9, i8** %7
%10 = load i64, i64* %3
ret i64 %10
}

LLVM IR (-O2):
define i64 @unpackValueUnsignedLongLong(i8** nocapture %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = load i8*, i8** %0
%5 = call i32 @memcpy(i64* %2, i8* %4, i32 8)
%6 = load i8*, i8** %0
%7 = getelementptr inbounds i8, i8* %6, i64 8
store i8* %7, i8** %0
%8 = load i64, i64* %2
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x95() {
  Assert_real((isxdigit(149) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              750, ("isxdigit should be 0 for 0x95"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x95>:
push   %rax
mov    $0x95,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x2ee,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x95\00"
define void @t_isxdigit_0x95() {
%1 = call i64 @isxdigit(i32 149)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 750, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x95\00"
define void @t_isxdigit_0x95() {
%1 = tail call i64 @isxdigit(i32 149)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 750, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}