xunge/DecIR huggingface dataset:
int rcmp(double x, double y) {
  if (x < y)
    return -1;
  if (x > y)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<rcmp>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    112e <rcmp+0x2e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1151 <rcmp+0x51>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    114a <rcmp+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1151 <rcmp+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rcmp>:
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @rcmp(double %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fcmp olt double %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 -1, i32* %3
br label %16
10: ; preds = %2
%11 = load double, double* %4
%12 = load double, double* %5
%13 = fcmp ogt double %11, %12
br i1 %13, label %14, label %15
14: ; preds = %10
store i32 1, i32* %3
br label %16
15: ; preds = %10
store i32 0, i32* %3
br label %16
16: ; preds = %15, %14, %9
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @rcmp(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = fcmp ogt double %0, %1
%5 = zext i1 %4 to i32
%6 = select i1 %3, i32 -1, i32 %5
ret i32 %6
}
/* Variables and functions */
char h2o_tolower(char);
void h2o_strtolower(char *s, size_t len) {
  for (; len != 0; ++s, --len)
    *s = h2o_tolower(*s);
}


x86 assembly (clang, -O0):
<h2o_strtolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115c <h2o_strtolower+0x4c>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <h2o_tolower@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    1120 <h2o_strtolower+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h2o_strtolower>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
je     1147 <h2o_strtolower+0x37>
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%r15,%rbx,1),%edi
call   1030 <h2o_tolower@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <h2o_strtolower+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @h2o_strtolower(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %10, %4 ], [ %1, %2 ]
%6 = phi i8* [ %9, %4 ], [ %0, %2 ]
%7 = load i8, i8* %6
%8 = tail call signext i8 @h2o_tolower(i8 signext %7)
store i8 %8, i8* %6
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = add i64 %5, -1
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OutputSpeed(unsigned char, char);
void SetSpeed(unsigned char Outputs, char Speed) {
  OutputSpeed(Outputs, Speed);
}


x86 assembly (clang, -O0):
<SetSpeed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%al
movzbl %al,%edi
movsbl -0x2(%rbp),%esi
call   1030 <OutputSpeed@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetSpeed>:
jmp    1030 <OutputSpeed@plt>

LLVM IR (-O0):
define void @SetSpeed(i8 zeroext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = load i8, i8* %4
%7 = call i32 @OutputSpeed(i8 zeroext %5, i8 signext %6)
ret void
}

LLVM IR (-O2):
define void @SetSpeed(i8 zeroext %0, i8 signext %1) {
%3 = tail call i32 @OutputSpeed(i8 zeroext %0, i8 signext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
double roundInt(float);
void main() {
  float a[1];
  a[0] = -1.0f;
  assert(roundInt(a[0]) == -1.0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  0xed8(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <roundInt@plt>
movsd  0xeb9(%rip),%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movss  0xed7(%rip),%xmm0
call   1040 <roundInt@plt>
cmpeqsd 0xed1(%rip),%xmm0
movq   %xmm0,%rdi
and    $0x1,%edi
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca [1 x float]
%2 = getelementptr inbounds [1 x float], [1 x float]* %1, i64 0, i64 0
store float -1.000000e+00, float* %2
%3 = getelementptr inbounds [1 x float], [1 x float]* %1, i64 0, i64 0
%4 = load float, float* %3
%5 = call double @roundInt(float %4)
%6 = fcmp oeq double %5, -1.000000e+00
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call double @roundInt(float -1.000000e+00)
%2 = fcmp oeq double %1, -1.000000e+00
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret void
}
/* Type definitions */
struct i40e_ring {
  int dummy;
};

/* Variables and functions */
int I40E_DESC_UNUSED(struct i40e_ring *);
int __i40evf_maybe_stop_tx(struct i40e_ring *, int);
scalar_t__ likely(int);
int i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size) {
  if (likely(I40E_DESC_UNUSED(tx_ring) >= size)) {
    return 0;
  }
  return __i40evf_maybe_stop_tx(tx_ring, size);
}


x86 assembly (clang, -O0):
<i40e_maybe_stop_tx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <I40E_DESC_UNUSED@plt>
cmp    -0x14(%rbp),%eax
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <likely@plt>
cmp    $0x0,%rax
je     116e <i40e_maybe_stop_tx+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    117d <i40e_maybe_stop_tx+0x4d>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <__i40evf_maybe_stop_tx@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i40e_maybe_stop_tx>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <I40E_DESC_UNUSED@plt>
xor    %edi,%edi
cmp    %ebp,%eax
setge  %dil
call   1050 <likely@plt>
test   %rax,%rax
je     1158 <i40e_maybe_stop_tx+0x28>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <__i40evf_maybe_stop_tx@plt>

LLVM IR (-O0):
%struct.i40e_ring = type { i32 }
define i32 @i40e_maybe_stop_tx(%struct.i40e_ring* %0, i32 %1) {
%3 = alloca i32
%4 = alloca %struct.i40e_ring*
%5 = alloca i32
store %struct.i40e_ring* %0, %struct.i40e_ring** %4
store i32 %1, i32* %5
%6 = load %struct.i40e_ring*, %struct.i40e_ring** %4
%7 = call i32 @I40E_DESC_UNUSED(%struct.i40e_ring* %6)
%8 = load i32, i32* %5
%9 = icmp sge i32 %7, %8
%10 = zext i1 %9 to i32
%11 = call i64 @likely(i32 %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 0, i32* %3
br label %18
14: ; preds = %2
%15 = load %struct.i40e_ring*, %struct.i40e_ring** %4
%16 = load i32, i32* %5
%17 = call i32 @__i40evf_maybe_stop_tx(%struct.i40e_ring* %15, i32 %16)
store i32 %17, i32* %3
br label %18
18: ; preds = %14, %13
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
%struct.i40e_ring = type { i32 }
define i32 @i40e_maybe_stop_tx(%struct.i40e_ring* %0, i32 %1) {
%3 = tail call i32 @I40E_DESC_UNUSED(%struct.i40e_ring* %0)
%4 = icmp sge i32 %3, %1
%5 = zext i1 %4 to i32
%6 = tail call i64 @likely(i32 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 @__i40evf_maybe_stop_tx(%struct.i40e_ring* %0, i32 %1)
br label %10
10: ; preds = %2, %8
%11 = phi i32 [ %9, %8 ], [ 0, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ trap_R_RegisterShaderNoMip(char *);
void Reset_Cache(void) { trap_R_RegisterShaderNoMip("menu/art/cut_frame"); }


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"menu/art/cut_frame\00"
define void @Reset_Cache() {
%1 = call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"menu/art/cut_frame\00"
define void @Reset_Cache() {
%1 = tail call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
void yy_1_TemplateArgumentStar(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_1_TemplateArgumentStar(i8* nocapture %0, i32 %1) {
ret void
}
void gtk_tree_path_to_string() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_path_to_string() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __print_int(int);
int main() {
  int i = 0;
  int a = 0;
  int b = 3;
  int c = 0;
  int d = 4;
  do {
    a = 5 * b / (2 - b) + d * 2;
    c = i * 2;
    i++;
  } while (i < 5);
  __print_int(a);
  __print_int(c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x4,-0x18(%rbp)
imul   $0x5,-0x10(%rbp),%eax
mov    $0x2,%ecx
sub    -0x10(%rbp),%ecx
cltd
idiv   %ecx
mov    -0x18(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jl     1142 <main+0x32>
mov    -0xc(%rbp),%edi
call   1030 <__print_int@plt>
mov    -0x14(%rbp),%edi
call   1030 <__print_int@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xfffffff9,%edi
call   1030 <__print_int@plt>
mov    $0x8,%edi
call   1030 <__print_int@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 3, i32* %4
store i32 0, i32* %5
store i32 4, i32* %6
br label %7
7: ; preds = %20, %0
%8 = load i32, i32* %4
%9 = mul nsw i32 5, %8
%10 = load i32, i32* %4
%11 = sub nsw i32 2, %10
%12 = sdiv i32 %9, %11
%13 = load i32, i32* %6
%14 = mul nsw i32 %13, 2
%15 = add nsw i32 %12, %14
store i32 %15, i32* %3
%16 = load i32, i32* %2
%17 = mul nsw i32 %16, 2
store i32 %17, i32* %5
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
br label %20
20: ; preds = %7
%21 = load i32, i32* %2
%22 = icmp slt i32 %21, 5
br i1 %22, label %7, label %23
23: ; preds = %20
%24 = load i32, i32* %3
%25 = call i32 @__print_int(i32 %24)
%26 = load i32, i32* %5
%27 = call i32 @__print_int(i32 %26)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__print_int(i32 -7)
%2 = tail call i32 @__print_int(i32 8)
ret i32 0
}
/* Variables and functions */
scalar_t__ isupper(char);
scalar_t__ tolower(char);
char lower(char c) {
  if (isupper(c))
    return (char)tolower(c);
  else
    return c;
}


x86 assembly (clang, -O0):
<lower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%edi
call   1040 <isupper@plt>
cmp    $0x0,%rax
je     1152 <lower+0x32>
movsbl -0x2(%rbp),%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbp)
jmp    1158 <lower+0x38>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lower>:
push   %rbx
mov    %edi,%ebx
call   1040 <isupper@plt>
test   %rax,%rax
je     1138 <lower+0x18>
movsbl %bl,%edi
call   1030 <tolower@plt>
mov    %rax,%rbx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define signext i8 @lower(i8 signext %0) {
%2 = tail call i64 @isupper(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i64 @tolower(i8 signext %0)
%6 = trunc i64 %5 to i8
br label %7
7: ; preds = %1, %4
%8 = phi i8 [ %6, %4 ], [ %0, %1 ]
ret i8 %8
}
void RTPathTraverseList(void) {}


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

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

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

LLVM IR (-O2):
define void @RTPathTraverseList() {
ret void
}
char *_strdup(const char *s) {
  char *str = _strdup(s);
  return str;
}


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

x86 assembly (clang, -O2):
<_strdup>:
jmp    1100 <_strdup>

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

LLVM IR (-O2):
define noalias i8* @_strdup(i8* nocapture readnone %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
void fc169(int n) {
  {
    typedef int(*b)[n];
    {
      typedef int(*c)[n];
      0;
    }
    {
      typedef int(*d)[n];
      0;
    };
    typedef int(*e)[n];
    0;
  };
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
    a:
      goto a;
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  0;
}


x86 assembly (clang, -O0):
<fc169>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fc169+0x7>

x86 assembly (clang, -O2):
<fc169>:
jmp    1100 <fc169>

LLVM IR (-O0):
define void @fc169(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = load i32, i32* %2
%12 = zext i32 %11 to i64
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
br label %15
15: ; preds = %15, %1
br label %15
16: ; No predecessors!
%17 = load i32, i32* %2
%18 = zext i32 %17 to i64
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = load i32, i32* %2
%22 = zext i32 %21 to i64
ret void
}

LLVM IR (-O2):
define void @fc169(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
void spca506_setAutobright(struct usb_spca50x *spca50x) {}


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

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

LLVM IR (-O0):
%struct.usb_spca50x = type opaque
define void @spca506_setAutobright(%struct.usb_spca50x* %0) {
%2 = alloca %struct.usb_spca50x*
store %struct.usb_spca50x* %0, %struct.usb_spca50x** %2
ret void
}

LLVM IR (-O2):
%struct.usb_spca50x = type opaque
define void @spca506_setAutobright(%struct.usb_spca50x* nocapture %0) {
ret void
}
void g_date_subtract_days() {}


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

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

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

LLVM IR (-O2):
define void @g_date_subtract_days() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ heap_stats();
int _heap_handler(int argc, char **argv) {
  (void)argc;
  (void)argv;
  heap_stats();
  return 0;
}


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

x86 assembly (clang, -O2):
<_heap_handler>:
push   %rax
xor    %eax,%eax
call   1030 <heap_stats@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @_heap_handler(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @heap_stats()
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int multprec_Newton_Laurent_step(int deci) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc(329, &deci, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<multprec_Newton_Laurent_step>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x149,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<multprec_Newton_Laurent_step>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x149,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @multprec_Newton_Laurent_step(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %3
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc(i32 329, i32* %2, i32* %6, double* %7)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @multprec_Newton_Laurent_step(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc(i32 329, i32* %2, i32* undef, double* undef)
ret i32 %3
}
/* Variables and functions */
double __nv_atanh(double);
double atanh(double __a) { return __nv_atanh(__a); }


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

x86 assembly (clang, -O2):
<atanh>:
jmp    1030 <__nv_atanh@plt>

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

LLVM IR (-O2):
define double @atanh(double %0) {
%2 = tail call double @__nv_atanh(double %0)
ret double %2
}
int main(void) {
  int arr[260];
  int n;
  n = 5;
  arr[0] = 0;
  while (n > 1) {
    arr[1] = 7;
    n--;
  }
  int arr2[260];
  n = 5;
  arr2[259] = 0;
  while (n > 1) {
    arr2[258] = 7;
    n--;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7c0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x424(%rbp)
movl   $0x0,-0x420(%rbp)
cmpl   $0x1,-0x424(%rbp)
jle    1151 <main+0x51>
movl   $0x7,-0x41c(%rbp)
mov    -0x424(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x424(%rbp)
jmp    1126 <main+0x26>
movl   $0x5,-0x424(%rbp)
movl   $0x0,-0x434(%rbp)
cmpl   $0x1,-0x424(%rbp)
jle    1190 <main+0x90>
movl   $0x7,-0x438(%rbp)
mov    -0x424(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x424(%rbp)
jmp    1165 <main+0x65>
mov    -0x4(%rbp),%eax
add    $0x7c0,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [260 x i32]
%3 = alloca i32
%4 = alloca [260 x i32]
store i32 0, i32* %1
store i32 5, i32* %3
%5 = getelementptr inbounds [260 x i32], [260 x i32]* %2, i64 0, i64 0
store i32 0, i32* %5
br label %6
6: ; preds = %9, %0
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = getelementptr inbounds [260 x i32], [260 x i32]* %2, i64 0, i64 1
store i32 7, i32* %10
%11 = load i32, i32* %3
%12 = add nsw i32 %11, -1
store i32 %12, i32* %3
br label %6
13: ; preds = %6
store i32 5, i32* %3
%14 = getelementptr inbounds [260 x i32], [260 x i32]* %4, i64 0, i64 259
store i32 0, i32* %14
br label %15
15: ; preds = %18, %13
%16 = load i32, i32* %3
%17 = icmp sgt i32 %16, 1
br i1 %17, label %18, label %22
18: ; preds = %15
%19 = getelementptr inbounds [260 x i32], [260 x i32]* %4, i64 0, i64 258
store i32 7, i32* %19
%20 = load i32, i32* %3
%21 = add nsw i32 %20, -1
store i32 %21, i32* %3
br label %15
22: ; preds = %15
%23 = load i32, i32* %1
ret i32 %23
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
double func_ret_double() { return 3.14; }


x86 assembly (clang, -O0):
<func_ret_double>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_ret_double>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @func_ret_double() {
ret double 3.140000e+00
}

LLVM IR (-O2):
define double @func_ret_double() {
ret double 3.140000e+00
}
int f9(int x, unsigned y) {
  int a = x - y;
  return x - a;
}


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

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

LLVM IR (-O0):
define i32 @f9(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = sub i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = load i32, i32* %5
%11 = sub nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @f9(i32 %0, i32 returned %1) {
ret i32 %1
}
/* Variables and functions */
int ace_tu_fs_does_file_contain_line_at(int /*<<< orphan*/, char *, char *);
bool ace_tu_fs_does_file_contain_line(char *filepath,
                                      char *str_without_linebreak) {
  return ace_tu_fs_does_file_contain_line_at(0, filepath,
                                             str_without_linebreak);
}


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

x86 assembly (clang, -O2):
<ace_tu_fs_does_file_contain_line>:
mov    %rsi,%rdx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <ace_tu_fs_does_file_contain_line_at@plt>

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

LLVM IR (-O2):
define i32 @ace_tu_fs_does_file_contain_line(i8* %0, i8* %1) {
%3 = tail call i32 @ace_tu_fs_does_file_contain_line_at(i32 0, i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int isAllNt(char *, int);
int isAllDna(char *poly, int size) {
  if (size <= 1)
    return 0;
  return isAllNt(poly, size);
}


x86 assembly (clang, -O0):
<isAllDna>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jg     1135 <isAllDna+0x25>
movl   $0x0,-0x4(%rbp)
jmp    1144 <isAllDna+0x34>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <isAllNt@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isAllDna>:
cmp    $0x2,%esi
jge    1118 <isAllDna+0x8>
xor    %eax,%eax
ret
jmp    1030 <isAllNt@plt>

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

LLVM IR (-O2):
define i32 @isAllDna(i8* %0, i32 %1) {
%3 = icmp slt i32 %1, 2
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @isAllNt(i8* %0, i32 %1)
br label %6
6: ; preds = %2, %4
%7 = phi i32 [ %5, %4 ], [ 0, %2 ]
ret i32 %7
}
void g_tree_new() {}


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

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

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

LLVM IR (-O2):
define void @g_tree_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ eprintf(char *, size_t);
void *malloc(size_t);
void *cmalloc(size_t nbytes) {
  void *buf = malloc(nbytes);
  if (buf)
    return buf;
  eprintf("malloc of %u bytes failed\n", nbytes);
  return 0;
}


x86 assembly (clang, -O0):
<cmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1151 <cmalloc+0x31>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1169 <cmalloc+0x49>
mov    -0x10(%rbp),%rsi
lea    0xea4(%rip),%rdi
call   1040 <eprintf@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <cmalloc+0x23>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
call   1040 <eprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [27 x i8] c"malloc of %u bytes failed\0A\00"
define i8* @cmalloc(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = call i8* @malloc(i64 %5)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i8*, i8** %4
store i8* %10, i8** %2
br label %14
11: ; preds = %1
%12 = load i64, i64* %3
%13 = call i32 @eprintf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i64 %12)
store i8* null, i8** %2
br label %14
14: ; preds = %11, %9
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
@.str = [27 x i8] c"malloc of %u bytes failed\0A\00"
define noalias i8* @cmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @eprintf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i64 %0)
br label %6
6: ; preds = %1, %4
ret i8* %2
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ strcpy(char *, char *);
void create(char **ptr) {
  *ptr = (char *)malloc(sizeof(char) * 6);
  strcpy(*ptr, "ABCDE");
}


x86 assembly (clang, -O0):
<create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x6,%edi
call   1040 <malloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
lea    0xeb2(%rip),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create>:
push   %rbx
mov    %rdi,%rbx
mov    $0x6,%edi
call   1040 <malloc@plt>
mov    %rax,(%rbx)
lea    0xec8(%rip),%rsi
mov    %rax,%rdi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"ABCDE\00"
define void @create(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i64 @malloc(i32 6)
%4 = inttoptr i64 %3 to i8*
%5 = load i8**, i8*** %2
store i8* %4, i8** %5
%6 = load i8**, i8*** %2
%7 = load i8*, i8** %6
%8 = call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"ABCDE\00"
define void @create(i8** nocapture writeonly %0) {
%2 = tail call i64 @malloc(i32 6)
%3 = inttoptr i64 %2 to i8*
store i8* %3, i8** %0
%4 = tail call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned short int f77(unsigned short int x, int y) {
  return (x << y) + (x >> (8 * sizeof(unsigned short) - y));
}


x86 assembly (clang, -O0):
<f77>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
movzwl -0x2(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
movzwl -0x2(%rbp),%edx
movslq -0x8(%rbp),%rsi
mov    $0x10,%ecx
sub    %rsi,%rcx
sar    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f77>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
mov    $0x10,%dl
sub    %cl,%dl
mov    %edx,%ecx
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f77(i16 zeroext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i32
store i16 %0, i16* %3
store i32 %1, i32* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i32, i32* %4
%8 = shl i32 %6, %7
%9 = load i16, i16* %3
%10 = zext i16 %9 to i32
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = sub i64 16, %12
%14 = trunc i64 %13 to i32
%15 = ashr i32 %10, %14
%16 = add nsw i32 %8, %15
%17 = trunc i32 %16 to i16
ret i16 %17
}

LLVM IR (-O2):
define zeroext i16 @f77(i16 zeroext %0, i32 %1) {
%3 = zext i16 %0 to i32
%4 = shl i32 %3, %1
%5 = sub i32 16, %1
%6 = lshr i32 %3, %5
%7 = add nsw i32 %6, %4
%8 = trunc i32 %7 to i16
ret i16 %8
}
/* Variables and functions */
char *stpcpy(char *, char const *);
void strcpy3(char *dest, const char *s1, const char *s2, const char *s3) {
  stpcpy(stpcpy(stpcpy(dest, s1), s2), s3);
}


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

x86 assembly (clang, -O2):
<strcpy3>:
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%rbx
call   1040 <stpcpy@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
call   1040 <stpcpy@plt>
mov    %rax,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define void @strcpy3(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i8* @stpcpy(i8* %9, i8* %10)
%12 = load i8*, i8** %7
%13 = call i8* @stpcpy(i8* %11, i8* %12)
%14 = load i8*, i8** %8
%15 = call i8* @stpcpy(i8* %13, i8* %14)
ret void
}

LLVM IR (-O2):
define void @strcpy3(i8* %0, i8* nocapture %1, i8* nocapture %2, i8* nocapture %3) {
%5 = tail call i8* @stpcpy(i8* %0, i8* %1)
%6 = tail call i8* @stpcpy(i8* %5, i8* %2)
%7 = tail call i8* @strcpy(i8* dereferenceable(1) %6, i8* dereferenceable(1) %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LCD_COM(int);
int /*<<< orphan*/ LCD_DATA(int);
int /*<<< orphan*/ ili9163_set_window(int, int, int, int);
void ili9163_write_pixel(int x, int y, int c) {
  ili9163_set_window(x, y, 1, 1);
  LCD_COM(0x2C);
  LCD_DATA(c >> 8);
  LCD_DATA(c);
}


x86 assembly (clang, -O0):
<ili9163_write_pixel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1040 <ili9163_set_window@plt>
mov    $0x2c,%edi
call   1050 <LCD_COM@plt>
mov    -0xc(%rbp),%edi
sar    $0x8,%edi
call   1030 <LCD_DATA@plt>
mov    -0xc(%rbp),%edi
call   1030 <LCD_DATA@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ili9163_write_pixel>:
push   %rbx
mov    %edx,%ebx
mov    $0x1,%edx
mov    $0x1,%ecx
call   1040 <ili9163_set_window@plt>
mov    $0x2c,%edi
call   1050 <LCD_COM@plt>
mov    %ebx,%edi
sar    $0x8,%edi
call   1030 <LCD_DATA@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <LCD_DATA@plt>

LLVM IR (-O0):
define void @ili9163_write_pixel(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* %4
%8 = load i32, i32* %5
%9 = call i32 @ili9163_set_window(i32 %7, i32 %8, i32 1, i32 1)
%10 = call i32 @LCD_COM(i32 44)
%11 = load i32, i32* %6
%12 = ashr i32 %11, 8
%13 = call i32 @LCD_DATA(i32 %12)
%14 = load i32, i32* %6
%15 = call i32 @LCD_DATA(i32 %14)
ret void
}

LLVM IR (-O2):
define void @ili9163_write_pixel(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @ili9163_set_window(i32 %0, i32 %1, i32 1, i32 1)
%5 = tail call i32 @LCD_COM(i32 44)
%6 = ashr i32 %2, 8
%7 = tail call i32 @LCD_DATA(i32 %6)
%8 = tail call i32 @LCD_DATA(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hang();
int /*<<< orphan*/ uart_strln(char *);
void c_prefetch_abort() {
  uart_strln("Exception: undefined instruction");
  hang();
}


x86 assembly (clang, -O0):
<c_prefetch_abort>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <uart_strln@plt>
mov    $0x0,%al
call   1040 <hang@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_prefetch_abort>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <uart_strln@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <hang@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Exception: undefined instruction\00"
define void @c_prefetch_abort() {
%1 = call i32 @uart_strln(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @hang()
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"Exception: undefined instruction\00"
define void @c_prefetch_abort() {
%1 = tail call i32 @uart_strln(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @hang()
ret void
}
int main() {
  const int real = 4;
  int *pointer = &real;
  *pointer = 9;
  return real;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x9,(%rax)
mov    $0x4,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
unsigned int test_12(int x) { return 0xFFFFFFFF - (x >> 31); }


x86 assembly (clang, -O0):
<test_12>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
sar    $0x1f,%ecx
mov    $0xffffffff,%eax
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_12>:
shr    $0x1f,%edi
lea    -0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @test_12(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 31
%5 = sub i32 -1, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @test_12(i32 %0) {
%2 = lshr i32 %0, 31
%3 = add nsw i32 %2, -1
ret i32 %3
}
int Net_Init(void) {
  int error;
  error = 0;
  return error;
}


x86 assembly (clang, -O0):
<Net_Init>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @Net_Init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_get_sample_info_list() {
  printf("NOT IMPLEMENTED:"
         "pa_context_get_sample_info_list"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [49 x i8] c"NOT IMPLEMENTED:pa_context_get_sample_info_list\0A\00"
define i32 @pa_context_get_sample_info_list() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [48 x i8] c"NOT IMPLEMENTED:pa_context_get_sample_info_list\00"
define i32 @pa_context_get_sample_info_list() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ kms_crypto_cleanup();
void kms_message_cleanup(void) { kms_crypto_cleanup(); }


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

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

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

LLVM IR (-O2):
define void @kms_message_cleanup() {
%1 = tail call i32 (...) @kms_crypto_cleanup()
ret void
}
/* Variables and functions */
int getpid();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("B %d\n", getpid());
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"B %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int divpwr2(int x, int n) {
  int sign = x >> 31;
  int mask = (1 << n) - 1;
  int adj = sign & mask;
  return (x + adj) >> n;
}


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

x86 assembly (clang, -O2):
<divpwr2>:
mov    %esi,%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
not    %edx
mov    %edi,%eax
sar    $0x1f,%eax
and    %edx,%eax
add    %edi,%eax
sar    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @divpwr2(i32 %0, i32 %1) {
%3 = shl nsw i32 -1, %1
%4 = xor i32 %3, -1
%5 = icmp slt i32 %0, 0
%6 = select i1 %5, i32 %4, i32 0
%7 = add nsw i32 %6, %0
%8 = ashr i32 %7, %1
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ printk(char *, char *);
_panic(char *msg) {
  printk("Panic: %s\n", msg);
  printk("Panic: %s\n", msg);
  abort();
}


x86 assembly (clang, -O0):
<_panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printk@plt>
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1030 <printk@plt>
mov    $0x0,%al
call   1040 <abort@plt>

x86 assembly (clang, -O2):
<_panic>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xed2(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printk@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printk@plt>
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Panic: %s\0A\00"
define i32 @_panic(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printk(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @printk(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@.str = [11 x i8] c"Panic: %s\0A\00"
define i32 @_panic(i8* %0) {
%2 = tail call i32 @printk(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @printk(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ft_print_middle(int x) {
  ft_putchar('|');
  while (x > 2) {
    ft_putchar(' ');
    x--;
  }
  if (x > 1) {
    ft_putchar('|');
  }
  ft_putchar('\n');
}


x86 assembly (clang, -O0):
<ft_print_middle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x7c,%edi
call   1030 <ft_putchar@plt>
cmpl   $0x2,-0x4(%rbp)
jle    1147 <ft_print_middle+0x37>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1125 <ft_print_middle+0x15>
cmpl   $0x1,-0x4(%rbp)
jle    115b <ft_print_middle+0x4b>
mov    $0x7c,%edi
call   1030 <ft_putchar@plt>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_print_middle>:
push   %rbx
mov    %edi,%ebx
mov    $0x7c,%edi
call   1030 <ft_putchar@plt>
cmp    $0x3,%ebx
jl     1144 <ft_print_middle+0x34>
add    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
add    $0xffffffff,%ebx
cmp    $0x3,%ebx
ja     1130 <ft_print_middle+0x20>
jmp    1149 <ft_print_middle+0x39>
cmp    $0x2,%ebx
jne    1153 <ft_print_middle+0x43>
mov    $0x7c,%edi
call   1030 <ft_putchar@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <ft_putchar@plt>

LLVM IR (-O0):
define void @ft_print_middle(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @ft_putchar(i8 signext 124)
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 2
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = call i32 @ft_putchar(i8 signext 32)
%9 = load i32, i32* %2
%10 = add nsw i32 %9, -1
store i32 %10, i32* %2
br label %4
11: ; preds = %4
%12 = load i32, i32* %2
%13 = icmp sgt i32 %12, 1
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 @ft_putchar(i8 signext 124)
br label %16
16: ; preds = %14, %11
%17 = call i32 @ft_putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @ft_print_middle(i32 %0) {
%2 = tail call i32 @ft_putchar(i8 signext 124)
%3 = icmp sgt i32 %0, 2
br i1 %3, label %4, label %9
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ %0, %1 ]
%6 = tail call i32 @ft_putchar(i8 signext 32)
%7 = add nsw i32 %5, -1
%8 = icmp ugt i32 %5, 3
br i1 %8, label %4, label %11
9: ; preds = %1
%10 = icmp eq i32 %0, 2
br i1 %10, label %11, label %13
11: ; preds = %4, %9
%12 = tail call i32 @ft_putchar(i8 signext 124)
br label %13
13: ; preds = %11, %9
%14 = tail call i32 @ft_putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ perror(char *);
int putchar(int);
int Putchar(int c) {
  int result;
  if ((result = putchar(c)) == EOF) {
    perror("(stdout)");
  }
  return (result);
}


x86 assembly (clang, -O0):
<Putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <putchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2eab(%rip),%rcx
cmp    (%rcx),%eax
jne    1151 <Putchar+0x31>
lea    0xeb4(%rip),%rdi
call   1040 <perror@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Putchar>:
push   %rbx
call   1030 <putchar@plt>
mov    %eax,%ebx
mov    0x2eb9(%rip),%rax
cmp    (%rax),%ebx
je     1137 <Putchar+0x17>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xec2(%rip),%rdi
call   1040 <perror@plt>
jmp    1133 <Putchar+0x13>

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

LLVM IR (-O2):
@EOF = global i32 0
@.str = [9 x i8] c"(stdout)\00"
define i32 @Putchar(i32 %0) {
%2 = tail call i32 @putchar(i32 %0)
%3 = load i32, i32* @EOF
%4 = icmp eq i32 %2, %3
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret i32 %2
}
int test_imm_E9uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0xE9 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E9uint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x10,%rdx
and    $0xe9,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_E9uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 15269888
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}