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

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_marshal(struct wl_proxy *, int);
void wl_shell_surface_set_toplevel(struct wl_shell_surface *wl_shell_surface) {
  wl_proxy_marshal((struct wl_proxy *)wl_shell_surface, 3);
}


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

x86 assembly (clang, -O2):
<wl_shell_surface_set_toplevel>:
mov    $0x3,%esi
jmp    1030 <wl_proxy_marshal@plt>

LLVM IR (-O0):
%struct.wl_shell_surface = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_shell_surface_set_toplevel(%struct.wl_shell_surface* %0) {
%2 = alloca %struct.wl_shell_surface*
store %struct.wl_shell_surface* %0, %struct.wl_shell_surface** %2
%3 = load %struct.wl_shell_surface*, %struct.wl_shell_surface** %2
%4 = bitcast %struct.wl_shell_surface* %3 to %struct.wl_proxy*
%5 = call i32 @wl_proxy_marshal(%struct.wl_proxy* %4, i32 3)
ret void
}

LLVM IR (-O2):
%struct.wl_shell_surface = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_shell_surface_set_toplevel(%struct.wl_shell_surface* %0) {
%2 = bitcast %struct.wl_shell_surface* %0 to %struct.wl_proxy*
%3 = tail call i32 @wl_proxy_marshal(%struct.wl_proxy* %2, i32 3)
ret void
}
/* Variables and functions */
int mkdir(char const *, int);
int make_dir(const char *path) { return mkdir(path, 0777); }


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

x86 assembly (clang, -O2):
<make_dir>:
mov    $0x1ff,%esi
jmp    1030 <mkdir@plt>

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

LLVM IR (-O2):
define i32 @make_dir(i8* nocapture %0) {
%2 = tail call i32 @mkdir(i8* %0, i32 511)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int file_exists(const char *filename) {
  FILE *f;
  if ((f = fopen(filename, "r"))) {
    fclose(f);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     115f <file_exists+0x3f>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
jmp    1166 <file_exists+0x46>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exists>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <file_exists+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define i32 @file_exists(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %4
%7 = icmp ne i32* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32*, i32** %4
%10 = call i32 @fclose(i32* %9)
store i32 1, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %8
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @file_exists(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
void itob(int N, char *s, unsigned int b) {
  int i = 0;
  do {
    *(s + (i++)) = N % b;
  } while ((N /= b) > 0);
}


x86 assembly (clang, -O0):
<itob>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x18(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%ecx
mov    -0x4(%rbp),%eax
xor    %edx,%edx
div    %ecx
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
jg     1115 <itob+0x15>
pop    %rbp
ret

x86 assembly (clang, -O2):
<itob>:
mov    %edx,%ecx
mov    %edi,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %edx,%edx
div    %ecx
mov    %dl,(%rsi)
add    $0x1,%rsi
test   %eax,%eax
jg     1110 <itob+0x10>
ret

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

LLVM IR (-O2):
define void @itob(i32 %0, i8* nocapture writeonly %1, i32 %2) {
br label %4
4: ; preds = %4, %3
%5 = phi i64 [ %9, %4 ], [ 0, %3 ]
%6 = phi i32 [ %11, %4 ], [ %0, %3 ]
%7 = urem i32 %6, %2
%8 = trunc i32 %7 to i8
%9 = add nuw i64 %5, 1
%10 = getelementptr inbounds i8, i8* %1, i64 %5
store i8 %8, i8* %10
%11 = udiv i32 %6, %2
%12 = icmp sgt i32 %11, 0
br i1 %12, label %4, label %13
13: ; preds = %4
ret void
}
/* Variables and functions */
char *find_group(char const *);
char *looking_at_command(char const *, char *);
int /*<<< orphan*/ print_old_ink_levels(char const *);
void do_old_status(const char *buf) {
  do {
    const char *ind;
    if ((ind = looking_at_command(buf, "IQ")) != 0) {
      print_old_ink_levels(ind);
    }
  } while ((buf = find_group(buf)) != NULL);
}


x86 assembly (clang, -O0):
<do_old_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1030 <looking_at_command@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1163 <do_old_status+0x33>
mov    -0x10(%rbp),%rdi
call   1050 <print_old_ink_levels@plt>
jmp    1168 <do_old_status+0x38>
mov    -0x8(%rbp),%rdi
call   1040 <find_group@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
jne    113c <do_old_status+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_old_status>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xec2(%rip),%r14
jmp    1150 <do_old_status+0x20>
mov    %rbx,%rdi
call   1040 <find_group@plt>
mov    %rax,%rbx
test   %rax,%rax
je     116a <do_old_status+0x3a>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <looking_at_command@plt>
test   %rax,%rax
je     1140 <do_old_status+0x10>
mov    %rax,%rdi
call   1050 <print_old_ink_levels@plt>
jmp    1140 <do_old_status+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"IQ\00"
define void @do_old_status(i8* %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %9, %8 ]
%4 = tail call i8* @looking_at_command(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @print_old_ink_levels(i8* %4)
br label %8
8: ; preds = %6, %2
%9 = tail call i8* @find_group(i8* %3)
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %2
11: ; preds = %8
ret void
}
/* Variables and functions */
int drand(double);
double getrand(double min, double max) {
  return min + (min == max ? 0. : drand(max - min));
}


x86 assembly (clang, -O0):
<getrand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jne    114f <getrand+0x3f>
jp     114f <getrand+0x3f>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1167 <getrand+0x57>
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
call   1030 <drand@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getrand>:
movapd %xmm0,%xmm2
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm2
jne    1125 <getrand+0x15>
jp     1125 <getrand+0x15>
addsd  %xmm2,%xmm0
ret
push   %rax
subsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
movsd  %xmm2,(%rsp)
call   1030 <drand@plt>
movsd  (%rsp),%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x8,%rsp
addsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @getrand(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fcmp oeq double %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
br label %16
10: ; preds = %2
%11 = load double, double* %4
%12 = load double, double* %3
%13 = fsub double %11, %12
%14 = call i32 @drand(double %13)
%15 = sitofp i32 %14 to double
br label %16
16: ; preds = %10, %9
%17 = phi double [ 0.000000e+00, %9 ], [ %15, %10 ]
%18 = fadd double %5, %17
ret double %18
}

LLVM IR (-O2):
define double @getrand(double %0, double %1) {
%3 = fcmp oeq double %0, %1
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = fsub double %1, %0
%6 = tail call i32 @drand(double %5)
%7 = sitofp i32 %6 to double
br label %8
8: ; preds = %2, %4
%9 = phi double [ %7, %4 ], [ 0.000000e+00, %2 ]
%10 = fadd double %9, %0
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ assem_debug(char *, int, int, int);
int /*<<< orphan*/ output_w32(int);
void emit_fsubd(int s1, int s2, int d) {
  assem_debug("fsubd d%d,d%d,d%d", d, s1, s2);
  output_w32(0xee300b40 | ((d & 7) << 12) | ((s1 & 7) << 16) | (s2 & 7));
}


x86 assembly (clang, -O0):
<emit_fsubd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xebf(%rip),%rdi
call   1030 <assem_debug@plt>
mov    -0xc(%rbp),%edi
and    $0x7,%edi
shl    $0xc,%edi
or     $0xee300b40,%edi
mov    -0x4(%rbp),%eax
and    $0x7,%eax
shl    $0x10,%eax
or     %eax,%edi
mov    -0x8(%rbp),%eax
and    $0x7,%eax
or     %eax,%edi
call   1040 <output_w32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_fsubd>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xece(%rip),%rdi
mov    %edx,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
call   1030 <assem_debug@plt>
and    $0x7,%r14d
shl    $0xc,%r14d
and    $0x7,%ebp
shl    $0x10,%ebp
and    $0x7,%ebx
or     %ebp,%ebx
lea    (%r14,%rbx,1),%edi
add    $0xee300b40,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <output_w32@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"fsubd d%d,d%d,d%d\00"
define void @emit_fsubd(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = call i32 @assem_debug(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
%11 = load i32, i32* %6
%12 = and i32 %11, 7
%13 = shl i32 %12, 12
%14 = or i32 -298841280, %13
%15 = load i32, i32* %4
%16 = and i32 %15, 7
%17 = shl i32 %16, 16
%18 = or i32 %14, %17
%19 = load i32, i32* %5
%20 = and i32 %19, 7
%21 = or i32 %18, %20
%22 = call i32 @output_w32(i32 %21)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"fsubd d%d,d%d,d%d\00"
define void @emit_fsubd(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @assem_debug(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %0, i32 %1)
%5 = shl i32 %2, 12
%6 = and i32 %5, 28672
%7 = shl i32 %0, 16
%8 = and i32 %7, 458752
%9 = and i32 %1, 7
%10 = or i32 %8, %9
%11 = or i32 %10, %6
%12 = or i32 %11, -298841280
%13 = tail call i32 @output_w32(i32 %12)
ret void
}
int my_str_isnum(char *str) {
  int i;
  i = 0;
  while (str[i] != '\0') {
    if (str[i] >= '0' && str[i] <= '9')
      i++;
    else
      return (0);
  }
  return (1);
}


x86 assembly (clang, -O0):
<my_str_isnum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     116d <my_str_isnum+0x6d>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x30,%eax
jl     115c <my_str_isnum+0x5c>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x39,%eax
jg     115c <my_str_isnum+0x5c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1168 <my_str_isnum+0x68>
movl   $0x0,-0x4(%rbp)
jmp    1174 <my_str_isnum+0x74>
jmp    110f <my_str_isnum+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_str_isnum>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <my_str_isnum+0x23>
add    $0x1,%rdi
nop
add    $0xd0,%cl
cmp    $0xa,%cl
jae    1124 <my_str_isnum+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <my_str_isnum+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @my_str_isnum(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
br label %5
5: ; preds = %33, %1
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %34
13: ; preds = %5
%14 = load i8*, i8** %3
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp sge i32 %19, 48
br i1 %20, label %21, label %32
21: ; preds = %13
%22 = load i8*, i8** %3
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* %22, i64 %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp sle i32 %27, 57
br i1 %28, label %29, label %32
29: ; preds = %21
%30 = load i32, i32* %4
%31 = add nsw i32 %30, 1
store i32 %31, i32* %4
br label %33
32: ; preds = %21, %13
store i32 0, i32* %2
br label %35
33: ; preds = %29
br label %5
34: ; preds = %5
store i32 1, i32* %2
br label %35
35: ; preds = %34, %32
%36 = load i32, i32* %2
ret i32 %36
}

LLVM IR (-O2):
define i32 @my_str_isnum(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %8
4: ; preds = %8
%5 = getelementptr inbounds i8, i8* %0, i64 %13
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1, %4
%9 = phi i64 [ %13, %4 ], [ 0, %1 ]
%10 = phi i8 [ %6, %4 ], [ %2, %1 ]
%11 = add i8 %10, -48
%12 = icmp ult i8 %11, 10
%13 = add nuw i64 %9, 1
br i1 %12, label %4, label %14
14: ; preds = %8, %4, %1
%15 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %8 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
void cc_arduino_PrintImpl_printReal__E(float f) { printf("%f", (float)f); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define void @cc_arduino_PrintImpl_printReal__E(float %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint16_t ntohs(uint16_t x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @ntohs(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
int MYFUNC(int times, char *string) {
  int local;
  for (local = 0; local <= times; local++) {
    printf("%d: %s\n", local, string);
  }
  return 99;
}


x86 assembly (clang, -O0):
<MYFUNC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1153 <MYFUNC+0x43>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <MYFUNC+0x16>
mov    $0x63,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MYFUNC>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
js     1144 <MYFUNC+0x34>
mov    %rsi,%r14
mov    %edi,%ebp
add    $0x1,%ebp
xor    %ebx,%ebx
lea    0xed4(%rip),%r15
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %ebx,%esi
mov    %r14,%rdx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    %ebx,%ebp
jne    1130 <MYFUNC+0x20>
mov    $0x63,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%d: %s\0A\00"
define i32 @MYFUNC(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
store i32 0, i32* %5
br label %6
6: ; preds = %14, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp sle i32 %7, %8
br i1 %9, label %10, label %17
10: ; preds = %6
%11 = load i32, i32* %5
%12 = load i8*, i8** %4
%13 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %11, i8* %12)
br label %14
14: ; preds = %10
%15 = load i32, i32* %5
%16 = add nsw i32 %15, 1
store i32 %16, i32* %5
br label %6
17: ; preds = %6
ret i32 99
}

LLVM IR (-O2):
@.str = [8 x i8] c"%d: %s\0A\00"
define i32 @MYFUNC(i32 %0, i8* %1) {
%3 = icmp slt i32 %0, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 0, %2 ]
%6 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %5, i8* %1)
%7 = add nuw i32 %5, 1
%8 = icmp eq i32 %5, %0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret i32 99
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void LTDC_ER_IRQHandler() { default_handler(); }


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

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

LLVM IR (-O0):
define weak void @LTDC_ER_IRQHandler() {
%1 = call i32 (...) @default_handler()
ret void
}

LLVM IR (-O2):
define weak void @LTDC_ER_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
void fd_bluetooth_transfer(void) {}


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

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

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

LLVM IR (-O2):
define void @fd_bluetooth_transfer() {
ret void
}
/* Variables and functions */
size_t strlen(char const *);
size_t ustrlen(const unsigned char data[]) {
  return strlen((const char *)data);
}


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

x86 assembly (clang, -O2):
<ustrlen>:
jmp    1030 <strlen@plt>

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

LLVM IR (-O2):
define i64 @ustrlen(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
ret i64 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fgetc(int /*<<< orphan*/ *);
int file_is_binary(FILE *fp) {
  int c = 0;
  while ((c = fgetc(fp)) != EOF) {
    if (c <= 0x08)
      return c;
  }
  return 0;
}


x86 assembly (clang, -O0):
<file_is_binary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x14(%rbp)
mov    0x2eb2(%rip),%rcx
cmp    (%rcx),%eax
je     1158 <file_is_binary+0x48>
cmpl   $0x8,-0x14(%rbp)
jg     1153 <file_is_binary+0x43>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115f <file_is_binary+0x4f>
jmp    1123 <file_is_binary+0x13>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_is_binary>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eca(%rip),%r14
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <fgetc@plt>
cmp    (%r14),%eax
je     1134 <file_is_binary+0x24>
cmp    $0x8,%eax
jg     1120 <file_is_binary+0x10>
jmp    1136 <file_is_binary+0x26>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @file_is_binary(i32* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = tail call i32 @fgetc(i32* %0)
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = icmp slt i32 %3, 9
br i1 %7, label %8, label %2
8: ; preds = %2, %6
%9 = phi i32 [ %3, %6 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void display_usage() {
  printf("Usage: c_send_byte [DEVICE_PATH] [BYTE]\n");
  printf("  DEVICE_PATH: Full path to SPI device file.\n");
  printf("  BYTE:        Byte to send (in hexidecimal)\n");
}


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

x86 assembly (clang, -O2):
<display_usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf04(%rip),%rdi
call   1030 <puts@plt>
lea    0xf25(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"Usage: c_send_byte [DEVICE_PATH] [BYTE]\0A\00"
@.str.1 = [46 x i8] c" DEVICE_PATH: Full path to SPI device file.\0A\00"
@.str.2 = [46 x i8] c" BYTE: Byte to send (in hexidecimal)\0A\00"
define void @display_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [40 x i8] c"Usage: c_send_byte [DEVICE_PATH] [BYTE]\00"
@str.3 = [45 x i8] c" DEVICE_PATH: Full path to SPI device file.\00"
@str.4 = [45 x i8] c" BYTE: Byte to send (in hexidecimal)\00"
define void @display_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_spaces(int num) {
  for (; num > 0; num--)
    printf(" ");
}


x86 assembly (clang, -O0):
<print_spaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    113f <print_spaces+0x2f>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    111b <print_spaces+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_spaces>:
push   %rbx
test   %edi,%edi
jle    1132 <print_spaces+0x22>
mov    %edi,%ebx
add    $0x1,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1120 <print_spaces+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
define void @print_spaces(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %8, %1
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6
%9 = load i32, i32* %2
%10 = add nsw i32 %9, -1
store i32 %10, i32* %2
br label %3
11: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @print_spaces(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ %0, %1 ]
%5 = tail call i32 @putchar(i32 32)
%6 = add nsw i32 %4, -1
%7 = icmp ugt i32 %4, 1
br i1 %7, label %3, label %8
8: ; preds = %3, %1
ret void
}
void gtk_binding_set_by_class() {}


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

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

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

LLVM IR (-O2):
define void @gtk_binding_set_by_class() {
ret void
}
int seg_index_rc(int ramseg, int seg_index, int *r, int *c) {
  int seg_no, seg_remainder;
  seg_no = seg_index >> 8;
  seg_remainder = seg_index - (seg_no << 8);
  *r = ((seg_no / ramseg) << 4) + (seg_remainder >> 4);
  *c = ((seg_no - ((*r) >> 4) * ramseg) << 4) + seg_remainder -
       (((*r) & 15) << 4);
  return seg_no;
}


x86 assembly (clang, -O0):
<seg_index_rc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x8,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    $0x8,%ecx
sub    %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cltd
idivl  -0x4(%rbp)
mov    %eax,%ecx
shl    $0x4,%ecx
mov    -0x20(%rbp),%eax
sar    $0x4,%eax
add    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
sar    $0x4,%eax
imul   -0x4(%rbp),%eax
sub    %eax,%ecx
shl    $0x4,%ecx
add    -0x20(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
and    $0xf,%eax
shl    $0x4,%eax
sub    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<seg_index_rc>:
mov    %rdx,%r8
mov    %esi,%r9d
sar    $0x8,%r9d
movzbl %sil,%r10d
mov    %r9d,%eax
cltd
idiv   %edi
shl    $0x4,%eax
mov    %r10d,%edi
shr    $0x4,%edi
or     %eax,%edi
mov    %edi,(%r8)
shl    $0x4,%edx
and    $0xf0,%esi
sub    %esi,%r10d
add    %edx,%r10d
mov    %r10d,(%rcx)
mov    %r9d,%eax
ret

LLVM IR (-O0):
define i32 @seg_index_rc(i32 %0, i32 %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%11 = load i32, i32* %6
%12 = ashr i32 %11, 8
store i32 %12, i32* %9
%13 = load i32, i32* %6
%14 = load i32, i32* %9
%15 = shl i32 %14, 8
%16 = sub nsw i32 %13, %15
store i32 %16, i32* %10
%17 = load i32, i32* %9
%18 = load i32, i32* %5
%19 = sdiv i32 %17, %18
%20 = shl i32 %19, 4
%21 = load i32, i32* %10
%22 = ashr i32 %21, 4
%23 = add nsw i32 %20, %22
%24 = load i32*, i32** %7
store i32 %23, i32* %24
%25 = load i32, i32* %9
%26 = load i32*, i32** %7
%27 = load i32, i32* %26
%28 = ashr i32 %27, 4
%29 = load i32, i32* %5
%30 = mul nsw i32 %28, %29
%31 = sub nsw i32 %25, %30
%32 = shl i32 %31, 4
%33 = load i32, i32* %10
%34 = add nsw i32 %32, %33
%35 = load i32*, i32** %7
%36 = load i32, i32* %35
%37 = and i32 %36, 15
%38 = shl i32 %37, 4
%39 = sub nsw i32 %34, %38
%40 = load i32*, i32** %8
store i32 %39, i32* %40
%41 = load i32, i32* %9
ret i32 %41
}

LLVM IR (-O2):
define i32 @seg_index_rc(i32 %0, i32 %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = ashr i32 %1, 8
%6 = and i32 %1, 255
%7 = sdiv i32 %5, %0
%8 = shl nsw i32 %7, 4
%9 = lshr i32 %6, 4
%10 = or i32 %8, %9
store i32 %10, i32* %2
%11 = mul nsw i32 %7, %0
%12 = srem i32 %5, %0
%13 = shl i32 %12, 4
%14 = and i32 %1, 240
%15 = sub nsw i32 %6, %14
%16 = add i32 %15, %13
store i32 %16, i32* %3
ret i32 %5
}
/* Variables and functions */
int FP_Cmp(float, float);
int __gtsf2(float a, float b) { return FP_Cmp(a, b); }


x86 assembly (clang, -O0):
<__gtsf2>:
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 <FP_Cmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__gtsf2>:
jmp    1030 <FP_Cmp@plt>

LLVM IR (-O0):
define i32 @__gtsf2(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call i32 @FP_Cmp(float %5, float %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @__gtsf2(float %0, float %1) {
%3 = tail call i32 @FP_Cmp(float %0, float %1)
ret i32 %3
}
double bot_matrix_determinant_2x2(const double m[4]) {
  return m[0] * m[3] - m[1] * m[2];
}


x86 assembly (clang, -O0):
<bot_matrix_determinant_2x2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x10(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<bot_matrix_determinant_2x2>:
movsd  0x10(%rdi),%xmm1
mulsd  0x8(%rdi),%xmm1
movsd  (%rdi),%xmm0
mulsd  0x18(%rdi),%xmm0
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @bot_matrix_determinant_2x2(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 3
%8 = load double, double* %7
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i64 1
%11 = load double, double* %10
%12 = load double*, double** %2
%13 = getelementptr inbounds double, double* %12, i64 2
%14 = load double, double* %13
%15 = fmul double %11, %14
%16 = fneg double %15
%17 = call double @llvm.fmuladd.f64(double %5, double %8, double %16)
ret double %17
}

LLVM IR (-O2):
define double @bot_matrix_determinant_2x2(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 3
%4 = load double, double* %3
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %0, i64 2
%8 = load double, double* %7
%9 = fneg double %6
%10 = fmul double %8, %9
%11 = tail call double @llvm.fmuladd.f64(double %2, double %4, double %10)
ret double %11
}
unsigned char create_addr_byte(unsigned char addr) {
  unsigned char rw = 0x00;
  unsigned char addr_byte = addr << 1;
  addr_byte |= rw;
  return addr_byte;
}


x86 assembly (clang, -O0):
<create_addr_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0x0,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x1,%eax
mov    %al,-0x3(%rbp)
movzbl -0x2(%rbp),%ecx
movzbl -0x3(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_addr_byte>:
lea    (%rdi,%rdi,1),%eax
ret

LLVM IR (-O0):
define zeroext i8 @create_addr_byte(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %2
store i8 0, i8* %3
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 1
%8 = trunc i32 %7 to i8
store i8 %8, i8* %4
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = load i8, i8* %4
%12 = zext i8 %11 to i32
%13 = or i32 %12, %10
%14 = trunc i32 %13 to i8
store i8 %14, i8* %4
%15 = load i8, i8* %4
ret i8 %15
}

LLVM IR (-O2):
define zeroext i8 @create_addr_byte(i8 zeroext %0) {
%2 = shl i8 %0, 1
ret i8 %2
}
void *canon(void *ptr) {
  unsigned long p = (unsigned long)ptr;
  unsigned long abs = ((p >> 16) << 4) + (p & 0xffff);
  if (abs & (unsigned long)0xf)
    abs = (abs & ~(unsigned long)0xf) + (unsigned long)0x10;
  return ((void *)(abs << 12));
}


x86 assembly (clang, -O0):
<canon>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x10,%rax
shl    $0x4,%rax
mov    -0x10(%rbp),%rcx
and    $0xffff,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
and    $0xf,%rax
cmp    $0x0,%rax
je     1150 <canon+0x50>
mov    -0x18(%rbp),%rax
and    $0xfffffffffffffff0,%rax
add    $0x10,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0xc,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<canon>:
movzwl %di,%ecx
shr    $0xc,%rdi
and    $0xfffffffffffffff0,%rdi
add    %rdi,%rcx
movabs $0xffffffffffff0,%rax
and    %rcx,%rax
add    $0x10,%rax
test   $0xf,%cl
cmove  %rcx,%rax
shl    $0xc,%rax
ret

LLVM IR (-O0):
define i8* @canon(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = ptrtoint i8* %5 to i64
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = lshr i64 %7, 16
%9 = shl i64 %8, 4
%10 = load i64, i64* %3
%11 = and i64 %10, 65535
%12 = add i64 %9, %11
store i64 %12, i64* %4
%13 = load i64, i64* %4
%14 = and i64 %13, 15
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %1
%17 = load i64, i64* %4
%18 = and i64 %17, -16
%19 = add i64 %18, 16
store i64 %19, i64* %4
br label %20
20: ; preds = %16, %1
%21 = load i64, i64* %4
%22 = shl i64 %21, 12
%23 = inttoptr i64 %22 to i8*
ret i8* %23
}

LLVM IR (-O2):
define i8* @canon(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = lshr i64 %2, 12
%4 = and i64 %3, 4503599627370480
%5 = and i64 %2, 65535
%6 = add nuw nsw i64 %4, %5
%7 = and i64 %6, 15
%8 = icmp eq i64 %7, 0
%9 = and i64 %6, 4503599627370480
%10 = add nuw nsw i64 %9, 16
%11 = select i1 %8, i64 %6, i64 %10
%12 = shl i64 %11, 12
%13 = inttoptr i64 %12 to i8*
ret i8* %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void DoOtherStuff() { printf("Doing other stuff!"); }


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"Doing other stuff!\00"
define void @DoOtherStuff() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"Doing other stuff!\00"
define void @DoOtherStuff() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getsig(int);
int /*<<< orphan*/ ignsig(int);
void stdsigs(void) {
  ignsig(3);
  getsig(2);
  getsig(11);
  getsig(14);
}


x86 assembly (clang, -O0):
<stdsigs>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1040 <ignsig@plt>
mov    $0x2,%edi
call   1030 <getsig@plt>
mov    $0xb,%edi
call   1030 <getsig@plt>
mov    $0xe,%edi
call   1030 <getsig@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdsigs>:
push   %rax
mov    $0x3,%edi
call   1040 <ignsig@plt>
mov    $0x2,%edi
call   1030 <getsig@plt>
mov    $0xb,%edi
call   1030 <getsig@plt>
mov    $0xe,%edi
pop    %rax
jmp    1030 <getsig@plt>

LLVM IR (-O0):
define void @stdsigs() {
%1 = call i32 @ignsig(i32 3)
%2 = call i32 @getsig(i32 2)
%3 = call i32 @getsig(i32 11)
%4 = call i32 @getsig(i32 14)
ret void
}

LLVM IR (-O2):
define void @stdsigs() {
%1 = tail call i32 @ignsig(i32 3)
%2 = tail call i32 @getsig(i32 2)
%3 = tail call i32 @getsig(i32 11)
%4 = tail call i32 @getsig(i32 14)
ret void
}
/* Type definitions */
struct wl_resource {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_resource_post_event(struct wl_resource *, int,
                                          char const *);
void wl_seat_send_name(struct wl_resource *resource_, const char *name) {
  wl_resource_post_event(resource_, 1, name);
}


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

x86 assembly (clang, -O2):
<wl_seat_send_name>:
mov    %rsi,%rdx
mov    $0x1,%esi
jmp    1030 <wl_resource_post_event@plt>

LLVM IR (-O0):
%struct.wl_resource = type { i32 }
define void @wl_seat_send_name(%struct.wl_resource* %0, i8* %1) {
%3 = alloca %struct.wl_resource*
%4 = alloca i8*
store %struct.wl_resource* %0, %struct.wl_resource** %3
store i8* %1, i8** %4
%5 = load %struct.wl_resource*, %struct.wl_resource** %3
%6 = load i8*, i8** %4
%7 = call i32 @wl_resource_post_event(%struct.wl_resource* %5, i32 1, i8* %6)
ret void
}

LLVM IR (-O2):
%struct.wl_resource = type { i32 }
define void @wl_seat_send_name(%struct.wl_resource* %0, i8* %1) {
%3 = tail call i32 @wl_resource_post_event(%struct.wl_resource* %0, i32 1, i8* %1)
ret void
}
/* Variables and functions */
size_t maxzu(size_t a, size_t b) { return (a >= b) ? a : b; }


x86 assembly (clang, -O0):
<maxzu>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jb     1127 <maxzu+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <maxzu+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<maxzu>:
mov    %rdi,%rax
cmp    %rsi,%rdi
cmovb  %rsi,%rax
ret

LLVM IR (-O0):
define i64 @maxzu(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 uge i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @maxzu(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
%4 = select i1 %3, i64 %1, i64 %0
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ TaskInit();
int /*<<< orphan*/ TaskScheduler();
void TaskStart(void) {
  TaskInit();
  TaskScheduler();
}


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

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

LLVM IR (-O0):
define void @TaskStart() {
%1 = call i32 (...) @TaskInit()
%2 = call i32 (...) @TaskScheduler()
ret void
}

LLVM IR (-O2):
define void @TaskStart() {
%1 = tail call i32 (...) @TaskInit()
%2 = tail call i32 (...) @TaskScheduler()
ret void
}
int basic_kbytes(bytes)
int bytes;
{ return ((((bytes > 0)) ? (bytes / 1024 + 1) : (bytes))); }


x86 assembly (clang, -O0):
<basic_kbytes>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1127 <basic_kbytes+0x27>
mov    -0x4(%rbp),%eax
mov    $0x400,%ecx
cltd
idiv   %ecx
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <basic_kbytes+0x2d>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<basic_kbytes>:
mov    %edi,%eax
shr    $0xa,%eax
add    $0x1,%eax
test   %edi,%edi
cmovle %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @basic_kbytes(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = lshr i32 %0, 10
%4 = add nuw nsw i32 %3, 1
%5 = select i1 %2, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char lowerCaseLetter, oppositeLetter;
  scanf("%c", &lowerCaseLetter);
  oppositeLetter = 'z' - (lowerCaseLetter - 'a');
  printf("%c", oppositeLetter);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%ecx
sub    $0x61,%ecx
mov    $0x7a,%eax
sub    %ecx,%eax
mov    %al,-0x6(%rbp)
lea    0xea9(%rip),%rdi
movsbl -0x6(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xf(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    $0xdb,%al
sub    0xf(%rsp),%al
movsbl %al,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %6, 97
%8 = sub nsw i32 122, %7
%9 = trunc i32 %8 to i8
store i8 %9, i8* %3
%10 = load i8, i8* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = sub i8 -37, %3
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %4)
ret i32 0
}
__attribute__((always_)) int x264_pthread_fetch_and_add(int *val, int add,
                                                        int *mutex) {
  int res = *val;
  *val += add;
  return res;
}


x86 assembly (clang, -O0):
<x264_pthread_fetch_and_add>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @x264_pthread_fetch_and_add(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
store i32 %9, i32* %7
%10 = load i32, i32* %5
%11 = load i32*, i32** %4
%12 = load i32, i32* %11
%13 = add nsw i32 %12, %10
store i32 %13, i32* %11
%14 = load i32, i32* %7
ret i32 %14
}

LLVM IR (-O2):
define i32 @x264_pthread_fetch_and_add(i32* nocapture %0, i32 %1, i32* nocapture readnone %2) {
%4 = load i32, i32* %0
%5 = add nsw i32 %4, %1
store i32 %5, i32* %0
ret i32 %4
}
void RTFileReadAt(void) {}


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

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

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

LLVM IR (-O2):
define void @RTFileReadAt() {
ret void
}
/* Type definitions */
struct csx_surf64 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct csx_surf64 *);
void surf64_free(struct csx_surf64 **ds) {
  free(*ds);
  *ds = NULL;
}


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

x86 assembly (clang, -O2):
<surf64_free>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.csx_surf64 = type { i32 }
define void @surf64_free(%struct.csx_surf64** %0) {
%2 = alloca %struct.csx_surf64**
store %struct.csx_surf64** %0, %struct.csx_surf64*** %2
%3 = load %struct.csx_surf64**, %struct.csx_surf64*** %2
%4 = load %struct.csx_surf64*, %struct.csx_surf64** %3
%5 = call i32 @free(%struct.csx_surf64* %4)
%6 = load %struct.csx_surf64**, %struct.csx_surf64*** %2
store %struct.csx_surf64* null, %struct.csx_surf64** %6
ret void
}

LLVM IR (-O2):
%struct.csx_surf64 = type { i32 }
define void @surf64_free(%struct.csx_surf64** nocapture %0) {
%2 = load %struct.csx_surf64*, %struct.csx_surf64** %0
%3 = tail call i32 @free(%struct.csx_surf64* %2)
store %struct.csx_surf64* null, %struct.csx_surf64** %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void voce3(int x) { printf("voce3: %d\n", x); }


x86 assembly (clang, -O0):
<voce3>:
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):
<voce3>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"voce3: %d\0A\00"
define void @voce3(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void UYVYToUV422Row_NEON() {}


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

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

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

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